Spec URL: https://belegdol.fedorapeople.org/python-reedsolo.spec SRPM URL: https://belegdol.fedorapeople.org/python-reedsolo-1.5.4-1.fc33.src.rpm Description: A pure-python universal errors-and-erasures Reed-Solomon Codec , based on the wonderful tutorial at wikiversity, written by “Bobmath” and “LRQ3000”. Fedora Account System Username: belegdol
What fun! So I can give you good advice regarding obsolete RPM macros, what releases are you targeting? All Fedoras? Just 33–35? EPEL8? EPEL7?
I am targeting all Fedoras.
I have a large number of small findings, all of which can be easily resolved. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated - The README.rst indicates the software may be used under Public Domain or MIT terms. However, no copyright statement and MIT license text is included, which is a problem since the MIT license requires that text to be reproduced in all copies. See https://github.com/tomerfiliba/reedsolomon/issues/30 and https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_text. For now, the License field should be changed to “Public Domain”. When/if upstream adds MIT license text, change the License field to “Public Domain or MIT” and email the fedora-devel list about the change (https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#License_Changes). - There is a small typo in the description: “Codec ,” should be “Codec,”. - There is no automatic %{description} macro akin to %{summary}, so the package description is literally “%{description}”. The convention for Python packages is something like this: %global common_description %{expand: A pure-python universal errors-and-erasures Reed-Solomon Codec, based on the wonderful tutorial at wikiversity, written by “Bobmath” and “LRQ3000”.} %description %{common_description} […] %description -n python3-%{srcname} %{common_description} - The %python3_pkgversion macro is not needed for Fedora. It is needed for EPEL. Since you are not planning to build for EPEL, please replace all occurences with “3”, e.g.: %package -n python3-%{srcname} Additionally, even if you were packaging for EPEL, %{?!python3_pkgversion:%global python3_pkgversion 3} would not be needed because this macro is defined on all current EPEL and Fedora releases. - Please remove: %{?python_enable_dependency_generator} The Python dependency generator is enabled by default on all supported Fedora releases and EPEL8, and is not available on EPEL7, so this line does nothing in practice. - The python_provide macro is obsolete and should not be used on Fedora. (It is needed on EPEL.) See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_the_py_provides_macro. On Fedora 32, it is replaced by %py_provides; on Fedora 33 and later, it is not needed for packages named python3-FOO where FOO is the name of the importable Python package or module, such as this one. I like to use conditional macros as a reminder to remove the unnecessary macro after Fedora 32 EOL. So %{?python_provide:%python_provide python3-%{srcname}} becomes %if 0%{?fedora} == 32 %py_provides python3-%{srcname} %endif - You should add %doc changelog.txt to the %files section. - The dependency python%{python3_pkgversion}-setuptools which becomes python3-setuptools after removing the unnecessary macro, is better written for Fedora as python3dist(setuptools) - There is no reason not to build the Cython compiled version. See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_packages_using_cython for guidance. You can remove BuildArch: noarch replace all occurences of python3_sitelib with python3_sitearch, add: BuildRequires: python3dist(cython) remove the pre-generated Cython C source by adding in %prep: rm c%{srcname}.c add to %files: %{python3_sitearch}/c%{srcname}.cpython-%{python3_version_nodots}-x86_64-linux-gnu.so and add to the package: %py_provides python3-c%{srcname} - The main source file has a shebang line (and one that uses #!/usr/bin/env, which is forbidden by ) but is not a script. Please remove it in %prep or with a patch. Open an issue and/or PR to remove it upstream (I already did this), and link it in a comment. So, in %prep: # Remove shebang in non-script source # https://github.com/tomerfiliba/reedsolomon/pull/31 sed -r -i '1{/^#!/d}' %{srcname}.py - The package has tests, which are included in the GitHub release tarball but not in the PyPI tarball. You should switch to the GitHub tarball, and run the tests in a %check section. We should not use nose, as upstream does, because it is dead upstream and deprecated in Fedora (https://fedoraproject.org/wiki/Changes/DeprecateNose), but we can run the tests with pytest by adding BuildRequires: python3dist(pytest) and using the %pytest macro. ===== MUST items ===== Generic: [x]: Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [!]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "Unknown or generated", "*No copyright* Public domain Expat License", "*No copyright* Public domain". 10 files have unknown license. Detailed output of licensecheck in /home/reviewer/1925761-python-reedsolo/licensecheck.txt [x]: Package contains no bundled libraries without FPC exception. [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [!]: Macros in Summary, %description expandable at SRPM build time. Note: Macros in: python3-reedsolo (description) [-]: 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 names). [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]: Package is not known to require an ExcludeArch tag. [-]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 20480 bytes in 1 files. [x]: Package complies to the Packaging Guidelines (except as otherwise noted) [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 must own all directories that it creates. [x]: Package does not own files or directories owned by other packages. [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]: Dist tag is present. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package must not depend on deprecated() packages. [x]: Package use %makeinstall only when make install DESTDIR=... doesn't work. [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 %{name}.spec. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local Python: [x]: Python eggs must not download any dependencies during the build process. [x]: A package which is used by another package via an egg interface should provide egg info. [x]: Package meets the Packaging Guidelines::Python (except as otherwise noted) [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 ===== Generic: [!]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. https://github.com/tomerfiliba/reedsolomon/issues/30 [x]: Final provides and requires are sane (see attachments). [?]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. Note: gpgverify is not used. [-]: 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 architectures. [!]: %check is present and all tests pass. [x]: Packages should try to preserve timestamps of original installed files. [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 $RPM_BUILD_ROOT) [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 ===== Generic: [x]: Rpmlint is run on all installed packages. Note: There are rpmlint messages (see attachment). [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: python3-reedsolo-1.5.4-1.fc35.noarch.rpm python-reedsolo-1.5.4-1.fc35.src.rpm python3-reedsolo.noarch: W: unexpanded-macro %description -l C %{description} python3-reedsolo.noarch: W: description-shorter-than-summary python3-reedsolo.noarch: E: non-executable-script /usr/lib/python3.9/site-packages/reedsolo.py 644 /usr/bin/env python python-reedsolo.src: W: spelling-error %description -l en_US wikiversity -> diversity 2 packages and 0 specfiles checked; 1 errors, 3 warnings. Rpmlint (installed packages) ---------------------------- python3-reedsolo.noarch: W: unexpanded-macro %description -l C %{description} python3-reedsolo.noarch: W: description-shorter-than-summary python3-reedsolo.noarch: E: non-executable-script /usr/lib/python3.9/site-packages/reedsolo.py 644 /usr/bin/env python 1 packages and 0 specfiles checked; 1 errors, 2 warnings. Source checksums ---------------- https://files.pythonhosted.org/packages/source/r/reedsolo/reedsolo-1.5.4.tar.gz : CHECKSUM(SHA256) this package : b8b25cdc83478ccb06361a0e8fadc27b376a3dfabbb1dc6bb583a998a22c0127 CHECKSUM(SHA256) upstream package : b8b25cdc83478ccb06361a0e8fadc27b376a3dfabbb1dc6bb583a998a22c0127 Requires -------- python3-reedsolo (rpmlib, GLIBC filtered): python(abi) Provides -------- python3-reedsolo: python-reedsolo python3-reedsolo python3.9-reedsolo python3.9dist(reedsolo) python3dist(reedsolo) Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10 Command line :/usr/bin/fedora-review -b 1925761 Buildroot used: fedora-rawhide-x86_64 Active plugins: Shell-api, Python, Generic Disabled plugins: PHP, Haskell, Ruby, SugarActivity, fonts, Perl, C/C++, R, Java, Ocaml Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
Created attachment 1760418 [details] Example spec file incorporating review feedback For your convenience, I’ve attached a spec file that should incorporate all of my review feedback. Please feel free to use it as-is, modify it to your liking, or discard it and implement any needed changes yourself.
Thanks for the review and sorry about the issues, I adapted the spec generated by rpmdev-newspec. Looks like it needs an update. New files: Spec URL: https://belegdol.fedorapeople.org/python-reedsolo.spec SRPM URL: https://belegdol.fedorapeople.org/python-reedsolo-1.5.4-3.fc33.src.rpm Changelog: - Add changelog.txt to %%doc - Add gcc to BuildRequires
Thanks! Approved. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated ===== MUST items ===== C/C++: [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. These are Python extension modules in the correct location. There is no problem here. Generic: [x]: Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [x]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "Unknown or generated", "*No copyright* Public domain". 12 files have unknown license. Detailed output of licensecheck in /home/reviewer/1925761-python-reedsolo/20210304/1925761-python- reedsolo/licensecheck.txt [x]: License file installed when any subpackage combination is installed. [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 names). [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. [-]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 30720 bytes in 2 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 must own all directories that it creates. [x]: Package does not own files or directories owned by other packages. [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 does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package must not depend on deprecated() packages. [x]: Package use %makeinstall only when make install DESTDIR=... doesn't work. [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 %{name}.spec. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local Python: [x]: Python eggs must not download any dependencies during the build process. [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 ===== Generic: [-]: 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 python3-reedsolo [x]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. Note: gpgverify is not used. [-]: 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 architectures. [x]: %check is present and all tests pass. [x]: Packages should try to preserve timestamps of original installed files. [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 $RPM_BUILD_ROOT) [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 ===== Generic: [!]: Spec file according to URL is the same as in SRPM. Note: Spec file as given by url is not the same as in SRPM (see attached diff). See: (this test has no URL) The SRPM was built before you added the changelog entry about putting GCC in the BuildRequires. Either version is approved. [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. Rpmlint ------- Checking: python3-reedsolo-1.5.4-3.fc35.x86_64.rpm python-reedsolo-debugsource-1.5.4-3.fc35.x86_64.rpm python-reedsolo-1.5.4-3.fc35.src.rpm python3-reedsolo.x86_64: W: spelling-error %description -l en_US wikiversity -> diversity python-reedsolo.src: W: spelling-error %description -l en_US wikiversity -> diversity 3 packages and 0 specfiles checked; 0 errors, 2 warnings. Rpmlint (installed packages) ---------------------------- python3-reedsolo.x86_64: W: spelling-error %description -l en_US wikiversity -> diversity 2 packages and 0 specfiles checked; 0 errors, 1 warnings. Unversioned so-files -------------------- python3-reedsolo: /usr/lib64/python3.9/site-packages/creedsolo.cpython-39-x86_64-linux-gnu.so Source checksums ---------------- https://github.com/tomerfiliba/reedsolomon/archive/v1.5.4.tar.gz : CHECKSUM(SHA256) this package : cbe74633d1e3ff0f3b9c44fac06dff3355c622e93d4a0cd85116c909932af665 CHECKSUM(SHA256) upstream package : cbe74633d1e3ff0f3b9c44fac06dff3355c622e93d4a0cd85116c909932af665 Requires -------- python3-reedsolo (rpmlib, GLIBC filtered): libc.so.6()(64bit) python(abi) rtld(GNU_HASH) python-reedsolo-debugsource (rpmlib, GLIBC filtered): Provides -------- python3-reedsolo: python-creedsolo python-reedsolo python3-creedsolo python3-reedsolo python3-reedsolo(x86-64) python3.9-creedsolo python3.9-reedsolo python3.9dist(reedsolo) python3dist(reedsolo) python-reedsolo-debugsource: python-reedsolo-debugsource python-reedsolo-debugsource(x86-64) Diff spec file in url and in SRPM --------------------------------- --- /home/reviewer/1925761-python-reedsolo/20210304/1925761-python-reedsolo/srpm/python-reedsolo.spec 2021-03-04 07:56:04.883305290 -0500 +++ /home/reviewer/1925761-python-reedsolo/20210304/1925761-python-reedsolo/srpm-unpacked/python-reedsolo.spec 2021-03-03 15:25:14.000000000 -0500 @@ -63,5 +63,4 @@ * Wed Mar 03 2021 Julian Sikorski <belegdol> - 1.5.4-3 - Add changelog.txt to %%doc -- Add gcc to BuildRequires * Wed Mar 03 2021 Benjamin A. Beasley <code> - 1.5.4-2 Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10 Command line :/usr/bin/fedora-review -b 1925761 Buildroot used: fedora-rawhide-x86_64 Active plugins: Python, Shell-api, Generic Disabled plugins: R, Perl, Ocaml, Ruby, Java, Haskell, PHP, C/C++, fonts, SugarActivity Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/python-reedsolo
Do you know how to deal with cython binaries naming? I tried using both %{arch} and an asterisk, but armv7hl still fails to build: https://koji.fedoraproject.org/koji/taskinfo?taskID=63157625
I have now solved the problem by replacing more of the filename with wildcards, if you know a better way, please let me know.
That’s what I would have done too!
After all, it’s not like the looser glob is going to match anything unexpected in practice.
FEDORA-2021-8414a74427 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-8414a74427
FEDORA-2021-d2cfe9bac0 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-d2cfe9bac0
FEDORA-2021-ccbccd6789 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-ccbccd6789
FEDORA-2021-8414a74427 has been pushed to the Fedora 32 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-8414a74427 \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-8414a74427 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-ccbccd6789 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-ccbccd6789 \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-ccbccd6789 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-d2cfe9bac0 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-d2cfe9bac0 \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-d2cfe9bac0 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-8414a74427 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-ccbccd6789 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-d2cfe9bac0 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.