commit ba6b1df3cd33ce41ec91bd66c31934a42c8a2e381c8e62771521243fa8dac328 Author: Nico Krapp Date: Mon Aug 25 06:58:23 2025 +0000 use poetry-core to instead of poetry OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libnacl?expand=0&rev=55 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /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/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/libnacl-2.1.0.tar.gz b/libnacl-2.1.0.tar.gz new file mode 100644 index 0000000..0d6d36b --- /dev/null +++ b/libnacl-2.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bef42f811f5c8d2509a34efd64e9028b223aa06fb52127cd4dad9301edde6f5 +size 46400 diff --git a/python-libnacl.changes b/python-libnacl.changes new file mode 100644 index 0000000..64d876f --- /dev/null +++ b/python-libnacl.changes @@ -0,0 +1,222 @@ +------------------------------------------------------------------- +Fri Aug 22 09:03:41 UTC 2025 - Max Lin + +- Use BuildRequires: poetry-core to instead of BuildRequires: poetry + +------------------------------------------------------------------- +Wed Jun 12 09:50:00 UTC 2024 - Dirk Müller + +- update to libsodium26 + +------------------------------------------------------------------- +Fri Mar 1 03:20:14 UTC 2024 - Steve Kowalik + +- Update to 2.1.0: + * Added classes to the libnacl.aead module allowing for the use of + XChaCha20-Poly1305-IETF, ChaCha20-Poly1305-IETF, and AES256-GCM. + * Added the libnacl.kx module. This module contains the ExchangeKey class. +- Switch to autosetup and pyproject macros. +- Drop patch crypto_kdf_derive.patch, no longer required. + +------------------------------------------------------------------- +Wed Jul 5 08:28:58 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Fri Jun 11 22:36:47 UTC 2021 - Niels Abspoel + +- add crypto_kdf_derive.patch to fix crypto_kdf_derive_from_key() on 32-bit platforms + +------------------------------------------------------------------- +Thu Feb 18 20:17:07 UTC 2021 - Niels Abspoel + +- Revert libsodium requirement back to libsodium23 + +------------------------------------------------------------------- +Mon Feb 1 23:12:44 UTC 2021 - Niels Abspoel + +- Update to 1.7.2 +* remove encoding parameter json.loads for python 3.9 compatibility +* implement functions for equal-comparison and hashing keys +* improved spec file + +------------------------------------------------------------------- +Tue Mar 3 13:12:32 UTC 2020 - Ondřej Súkup + +- update to 1.7.1 + * Bindings for kdf in libsodium + * Added extra key validation + * Add Crypto_box_easy + +------------------------------------------------------------------- +Mon Oct 14 13:59:30 UTC 2019 - Matej Cepl + +- Replace %fdupes -s with plain %fdupes; hardlinks are better. + +------------------------------------------------------------------- +Fri Aug 10 13:47:38 UTC 2018 - tchvatal@suse.com + +- Fix the libsodium dependency on the runtime to be copied by macros +- Install license file + +------------------------------------------------------------------- +Fri Dec 22 10:33:56 UTC 2017 - adrian@suse.de + +- update to version 1.6.1 from github +- drop obsolete patch libnacl-1.4.4-libsodium18.patch +- enable python3 builds + +------------------------------------------------------------------- +Wed Apr 13 17:36:30 UTC 2016 - zaitor@opensuse.org + +- Add conditional pkgconfig(libsodium) BuildRequires for all + openSUSE versions newer than 13.1. + +------------------------------------------------------------------- +Thu Jan 14 13:07:31 UTC 2016 - dmacvicar@suse.de + +- remove the escaped epoch to prevent the build service to + auto replace it and break the macro. + +------------------------------------------------------------------- +Thu Jan 14 09:31:03 UTC 2016 - dmacvicar@suse.de + +- Add libnacl-1.4.4-libsodium18.patch to find libsodium 1.0.8 +- Fix BuildRequires to avoid building with a newer version + of libsodium than 1.0.8 + +------------------------------------------------------------------- +Mon Jan 4 20:13:15 UTC 2016 - aboe76@gmail.com + +- Updated to 1.4.4 + - Add pack_nonce options to secretbox + libnacl secretbox has been packing the nonce in each message, + the new pack_nonce option allows for the nonce to be omitted + which allows for more flexible options + - Add soversion 17 detection + Added explicit soversion support for libsodium 17 + - Fix crypto_onetimeauth tests + The crypto onetimeauth test issues have been resolved + - Remove tweetnacl Support + The tweetnacl support was never really tested, and since the + tweetnacl api is not complete we have removed support for it + - Add sodium_init calls + Added calls to sodium_init when the lib is loaded + - packaging: + - New BuildRequirement python-setuptools + - Updated the description + - Removed the patch for soname: libnacl-1.4.3_bump_libsodium_soversion.patch + not needed anymore + +------------------------------------------------------------------- +Thu Nov 19 17:04:26 UTC 2015 - mrueckert@suse.de + +- no longer build as noarch package, while the code is still + noarch. we actually depend on the native library at runtime. To + be able to make this work properly we need to require that native + library, that native requires makes us arch dependent. + +------------------------------------------------------------------- +Thu Nov 19 16:28:31 UTC 2015 - mrueckert@suse.de + +- make sure we require the libsodium version we were built with + +------------------------------------------------------------------- +Thu Nov 19 16:08:47 UTC 2015 - mrueckert@suse.de + +- fix libsodium loading on Tumbleweed: soversion was bumped to 17 + reported as https://github.com/saltstack/libnacl/pull/60 + + adds libnacl-1.4.3_bump_libsodium_soversion.patch + +------------------------------------------------------------------- +Thu Jun 11 20:39:13 UTC 2015 - aboe76@gmail.com + +- Updated to 1.4.3 +- crypto_onetimeauth_verify fixes + + Fix a call to the crypto_onetimeauth_verify routine into the right libsodium system + + Add tests for crypto_onetimeauth_verify +- Add support for reading file streams for key loading + +------------------------------------------------------------------- +Tue Mar 17 18:42:08 UTC 2015 - aboe76@gmail.com + +- Updated to 1.4.2 + + Add support to save and load SecretBox keys + +------------------------------------------------------------------- +Thu Feb 19 18:50:58 UTC 2015 - aboe76@gmail.com + +- Updated to 1.4.1 + + Fix for crypto_auth_verify and crypto_auth_onetimeverify + + Lint fixes and updates + +------------------------------------------------------------------- +Mon Nov 3 19:35:19 UTC 2014 - aboe76@gmail.com + +- Updated to 1.4.0 + + Initial support has been added for the blake2b hash algorithm + + Fix issue with keyfile saves on windows + + Fix libsodium detection for Ubuntu manual installs and Windows dll detection + +------------------------------------------------------------------- +Thu Oct 2 20:43:02 UTC 2014 - aboe76@gmail.com + +- Small update to 1.3.6 + + Restrict library load to specific supported libsodium versions + + fix randombytes functions + +------------------------------------------------------------------- +Tue Sep 9 21:14:30 UTC 2014 - aboe76@gmail.com + +- Updated to 1.3.5 + + only updates for py3 + +------------------------------------------------------------------- +Tue Sep 2 17:28:35 UTC 2014 - aboe76@gmail.com + +- Updated to 1.3.4 + + Fixed issue and add tests for bug where saving and loading a signing key caused a stack trace, se issue #18 + + Change the default ctype values to be more accurate and efficient + + Update soname detection on Linux for libsodium 0.7.0 + + Make soname detection a little more future proof + +------------------------------------------------------------------- +Thu Aug 14 18:57:32 UTC 2014 - aboe76@gmail.com + +- Updated to 1.3.2: + + Add detection of the libsodium.so.10 lib created by libsodium 0.6 + +------------------------------------------------------------------- +Wed Jul 30 19:04:29 UTC 2014 - aboe76@gmail.com + +- Updated to 1.2.0 +his release introduces the DualKey class, secure key saving and loading, +as well as enhancements to the time_nonce function. + +Dual Key Class +Dual Keys are classes which can encrypt and sign data. These classes generate +and maintain both Curve25519 and Ed25519 keys, as well as all methods for both encryption and signing. + +Time Nonce Improvements +The original time nonce routine used the first 20 chars of the 24 char nonce for the microsecond +timestamp (based on salt's jid), leaving 4 chars for random data. This new nonce uses far fewer +chars for the timestamp by hex encoding the float of microseconds into just 13 chars, +leaving 11 chars of random data. This makes the default nonce safer and more secure.on. + +------------------------------------------------------------------- +Wed Jul 2 18:28:08 UTC 2014 - aboe76@gmail.com + +- Updated to 1.1.0 + +------------------------------------------------------------------- +Fri Jun 20 15:10:52 UTC 2014 - aboe76@gmail.com + +- Simplified BuildRequirements to libsodium-devel + +------------------------------------------------------------------- +Mon Jun 9 10:53:12 UTC 2014 - aboe76@gmail.com + +- initial package + diff --git a/python-libnacl.spec b/python-libnacl.spec new file mode 100644 index 0000000..227ff38 --- /dev/null +++ b/python-libnacl.spec @@ -0,0 +1,65 @@ +# +# spec file for package python-libnacl +# +# Copyright (c) 2024 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-libnacl +Version: 2.1.0 +Release: 0 +Summary: Python bindings for libsodium based on ctypes +License: Apache-2.0 +URL: https://github.com/saltstack/libnacl +Source0: https://github.com/saltstack/libnacl/archive/v%{version}.tar.gz#/libnacl-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module poetry-core} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: pkgconfig(libsodium) +# This will need updating and verification but smart magic is not copied by +# singlespec macros +Requires: libsodium26 +BuildArch: noarch +%python_subpackages + +%description +This library is used to gain direct access to the functions exposed by Daniel J. Bernstein's nacl library via libsodium. +It has been constructed to maintain extensive documentation on how to use nacl as well as being completely portable. The file +in libnacl/__init__.py can be pulled out and placed directly in any project to give a single file binding to all of nacl. + +%prep +%autosetup -p1 -n libnacl-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}/%{$python_sitelib} + +%check +%python_expand $python tests/runtests.py + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/libnacl +%{python_sitelib}/libnacl-%{version}.dist-info + +%changelog