Bug 729199 - Review Request: satsolver - Dependency solving library for libzypp
Review Request: satsolver - Dependency solving library for libzypp
Status: CLOSED DUPLICATE of bug 442714
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Nobody's working on this, feel free to take it
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 729200 729201 729203
  Show dependency treegraph
 
Reported: 2011-08-08 22:57 EDT by T.C. Hollingsworth
Modified: 2011-12-16 04:55 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-08-19 06:48:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
spec file parch (2.82 KB, patch)
2011-08-12 07:02 EDT, Terje Røsten
no flags Details | Diff

  None (edit)
Description T.C. Hollingsworth 2011-08-08 22:57:58 EDT
Spec URL: http://www.u.arizona.edu/~tchol/fedora/satsolver.spec
SRPM URL: http://www.u.arizona.edu/~tchol/fedora/satsolver-0.17.2-1.fc15.src.rpm
Description: A new approach to package dependency solving

(previous review in bug442714 failed due to now fixed RPM incompatibilities)
Comment 1 T.C. Hollingsworth 2011-08-09 08:35:36 EDT
$ rpmlint SPECS/satsolver.spec 
SPECS/satsolver.spec:101: W: macro-in-%changelog %3AFactory
SPECS/satsolver.spec:101: W: macro-in-comment %3AFactory
SPECS/satsolver.spec: W: invalid-url Source0: satsolver-0.17.2.tar.bz2
0 packages and 1 specfiles checked; 0 errors, 3 warnings.

$ rpmlint SRPMS/satsolver-0.17.2-1.fc15.src.rpm 
satsolver.src:101: W: macro-in-%changelog %3AFactory
satsolver.src:101: W: macro-in-comment %3AFactory
satsolver.src: W: invalid-url Source0: satsolver-0.17.2.tar.bz2
1 packages and 0 specfiles checked; 0 errors, 3 warnings.
Comment 2 T.C. Hollingsworth 2011-08-09 08:45:56 EDT
Sorry, should have done the binary RPM, not the SRPM.

$ rpmlint RPMS/x86_64/libzypp-9.10.1-1.fc15.x86_64.rpm 
libzypp.x86_64: E: explicit-lib-dependency libzypp-config
libzypp.x86_64: E: incoherent-logrotate-file /etc/logrotate.d/libzypp.lr
libzypp.x86_64: W: no-manual-page-for-binary package-manager-su
libzypp.x86_64: W: no-manual-page-for-binary package-manager
libzypp.x86_64: W: no-manual-page-for-binary zypp-CheckAccessDeleted
1 packages and 0 specfiles checked; 2 errors, 3 warnings.

$ rpmlint RPMS/x86_64/libzypp-devel-9.10.1-1.fc15.x86_64.rpm 
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/ProblemSolutionCombi.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/Helper.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/ProblemTypes.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/Types.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/SolverQueueItem.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/SolverQueueItemInstall.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/Resolver.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/ProblemSolutionIgnore.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/SolverQueueItemDelete.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/InstallOrder.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/SATResolver.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/SolverQueueItemUpdate.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/SolverQueueItemInstallOneOf.h
libzypp-devel.x86_64: E: incorrect-fsf-address /usr/include/zypp/solver/detail/SolverQueueItemLock.h
1 packages and 0 specfiles checked; 14 errors, 0 warnings.
Comment 3 T.C. Hollingsworth 2011-08-09 08:52:54 EDT
Oops, wrong tab.  Sorry for the noise, folks.

