Bug 769832 - Review Request: kmod - Linux kernel module management utilities (official replacement for module-init-tools)
Summary: Review Request: kmod - Linux kernel module management utilities (official rep...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Neil Horman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-22 12:46 UTC by Jon Masters
Modified: 2011-12-23 18:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-23 18:11:32 UTC
Type: ---
Embargoed:
nhorman: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Jon Masters 2011-12-22 12:46:41 UTC
Spec URL: http://jcm.fedorapeople.org/kmod/packages/review/initial/kmod.spec
SRPM URL: http://jcm.fedorapeople.org/kmod/packages/review/initial/kmod-2-2.fc17.src.rpm
Description: The kmod package provides various programs needed for automatic
loading and unloading of modules under 2.6, 3.x, and later kernels, as well
as other module management programs. Device drivers and filesystems are two
examples of loaded and unloaded modules.

Comment 1 Jon Masters 2011-12-22 12:51:38 UTC
This is likely to get an update over the weekend, but it's a rough first cut. Neil Horman has agreed to help review it for me, so he'll be grabbing this bug.

For the moment, it is intention that the new tools be parallel installed and have a kmod- prefix. I do not think that should affect review of the package though, since my understanding is that it is more about general guideline conformance than whether we're yet ready to replace the binaries. However, I will read through the material and in the worst case we can hold off a few days or a week or so before moving forward.

Comment 2 Neil Horman 2011-12-22 13:29:08 UTC
I'll start reviewing based on the rpm you have above.

Comment 3 Neil Horman 2011-12-22 13:39:27 UTC
rpmlint output on source package:
[nhorman@hmsreliant jcm]$ rpmlint ./kmod-2-2.fc17.src.rpm 
kmod.src: W: spelling-error %description -l en_US filesystems -> file systems, file-systems, systematizes
kmod.src:20: W: unversioned-explicit-obsoletes modutils-devel
kmod.src:20: W: unversioned-explicit-obsoletes modutils
kmod.src:78: E: hardcoded-library-path in $RPM_BUILD_ROOT/lib
kmod.src:79: E: hardcoded-library-path in $RPM_BUILD_ROOT/lib/modprobe.d
kmod.src:106: E: hardcoded-library-path in /lib/modprobe.d
kmod.src: W: invalid-url Source0: kmod-2.tar.xz
1 packages and 0 specfiles checked; 3 errors, 4 warnings.

I'd ignore the filesystem warning, I think the spell checker  is overly sensitive there anyway.

The unversioned Obsoletes is certainly a problem, as It would seem to prevent the side-by-side installation. I'd suggest removing it given that you plan to do a kmod-prefix on your tools to make it parallel install.  You can add it back later.

I expect you want to replace the lib in the mkdirs on line 78/79/106 with %{_libdir}

The url you want on line 106 I think is
http://packages.profusion.mobi/kmod/%{name}-%{version}.tar.xz

Comment 4 Neil Horman 2011-12-22 13:44:07 UTC
[nhorman@hmsreliant x86_64]$ rpmlint ./kmod-2-2.fc15.x86_64.rpm 
kmod.x86_64: W: spelling-error %description -l en_US filesystems -> file systems, file-systems, systematizes
kmod.x86_64: W: incoherent-version-in-changelog 2-1 ['2-2.fc15', '2-2']
kmod.x86_64: W: obsolete-not-provided modutils-devel
kmod.x86_64: W: obsolete-not-provided modutils
kmod.x86_64: E: binary-or-shlib-defines-rpath /sbin/kmod-rmmod ['/usr/lib64']
kmod.x86_64: E: binary-or-shlib-defines-rpath /sbin/kmod-modprobe ['/usr/lib64']
kmod.x86_64: E: binary-or-shlib-defines-rpath /sbin/kmod-insmod ['/usr/lib64']
kmod.x86_64: E: binary-or-shlib-defines-rpath /sbin/kmod-modinfo ['/usr/lib64']
kmod.x86_64: E: binary-or-shlib-defines-rpath /sbin/kmod-lsmod ['/usr/lib64']
kmod.x86_64: W: no-documentation
kmod.x86_64: W: no-manual-page-for-binary kmod-lsmod
kmod.x86_64: W: no-manual-page-for-binary kmod-rmmod
kmod.x86_64: W: no-manual-page-for-binary kmod-modinfo
kmod.x86_64: W: no-manual-page-for-binary kmod-insmod
kmod.x86_64: W: no-manual-page-for-binary kmod-modprobe
kmod.x86_64: W: dangerous-command-in-%pre mv
1 packages and 0 specfiles checked; 5 errors, 11 warnings.

Nothing really here that the source file didn't catch.  T

The changelog is an easy fix

The obsoletes have already been discussed

he binary-or-shlib errors are the result of the hardcoded /lib in the spec file and will go away when thats fixed.

The docs should be included (at least NEWS README TODO and COPYING).  The last one will help re-enforce the license selected in the spec file.

The man page stuff can be ignored, I'm sure it will get added as the package continues to mature.

Comment 5 Neil Horman 2011-12-22 13:47:50 UTC
[nhorman@hmsreliant x86_64]$ rpmlint kmod-debuginfo-2-2.fc15.x86_64.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

Good.


[nhorman@hmsreliant x86_64]$ rpmlint kmod-devel-2-2.fc15.x86_64.rpm
kmod-devel.x86_64: W: no-documentation
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
Good.  The warning can be ignored, that belongs in the base package.

[nhorman@hmsreliant x86_64]$ rpmlint kmod-libs-2-2.fc15.x86_64.rpm
kmod-libs.x86_64: W: spelling-error %description -l en_US runtime -> run time, run-time, rudiment
kmod-libs.x86_64: W: no-documentation
kmod-libs.x86_64: W: devel-file-in-non-devel-package /lib64/libkmod.so

Documentation and spelling errors can be ignored.  The library file needs fixing.  IIRC the right thing to do is version that library file, which will squash the error, and then add a %post script to the -devel package to symlink libkmod.so to its corresponding versioned library.

Comment 6 Jon Masters 2011-12-22 13:48:01 UTC
NOTE: The use of /lib(64) is obviously required at this point. We might get a unified filesystem in the future, but for now it needs to be done this way. I have been told it is best to have the generic devel .so in the -devel package and under /usr. I'll look into correct practice there - have to admit, I'm not so used to splitting libraries up between two lib locations for the same thing.

Comment 7 Jon Masters 2011-12-22 13:48:52 UTC
Thanks for the initial review (comment 6 was written before seeing yours). I'm going to crash out at some point soon and get back to this later.

Comment 8 Neil Horman 2011-12-22 14:15:35 UTC
The package must be named according to the Package Naming Guidelines . - Check

The spec file name must match the base package %{name}, in the format %{name}.spec - Check

The package must meet the Packaging Guidelines - Check, nothing obviously wrong.  The COPYINg file needs to be included to support the license tag inthe spec file, but thats already been mentioned in the rpmlint output.

The package must be licensed with a Fedora approved license and meet the Licensing Guidelines . - check

The License field in the package spec file must match the actual license. [3] - Check

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. - This will be fixed when the warning about the lack of docs is fixed from the rpmlint output

The spec file must be written in American English. - Check

The spec file for the package MUST be legible. - Check

The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use md5sum for this task. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this. - Check, although the url needs updating in the spec file:
[nhorman@hmsreliant jcm]$ rpm -ivh kmod-2-2.fc17.src.rpm 
   1:kmod                   warning: user jcm does not exist - using root
warning: group jcm does not exist - using root
warning: user jcm does not exist - using root 98%)
warning: group jcm does not exist - using root
########################################### [100%]
[nhorman@hmsreliant jcm]$ cd ~/rpmbuild/SOURCES/^C
[nhorman@hmsreliant jcm]$ md5sum ~/rpmbuild/SOURCES/kmod-2.tar.xz 
6017364434377f6724f749d7a28c5d7a  /home/nhorman/rpmbuild/SOURCES/kmod-2.tar.xz
wget: /home/nhorman/.netrc:1: unknown token “sZ3MK4yz5UH6”
Resolving packages.profusion.mobi... 74.207.229.112
Connecting to packages.profusion.mobi|74.207.229.112|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 262484 (256K) [application/x-tar]
Saving to: “kmod-2.tar.xz”

