Bug 812121 - Review Request: python-kmod - Load, unload & list kernel modules from Python
Review Request: python-kmod - Load, unload & list kernel modules from Python
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jiri Popelka
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-04-12 15:43 EDT by Andy Grover
Modified: 2012-08-07 19:55 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-07 19:55:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
jpopelka: fedora‑review+
limburgher: fedora‑cvs+

Attachments (Terms of Use)

  None (edit)
Description Andy Grover 2012-04-12 15:43:04 EDT
Spec URL: http://fedorapeople.org/~grover/new/python-kmod.spec
SRPM URL: http://fedorapeople.org/~grover/new/python-kmod-0.1-1.fc17.src.rpm
Description: Python module to allow listing, loading, and unloading
Linux kernel modules, using libkmod.
Comment 1 Tomas Edwardsson 2012-04-16 20:30:04 EDT
This is a Informal Review.

MUST: rpmlint must be run on the source rpm and all binary rpms the build produces.		[FIX]

rpmlint returns various errors:

private-shared-object-provides - the dependency for kmod-libs is automatically generated so you should remove it from the spec file.
incorrect-fsf-address, see http://www.gnu.org/licenses/lgpl-2.1.html
spelling-error I believe you can safely ignore this
non-standard-executable-perm - seems to conform to other python packages

rpmlint python-kmod-debuginfo-0.1-1.fc17.x86_64.rpm

python-kmod-debuginfo.x86_64: E: incorrect-fsf-address /usr/src/debug/agrover-python-kmod-74467e0/libkmod.c
1 packages and 0 specfiles checked; 1 errors, 0 warnings.

rpmlint python-kmod-0.1-1.fc17.x86_64.rpm

python-kmod.x86_64: E: explicit-lib-dependency kmod-libs
python-kmod.x86_64: W: spelling-error %description -l en_US libkmod -> libido
python-kmod.x86_64: W: private-shared-object-provides /usr/lib64/python2.7/site-packages/kmod.so kmod.so()(64bit)
python-kmod.x86_64: E: non-standard-executable-perm /usr/lib64/python2.7/site-packages/kmod.so 0775L
python-kmod.x86_64: E: incorrect-fsf-address /usr/share/doc/python-kmod-0.1/COPYING
python-kmod.x86_64: E: incorrect-fsf-address /usr/share/doc/python-kmod-0.1/COPYING.LESSER
1 packages and 0 specfiles checked; 3 errors, 2 warnings.

python-kmod.src: W: spelling-error %description -l en_US libkmod -> libido
The value of this tag appears to be misspelled. Please double-check.

1 packages and 0 specfiles checked; 0 errors, 1 warnings.

MUST: The License field in the package spec file must match the actual license.			[FIX]

The License specified in the spec file is MIT but it looks like LGPLv2+ is more appropriate.
Comment 2 Andy Grover 2012-04-17 14:49:14 EDT
thanks for the informal review. Updated.

Spec URL: http://fedorapeople.org/~grover/new/python-kmod.spec
SRPM URL: http://fedorapeople.org/~grover/new/python-kmod-0.1-2.fc17.src.rpm

- Updated License field for proper license
- Removed explicit dependency
- FSF address fixed upstream for next release
Comment 3 Andy Grover 2012-05-04 17:06:26 EDT
Updated spec since upstream now has proper tarballs available:

Spec URL: http://fedorapeople.org/~grover/new/python-kmod.spec
SRPM URL: http://repos.fedorapeople.org/repos/grover/target/fedora-17/SRPMS/python-kmod-0.1-3.fc17.src.rpm
Comment 4 Jiri Popelka 2012-06-29 13:07:37 EDT
Package Review

- = N/A
x = Pass
! = Fail

[x]: MUST Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
[x]: MUST Package successfully compiles and builds into binary rpms on at
     least one supported primary architecture.
[x]: MUST %build honors applicable compiler flags or justifies otherwise.
[x]: MUST All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: MUST Buildroot is not present
[x]: MUST Package contains no bundled libraries.
[x]: MUST Changelog in prescribed format.
[x]: MUST Sources contain only permissible code or content.
[-]: MUST Macros in Summary, %description expandable at SRPM build time.
[-]: MUST Package requires other packages for directories it uses.
[x]: MUST Package uses nothing in %doc for runtime.
[x]: MUST Package is not known to require ExcludeArch.
[x]: MUST Permissions on files are set properly.
[x]: MUST Package does not contain duplicates in %files.
[x]: MUST Spec file lacks Packager, Vendor, PreReq tags.
[-]: MUST Large documentation files are in a -doc subpackage, if required.
[x]: 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 is included in %doc.
[x]: MUST License field in the package spec file matches the actual license.
[x]: MUST Package consistently uses macros (instead of hard-coded directory
[x]: MUST Package is named according to the Package Naming Guidelines.
[x]: MUST Package does not generate any conflict.
[x]: MUST Package obeys FHS, except libexecdir and /usr/target.
[-]: MUST Package must own all directories that it creates.
[x]: MUST Package does not own files or directories owned by other packages.
[]: MUST Package installs properly.
[-]: MUST Requires correct, justified where necessary.
[!]: MUST Rpmlint output is silent.

python-kmod.src: W: invalid-url Source0: //github.com/downloads/agrover/python-kmod/python-kmod-0.1.tar.gz

Seems there's a colon missing. And also use Source0 instead of Source.

python-kmod.i686: W: private-shared-object-provides /usr/lib/python2.7/site-packages/kmod.so kmod.so


python-kmod.i686: E: non-standard-executable-perm /usr/lib/python2.7/site-packages/kmod.so 0775L

I'd say just put this into %install
chmod 755 %{buildroot}%{python_sitearch}/kmod.so

And I think it would be better to list the files in %files like this:
instead of %{python_sitearch}/*

[x]: MUST Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: MUST Spec file is legible and written in American English.
[x]: MUST Spec file name must match the spec package %{name}, in the format
[x]: MUST File names are valid UTF-8.
[x]: MUST Useful -debuginfo package or justification otherwise.
[x]: SHOULD Reviewer should test that the package builds in mock.
[x]: SHOULD If the source package does not include license text(s) as a
     separate file from upstream, the packager SHOULD query upstream to
     include it.

Actually it includes more licence files than I think is necessary :-)
I don't understand why there's the GPLv2 licence
file (COPYING) in the upstream (you are upstream, aren't you ?) tarball
when the source code is under LGPLv2.1

[x]: SHOULD Dist tag is present.
[x]: SHOULD Latest version is packaged.
[-]: SHOULD Spec use %global instead of %define.
Comment 5 Andy Grover 2012-08-01 14:54:32 EDT
Updated spec based on review comments:

Spec URL: http://fedorapeople.org/~grover/new/python-kmod.spec
SRPM URL: http://fedorapeople.org/~grover/new/python-kmod-0.1-4.fc17.src.rpm
Comment 6 Jiri Popelka 2012-08-02 04:41:01 EDT
Seems to be OK now.

This package is APPROVED !
Comment 7 Andy Grover 2012-08-02 12:30:09 EDT
New Package SCM Request
Package Name: python-kmod
Short Description: Load, unload, and list kernel modules from Python
Owners: grover
Branches: f17
Comment 8 Gwyn Ciesla 2012-08-02 12:40:37 EDT
Git done (by process-git-requests).

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