Bug 1719957 - Review Request: python-pycryptodome - self-contained Python package of low-level cryptographic primitives
Summary: Review Request: python-pycryptodome - self-contained Python package of low-l...
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2019-06-12 19:49 UTC by Pavlo Rudyi
Modified: 2020-01-31 18:21 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-01-31 18:21:33 UTC
Type: ---
zebob.m: fedora-review+

Attachments (Terms of Use)

Description Pavlo Rudyi 2019-06-12 19:49:56 UTC
Spec URL: https://gist.github.com/paulcarroty/5cceff6b0abf8b55c73c9e5cb5145213#file-python-pycryptodome-spec
SRPM URL: https://copr-be.cloud.fedoraproject.org/results/paulcarroty/gnome-passwordsafe/fedora-30-x86_64/00928954-python-pycryptodome/python-pycryptodome-3.8.2-1.fc30.src.rpm
Description: PyCryptodome is a self-contained Python package of low-level
cryptographic primitives.
Fedora Account System Username: paulcarroty

Comment 1 Robert-André Mauchin 🐧 2019-06-13 16:41:28 UTC
 - You need to include changelog entries


Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz


Source0:  %{pypi_source}

 - License field is not correct:

License: BSD and Public Domain and ASL 2.0

  Add a comment explaining the license breakdown too

 - Just include:

%doc AUTHORS.rst Changelog.rst README.rst
%license LICENSE.rst

 - Use system libtomcrypt by stealing this patch: https://src.fedoraproject.org/rpms/python-pycryptodomex/blob/master/f/python-pycryptodomex-3.7.3-use_external_libtomcrypt.patch

 And in %prep:

# Drop bundled libraries
rm -r src/libtom/

 With BR:

BuildRequires:  libtomcrypt-devel

 - Add gmp Requires for Py3 subpackage:

# GMP library is dl-opened
Requires:       gmp%{?_isa}

 - Remove shebang:

# Remove shebang
sed '1{\@^#! /usr/bin/env python@d}' lib/Crypto/SelfTest/__main__.py >lib/Crypto/SelfTest/__main__.py.new && \
touch -r lib/Crypto/SelfTest/__main__.py lib/Crypto/SelfTest/__main__.py.new && \
mv lib/Crypto/SelfTest/__main__.py.new lib/Crypto/SelfTest/__main__.py

Package Review