100%[==========================================================================>] 262,484      824K/s   in 0.3s    

2011-12-22 09:02:27 (824 KB/s) - “kmod-2.tar.xz” saved [262484/262484]

[nhorman@hmsreliant jcm]$ md5sum ./kmod-2.tar.xz 
6017364434377f6724f749d7a28c5d7a  ./kmod-2.tar.xz



The package MUST successfully compile and build into binary rpms on at least one primary architecture - Check, see http://koji.fedoraproject.org/koji/taskinfo?taskID=3601228

If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch. Each architecture listed in ExcludeArch MUST have a bug filed in bugzilla, describing the reason that the package does not compile/build/work on that architecture. The bug number MUST be placed in a comment, next to the corresponding ExcludeArch line - Not applicable, see previous


All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense. - check, although, why is glibc-static required.  The initramfs has glibc available doesn't it?  We should be able to build dynamically here.


The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.- Not applicable, no human readable output provided from the pkg.

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. - check

Packages must NOT bundle copies of system libraries.- Check

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. - Not applicable, not relocatable.

 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. - Check

 A Fedora package must not list a file more than once in the spec file's %files listings. (Notable exception: license texts in specific situations)- Check

Permissions on files must be set properly. Executables should be set with executable permissions, for example. - Check

Each package must consistently use macros. - check

