Bug 562330 - Review Request: libnih - Lightweight application development library
Summary: Review Request: libnih - Lightweight application development library
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Eric Smith
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 562141
TreeView+ depends on / blocked
 
Reported: 2010-02-06 00:09 UTC by Casey Dahlin
Modified: 2014-06-18 08:47 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-07 21:10:03 UTC
Type: ---
Embargoed:
spacewar: fedora-review+
j: fedora-cvs+


Attachments (Terms of Use)

Description Casey Dahlin 2010-02-06 00:09:58 UTC
Spec URL: http://sadmac.fedorapeople.org/libnih.spec
SRPM URL: http://sadmac.fedorapeople.org/libnih-1.0.1-1.fc12.src.rpm
Description:
libnih is a small library for C application development containing functions that, despite its name, are not implemented elsewhere in the standard library set.

libnih is roughly equivalent to other C libraries such as glib, except that its
focus is on a small size and intended for applications that sit very low in the
software stack, especially outside of /usr.

The latest release of Upstart requires this package.

Comment 2 Eric Smith 2010-02-07 04:32:23 UTC
rpmlint output:
../SPECS/libnih.spec:52: E: hardcoded-library-path in %{_prefix}/lib/pkgconfig/*
3 packages and 1 specfiles checked; 1 errors, 0 warnings.

See http://fedoraproject.org/wiki/Common_Rpmlint_issues#hardcoded-library-path

SHOULD: The package builds in mock. NEEDWORK

(I presume the "SHOULD" in the review guidelines means that this is a SHOULD for the reviewer; presumably the package actually MUST build with mock, or it most likely won't build with koji.)

tail of build.log says:

Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.mwUO9D
+ umask 022
+ cd /builddir/build/BUILD
+ cd libnih-1.0.1
+ LANG=C
+ export LANG
+ unset DISPLAY
+ autoreconf -i --force
Can't exec "autopoint": Permission denied at /usr/share/autoconf/Autom4te/FileUtils.pm line 345.
autoreconf: failed to run autopoint: Permission denied
autoreconf: autopoint is needed because this package uses Gettext
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.mwUO9D (%build)
    Bad exit status from /var/tmp/rpm-tmp.mwUO9D (%build)
Child returncode was: 1
EXCEPTION: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/libnih.spec']
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.6/site-packages/mock/util.py", line 324, in do
    raise mock.exception.Error, ("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/libnih.spec']
LEAVE do --> EXCEPTION RAISED

MUST: The package must be named according to the Package Naming Guidelines. OK
MUST: The spec file for the package is legible and macros are used
consistently. OK
MUST: The package must be licensed with a Fedora approved license and meet the 
Licensing Guidelines. NEEDSWORK

None of the source files in nih-dbus-tool/tests/expected have copyright and license information, and I don't see a blanket statement that covers them.

MUST: The License field in the package spec file must match the actual license.
OK
MUST: 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 must be included in %doc. OK
MUST: The spec file must be written in American English. OK
MUST: The spec file for the package MUST be legible. OK
MUST: The sources used to build the package must match the upstream source, as
provided in the spec URL. OK
MUST: The package MUST successfully compile and build into binary rpms on at
least one primary architecture. OK
MUST: If the package does not successfully compile, build or work on an
architecture, then those architectures should be listed in the spec in
ExcludeArch. N/A
MUST: All build dependencies must be listed in BuildRequires, NEEDSWORK

I'm not sure about the build dependencies; that could be the reason it fails to build with mock.

MUST: The spec file MUST handle locales properly. OK
MUST: Every binary RPM package (or subpackage) which stores shared library
files (not just symlinks) in any of the dynamic linker's default paths, must
call ldconfig in %post and %postun. OK
MUST: Packages must NOT bundle copies of system libraries. OK
MUST: If the package is designed to be relocatable, the packager must state
this fact in the request for review, along with the rationalization for
relocation of that specific package. Without this, use of Prefix: /usr is
considered a blocker. OK
MUST: A package must own all directories that it creates. If it does not create
a directory that it uses, then it should require a package which does create
that directory. OK
MUST: A Fedora package must not list a file more than once in the spec file's
%files listings. OK
MUST: Permissions on files must be set properly. Executables should be set with
executable permissions, for example. Every %files section must include a
%defattr(...) line. OK
MUST: Each package must have a %clean section, which contains rm -rf
%{buildroot} (or $RPM_BUILD_ROOT). OK
MUST: Each package must consistently use macros. OK
MUST: The package must contain code, or permissable content. OK
MUST: Large documentation files must go in a -doc subpackage. N/A
MUST: If a package includes something as %doc, it must not affect the runtime
of the application. OK
MUST: Header files must be in a -devel package. OK
MUST: Static libraries must be in a -static package. N/A
MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' NEEDSWORK
MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1),
then library files that end in .so (without suffix) must go in a -devel
package. OK
MUST: In the vast majority of cases, devel packages must require the base
package using a fully versioned dependency OK
MUST: Packages must NOT contain any .la libtool archives, these must be removed
in the spec if they are built. OK
MUST: Packages containing GUI applications must include a %{name}.desktop file,
and that file must be properly installed with desktop-file-install in the
%install section N/A
MUST: Packages must not own files or directories already owned by other
packages. OK
MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot}
(or $RPM_BUILD_ROOT). OK
MUST: All filenames in rpm packages must be valid UTF-8. OK

SHOULD: If the package does not include license text(s) as separate files from
upstream, the packager should query upstream to include it. OK
SHOULD: The description and summary sections in the package spec file should
contain translations for supported Non-English languages, if available. N/A
SHOULD: The reviewer should test that the package functions as described. A
package should not segfault instead of running, for example. NEEDSWORK

The RPM I built on a Fedora 12 x86_64 system fails to install, reporting:

$ rpm -Uvh ../RPMS/x86_64/libnih-*.rpm
error: Failed dependencies:
	libc.so.6(GLIBC_PRIVATE)(64bit) is needed by libnih-1.0.1-2.fc12.x86_64
$ ls /lib64/libc.so*
/lib64/libc.so.6

I'm not sure whether this indicates a build problem.

SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague,
and left up to the reviewers judgement to determine sanity. OK
SHOULD: Usually, subpackages other than devel should require the base package
using a fully versioned dependency. OK
SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and
this is usually for development purposes, so should be placed in a -devel pkg.
A reasonable exception is that the main pkg itself is a devel tool not
installed in a user runtime, e.g. gcc or gdb. OK
SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin,
/usr/bin, or /usr/sbin consider requiring the package which provides the file
instead of the file itself. N/A
SHOULD: your package should contain man pages for binaries/scripts. If it
doesn't, work with upstream to add them where they make sense. OK


Summary:
* Fails to build in mock.  Possible missing build dependency?
* Some source files missing licensing information, should be fixed upstream.
* Need "Requires: pkgconfig"
* Package won't install when built on Fedora 12 x86_64.  Should it?

Comment 3 Casey Dahlin 2010-02-07 07:39:22 UTC
(In reply to comment #2)
> rpmlint output:
> ../SPECS/libnih.spec:52: E: hardcoded-library-path in
> %{_prefix}/lib/pkgconfig/*
> 3 packages and 1 specfiles checked; 1 errors, 0 warnings.
> 

We may have to give this one a pass. The autoconf from upstream puts it exactly there.

Everything but the install issue and Licensing should be addressed by:
http://sadmac.fedorapeople.org/libnih-1.0.1-3.fc12.src.rpm

Comment 4 Casey Dahlin 2010-02-07 08:10:25 UTC
Re-uploaded with install issue fixed.

Comment 5 Eric Smith 2010-02-09 03:20:37 UTC
I've confirmed that it now builds with mock for Fedora 12 x86_64, the resulting RPMs install, and nih-dbus-tool works at least as far as getting a usage message.  (I don't know how to test beyond that.)  I agree that everything but the rpmlint hardcoded-library-path error and the licensing issue have been fixed.

rpmlint reports:
libnih.spec:63: E: hardcoded-library-path in %{_prefix}/lib/pkgconfig/*
libnih.x86_64: W: unused-direct-shlib-dependency /lib64/libnih-dbus.so.1.0.0 /lib64/libpthread.so.0
3 packages and 1 specfiles checked; 1 errors, 1 warnings.

I'm not sure why it's getting the warning.

The package looks good other than the hardcoded-library-path and the licensing issue.  Have you submitted a ticked upstream to get the licensing fixed?  I don't think I can approve the package with either issue (I've already been chastised once for approving a package where I overlooked some source files without copyright/license information), but if another reviewer is willing to do it, they should feel free to reassign this review request to themself.

Comment 6 Casey Dahlin 2010-02-09 04:28:49 UTC
I'd probably just send the patch. I have a few other things on top of my upstream queue that I'd like to finish.

Upstart needs this, making this potentially (but not necessarily) critical. If it is I'm guessing I can get a higher authority to give it a push without you having to be chastised again :) if not I'll have a patch soon.

Comment 7 Susi Lehtola 2010-02-09 08:43:01 UTC
(In reply to comment #5)
> rpmlint reports:
> libnih.spec:63: E: hardcoded-library-path in %{_prefix}/lib/pkgconfig/*

This one is OK as long as the pkgconfig file is arch independent.
Please be more specific with the %files, though - you might end up with all sorts of surprises with just wildcards.

> libnih.x86_64: W: unused-direct-shlib-dependency /lib64/libnih-dbus.so.1.0.0
> /lib64/libpthread.so.0
> 3 packages and 1 specfiles checked; 1 errors, 1 warnings.
> 
> I'm not sure why it's getting the warning.

https://fedoraproject.org/wiki/Common_Rpmlint_issues#unused-direct-shlib-dependency

Comment 8 Petr Lautrbach 2010-02-09 12:11:38 UTC
> MUST: The package must be licensed with a Fedora approved license and meet the 
> Licensing Guidelines. NEEDSWORK
> None of the source files in nih-dbus-tool/tests/expected have copyright and
> license information, and I don't see a blanket statement that covers them.

License is included in source tar ball in file COPYING so there is no need to specify it in every single file again.

>> rpmlint reports:
>> libnih.spec:63: E: hardcoded-library-path in %{_prefix}/lib/pkgconfig/*

> This one is OK as long as the pkgconfig file is arch independent.

No, it's not:
$ diff libnih.pc libnih-x86_64.pc
3c3
< libdir=/lib
---
> libdir=/lib64

But it's ok, it just hits this part of spec file:

test "lib" = "%{_lib}" || \
        mv $RPM_BUILD_ROOT%{_prefix}/lib/pkgconfig/* \
        $RPM_BUILD_ROOT%{_libdir}/pkgconfig



I'm missing section %check. Why it is not included as it is in upstart?

Comment 9 Susi Lehtola 2010-02-09 14:01:23 UTC
(In reply to comment #8)
> >> rpmlint reports:
> >> libnih.spec:63: E: hardcoded-library-path in %{_prefix}/lib/pkgconfig/*
> 
> > This one is OK as long as the pkgconfig file is arch independent.
> 
> But it's ok, it just hits this part of spec file:

That's right. But IMHO it would be nicer to use a configure flag or patch to avoid using that kind of conditionals..

Comment 10 Eric Smith 2010-02-10 01:10:46 UTC
Since Petr Lautrbach says just having COPYING is sufficient, if you update the spec to solve the pkgconfig issue I'll approve the package.  Maybe you can fix the unused-direct-shlib-dependency too, though I'm not going to hold it up for that warning.

Comment 11 Casey Dahlin 2010-02-10 14:59:24 UTC
http://sadmac.fedorapeople.org/libnih-1.0.1-4.fc12.src.rpm

spec also updated. Both issues fixed.

Comment 12 Eric Smith 2010-02-12 06:51:49 UTC
All issues have been fixed, so this package is

APPROVED

Comment 13 Casey Dahlin 2010-02-16 22:09:37 UTC
New Package CVS Request
=======================
Package Name: libnih
Short Description: lightweight application development library
Owners: sadmac
Branches: F-12
InitialCC: plautrba notting

Comment 14 Jason Tibbitts 2010-02-19 19:24:40 UTC
CVS done (by process-cvs-requests.py).

Added an F-13 branch as well.

Comment 15 Eric Smith 2010-04-07 21:10:03 UTC
Closing since libnih has been pushed to F-12 and F-13.


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