Bug 1243379 - Review Request: tinyxpath - Small footprint XPath syntax decoder
Summary: Review Request: tinyxpath - Small footprint XPath syntax decoder
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: František Dvořák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1193990
TreeView+ depends on / blocked
 
Reported: 2015-07-15 10:49 UTC by Alexandre Moine
Modified: 2015-08-15 02:22 UTC (History)
3 users (show)

Fixed In Version: tinyxpath-1.3.1-3.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-10 10:11:04 UTC
Type: ---
Embargoed:
valtri: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Alexandre Moine 2015-07-15 10:49:02 UTC
Spec URL: https://nobrakal.fedorapeople.org/tinyxpath.spec
SRPM URL: https://nobrakal.fedorapeople.org/tinyxpath-1.3.1-1.fc22.src.rpm

Description: Tinyxpath is a small footprint XPath syntax decoder that use tinyxml, and written in c++.

I have to package it for opencity, a city game simulator (see https://bugzilla.redhat.com/show_bug.cgi?id=1193990 ), because, like tinyxml, tinyxpath is designed to be a bundled library.

I only had to unbundle tinyxml, and make a shared library from the code.

The package build just fine in mock with fedora 22-x86_64

Fedora Account System Username: nobrakal

Comment 1 František Dvořák 2015-07-30 10:40:04 UTC
It's funny opencity unbundled the tinyxml from tinyxpath and bundle it itself. :-) Good catch.

Issues found:

1) License file

Currently it is used the link created automatically by automake, which points to GPL license file. But the license is zlib and source code doesn't contain text license.

libpng/zlib license doesn't require separate license text file distributed with the sources/binaries, so it is not show-stopper for Fedora packaging and you can just remove the wrong link.

The proper way is to ask upstream to include the license text:

https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text


2) AUTHORS

This file can be included in the package documentation.


3) shared library versioning

See the link: http://fedoraproject.org/wiki/Packaging:Guidelines#Downstream_.so_name_versioning

The soname should be something like libxpath.so.0.1.


4) libxpath.so* files are in both packages (tinyxpath, tinyxpath-devel), the *.so file (the link) should be in -devel, the other files in the main package.

Something like:

%files
%{_libdir}/lib%{name}.so.0
%{_libdir}/lib%{name}.so.0.*

%files devel
%{_libdir}/lib%{name}.so


5) tinyxpath binary is more like test and example code, it is not needed to include it in the tinyxpath package

By the way you can add %check section and use tinyxpath binary there. :-) It always returns zero exit code, but the out.htm file will contain some <em> html tags in case of errors. So the section could look like this?:

%check
./tinyxpath
grep -q '<em>' out.htm && false

The problem is there is one error. It is probably not important error, but it could be reported upstream (and ignored in the %check).


6) fedora-review complains about requirement of -devel on the base package:

[ ]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     tinyxpath-devel

There is just missing the %{?_isa}.


7) 'Requires: tinyxml' not needed, dependencies on the libraries are generated automagically by rpmbuild scripts.

See http://fedoraproject.org/wiki/Packaging:Guidelines#Explicit_Requires .


8) fedora-review complains about mixing of %{buildroot} and $RPM_BUILD_ROOT

See: http://fedoraproject.org/wiki/Packaging/Guidelines#macros


9) cosmetic (you can ignore): I would move the %post and %postun sections before the %file section. This is just cosmetic and I should probably not even mention it here. But because of atypical placing my first impression was the %post/%postun sections are not there. :-)

Comment 2 Alexandre Moine 2015-07-30 21:54:40 UTC
Spec URL: https://nobrakal.fedorapeople.org/tinyxpath.spec
SRPM URL: https://nobrakal.fedorapeople.org/tinyxpath-1.3.1-2.fc22.src.rpm

Hi,

Thank you for your reply :D (and yes, tinyxml is my pet peeve)

So,

>1) License file
>
>The proper way is to ask upstream to include the license text:
>
>https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text

Reported: https://sourceforge.net/p/tinyxpath/feature-requests/3/


2) Done


>3) shared library versioning
>
>See the link: http://fedoraproject.org/wiki/Packaging:Guidelines#Downstream_.so_name_versioning
>
>The soname should be something like libxpath.so.0.1.

Done, I use "1" instead of %{version} on the contrary of the doc... Because %{version} is very long (1.3.1)

>4) 
Done


>5) 
>
>The problem is there is one error. It is probably not important error, but it >could be reported upstream (and ignored in the %check).

Corrected with a patch, seems like a bug, reported https://sourceforge.net/p/tinyxpath/support-requests/7/


6) Corrected


7) Corrected


8) Corrected, I've removed the out-of-date "rm -rf $RPM_BUILD_ROOT"


9) Corrected, you're right ;)

Comment 3 František Dvořák 2015-07-31 09:00:34 UTC
Great, good work. :-)

More issues (not noticed before or in the new changes):

10) linking
 - I would rather not include the main.o file in the library (I guess the 'main' symbol will be problematic)
 - also there is missing -ltinyxml: it will add the automatic dependency on the tinyxml library and fix undefined-non-weak-symbol errors from rpmlint

Something like?:

g++ $RPM_OPT_FLAGS -shared -o lib%{name}.so.0.1 \
   -Wl,-soname,lib%{name}.so.0.1 `ls *.o | grep -v main.o` -ltinyxml