$ rpmlint RPMS/x86_64/satsolver-0.17.2-1.fc15.x86_64.rpm 
satsolver.x86_64: W: no-manual-page-for-binary repo2solv.sh
satsolver.x86_64: W: no-manual-page-for-binary repomdxml2solv
satsolver.x86_64: W: no-manual-page-for-binary mergesolv
satsolver.x86_64: W: no-manual-page-for-binary dumpsolv
satsolver.x86_64: W: no-manual-page-for-binary installcheck
satsolver.x86_64: W: no-manual-page-for-binary deltainfoxml2solv
satsolver.x86_64: W: no-manual-page-for-binary rpmdb2solv
satsolver.x86_64: W: no-manual-page-for-binary updateinfoxml2solv
satsolver.x86_64: W: no-manual-page-for-binary rpmmd2solv
satsolver.x86_64: W: no-manual-page-for-binary rpms2solv
satsolver.x86_64: W: no-manual-page-for-binary susetags2solv
1 packages and 0 specfiles checked; 0 errors, 11 warnings.

$ rpmlint RPMS/x86_64/satsolver-devel-0.17.2-1.fc15.x86_64.rpm 
satsolver-devel.x86_64: W: no-documentation
satsolver-devel.x86_64: W: no-manual-page-for-binary helix2solv
satsolver-devel.x86_64: W: no-manual-page-for-binary deptestomatic
1 packages and 0 specfiles checked; 0 errors, 3 warnings.

$ rpmlint RPMS/x86_64/satsolver-demo-0.17.2-1.fc15.x86_64.rpm 
satsolver-demo.x86_64: W: no-documentation
satsolver-demo.x86_64: W: no-manual-page-for-binary solv
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
Comment 4 Miroslav Suchý 2011-08-09 11:43:43 EDT
I recommend you to write the man page. And add it to this package as patch or sent it to upstream. 
If you have problem writing man page or you never done it, I recommend you:
http://www.methods.co.nz/asciidoc/
http://www.methods.co.nz/asciidoc/asciidoc.1.txt
You can write man page using wiki syntax very quickly.
Comment 5 Miroslav Suchý 2011-08-09 11:57:15 EDT
> rpmlint satsolver-0.17.2-1.fc15.src.rpm
> satsolver.src:101: W: macro-in-%changelog %3AFactory
> satsolver.src:101: W: macro-in-comment %3AFactory
You must double that percent char, even in that commend

> satsolver.src: W: invalid-url Source0: satsolver-0.17.2.tar.bz2
You have in spec:
 # download from https://github.com/openSUSE/sat-solver
 Source:         %{name}-%{version}.tar.bz2
This in not enough. That url offer you just download of HEAD of master branch. And it may change every day or even every hour. You need something reproducible. If upstream does not provide tar.gz you should use something like:
 # downloaded from https://github.com/openSUSE/sat-solver/commit/b9ef5a9a67d20d330c7b9f88c8a684d84a4166e2
 # which is tar.gz of commit b9ef5a9a67d20d330c7b9f88c8a684d84a4166e2 in master branch
 Source:         %{name}-%{version}.tar.bz2
Comment 6 Miroslav Suchý 2011-08-09 12:04:59 EDT
You should really do better job with description. Additionally all descriptions must end with dot.

> make %{?jobs:-j %jobs}
You should use _smp_mflags macro:
http://fedoraproject.org/wiki/Packaging:Guidelines#Parallel_make
Comment 7 Miroslav Suchý 2011-08-09 12:40:25 EDT
Scratch build in koji (you can do it yourself too even if you are not packager yet):
http://koji.fedoraproject.org/koji/taskinfo?taskID=3262301
http://koji.fedoraproject.org/koji/getfile?taskID=3262302&name=build.log

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Please install 'check' and 'check-devel' packages (missing: CHECK_LIBRARY
  CHECK_INCLUDE_DIR)

You are missing some Buildrequires.
Comment 8 T.C. Hollingsworth 2011-08-09 21:16:57 EDT
Thanks for taking a look at this.  Everything is now fixed except for the man pages.

Spec: http://www.u.arizona.edu/~tchol/fedora/satsolver.spec
SRPM: http://www.u.arizona.edu/~tchol/fedora/satsolver-0.17.2-2.fc15.src.rpm

Koji scratch build:  http://koji.fedoraproject.org/koji/taskinfo?taskID=3263280

