Bug 1850262 - Review Request: kissat - Keep It Simple SAT solver
Summary: Review Request: kissat - Keep It Simple SAT solver
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dan Čermák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-23 20:20 UTC by Jerry James
Modified: 2020-08-04 03:15 UTC (History)
2 users (show)

Fixed In Version: kissat-0-0.1.20200704gitbaef460.fc33
Clone Of:
Environment:
Last Closed: 2020-08-04 03:15:37 UTC
Type: ---
Embargoed:
dan.cermak: fedora-review+


Attachments (Terms of Use)

Description Jerry James 2020-06-23 20:20:41 UTC
Spec URL: https://jjames.fedorapeople.org/kissat/kissat.spec
SRPM URL: https://jjames.fedorapeople.org/kissat/kissat-0-1.sc2020.fc33.src.rpm
Fedora Account System Username: jjames
Description: KISSAT is a "keep it simple and clean bare metal SAT solver" written in C.  It is a port of CaDiCaL back to C with improved data structures, better scheduling of inprocessing and optimized algorithms and implementation.  Coincidentally 'kissat' also means 'cats' in Finnish.

Comment 1 Dan Čermák 2020-06-25 16:25:15 UTC
Unfortunately it currently fails to build:

make[1]: Leaving directory '/builddir/build/BUILD/kissat-sc2020/build'
cc1: fatal error: inaccessible plugin file plugin/annobin.so expanded from short plugin name annobin: No such file or directory compilation terminated.

Comment 2 Jerry James 2020-06-25 20:47:09 UTC
Hi Dan.  Thanks for looking at this package.  I can't reproduce the problem, but it looks like annobin is/was broken.  I just did a mock build with "mock -r fedora-rawhide-x86_64 --rebuild kissat-0-1.sc2020.fc32.src.rpm" and it built successfully.  Can you try again and see if the issue was transient?  If not, can you give me the mock invocation you are using?

Comment 3 Dan Čermák 2020-06-25 22:20:05 UTC
I have used Rawhide as the default build root, which currently contains a broken annobin (again…). F32 works flawlessly so I've used that instead.

A few comments:
- Have you tried talking to upstream to get the shared library option added upstream so that we don't have this downstream patch?
- The package's tests fails on i686, armv7hl and s390x: https://koji.fedoraproject.org/koji/taskinfo?taskID=46161272
- consider using `install -p` instead of cp to preserve the timestamps of the files
- %{optflags} and $RPM_LD_FLAGS are being phased out, the "new" ones are %build_cflags and %build_ldflags, respectively. Also, your patch does not appear to forward the LD_FLAGS to the $(LD) invocation at all.
- I would suggest to add a fake version to the .so and bump it with each update as upstream has probably no guarantees about ABI compatibility at all.

===== 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]: ldconfig not called in %post and %postun for Fedora 28 and later.
[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: "Unknown or generated", "Expat License". 435 files have unknown
     license. Detailed output of licensecheck in /home/dan/fedora-
     scm/1850262-kissat/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.
[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 10240 bytes in 1 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]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in kissat-
     libs , kissat-devel
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[!]: 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.
[!]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[!]: 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 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]: Spec file according to URL is the same as in SRPM.