11) why is ./tinyxpath called twice in the %check? It works OK though.


12) installing AUTHORS manually is not needed, %doc macro in %file will pick it automatically
(or in case of manual installation it would be better _pkgdocdir macro)

See: http://fedoraproject.org/wiki/Packaging:Guidelines#Documentation


13) devel subpackage could have also runtime require on tinyxml-devel package

...because tinyxpath headers includes headers from tinyxml.

Comment 4 Alexandre Moine 2015-07-31 11:25:38 UTC
Hi,

Spec URL: https://nobrakal.fedorapeople.org/tinyxpath.spec
SRPM URL: https://nobrakal.fedorapeople.org/tinyxpath-1.3.1-3.fc22.src.rpm

10)
Right, btw the main.cpp seem only contain the test code for the executable.

11) 
Corrected

12)
Corrected

13)
tinyxml-devel is now a Requires of tinyxpath-devel (One library to rule them all, One library to find them,
One library to bring them all and in the darkness bind them)

Thank you again for your great review :D

Comment 5 František Dvořák 2015-07-31 12:29:48 UTC
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]: Header files in -devel subpackage, if present.
[x]: ldconfig called in %post and %postun if required.
[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.
[-]: 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]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "zlib/libpng". 1 files have unknown
     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.
[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.
[-]: 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).
     OK: both warnings are fine (devel subpackage must be arched, no API docs)
[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]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[x]: 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.
[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.
[x]: Scriptlets must be sane, if 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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[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]: Uses parallel make %{?_smp_mflags} macro.
[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: tinyxpath-1.3.1-3.fc24.x86_64.rpm
          tinyxpath-devel-1.3.1-3.fc24.x86_64.rpm
          tinyxpath-1.3.1-3.fc24.src.rpm
tinyxpath-devel.x86_64: W: only-non-binary-in-usr-lib
tinyxpath-devel.x86_64: W: no-documentation
3 packages and 0 specfiles checked; 0 errors, 2 warnings.




Rpmlint (debuginfo)
-------------------
Checking: tinyxpath-debuginfo-1.3.1-3.fc24.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
tinyxpath-devel.x86_64: W: only-non-binary-in-usr-lib
tinyxpath-devel.x86_64: W: no-documentation
3 packages and 0 specfiles checked; 0 errors, 2 warnings.



Requires
--------
tinyxpath-devel (rpmlib, GLIBC filtered):
    libtinyxpath.so.0.1()(64bit)
    tinyxml-devel
    tinyxpath(x86-64)

tinyxpath (rpmlib, GLIBC filtered):
    /sbin/ldconfig
    libc.so.6()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libm.so.6()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libtinyxml.so.0()(64bit)
    rtld(GNU_HASH)



Provides
--------
tinyxpath-devel:
    tinyxpath-devel
    tinyxpath-devel(x86-64)

tinyxpath:
    libtinyxpath.so.0.1()(64bit)
    tinyxpath
    tinyxpath(x86-64)



Source checksums
----------------
http://downloads.sourceforge.net/tinyxpath/tinyxpath_1_3_1.zip :
  CHECKSUM(SHA256) this package     : c1ea02fffed6f2353870c96b41f62c382ebc0812997322ab8683d016e4ea126b
  CHECKSUM(SHA256) upstream package : c1ea02fffed6f2353870c96b41f62c382ebc0812997322ab8683d016e4ea126b


Generated by fedora-review 0.5.3 (bcf15e3) last change: 2015-05-04
Command line :/usr/bin/fedora-review -m fedora-rawhide-x86_64 -n tinyxpath
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, C/C++
Disabled plugins: Java, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

=======

All good. Package APPROVED!

Comment 6 Alexandre Moine 2015-07-31 17:39:17 UTC
New Package SCM Request
=======================
Package Name: tinyxpath
Short Description: Small XPath syntax decoder
Upstream URL: http://tinyxpath.sourceforge.net/
Owners: nobrakal
Branches: f21 f22 f23
InitialCC:

Comment 7 Gwyn Ciesla 2015-07-31 17:53:06 UTC
Git done (by process-git-requests).

Comment 8 Fedora Update System 2015-08-04 16:39:16 UTC
tinyxpath-1.3.1-3.fc23 has been submitted as an update for Fedora 23.
https://admin.fedoraproject.org/updates/tinyxpath-1.3.1-3.fc23

Comment 9 Fedora Update System 2015-08-04 16:41:33 UTC
tinyxpath-1.3.1-3.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/tinyxpath-1.3.1-3.fc22

Comment 10 Fedora Update System 2015-08-04 16:56:00 UTC
tinyxpath-1.3.1-3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/tinyxpath-1.3.1-3.fc21

Comment 11 Fedora Update System 2015-08-05 00:11:18 UTC
tinyxpath-1.3.1-3.fc23 has been pushed to the Fedora 23 testing repository.

Comment 12 Fedora Update System 2015-08-10 10:11:04 UTC
tinyxpath-1.3.1-3.fc23 has been pushed to the Fedora 23 stable repository.

Comment 13 Fedora Update System 2015-08-15 02:09:50 UTC
tinyxpath-1.3.1-3.fc22 has been pushed to the Fedora 22 stable repository.

Comment 14 Fedora Update System 2015-08-15 02:22:35 UTC
tinyxpath-1.3.1-3.fc21 has been pushed to the Fedora 21 stable repository.


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