commit fbeecc8df40438335731d8351707db0018799304 Author: Adrian Schröter Date: Fri Dec 22 10:27:21 2023 +0100 Sync from SUSE:ALP:Source:Standard:1.0 python-passlib revision 735b51c4e2d8828a9b0bc363525f73a9 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..83bd4e9 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/no-pkg_resources.patch b/no-pkg_resources.patch new file mode 100644 index 0000000..e3801d7 --- /dev/null +++ b/no-pkg_resources.patch @@ -0,0 +1,30 @@ +Index: passlib-1.7.4/passlib/pwd.py +=================================================================== +--- passlib-1.7.4.orig/passlib/pwd.py ++++ passlib-1.7.4/passlib/pwd.py +@@ -13,8 +13,8 @@ except ImportError: + from collections import MutableMapping + from math import ceil, log as logf + import logging; log = logging.getLogger(__name__) +-import pkg_resources + import os ++import sys + # site + # pkg + from passlib import exc +@@ -122,7 +122,14 @@ def _open_asset_path(path, encoding=None + if not sep: + raise ValueError("asset path must be absolute file path " + "or use 'pkg.name:sub/path' format: %r" % (path,)) +- return pkg_resources.resource_stream(package, subpath) ++ if sys.version_info >= (3, 9): ++ # We can use the new and shiny importlib.resources ++ import importlib.resources ++ return importlib.resources.files(package).joinpath(subpath).open('rb') ++ else: ++ # Fallback to pkg_resources ++ import pkg_resources ++ return pkg_resources.resource_stream(package, subpath) + + + #: type aliases diff --git a/passlib-1.7.4.tar.gz b/passlib-1.7.4.tar.gz new file mode 100644 index 0000000..f2e5bae --- /dev/null +++ b/passlib-1.7.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04 +size 689844 diff --git a/python-passlib.changes b/python-passlib.changes new file mode 100644 index 0000000..94193f5 --- /dev/null +++ b/python-passlib.changes @@ -0,0 +1,246 @@ +------------------------------------------------------------------- +Thu Aug 3 06:29:11 UTC 2023 - Steve Kowalik + +- Add patch no-pkg_resources.patch: + * Stop using pkg_resources. +- Switch to pyproject macros. + +------------------------------------------------------------------- +Tue May 9 13:39:14 UTC 2023 - Johannes Kastl + +- add sle15_python_module_pythons + +------------------------------------------------------------------- +Fri Jan 28 12:36:46 UTC 2022 - Matej Cepl + +- The disaster of falling tests (see previous record in this + changelog for URL) just continues with test_02_handler_wrapper. + +------------------------------------------------------------------- +Fri Aug 6 14:01:31 UTC 2021 - Matej Cepl + +- Skip failing tests and ask upstream for investigation + (https://foss.heptapod.net/python-libs/passlib/-/issues/135). + +------------------------------------------------------------------- +Thu Jan 28 13:47:51 UTC 2021 - Matej Cepl + +- OpenLeap is not SLE + +------------------------------------------------------------------- +Thu Jan 28 08:50:11 UTC 2021 - Antonio Larrosa + +- Use _multibuild to only have the test dependencies as + buildrequires of the test build. +- Have optional test dependencies (Django and scrypt) that are not + available in SLE only be buildrequired in TW. + +------------------------------------------------------------------- +Sat Nov 21 00:01:52 UTC 2020 - John Vandenberg + +- Update URL to https://foss.heptapod.net/python-libs/passlib +- Add optional dependencies: Django, apache2-utils +- Update %check to report skipped tests +- Update to v0.7.4 + * updated tests to pass for Django 1.8 - 3.1 + * CryptContext will now throw UnknownHashError when it can't + identify a hash provided to methods such as CryptContext.verify + Previously it would throw a generic :exc:`ValueError`. +- from v1.7.3 + * ldap_salted_sha512 LDAP "salted hash" support added for SHA-256 + and SHA-512 + * bcrypt: Fixed Python 3 OS native backend detection on BSD platforms + * safe_crypt added support for crypt.crypt unexpectedly returning + bytes under Python 3 + * safe_crypt added support for crypt.crypt throwing OSError + which can happen as of Python 3.9 + * passlib.ext.django fixed lru_cache import for Django 3 compatibility + * bcrypt_sha256 Internal algorithm has been changed to use HMAC-SHA256 + instead of plain SHA256 + * bcrypt OS native backend ("os_crypt") now raises the new + PasswordValueError if password is provided as non-UTF8 bytes + * lookup_hash's required=False kwd was modified to report unsupported + hashes via the HashInfo.supported attribute; rather than letting + ValueErrors through uncaught. + * Various Python 3.9 compatibility fixes + +------------------------------------------------------------------- +Thu Sep 24 17:34:01 UTC 2020 - Hans-Peter Jansen + +- Add optional dependencies: bcrypt, argon2_cffi, cryptography + and scrypt. + +------------------------------------------------------------------- +Tue Jun 9 06:39:47 UTC 2020 - Marketa Calabkova + +- replace nose with pytest + +------------------------------------------------------------------- +Wed Jan 1 22:15:42 UTC 2020 - Michael Ströder + +- Removed obsolete patches: + * python-passlib-1.7.1-libxcrypt-compat.patch + * pr_9_1.patch and pr_9_2.patch +- Update to 1.7.2 + * New Features + - argon2: Now supports Argon2 “ID” and “D” hashes + (assuming new enough backend library). + - scrypt: Now uses python 3.6 stdlib’s hashlib.scrypt() as backend, + if present (issue 86). + + * Bugfixes + - Python 3.8 compatibility fixes + - passlib.apache.HtpasswdFile: + Now generates bcrypt hashes using the "$2y$" prefix, which should work + properly with Apache 2.4’s htpasswd tool. + - passlib.totp: The TOTP.to_uri() method now prepends the issuer to URI label, + (per the KeyURI spec). This should fix some compatibility issues with + older TOTP clients (issue 92) + - Fixed error in argon2.parsehash() (issue 97) + - unittests: crypt() unittests now account for linux systems running + libxcrypt (such as recent Fedora releases) + +------------------------------------------------------------------- +Thu Oct 3 15:09:46 UTC 2019 - John Vandenberg + +- Add two patches to fix Python 3.8 compatibility + * pr_9_1.patch and pr_9_2.patch + +------------------------------------------------------------------- +Mon Mar 18 10:46:39 UTC 2019 - Tomáš Chvátal + +- Add patch to fix libxcrypt compatibility: + * python-passlib-1.7.1-libxcrypt-compat.patch + +------------------------------------------------------------------- +Sat Mar 2 15:20:20 UTC 2019 - Tomáš Chvátal + +- Do not use symlinks when creating fdupes + +------------------------------------------------------------------- +Wed Dec 19 00:03:58 UTC 2018 - Jan Engelhardt + +- Use noun phrase in summary. Trim filler wording from description. + +------------------------------------------------------------------- +Tue Dec 4 12:51:16 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Sat Apr 22 16:44:52 UTC 2017 - aloisio@gmx.com + +- Converted to single-spec +- Enabled tests + +------------------------------------------------------------------- +Tue Jan 31 15:08:14 UTC 2017 - michael@stroeder.com + +- Update to 1.7.1 + +------------------------------------------------------------------- +Sun Jan 22 11:18:59 UTC 2017 - michael@stroeder.com + +- updated project and source URLs + +------------------------------------------------------------------- +Sat Nov 26 15:40:04 UTC 2016 - michael@stroeder.com + +- Update to 1.7.0 with very many changes: + http://passlib.readthedocs.io/en/stable/history/1.7.html#id1 +- CHANGES not in upstream source anymore + +------------------------------------------------------------------- +Sun Feb 21 10:06:22 UTC 2016 - mardnh@gmx.de + +- Update to 1.6.5: + * Fixed some minor bugs in the test suite which were causing erroneous + test failures + +- Update to 1.6.4: + * bugfix: Correctly detect bcrypt 2.0. + * bugfix: CryptContext now accepts scheme names as unicode + * bugfix: :mod:`passlib.ext.django` now works correctly with Django 1.7-1.8. + * bugfix: :class:`passlib.apache.HtpasswdFile` now recognizes bcrypt, + sha256_crypt, sha512_crypt hashes + + * A few changes have been made to the :class:`~passlib.hash.bcrypt` hash: + + It now supports the ``$2b$`` hash format. + + It will now issue a :exc:`~passlib.exc.PasslibSecurityWarning` if the active + backend is vulnerable to the :ref:`wraparound bug `, + and automatically enable a workaround(py-bcrypt is known to be vulnerableas of v0.4). + + It will throw a :exc:`~passlib.exc.PasslibSecurityError` if the active backend + is vulnerable to the :ref:`8-bit bug ` (none of Passlib's + backends are known to be vulnerable as of 2015-07). + + Updated documentation to indicate the cffi-based + `bcrypt `_ library is now the recommended + bcrypt backend. + + Backend capability detection code refactored to rely on runtime detection + rather than hardcoded information. + + Release **1.6.3** was skipped due to upload issues. + +------------------------------------------------------------------- +Mon Jan 13 14:00:00 UTC 2014 - dmueller@suse.com + +- update to 1.6.2: + * Re-tuned the :attr:`~passlib.ifc.PasswordHash.default_rounds` values for all of the hashes. + * Added the new :doc:`bcrypt_sha256 ` hash, + which wraps BCrypt using SHA256 in order to work around BCrypt's password size limitations + * :doc:`passlib.hash.bcrypt `: + Added support for the `bcrypt `_ + +------------------------------------------------------------------- +Thu Oct 24 11:09:44 UTC 2013 - speilicke@suse.com + +- Require python-setuptools instead of distribute (upstreams merged) + +------------------------------------------------------------------- +Tue Feb 5 13:10:42 UTC 2013 - saschpe@suse.de + +- Drop testsuite again, has strange issues + +------------------------------------------------------------------- +Sat Sep 8 21:58:41 UTC 2012 - os-dev@jacraig.com + +- Update to 1.6.1: + * bugfix: Various CryptContext methods would incorrectly raise TypeError + if passed a unicode user category under Python 2. For consistency, + unicode user category values are now encoded to ``utf-8`` bytes under + Python 2. + * bugfix: Reworked internals of the CryptContext config compiler to fix a + couple of border cases (issue 39), see CHANGES for details. + * bugfix: FreeBSD 8.3 added native support for hash.sha256_crypt -- updated + Passlib's unittests and documentation accordingly (issue 35). + * bugfix: Fixed bug which caused passlib.apache unittest to fail if mtime + resolution >= 1 second (issue 35). + * Various bugfixes for Python 3.3 compatibility. + * Various documentation updates and corrections. + +------------------------------------------------------------------- +Fri Jun 15 04:57:41 UTC 2012 - os-dev@jacraig.com + +- Update to 1.6: tons of changes including deprecated API, features and fixes; + see CHANGES. + +------------------------------------------------------------------- +Thu Mar 8 11:34:03 UTC 2012 - saschpe@suse.de + +- Don't run testsuite on SLE, fixes build + +------------------------------------------------------------------- +Tue Jan 31 10:38:52 UTC 2012 - saschpe@suse.de + +- Fix macro usage and remove reST from description + +------------------------------------------------------------------- +Tue Nov 29 09:26:22 UTC 2011 - saschpe@suse.de + +- SPDX-style license string (BSD-3-Clause) +- Package CHANGES, README, LICENSE +- Run testsuite + +------------------------------------------------------------------- +Mon Oct 24 12:26:26 UTC 2011 - cthiel@suse.com + +- initial package (version 1.5.3) + diff --git a/python-passlib.spec b/python-passlib.spec new file mode 100644 index 0000000..e698649 --- /dev/null +++ b/python-passlib.spec @@ -0,0 +1,96 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define skip_python2 1 +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif + +%{?sle15_python_module_pythons} +Name: python-passlib%{psuffix} +Version: 1.7.4 +Release: 0 +Summary: Password hashing framework supporting over 20 schemes +License: BSD-3-Clause +URL: https://foss.heptapod.net/python-libs/passlib +Source: https://files.pythonhosted.org/packages/source/p/passlib/passlib-%{version}.tar.gz +# PATCH-FIX-OPENSUSE Posted to https://foss.heptapod.net/python-libs/passlib/-/issues/185 +Patch0: no-pkg_resources.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%if %{with test} +BuildRequires: %{python_module argon2_cffi} +BuildRequires: %{python_module bcrypt} +BuildRequires: %{python_module cryptography} +BuildRequires: %{python_module pytest} +%if 0%{?suse_version} >= 1550 || 0%{?is_opensuse} +BuildRequires: %{python_module Django} +BuildRequires: %{python_module scrypt} +%endif +BuildRequires: apache2-utils +%endif +Recommends: python-argon2_cffi +Recommends: python-bcrypt +Recommends: python-cryptography +Recommends: python-scrypt +BuildArch: noarch +%python_subpackages + +%description +Passlib is a password hashing library for Python 2 & 3. It provides +implementations of over 20 password hashing algorithms, as well as a +framework for managing existing password hashes. It can verify hashes +found in %{_sysconfdir}/shadow, and provide password hashing for +applications. + +%prep +%autosetup -p1 -n passlib-%{version} + +%build +%pyproject_wheel + +%install +%if !%{with test} +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with test} +# https://foss.heptapod.net/python-libs/passlib/-/issues/135 for the +# skipped tests. +%pytest -rs -k 'not (test_available_schemes or test_available_schemes or test_default_algorithm or test_empty_hash_value or test_empty_password or test_extension_config or test_invalid_hash_values or test_none_hash_value or test_unusable_flag or test_00_patch_control or test_01_overwrite_detection or test_12_config_presets or test_13_config_defaults or test_21_category_setting or test_02_handler_wrapper)' +%endif + +%if !%{with test} +%files %{python_files} +%license LICENSE +%doc README +%{python_sitelib}/passlib +%{python_sitelib}/passlib-%{version}.dist-info +%endif + +%changelog