Comment 4 Jerry James 2020-06-25 22:40:46 UTC
(In reply to dan.cermak from comment #3)
> - Have you tried talking to upstream to get the shared library option added
> upstream so that we don't have this downstream patch?

No, I haven't.  This package has the same upstream as cadical.  I need to submit patches for both packages to upstream.  I will do that before the next update to this bug.

> - The package's tests fails on i686, armv7hl and s390x:
> https://koji.fedoraproject.org/koji/taskinfo?taskID=46161272

I'll investigate.  Thanks for noticing.

> - consider using `install -p` instead of cp to preserve the timestamps of
> the files

Hmm?  I'm using "cp -p", which does preserve timestamps.

> - %{optflags} and $RPM_LD_FLAGS are being phased out, the "new" ones are
> %build_cflags and %build_ldflags, respectively. Also, your patch does not
> appear to forward the LD_FLAGS to the $(LD) invocation at all.

I was unaware of this phasing out.  Did I miss an announcement somewhere?  (I like the idea of having the names of the two resemble each other.  I'll start converting my spec files over as I work on them.)

As for the RPM_LD_FLAGS, it looks to me like it is working.  I see this in the build log:

gcc -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -shared -Wl,-h,libkissat.so.0 -o libkissat.so.0.0.0 allocate.o analyze.o ands.o arena.o assign.o autarky.o averages.o backtrack.o backward.o build.o bump.o check.o clause.o clueue.o collect.o colors.o compact.o config.o decide.o deduce.o dense.o dominate.o dump.o eliminate.o equivalences.o error.o extend.o failed.o file.o flags.o format.o forward.o frames.o gates.o handle.o heap.o ifthenelse.o import.o internal.o learn.o limits.o logging.o minimize.o mode.o options.o phases.o print.o probe.o profile.o promote.o proof.o propdense.o prophyper.o proprobe.o propsearch.o queue.o reduce.o reluctant.o rephase.o report.o resize.o resolve.o resources.o restart.o search.o smooth.o sort.o stack.o statistics.o strengthen.o substitute.o terminate.o ternary.o trail.o transitive.o utilities.o vector.o vivify.o walk.o watch.o weaken.o xors.o -lm

and this:

gcc -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o tissat test.o application.o parse.o witness.o testadd.o testallocate.o testapplication.o testarena.o testbump.o testcollect.o testcoverage.o testdivert.o testdump.o testendianess.o testerror.o testfile.o testformat.o testheap.o testinit.o testmain.o testmessages.o testoptions.o testparse.o testprove.o testqueue.o testrandom.o testrank.o testreferences.o testreluctant.o testscheduler.o testsizes.o testsolve.o testsort.o teststack.o testterminate.o testusage.o testvector.o -L. -lkissat -lm

So for both the library and the binary, $RPM_LD_FLAGS comprise the first options after "gcc".

> - I would suggest to add a fake version to the .so and bump it with each
> update as upstream has probably no guarantees about ABI compatibility at all.

Yes, that is likely.  Okay, let me try to come up with some scheme that won't cause problems if upstream decides to support shared libraries and sonames.

Thanks again for the review, Dan!  I appreciate you taking the time.

Comment 5 Jerry James 2020-06-25 23:49:58 UTC
(In reply to dan.cermak from comment #3)
> - The package's tests fails on i686, armv7hl and s390x:
> https://koji.fedoraproject.org/koji/taskinfo?taskID=46161272

Upstream has deliberately caused a test failure on big endian architectures.  I will see if the code is easy to port and submit a patch upstream if it is.  Otherwise, I'll have to add ExcludeArch: s390x and do likewise for the kissat dependency in cvc4.

I don't yet know what's going on with the 32-bit architectures, but will look into that next.

Comment 6 Jerry James 2020-06-26 01:35:16 UTC
(In reply to Jerry James from comment #5)
> I don't yet know what's going on with the 32-bit architectures, but will
> look into that next.

One of the tests attempts to allocate 2 GB, which fails on the 32-bit architectures.  I'll see what can be done about this, too.

Comment 7 Jerry James 2020-07-12 16:51:22 UTC
Upstream has fixed both the 32-bit and big endian issues, so I'm building from a git snapshot now.  I've also changed the release number to reflect that fact.  Macros are in place to help manage the library soname.  New URLs:

Spec URL: https://jjames.fedorapeople.org/kissat/kissat.spec
SRPM URL: https://jjames.fedorapeople.org/kissat/kissat-0-0.1.20200704gitbaef460.fc33.src.rpm

Comment 8 Dan Čermák 2020-08-03 13:49:02 UTC
Sorry for the long radio silence, package is approved!

===== 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]: ldconfig not called in %post and %postun for Fedora 28 and later.
[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: "Unknown or generated", "Expat License". 433 files have unknown
     license. Detailed output of licensecheck in /home/dan/fedora-
     scm/1850262-kissat/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.
[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.
[?]: 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 1 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]: 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]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in kissat-
     libs , kissat-devel
[?]: 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]: 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]: Spec file according to URL is the same as in SRPM.

Comment 9 Gwyn Ciesla 2020-08-03 20:14:58 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/kissat

Comment 10 Jerry James 2020-08-04 03:15:37 UTC
Built in Rawhide.


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