$ rpmlint RPMS/x86_64/satsolver-0.17.2-2.fc15.x86_64.rpm 
satsolver.x86_64: W: no-manual-page-for-binary repo2solv.sh
satsolver.x86_64: W: no-manual-page-for-binary repomdxml2solv
satsolver.x86_64: W: no-manual-page-for-binary mergesolv
satsolver.x86_64: W: no-manual-page-for-binary dumpsolv
satsolver.x86_64: W: no-manual-page-for-binary installcheck
satsolver.x86_64: W: no-manual-page-for-binary deltainfoxml2solv
satsolver.x86_64: W: no-manual-page-for-binary rpmdb2solv
satsolver.x86_64: W: no-manual-page-for-binary updateinfoxml2solv
satsolver.x86_64: W: no-manual-page-for-binary rpmmd2solv
satsolver.x86_64: W: no-manual-page-for-binary rpms2solv
satsolver.x86_64: W: no-manual-page-for-binary susetags2solv
1 packages and 0 specfiles checked; 0 errors, 11 warnings.

$ rpmlint RPMS/x86_64/satsolver-devel-0.17.2-2.fc15.x86_64.rpm 
satsolver-devel.x86_64: W: spelling-error Summary(en_US) libzypp -> Libby
satsolver-devel.x86_64: W: spelling-error %description -l en_US libzypp -> Libby
satsolver-devel.x86_64: W: spelling-error %description -l en_US satisfiability -> insatiability, advisability
satsolver-devel.x86_64: W: no-documentation
satsolver-devel.x86_64: W: no-manual-page-for-binary helix2solv
satsolver-devel.x86_64: W: no-manual-page-for-binary deptestomatic
1 packages and 0 specfiles checked; 0 errors, 6 warnings.


$ rpmlint RPMS/x86_64/satsolver-demo-0.17.2-2.fc15.x86_64.rpm 
satsolver-demo.x86_64: W: no-documentation
satsolver-demo.x86_64: W: no-manual-page-for-binary solv
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
Comment 9 Terje Røsten 2011-08-12 07:02:00 EDT
Created attachment 518012 [details]
spec file parch
Comment 10 Terje Røsten 2011-08-12 07:02:52 EDT
Patch to fix some minor issues:

 - sort buildreq and remove implicit buildreq
 - use %cmake to build: http://fedoraproject.org/wiki/Packaging:Cmake
 - add %check, ctest seems to fail, please have a look
 - fix %defattr
 - fix req in -devel subpkg
 - explicit file listing
Comment 11 T.C. Hollingsworth 2011-08-14 08:16:17 EDT
Thanks for taking a look at this.  I've researched the matter further and discovered that we should track the openSUSE stable branches of all the ZYpp tools instead of the latest releases.  This way they'll pass the tests and generally be less buggy.

I've also now included the language bindings for this package.  I was originally under the impression that they should be packaged seperately, but they're included with the upstream tarball and other Fedora packages also ship them in one SRPM when that is the case.

Spec: http://www.u.arizona.edu/~tchol/fedora/satsolver.spec
SRPM: http://www.u.arizona.edu/~tchol/fedora/satsolver-0.16.3-1.fc15.src.rpm

$ rpmlint SPECS/satsolver.spec 
SPECS/satsolver.spec: W: invalid-url Source0: satsolver-0.16.3.tar.bz2
0 packages and 1 specfiles checked; 0 errors, 1 warnings.

