Bug 1992877 - Review Request: flintqs - William Hart's quadratic sieve
Summary: Review Request: flintqs - William Hart's quadratic sieve
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-11 22:08 UTC by Jerry James
Modified: 2021-08-18 16:30 UTC (History)
2 users (show)

Fixed In Version: flintqs-1.0-1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-18 16:30:15 UTC
Type: ---
Embargoed:
code: fedora-review+


Attachments (Terms of Use)

Description Jerry James 2021-08-11 22:08:28 UTC
Spec URL: https://jjames.fedorapeople.org/flintqs/flintqs.spec
SRPM URL: https://jjames.fedorapeople.org/flintqs/flintqs-1.0-1.fc35.src.rpm
Fedora Account System Username: jjames
Description: This package contains William Hart's quadratic sieve implementation, as modified for sagemath.

Comment 1 Ben Beasley 2021-08-13 18:37:08 UTC
I know upstream isn’t exactly active, but please offer your patches there. Even if there is nobody to accept them, it allows other users and distribution packagers to find the patches.

https://docs.fedoraproject.org/en-US/packaging-guidelines/PatchUpstreamStatus/

----

I haven’t done a full review but I think that is likely to be my only complaint.

Comment 2 Jerry James 2021-08-13 22:49:06 UTC
Several of the patches touch the same bits of code, and github's support for dependent pull requests is not great, so I had hoped that upstream would merge the memory leak fix first, then I would submit the rest.  However, as you noted, upstream is not active.  I have interacted with the primary committer before, so I will attempt to contact him via email.

In the meantime, I submitted pull request 2 with all of the warning fixes packed together.  The final one, falling back to /tmp if TMPDIR is not set, is problematic.  It touches code that is changed by *both* of the existing pull requests.  Rather than tear my hair out, I'm going to see if I can get some movement on the other 2 pull requests first, then submit that one.

Mock switched from generating fc35 to fc36 rpms while I was working on that, so here are new URLs:

Spec URL: https://jjames.fedorapeople.org/flintqs/flintqs.spec
SRPM URL: https://jjames.fedorapeople.org/flintqs/flintqs-1.0-1.fc36.src.rpm

Comment 3 Ben Beasley 2021-08-15 17:27:16 UTC
I’ll take this review, but mock is broken right now (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/ZPOZNHVHDZEEMDE6F3DGXY6SL5W6UXBO/) and I’m planning to wait for it to be fixed rather than hacking around in /etc/mock/ to get it working myself.

Comment 4 Ben Beasley 2021-08-16 19:59:24 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

===== Issues =====

- Since you are invoking the autotools (autoreconf), I think you should
  explicitly add

    BuildRequires:  autoconf
    BuildRequires:  automake

  rather than relying on an indirect dependency via

    BuildRequires:  libtool

- There are no upstream tests, but it would be nice to do a “smoke test” with
  one of the examples from
  https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/qsieve.html,
  something like this:

    %check
    # Example from
    # https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/qsieve.html
    factors="$(
      echo '1000000000000000005490000000000000001989' |
      %{buildroot}%{_bindir}/QuadraticSieve |
      awk 'f; /^FACTORS:$/ {f=1}' | sort -n -u | tr '\n' ' '
    )"
    [ "${factors}" = '10000000000000000051 100000000000000000039 ' ]

  What do you think?