[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed

- Package does not contain duplicates in %files.
  Note: BUILDSTDERR: warning: File listed twice:
  See: https://docs.fedoraproject.org/en-US/packaging-

===== MUST items =====

[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "BSD 2-clause "Simplified" License",
     "*No copyright* BSD (unspecified)", "*No copyright* Public domain",
     "*No copyright* Public domain BSD (unspecified)", "BSD (unspecified)",
     "*No copyright* GNU General Public License". 513 files have unknown
     license. Detailed output of licensecheck in
[x]: License file installed when any subpackage combination is installed.
[x]: Package does not own files or directories owned by other packages.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 3 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

[x]: Python eggs must not download any dependencies during the build
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.

Checking: python3-pycryptodome-3.8.2-1.fc31.x86_64.rpm
python3-pycryptodome.x86_64: W: spelling-error Summary(en_US) Cryptographic -> Cryptography, Cryptographer, Crystallographic
python3-pycryptodome.x86_64: E: no-changelogname-tag
python3-pycryptodome.x86_64: W: invalid-license BSD, Public Domain, Apache
python3-pycryptodome.x86_64: E: zero-length /usr/lib64/python3.7/site-packages/Crypto/Cipher/__init__.pyi
python3-pycryptodome.x86_64: E: zero-length /usr/lib64/python3.7/site-packages/Crypto/Hash/__init__.pyi
python3-pycryptodome.x86_64: E: zero-length /usr/lib64/python3.7/site-packages/Crypto/PublicKey/__init__.pyi
python3-pycryptodome.x86_64: E: non-executable-script /usr/lib64/python3.7/site-packages/Crypto/SelfTest/PublicKey/test_vectors/ECC/gen_ecc_p256.sh 644 /bin/sh 
python3-pycryptodome.x86_64: E: non-executable-script /usr/lib64/python3.7/site-packages/Crypto/SelfTest/PublicKey/test_vectors/ECC/gen_ecc_p384.sh 644 /bin/sh 
python3-pycryptodome.x86_64: E: non-executable-script /usr/lib64/python3.7/site-packages/Crypto/SelfTest/PublicKey/test_vectors/ECC/gen_ecc_p521.sh 644 /bin/sh 
python3-pycryptodome.x86_64: E: wrong-script-interpreter /usr/lib64/python3.7/site-packages/Crypto/SelfTest/__main__.py /usr/bin/env python
python3-pycryptodome.x86_64: E: non-executable-script /usr/lib64/python3.7/site-packages/Crypto/SelfTest/__main__.py 644 /usr/bin/env python
python3-pycryptodome.x86_64: E: zero-length /usr/lib64/python3.7/site-packages/Crypto/py.typed
python-pycryptodome-debugsource.x86_64: E: no-changelogname-tag
python-pycryptodome-debugsource.x86_64: W: invalid-license BSD, Public Domain, Apache
python-pycryptodome.src: W: spelling-error Summary(en_US) Cryptographic -> Cryptography, Cryptographer, Crystallographic
python-pycryptodome.src: E: no-changelogname-tag
python-pycryptodome.src: W: invalid-license BSD, Public Domain, Apache
3 packages and 0 specfiles checked; 12 errors, 5 warnings.

Comment 3 Robert-André Mauchin 🐧 2019-06-14 14:42:57 UTC
 - Your changelog entry must include Version-Release info:

* Fri Jun 14 2019 Pavlo Rudyi <paulcarroty@fedoraproject.org> - 3.8.2-1

Comment 4 Robert-André Mauchin 🐧 2019-06-14 14:44:14 UTC
 - This must be included in the Py 3 subpackages, not the main one:

# GMP library is dl-opened
Requires: gmp%{?_isa}

Comment 5 Pavlo Rudyi 2019-06-14 15:44:24 UTC

Comment 6 Robert-André Mauchin 🐧 2019-06-14 15:51:00 UTC
Package approved.

Comment 7 Robert-André Mauchin 🐧 2019-09-22 15:48:31 UTC
Refreshing flag.

Comment 8 Gwyn Ciesla 2019-09-23 13:12:59 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-pycryptodome

Comment 9 Mohamed El Morabity 2019-09-23 13:50:24 UTC
Actually this package is already available in the Fedora repos: I'm maintaining python-pycryptodomex for months.
pycryptodomex is *exactly* the same as pycryptodome (same sources, same upstream team). As recommended upstream, the difference is that the "x" suffix ensures there is no conflict with the pycrypto library (python-crypto package in Fedora). And python-cryptodome *conflicts* with python-crypto.

Comment 10 Kevin Fenzi 2019-09-27 22:52:50 UTC
The conflict with python-crypto broke rawhide composes. ;( 

See https://bugzilla.redhat.com/show_bug.cgi?id=1756505

I'm going to untag it from rawhide for now...

Comment 11 Elliott Sales de Andrade 2019-09-28 00:57:53 UTC
I don't understand; this is a duplicate review request to bug 1750765, which was opened by atim, who is *also* admin of this accepted package. How did you somehow open duplicate reviews without notifying each other, and then still become mutual admin? And if instead, you worked together to continue the package request, why didn't you mention it on the previous bug?

Comment 12 Elliott Sales de Andrade 2019-11-19 03:40:40 UTC
So according to bug 1750765, this isn't needed; should it be retired since it's just going to cause conflicts on the next rebuild?

Comment 13 Kevin Fenzi 2020-01-31 18:21:33 UTC
I have retired this package.

Note You need to log in before you can comment on or make changes to this bug.