$ rpmlint satsolver-0.16.3-1.fc15.x86_64.rpm 
satsolver.x86_64: W: spelling-error Summary(en_US) libzypp -> Libby
satsolver.x86_64: W: spelling-error %description -l en_US libzypp -> Libby
satsolver.x86_64: W: spelling-error %description -l en_US satisfiability -> insatiability, advisability
satsolver.x86_64: W: no-manual-page-for-binary repo2solv.sh
satsolver.x86_64: W: no-manual-page-for-binary repomdxml2solv
satsolver.x86_64: W: no-manual-page-for-binary mergesolv
satsolver.x86_64: W: no-manual-page-for-binary dumpsolv
satsolver.x86_64: W: no-manual-page-for-binary rpmdb2solv
satsolver.x86_64: W: no-manual-page-for-binary deltainfoxml2solv
satsolver.x86_64: W: no-manual-page-for-binary susetags2solv
satsolver.x86_64: W: no-manual-page-for-binary rpmmd2solv
satsolver.x86_64: W: no-manual-page-for-binary rpms2solv
satsolver.x86_64: W: no-manual-page-for-binary updateinfoxml2solv
1 packages and 0 specfiles checked; 0 errors, 13 warnings.

$ rpmlint satsolver-devel-0.16.3-1.fc15.x86_64.rpm 
satsolver-devel.x86_64: W: spelling-error Summary(en_US) libzypp -> Libby
satsolver-devel.x86_64: W: spelling-error %description -l en_US libzypp -> Libby
satsolver-devel.x86_64: W: spelling-error %description -l en_US satisfiability -> insatiability, advisability
satsolver-devel.x86_64: W: no-documentation
satsolver-devel.x86_64: W: no-manual-page-for-binary helix2solv
satsolver-devel.x86_64: W: no-manual-page-for-binary deptestomatic
1 packages and 0 specfiles checked; 0 errors, 6 warnings.

$ rpmlint python-satsolver-0.16.3-1.fc15.x86_64.rpm 
# not filtered because this package contains binaries in $PATH
python-satsolver.x86_64: W: private-shared-object-provides 
/usr/lib64/python2.7/site-packages/_satsolver.so _satsolver.so()(64bit)
python-satsolver.x86_64: W: no-documentation
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

$ rpmlint ruby-satsolver-0.16.3-1.fc15.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

$ rpmlint perl-satsolver-0.16.3-1.fc15.x86_64.rpm 
# not filtered because this package contains binaries in $PATH
perl-satsolver.x86_64: W: private-shared-object-provides /usr/lib64/perl5/vendor_perl/satsolver.so satsolver.so()(64bit)
perl-satsolver.x86_64: W: private-shared-object-provides /usr/lib64/perl5/vendor_perl/satsolver.so satsolver.so()(64bit)
perl-satsolver.x86_64: W: no-documentation
1 packages and 0 specfiles checked; 0 errors, 3 warnings.