- A man page is always wanted (“SHOULD”) for a command-line tool
  (https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages).

  Normally I would offer to write one, but it’s hard to clearly document
  exactly what outputs to expect, and what inputs will produce useful
  results, without extensive study—even
  https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/qsieve.html
  doesn’t do a great job—so I don’t really want to do that in this case.

  (No change is required for approval.)

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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[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.

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", "GNU General Public License, Version
     2", "FSF All Permissive License", "GNU General Public License v2.0 or
     later". 7 files have unknown license. Detailed output of licensecheck
     in /home/reviewer/1992877-flintqs/licensecheck.txt

     FSFAP license applies only to the INSTALL text file, which is not
     installed and is not a source for the binary RPM contents, so it does not
     need to appear in the License field.

     Manual inspection confirms that there is no GPL2-only content, and GPLv2+
     is the correct overall License.

[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 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 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

===== 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]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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.

     Upstream does not provide any tests. Would a simple downstream test make
     sense?

[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]: Fully versioned dependency in subpackages if applicable.
[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 debuginfo package(s).
     Note: No rpmlint messages.
[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]: Package should not use obsolete m4 macros
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: flintqs-1.0-1.fc36.aarch64.rpm
          flintqs-debuginfo-1.0-1.fc36.aarch64.rpm
          flintqs-debugsource-1.0-1.fc36.aarch64.rpm
          flintqs-1.0-1.fc36.src.rpm
flintqs.aarch64: W: spelling-error %description -l en_US sagemath -> sage math, sage-math, stratagem
flintqs.aarch64: W: no-manual-page-for-binary QuadraticSieve
flintqs.src: W: spelling-error %description -l en_US sagemath -> sage math, sage-math, stratagem
4 packages and 0 specfiles checked; 0 errors, 3 warnings.




Rpmlint (debuginfo)
-------------------
Checking: flintqs-debuginfo-1.0-1.fc36.aarch64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://github.com/sagemath/FlintQS/archive/v1.0/flintqs-1.0.tar.gz :
  CHECKSUM(SHA256) this package     : b983052f267988192c9ec59c9d2754470e5f2db74b45e364cf7ad62f349bc9eb
  CHECKSUM(SHA256) upstream package : b983052f267988192c9ec59c9d2754470e5f2db74b45e364cf7ad62f349bc9eb


Requires
--------
flintqs (rpmlib, GLIBC filtered):
    ld-linux-aarch64.so.1()(64bit)
    libc.so.6()(64bit)
    libgmp.so.10()(64bit)
    libm.so.6()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    rtld(GNU_HASH)

flintqs-debuginfo (rpmlib, GLIBC filtered):

flintqs-debugsource (rpmlib, GLIBC filtered):



Provides
--------
flintqs:
    flintqs
    flintqs(aarch-64)

flintqs-debuginfo:
    debuginfo(build-id)
    flintqs-debuginfo
    flintqs-debuginfo(aarch-64)

flintqs-debugsource:
    flintqs-debugsource
    flintqs-debugsource(aarch-64)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1992877
Buildroot used: fedora-rawhide-aarch64
Active plugins: Shell-api, Generic, C/C++
Disabled plugins: Haskell, Ocaml, SugarActivity, fonts, PHP, Python, R, Java, Perl
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 5 Jerry James 2021-08-16 22:06:38 UTC
(In reply to Ben Beasley from comment #4)
> - Since you are invoking the autotools (autoreconf), I think you should
>   explicitly add
> 
>     BuildRequires:  autoconf
>     BuildRequires:  automake
> 
>   rather than relying on an indirect dependency via
> 
>     BuildRequires:  libtool

Done.

> - There are no upstream tests, but it would be nice to do a “smoke test” with
>   one of the examples from
>  
> https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/qsieve.
> html,
>   something like this:
> 
>     %check
>     # Example from
>     #
> https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/qsieve.
> html
>     factors="$(
>       echo '1000000000000000005490000000000000001989' |
>       %{buildroot}%{_bindir}/QuadraticSieve |
>       awk 'f; /^FACTORS:$/ {f=1}' | sort -n -u | tr '\n' ' '
>     )"
>     [ "${factors}" = '10000000000000000051 100000000000000000039 ' ]
> 
>   What do you think?

Good idea, thanks!  I've added exactly the one you suggested.

> - A man page is always wanted (“SHOULD”) for a command-line tool
>   (https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages).
> 
>   Normally I would offer to write one, but it’s hard to clearly document
>   exactly what outputs to expect, and what inputs will produce useful
>   results, without extensive study—even
>  
> https://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/qsieve.
> html
>   doesn’t do a great job—so I don’t really want to do that in this case.

Hmmm.  Well, on the plus side, the command line tool takes no arguments whatsoever, so documenting that part is easy. :-)  On the other hand, like you, I would have to study this tool for awhile to write a reasonable man page.  The binary is meant to be invoked from sagemath anyway.  I don't really expect anyone to run it directly from the command line.  All things considered, I would like to take a pass on providing a man page for this package.

New URLs:
Spec URL: https://jjames.fedorapeople.org/flintqs/flintqs.spec
SRPM URL: https://jjames.fedorapeople.org/flintqs/flintqs-1.0-2.fc36.src.rpm

Comment 6 Ben Beasley 2021-08-18 04:32:03 UTC
Looks great! Package is approved.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated



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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[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.

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", "GNU General Public License, Version
     2", "FSF All Permissive License", "GNU General Public License v2.0 or
     later". 7 files have unknown license. Detailed output of licensecheck
     in /home/reviewer/1992877-flintqs/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 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 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

===== 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]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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]: Fully versioned dependency in subpackages if applicable.
[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 debuginfo package(s).
     Note: No rpmlint messages.
[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]: Package should not use obsolete m4 macros
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: flintqs-1.0-2.fc36.aarch64.rpm
          flintqs-debuginfo-1.0-2.fc36.aarch64.rpm
          flintqs-debugsource-1.0-2.fc36.aarch64.rpm
          flintqs-1.0-2.fc36.src.rpm
flintqs.aarch64: W: spelling-error %description -l en_US sagemath -> sage math, sage-math, stratagem
flintqs.aarch64: W: no-manual-page-for-binary QuadraticSieve
flintqs.src: W: spelling-error %description -l en_US sagemath -> sage math, sage-math, stratagem
4 packages and 0 specfiles checked; 0 errors, 3 warnings.




Rpmlint (debuginfo)
-------------------
Checking: flintqs-debuginfo-1.0-2.fc36.aarch64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://github.com/sagemath/FlintQS/archive/v1.0/flintqs-1.0.tar.gz :
  CHECKSUM(SHA256) this package     : b983052f267988192c9ec59c9d2754470e5f2db74b45e364cf7ad62f349bc9eb
  CHECKSUM(SHA256) upstream package : b983052f267988192c9ec59c9d2754470e5f2db74b45e364cf7ad62f349bc9eb


Requires
--------
flintqs (rpmlib, GLIBC filtered):
    ld-linux-aarch64.so.1()(64bit)
    libc.so.6()(64bit)
    libgmp.so.10()(64bit)
    libm.so.6()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    rtld(GNU_HASH)

flintqs-debuginfo (rpmlib, GLIBC filtered):

flintqs-debugsource (rpmlib, GLIBC filtered):



Provides
--------
flintqs:
    flintqs
    flintqs(aarch-64)

flintqs-debuginfo:
    debuginfo(build-id)
    flintqs-debuginfo
    flintqs-debuginfo(aarch-64)

flintqs-debugsource:
    flintqs-debugsource
    flintqs-debugsource(aarch-64)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1992877
Buildroot used: fedora-rawhide-aarch64
Active plugins: C/C++, Shell-api, Generic
Disabled plugins: Java, Perl, PHP, Python, Ocaml, SugarActivity, R, Haskell, fonts
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 7 Jerry James 2021-08-18 14:31:51 UTC
Thank you, Ben!

Comment 8 Gwyn Ciesla 2021-08-18 15:29:45 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/flintqs

Comment 9 Jerry James 2021-08-18 16:30:15 UTC
Built in Rawhide and F35.


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