https://bugzilla.redhat.com/show_bug.cgi?id=1540335
Bug ID: 1540335 Summary: Review Request: primesieve - Fast C/C++ prime number generator Product: Fedora Version: rawhide Component: Package Review Severity: medium Assignee: nobody@fedoraproject.org Reporter: kim.walisch@gmail.com QA Contact: extras-qa@fedoraproject.org CC: package-review@lists.fedoraproject.org
Spec URL: https://github.com/kimwalisch/primesieve-rpm/blob/master/primesieve.spec SRPM URL: https://github.com/kimwalisch/primesieve-rpm/raw/master/primesieve-6.4-1.fc2...
Description: primesieve is a command-line program and C/C++ library for generating prime numbers and prime k-tuplets (twin primes, prime triplets, ...). The primesieve program is mainly used by students interested in primes and by Overclockers for stress testing their CPU (e.g. primesieve has been integrated into the phoronix test suite).
The C/C++ primesieve library is mostly used by students and research scientists for speeding up their C/C++ math programs. primesieve has already been packaged for Debian/Ubuntu, macOS (Homebrew) and Windows (Chocolatey). Now I am trying to also get it packaged for Fedora...
primesieve also has a homepage: http://primesieve.org
Fedora Account System Username: walki
This is my first package and I need a sponsor. Hers's the link to successful koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=24575881
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
Iwicki Artur fedora@svgames.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fedora@svgames.pl
--- Comment #1 from Iwicki Artur fedora@svgames.pl ---
Group: Development/Libraries
The "Group:" tag is not used in Fedora.
%clean
%clean should not be used in Fedora. https://fedoraproject.org/wiki/Packaging:Guidelines#Tags_and_Sections
pushd [...] popd
rpmbuild resets the working directory at the start of %build, %check and %install, so these are not needed.
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
--- Comment #2 from Kim Walisch kim.walisch@gmail.com --- Thanks for your feedback. I have fixed the issues you pointed out and pushed a new version of the spec and SRPM to GitHub:
Spec URL: https://github.com/kimwalisch/primesieve-rpm/blob/master/primesieve.spec SRPM URL: https://github.com/kimwalisch/primesieve-rpm/raw/master/primesieve-6.4-1.fc2...
Hers's the link to the successful koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=24601545
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
--- Comment #3 from Kim Walisch kim.walisch@gmail.com --- Reading through the documentation:
Use a Release: tag starting with 1 (never 0). Append the Dist tag. Increment the release (by 1) for each update you make. Reset to 1 whenever you change Version:.
OK, I missed this. But I have now increased the release to 2%{?dist}.
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
Kim Walisch kim.walisch@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |177841 (FE-NEEDSPONSOR)
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=177841 [Bug 177841] Tracker: Review requests from new Fedora packagers who need a sponsor
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
--- Comment #4 from Michael Schwendt bugs.michael@gmx.net ---
%check make test
%install
During rpmbuild, %check gets executed _after_ %install, so putting %check below %install in the spec file is common practice. Sometimes tests are run on buildroot contents, btw, which explains the order of those sections.
%package static Requires: %{name}-devel = %{version}-%{release}
Make it arch-specific as explained in the base package guidelines: https://fedoraproject.org/wiki/Packaging:Guidelines#Requiring_Base_Package
%{_includedir}/primesieve/PrimeSieve.hpp
If you list individual files like that (which may be beneficial because the build would abort for added/removed files), you need to specify also directories:
%dir %{_includedir}/primesieve
https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Owner... https://fedoraproject.org/wiki/Packaging:UnownedDirectories
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
--- Comment #5 from Kim Walisch kim.walisch@gmail.com --- Hi Micheal,
Thanks for your feedback. I have fixed the issues you pointed out and pushed a new version of the spec and SRPM to GitHub:
Spec URL: https://raw.githubusercontent.com/kimwalisch/primesieve-rpm/master/primesiev... SRPM URL: https://raw.githubusercontent.com/kimwalisch/primesieve-rpm/master/primesiev...
Note that I have also fixed the following issues pointed out by Jerry James:
%post -p /sbin/ldconfig %postun -p /sbin/ldconfig
should be replaced with this: %ldconfig_scriptlets
1) Done, use ldconfig_scriptlets.
Also, the spec file at the URL given in the review bug has release number 2, but the one inside the SRPM has release number 1. Make sure those match.
2) Done, spec release number now matches SRPM release number.
...it is a good idea for the binary and the library to
be in separate packages.
3) I have now put the binary in the primesieve package, the shared libprimesieve and the header files are in the libprimesieve-devel package and the static libprimesieve is in the libprimesieve-static package. The naming of the packages is similar to Debian/Ubuntu where the binary is in primesieve and the libraries and header in libprimesieve-dev.
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
--- Comment #6 from Michael Schwendt bugs.michael@gmx.net ---
That is a recent change indeed. https://fedoraproject.org/wiki/Packaging:Scriptlets#Shared_Libraries
If the package naming bugs you that much, you could go a step further and build the following packages:
primesieve : for the executable libprimesieve : for the shared runtime lib libprimesieve-devel : for the shared buildtime lib libprimesieve-static : for the static lib
That would be even closer to Debian, where they use a versioned libprimesieve8 package. Of course, if no other program links with libprimesieve [yet], you may also drop the primesieve package and include it in the libprimesieve package. Adding "Provides: primesieve" would extend the namespace with regard to user searches.
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
--- Comment #7 from Kim Walisch kim.walisch@gmail.com --- Hi Micheal,
I have released a new version of the primesieve spec file and corresponding SRPM package:
Spec URL: https://raw.githubusercontent.com/kimwalisch/primesieve-rpm/master/primesiev... SRPM URL: https://raw.githubusercontent.com/kimwalisch/primesieve-rpm/master/primesiev...
primesieve : for the executable libprimesieve : for the shared runtime lib libprimesieve-devel : for the shared buildtime lib libprimesieve-static : for the static lib
I like your idea of adding a libprimesieve package so I have implemented that. Previously, if the user would have installed the libprimesieve-devel package this would also install the primesieve package with the binary. This issue is fixed now.
you may also drop the primesieve package and include it in the libprimesieve package.
I don't like this idea because most users will be interested in the primesieve binary and I want users to be able to install the binary with 'dnf install primesieve'.
I have also improved the summaries and descriptions of the different packages.
Hers's the link to the successful koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=25096373
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
--- Comment #8 from Kim Walisch kim.walisch@gmail.com --- I have released primesieve-6.4 on GitHub yesterday. Today I have updated the primesieve spec file and corresponding SRPM package to version 6.4:
Spec URL: https://raw.githubusercontent.com/kimwalisch/primesieve-rpm/v6.4-5/primesiev... SRPM URL: https://raw.githubusercontent.com/kimwalisch/primesieve-rpm/v6.4-5/primesiev...
Hers's the link to the successful koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=25943211
I am still looking for a sponsor for the primesieve package. The development of primesieve was started 8 years ago and it is now very mature i.e. primesieve builds and runs successfully on every single CPU architecture supported by both Fedora and Debian.
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
Jani Juhani Sinervo jani@sinervo.fi changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jani@sinervo.fi
--- Comment #9 from Jani Juhani Sinervo jani@sinervo.fi --- (In reply to Kim Walisch from comment #8)
I am still looking for a sponsor for the primesieve package. The development of primesieve was started 8 years ago and it is now very mature i.e. primesieve builds and runs successfully on every single CPU architecture supported by both Fedora and Debian.
Well, I cannot help you with the sponsoring thing, but here's a preliminary (unofficial) package review
I'd probably move the API documentations into their own packages, but that's just me.
Package Review ==============
Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed
Issues: ======= - ldconfig called in %post and %postun if required. Note: /sbin/ldconfig not called in libprimesieve See: http://fedoraproject.org/wiki/Packaging/Guidelines#Shared_Libraries
===== MUST items =====
C/C++: [x]: Package does not contain kernel modules. [x]: Package contains no static executables. [x]: Package does not contain any libtool archives (.la) [x]: Rpath absent or only used for internal libs. [x]: Development (unversioned) .so files in -devel subpackage, if present.
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: "BSD (unspecified)", "BSD (2 clause)", "GPL (v3 or later)", "Unknown or generated". 107 files have unknown license. Detailed output of licensecheck in /home/jani/review_stuff/1540335-primesieve/licensecheck.txt [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. [!]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [-]: Package contains desktop file if it is a GUI application. [x]: 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. [x]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 942080 bytes in 179 files. [!]: 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 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 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]: Static libraries in -static or -devel subpackage, providing -devel if present. Note: Package has .a files: libprimesieve-static. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local
===== 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). [x]: Fully versioned dependency in subpackages if applicable. Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in libprimesieve , libprimesieve-static , primesieve-debuginfo , primesieve-debugsource [?]: Package functions as described. [!]: 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 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]: The placement of pkgconfig(.pc) files are correct. [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]: Large data in /usr/share should live in a noarch subpackage if package is arched. Note: Arch-ed rpms have a total of 1054720 bytes in /usr/share [x]: Rpmlint is run on debuginfo package(s). Note: No rpmlint messages. [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: primesieve-6.4-5.fc28.x86_64.rpm libprimesieve-6.4-5.fc28.x86_64.rpm libprimesieve-devel-6.4-5.fc28.x86_64.rpm libprimesieve-static-6.4-5.fc28.x86_64.rpm primesieve-debuginfo-6.4-5.fc28.x86_64.rpm primesieve-debugsource-6.4-5.fc28.x86_64.rpm primesieve-6.4-5.fc28.src.rpm primesieve.x86_64: W: spelling-error %description -l en_US tuplets -> sextuplets, sextuplet, couplets primesieve.x86_64: W: tag-in-description C Requires: libprimesieve.x86_64: W: spelling-error %description -l en_US primesieve -> prime sieve, prime-sieve, impressive libprimesieve.x86_64: W: no-documentation libprimesieve-static.x86_64: W: spelling-error Summary(en_US) primesieve -> prime sieve, prime-sieve, impressive libprimesieve-static.x86_64: W: spelling-error %description -l en_US primesieve -> prime sieve, prime-sieve, impressive libprimesieve-static.x86_64: W: no-documentation primesieve.src: W: spelling-error %description -l en_US tuplets -> sextuplets, sextuplet, couplets primesieve.src: W: tag-in-description C Requires: primesieve.src: E: specfile-error warning: bogus date in %changelog: Thu Feb 16 2018 Kim Walisch walki@fedoraproject.org - 6.4-4 7 packages and 0 specfiles checked; 1 errors, 9 warnings.
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
--- Comment #10 from Kim Walisch kim.walisch@gmail.com --- Thanks for your review.
Issues:
- ldconfig called in %post and %postun if required.
Note: /sbin/ldconfig not called in libprimesieve
I actually had that in an earlier version of primesieve.spec (see https://github.com/kimwalisch/primesieve-rpm/commit/4604d88f2367181280ac6cc9...). But following the suggestion of Jerry James (%post -p /sbin/ldconfig & %postun -p /sbin/ldconfig should be replaced with this: %ldconfig_scriptlets) I replaced that code by %ldconfig_scriptlets. So can we drop your ldconfig issue?
I have fixed the following Rpmlint error:
primesieve.src: E: specfile-error warning: bogus date in %changelog: Thu Feb 16 2018 Kim Walisch walki@fedoraproject.org - 6.4-4
The Rpmlint spelling-error warnings are false positives.
I have updated the primesieve package to the latest primesieve-7.0 version:
Spec URL: https://raw.githubusercontent.com/kimwalisch/primesieve-rpm/v7.0-1/primesiev... SRPM URL: https://raw.githubusercontent.com/kimwalisch/primesieve-rpm/v7.0-1/primesiev...
Hers's the link to the successful koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=28083380
https://bugzilla.redhat.com/show_bug.cgi?id=1540335
--- Comment #11 from Jani Juhani Sinervo jani@sinervo.fi --- (In reply to Kim Walisch from comment #10)
Thanks for your review.
The Rpmlint spelling-error warnings are false positives.
Oh, good to know for future reference! I was actually thinking if that would actually affect the review outcome significantly in an actual review. I included it as a "problem" in that preliminary review just in case.
--
But yeah, with the fix to the ldconfig problem sorted, and updating to the new version, I'd see no problems with this being included. But I'll leave the decision for someone less amateurish than I. But while we wait for an official review, here's an updated preliminary review for this new version.
This is a review *template*. Besides handling the [ ]-marked tests you are also supposed to fix the template before pasting into bugzilla: - Add issues you find to the list of issues on top. If there isn't such a list, create one. - Add your own remarks to the template checks. - Add new lines marked [!] or [?] when you discover new things not listed by fedora-review. - Change or remove any text in the template which is plain wrong. In this case you could also file a bug against fedora-review - Remove the "[ ] Manual check required", you will not have any such lines in what you paste. - Remove attachments which you deem not really useful (the rpmlint ones are mandatory, though) - Remove this text
Package Review ==============
Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed
===== MUST items =====
C/C++: [x]: Package does not contain kernel modules. [x]: Package contains no static executables. [x]: Package does not contain any libtool archives (.la) [x]: Rpath absent or only used for internal libs. [x]: Development (unversioned) .so files in -devel subpackage, if present.
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: "BSD (unspecified)", "BSD (2 clause)", "GPL (v3 or later)", "Unknown or generated". 114 files have unknown license. Detailed output of licensecheck in /home/jani/review_stuff/1540335-primesieve/licensecheck.txt [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. [x]: 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. [x]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 962560 bytes in 179 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 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 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]: Static libraries in -static or -devel subpackage, providing -devel if present. Note: Package has .a files: libprimesieve-static. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local
===== 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). [x]: Fully versioned dependency in subpackages if applicable. Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in libprimesieve , libprimesieve-static , primesieve-debuginfo , primesieve-debugsource [?]: 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 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]: The placement of pkgconfig(.pc) files are correct. [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]: Large data in /usr/share should live in a noarch subpackage if package is arched. Note: Arch-ed rpms have a total of 1064960 bytes in /usr/share [x]: Rpmlint is run on debuginfo package(s). Note: No rpmlint messages. [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: primesieve-7.0-1.fc28.x86_64.rpm libprimesieve-7.0-1.fc28.x86_64.rpm libprimesieve-devel-7.0-1.fc28.x86_64.rpm libprimesieve-static-7.0-1.fc28.x86_64.rpm primesieve-debuginfo-7.0-1.fc28.x86_64.rpm primesieve-debugsource-7.0-1.fc28.x86_64.rpm primesieve-7.0-1.fc28.src.rpm primesieve.x86_64: W: spelling-error %description -l en_US tuplets -> sextuplets, sextuplet, couplets primesieve.x86_64: W: tag-in-description C Requires: libprimesieve.x86_64: W: spelling-error %description -l en_US primesieve -> prime sieve, prime-sieve, impressive libprimesieve.x86_64: W: no-documentation libprimesieve-static.x86_64: W: spelling-error Summary(en_US) primesieve -> prime sieve, prime-sieve, impressive libprimesieve-static.x86_64: W: spelling-error %description -l en_US primesieve -> prime sieve, prime-sieve, impressive libprimesieve-static.x86_64: W: no-documentation primesieve.src: W: spelling-error %description -l en_US tuplets -> sextuplets, sextuplet, couplets primesieve.src: W: tag-in-description C Requires: 7 packages and 0 specfiles checked; 0 errors, 9 warnings.
package-review@lists.fedoraproject.org