$ rpmlint satsolver-demo-0.16.3-1.fc15.x86_64.rpm 
satsolver-demo.x86_64: W: no-documentation
satsolver-demo.x86_64: W: no-manual-page-for-binary solv
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
Comment 12 Miroslav Suchý 2011-08-16 04:39:16 EDT
Fedora15, rpmbuild -ba satsolver.spec:
...
.6(GLIBC_2.4)(64bit) libc.so.6(GLIBC_2.8)(64bit) libexpat.so.1()(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libgcc_s.so.1(GCC_3.3.1)(64bit) libz.so.1()(64bit) libz.so.1(ZLIB_1.2.3.3)(64bit) rtld(GNU_HASH)
Processing files: ruby-satsolver-0.16.3-1.fc15.x86_64
error: File not found: /home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/lib/ruby/site_ruby/1.8/satsolver
error: File not found: /home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/lib/ruby/site_ruby/1.8/satsolver.rb
error: File not found by glob: /home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/lib/ruby/site_ruby/1.8/satsolver/*.rb
error: File not found: /home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/lib64/ruby/site_ruby/1.8/x86_64-linux/satsolver.so
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.5sXmbs
+ umask 022
+ cd /home/msuchy/rpmbuild/BUILD
+ cd satsolver-0.16.3
+ DOCDIR=/home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/share/doc/ruby-satsolver-0.16.3
+ export DOCDIR
+ rm -rf /home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/share/doc/ruby-satsolver-0.16.3
+ /bin/mkdir -p /home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/share/doc/ruby-satsolver-0.16.3
+ cp -pr bindings/ruby/html /home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/share/doc/ruby-satsolver-0.16.3
cp: cannot stat `bindings/ruby/html': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.5sXmbs (%doc)


RPM build errors:
    File not found: /home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/lib/ruby/site_ruby/1.8/satsolver
    File not found: /home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/lib/ruby/site_ruby/1.8/satsolver.rb
    File not found by glob: /home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/lib/ruby/site_ruby/1.8/satsolver/*.rb
    File not found: /home/msuchy/rpmbuild/BUILDROOT/satsolver-0.16.3-1.fc15.x86_64/usr/lib64/ruby/site_ruby/1.8/x86_64-linux/satsolver.so
    Bad exit status from /var/tmp/rpm-tmp.5sXmbs (%doc)
Comment 13 Miroslav Suchý 2011-08-16 04:40:07 EDT
And:
+ ctest
Test project /home/msuchy/rpmbuild/BUILD/satsolver-0.16.3
    Start 1: solv_test
1/5 Test #1: solv_test ........................   Passed    0.01 sec
    Start 2: solver_testsuite
2/5 Test #2: solver_testsuite .................   Passed    3.13 sec
    Start 3: tools_content_os11beta3
3/5 Test #3: tools_content_os11beta3 ..........***Failed    0.14 sec
    Start 4: tools_content_os11_1
4/5 Test #4: tools_content_os11_1 .............***Failed    0.04 sec
    Start 5: tools_rpmmd_pattern
5/5 Test #5: tools_rpmmd_pattern ..............***Failed    0.04 sec

40% tests passed, 3 tests failed out of 5

Total Test time (real) =   6.38 sec

The following tests FAILED:
          3 - tools_content_os11beta3 (Failed)
          4 - tools_content_os11_1 (Failed)
          5 - tools_rpmmd_pattern (Failed)
Errors while running CTest
Comment 14 T.C. Hollingsworth 2011-08-16 06:58:53 EDT
Well, part of the problem is that I forgot BuildRequires on swig, but even when I add that build fails on koji, because it can't find the Python or Ruby interpreters.  I have BuildRequires on python2-devel and ruby, and YUM successfully installs them in koji, yet attempting to run either interpreter results in an error:

sh: ruby: command not found
sh: ruby: command not found
sh: /usr/bin/python: No such file or directory
sh: /usr/bin/python: No such file or directory
sh: /usr/bin/python: No such file or directory
sh: /usr/bin/python: No such file or directory
sh: /usr/bin/python: No such file or directory

Even stranger still, CMake can find Python but not Ruby:

/usr/bin/ruby: no such file to load -- vendor-specific (LoadError)
-- Found PythonLibs: /usr/lib64/libpython2.7.so 
-- Found Perl: /usr/bin/perl 
-- Found PythonInterp: /usr/bin/python2.7 
-- Python executable: /usr/bin/python2.7
-- Python lib dir: /usr/lib/python2.7/site-packages
-- Python site dir: /usr/lib64/python2.7/site-packages

Looking over the ctest output, the Python module seems to be building but rpmbuild never gets far enough to know for sure.

Koji build log:  http://koji.fedoraproject.org/koji/getfile?taskID=3275381&name=build.log
Koji task:  http://koji.fedoraproject.org/koji/taskinfo?taskID=3275381

This builds fine locally:  http://www.u.arizona.edu/~tchol/fedora/satsolver-0.16.3-1.fc15.x86_64.build.log
Comment 15 T.C. Hollingsworth 2011-08-19 06:48:24 EDT
Closing because this is blocked on bug729200.

I'm deleting the SRPMS to save my horribly close disk quota but I'll leave the specfiles up for future contributors interested in packaging this.
Comment 16 Susi Lehtola 2011-12-16 04:55:20 EST

*** This bug has been marked as a duplicate of bug 442714 ***

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