The package must contain code, or permissable content. - Check

 Large documentation files must go in a -doc subpackage. (The definition of large is left up to the packager's best judgement, but is not restricted to size. Large can refer to either size or quantity). - Not applicable

If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present. - Check

Header files must be in a -devel package. - Check


Static libraries must be in a -static package. - Not applicable, no static libraries

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. - should be fixed as per rpmlint output discussion.

In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name}%{?_isa} = %{version}-%{release} - Check

Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.- Check

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. If you feel that your packaged GUI application does not need a .desktop file, you must put a comment in the spec file with your explanation. - Not applicable

 Packages must not own files or directories already owned by other packages. The rule of thumb here is that the first package to be installed should own the files or directories that other packages may rely upon. This means, for example, that no package in Fedora should ever share ownership with any of the files or directories owned by the filesystem or man package. If you feel that you have a good reason to own a file or directory that another package owns, then please present that at package review time. - Check

All filenames in rpm packages must be valid UTF-8. - Check.


By an large, looks pretty good.  I'd fix the rpmlint output errors, look at the static library use, and I'd say we're in pretty good shape.

Comment 9 Neil Horman 2011-12-22 14:19:55 UTC
Jon, FWIW a good example usage of -devel and base library usage is zlib.  the base package has the versioned library, while the devel package includes a symlink file in the manifest that is unversioned and points to the versioned file from the base package.  by doing that the, along with the Requires line that you already include in the -devel part of the spec, the devel library always points to the correct version of the base library as per the version of the rpms you have installed.

Comment 10 Jon Masters 2011-12-22 21:12:30 UTC
Taking care of these now. Just discussed all of the existing issues with Neil.

Comment 11 Neil Horman 2011-12-22 21:14:12 UTC
Btw, jon, you were just asking on the phone about a macro to generically encode /lib and /lib64 in an arch independent way.  %{_lib} will do that for you.  Its defined in /usr/lib/rpm/macros in fedora.  Hope that helps!

Comment 12 Jon Masters 2011-12-23 00:44:28 UTC
Oh yea, what I was saying is already do that :) But there's no equivalent of a top level /lib or /lib64, so I end up using /%{_lib} (note the slash). Still, it will suffice IMO. Thanks!

Comment 13 Neil Horman 2011-12-23 00:46:01 UTC
Ah, sorry, I misunderstood.  Ok, post your new spec and srpm here, I'll take a look and sign off, thanks!

Comment 14 Jon Masters 2011-12-23 01:41:47 UTC
Neil,

Updated packages are now available here:

http://jcm.fedorapeople.org/kmod/packages/review/take2/

All of the issues are fixed, except that please note the /lib hard coded paths do actually need to stay. These aren't libraries, these are referring to /lib/modprobe.d which we introduced a while back to complement /lib/modules. It is always in that location, irrespective of multi-arch. I also updated the repos for fc16 and am doing so for rawhide right now. It even works :)

Jon.

Comment 15 Jon Masters 2011-12-23 01:44:46 UTC
(the withrootlibdir patch is going away, it's in the next release)

The binaries are moved into /bin at the suggestion that they aren't setuid and belong generally in /bin these days. Also the old obsoletes are removed, the library so files are moved around (consistent with other existing packages). I think everything is as close to good as it can be!

Comment 16 Neil Horman 2011-12-23 02:34:48 UTC
Ok, rpmlint shows all the warnings and errors are cleaned up, save for the /lib pathing ones, and as per your explination, we can waive those.  Package approved.

Comment 17 Jon Masters 2011-12-23 02:55:18 UTC
Thanks man!

Comment 18 Jon Masters 2011-12-23 02:59:10 UTC
New Package SCM Request
=======================
Package Name: kmod
Short Description: Linux kernel module management utilities (replacement for module-init-tools)
Owners: jcm msivak
Branches: f17
InitialCC:

Comment 19 Jon Masters 2011-12-23 03:11:10 UTC
(slight problem setting the cvs flags on this bug, I've opened ticket 5008 about it and hope to be able to get this out over the next day or two after they look. For now, I am headed out for a couple of hours)

Comment 20 Gwyn Ciesla 2011-12-23 03:54:52 UTC
Git done (by process-git-requests).

f17 isn't branched yet, so it's still==devel.

Comment 21 Jon Masters 2011-12-23 18:11:32 UTC
Packages built!


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