Bug 548694 - Review Request: python-rpmfluff - Lightweight way of building RPMs, and sabotaging them
Summary: Review Request: python-rpmfluff - Lightweight way of building RPMs, and sabot...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-18 09:18 UTC by Jan Hutař
Modified: 2016-08-14 15:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-14 15:55:19 UTC
Type: ---
Embargoed:
tcallawa: fedora-review+
j: fedora-cvs+


Attachments (Terms of Use)
rpmfluff.patch (1.61 KB, patch)
2010-01-05 22:09 UTC, James Laska
no flags Details | Diff

Description Jan Hutař 2009-12-18 09:18:00 UTC
Spec URL: http://git.fedorahosted.org/git/rpmfluff.git?p=rpmfluff.git;a=blob_plain;f=python-rpmfluff.spec
SRPM URL: https://fedorahosted.org/releases/r/p/rpmfluff/python-rpmfluff-0.3-1.fc10.src.rpm
Description:
rpmfluff is a lightweight way of building RPMs, and sabotaging them so they
are broken in controlled ways.

It is intended for use when testing RPM-testers e.g. rpmlint
and writing test cases for RPM tools e.g. yum

Comment 1 James Laska 2009-12-18 13:40:57 UTC
= rpmlint =

$ rpmlint python-rpmfluff-0.3-1.fc12.src.rpm
python-rpmfluff.src: W: spelling-error-in-description en_US rpmlint
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

$ rpmlint python-rpmfluff-0.3-1.fc12.noarch.rpm 
python-rpmfluff.noarch: W: spelling-error-in-description en_US rpmlint
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

The above is more of a warning and not something I would expect to cause issue.

= general specfile formatting =

I've made some minor formatting corrections based on the feedback I've always received from my package reviews.  I don't think this is a requirement, but might help.

See the changes at ... http://pastie.org/748652

= license =

The spec file lists GPLv2, but there is no LICENSE file in the source or %doc.  Perhaps someone else can speak to that. 

= copyright =

The rpmfluff.py file has no copyright preamble.  Should one be added?

Comment 2 Jan Hutař 2009-12-21 08:17:05 UTC
Hello,
thanks for the input!

(In reply to comment #1)
> = rpmlint =

If some native speaker advises how to fix that, I'm pretty OK to do so.

> = general specfile formatting =

Fixed this.

> = license =

I have added separate LICENSE file.

> = copyright =

Not sure what does this mean and how to fix this. There is "Copyright (c) 2006 Red Hat, Inc. All rights reserved." in the comment on top of rpmfluff.py but not sure if that is what you mean. How to fix this?

Thank you,
Jan

Comment 3 James Laska 2010-01-05 22:09:45 UTC
Created attachment 381859 [details]
rpmfluff.patch

The attached patch addresses several small issues during review, including:
 * rpmlint typo in %description
 * incorrect permissions on rpmfluff.py
 * Adding a %Requires on python 
 * Removing file header from rpmfluff.py to correct rpmlint error

Comment 4 James Laska 2010-01-05 22:22:05 UTC
I've reviewed the package according to the review guidelines (see http://fedoraproject.org/wiki/Packaging:ReviewGuidelines).  Results are posted below.  Please address the outstanding issues noted by "NOT OK".

# MUST: rpmlint must be run on every package. The output should be posted in
# the review.[1]
OK (see attached patch)

    $ rpmlint python-rpmfluff-0.3-2.fc12.src.rpm
    1 packages and 0 specfiles checked; 0 errors, 0 warnings.

    $ rpmlint python-rpmfluff-0.3-2.fc12.noarch.rpm
    1 packages and 0 specfiles checked; 0 errors, 0 warnings.

    $ rpmlint python-rpmfluff.spec
    0 packages and 1 specfiles checked; 0 errors, 0 warnings.

# MUST: The package must be named according to the Package Naming Guidelines .
OK

# MUST: The spec file name must match the base package %{name}, in the format
# %{name}.spec unless your package has an exemption. [2] .
OK

# MUST: The package must meet the Packaging Guidelines .
OK

# MUST: The package must be licensed with a Fedora approved license and meet
# the Licensing Guidelines .
OK

# MUST: The License field in the package spec file must match the actual
# license. [3]
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.[4]
OK

# MUST: The spec file must be written in American English. [5]
OK

# MUST: The spec file for the package MUST be legible. [6]
OK

# MUST: 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.
NOT OK

    $ curl https://fedorahosted.org/releases/r/p/rpmfluff/rpmfluff-0.3.tar.bz2 | md5sum
    b349770877d43d9fd71d53ece24a4165

    $ rpm -ivh https://fedorahosted.org/releases/r/p/rpmfluff/python-rpmfluff-0.3-1.fc10.src.rpm
       1:python-rpmfluff     ########################################### [100%]
    $ md5sum /tmp/jlaska-rpm/SOURCES/rpmfluff-0.3.tar.bz2
    db40cf13beb5241835d9256a90e998be  /tmp/jlaska-rpm/SOURCES/rpmfluff-0.3.tar.bz2

# MUST: The package MUST successfully compile and build into binary rpms on at
# least one primary architecture. [7]
OK (tested on x86_64)

# 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. 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. [8]
N/A

# MUST: 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.
OK

If you wish to change to using python distutils, you may wish to add BuildRequires: python-setuptools-devel

# MUST: The spec file MUST handle locales properly. This is done by using the
# %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.[9]
N/A

# 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. [10]
N/A

# MUST: Packages must NOT bundle copies of system libraries.[11]
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. [12]
N/A

# 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. [13]
OK - with included patch

# MUST: A Fedora package must not list a file more than once in the spec file's
# %files listings. [14]
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. [15]
OK - with included patch to change 0644 for rpmfluff.py

# MUST: Each package must have a %clean section, which contains rm -rf
# %{buildroot} (or $RPM_BUILD_ROOT). [16]
OK

# MUST: Each package must consistently use macros. [17]
OK

# MUST: The package must contain code, or permissable content. [18]
OK

# MUST: 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). [19]
N/A

# MUST: 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. [19]
OK

# MUST: Header files must be in a -devel package. [20]
N/A

# MUST: Static libraries must be in a -static package. [21]
N/A

# MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability). [22]
N/A

# 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. [20]
N/A

# MUST: In the vast majority of cases, devel packages must require the base
# package using a fully versioned dependency: Requires: %{name} =
# %{version}-%{release} [23]
N/A

# MUST: Packages must NOT contain any .la libtool archives, these must be
# removed in the spec if they are built.[21]
N/A

# 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. 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. [24]
N/A

# MUST: 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. [25]
N/A

# MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot}
# (or $RPM_BUILD_ROOT). [26]
OK

# MUST: All filenames in rpm packages must be valid UTF-8. [27]
OK

# 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. [28]
OK

# SHOULD: The description and summary sections in the package spec file should
# contain translations for supported Non-English languages, if available. [29]

# SHOULD: The reviewer should test that the package builds in mock. [30]
OK (using koji scratch build)
http://koji.fedoraproject.org/koji/taskinfo?taskID=1904152

# SHOULD: The package should compile and build into binary rpms on all
# supported architectures. [31]
OK (noarch)

# SHOULD: The reviewer should test that the package functions as described. A
# package should not segfault instead of running, for example.
OK (tested using rpmguard)

# SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague,
# and left up to the reviewers judgement to determine sanity. [32]
N/A

# SHOULD: Usually, subpackages other than devel should require the base package
# using a fully versioned dependency. [23]
N/A

# 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. [22]
N/A

# 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. [33] 
OK

Comment 5 Jan Hutař 2010-01-07 08:20:42 UTC
(In reply to comment #3)
> Created an attachment (id=381859) [details]
> rpmfluff.patch
> 
> The attached patch addresses several small issues during review, including:
>  * rpmlint typo in %description
>  * incorrect permissions on rpmfluff.py
>  * Adding a %Requires on python 
>  * Removing file header from rpmfluff.py to correct rpmlint error  

I have applied the patch. Thank you very much.

Comment 6 Jan Hutař 2010-01-07 08:23:03 UTC
Also thanks to James help on IRC rpmfluff is now distributed using EGGs.

Comment 7 Jan Hutař 2010-01-07 08:27:25 UTC
(In reply to comment #4)

> # MUST: 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.
> NOT OK
> 
>     $ curl https://fedorahosted.org/releases/r/p/rpmfluff/rpmfluff-0.3.tar.bz2
> | md5sum
>     b349770877d43d9fd71d53ece24a4165
> 
>     $ rpm -ivh
> https://fedorahosted.org/releases/r/p/rpmfluff/python-rpmfluff-0.3-1.fc10.src.rpm
>        1:python-rpmfluff     ########################################### [100%]
>     $ md5sum /tmp/jlaska-rpm/SOURCES/rpmfluff-0.3.tar.bz2
>     db40cf13beb5241835d9256a90e998be 
> /tmp/jlaska-rpm/SOURCES/rpmfluff-0.3.tar.bz2

Fixed now in 0.3-3:

$ curl https://fedorahosted.org/releases/r/p/rpmfluff/rpmfluff-0.3.tar.bz2 | md5sum 
cd00673f122358f29a2635b96c46a5bd  -
$ rpm -ivh https://fedorahosted.org/releases/r/p/rpmfluff/python-rpmfluff-0.3-3.fc12.src.rpm
   1:python-rpmfluff        ########################################### [100%]
$ md5sum rpmbuild/SOURCES/rpmfluff-0.3.tar.bz2
cd00673f122358f29a2635b96c46a5bd  rpmbuild/SOURCES/rpmfluff-0.3.tar.bz2

> # MUST: 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.
> OK
> 
> If you wish to change to using python distutils, you may wish to add
> BuildRequires: python-setuptools-devel

Added.


Thank you for review.

Comment 9 James Laska 2010-01-14 15:47:04 UTC
Thanks Jan.  rpmlint on the updated packages from comment#8 looks good.

# MUST: rpmlint must be run on every package. The output should be posted in
# the review.[1]
OK

$ rpmlint python-rpmfluff.spec python-rpmfluff-0.3-3.fc12.src.rpm /tmp/jlaska-rpm/RPMS/noarch/python-rpmfluff-0.3-3.fc12.noarch.rpm
2 packages and 1 specfiles checked; 0 errors, 0 warnings.

# MUST: 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.

OK

$ curl https://fedorahosted.org/releases/r/p/rpmfluff/rpmfluff-0.3.tar.bz2 | md5sum
cd00673f122358f29a2635b96c46a5bd  -

$ md5sum /tmp/jlaska-rpm/SOURCES/rpmfluff-0.3.tar.bz2
cd00673f122358f29a2635b96c46a5bd  /tmp/jlaska-rpm/SOURCES/rpmfluff-0.3.tar.bz2

# SHOULD: The reviewer should test that the package builds in mock. [30]

WARN - The package builds locally and through koji
http://koji.fedoraproject.org/koji/taskinfo?taskID=1921133

However, one warning message pops out while processing the setup.py bdist command ...

    setup.py:2: DeprecationWarning: The popen2 module is deprecated.  Use the
    subprocess module.
      from popen2 import popen2
    grep: python-rpmfluff.spec: No such file or directory
    grep: python-rpmfluff.spec: No such file or directory
    running install
    running install_lib

This doesn't appear to affect functionality of the built package, but perhaps something to investigate?

Additional review steps from https://fedoraproject.org/wiki/Packaging:Python

# MUST: Python eggs must be built from source. They cannot simply drop an egg
# from upstream into the proper directory.

OK, there is no egg file carried in version control and they are build using distutils

# MUST: Python eggs must not download any dependencies during the build
# process.

OK

# MUST: If egg-info files are generated by the modules build scripts they must
# be included in the package.

OK

# MUST: When building a compat package, it must install using easy_install -m
# so it won't conflict with the main package.

N/A

# MUST: When building multiple versions (for a compat package) one of the
# packages must contain a default version that is usable via "import MODULE"
# with no prior setup.

N/A

# SHOULD: A package which is used by another package via an egg interface
# should provide egg info. 

N/A

Comment 10 Jan Hutař 2010-01-26 13:58:51 UTC
(In reply to comment #9)
[...]
> # SHOULD: The reviewer should test that the package builds in mock. [30]
> 
> WARN - The package builds locally and through koji
> http://koji.fedoraproject.org/koji/taskinfo?taskID=1921133
> 
> However, one warning message pops out while processing the setup.py bdist
> command ...
> 
>     setup.py:2: DeprecationWarning: The popen2 module is deprecated.  Use the
>     subprocess module.
>       from popen2 import popen2
>     grep: python-rpmfluff.spec: No such file or directory
>     grep: python-rpmfluff.spec: No such file or directory
>     running install
>     running install_lib
> 
> This doesn't appear to affect functionality of the built package, but perhaps
> something to investigate?
> 
> Additional review steps from https://fedoraproject.org/wiki/Packaging:Python
[...]

Hello,
fixed in:

https://fedorahosted.org/releases/r/p/rpmfluff/rpmfluff-0.3.tar.bz2
https://fedorahosted.org/releases/r/p/rpmfluff/python-rpmfluff-0.3-3.fc12.src.rpm

99a3b6a2d94f3d10b041ea4a86b2974d  rpmfluff-0.3.tar.bz2

Comment 11 James Laska 2010-01-27 21:12:30 UTC
(In reply to comment #10)
> Hello,
> fixed in:
> 
> https://fedorahosted.org/releases/r/p/rpmfluff/rpmfluff-0.3.tar.bz2
> https://fedorahosted.org/releases/r/p/rpmfluff/python-rpmfluff-0.3-3.fc12.src.rpm
> 
> 99a3b6a2d94f3d10b041ea4a86b2974d  rpmfluff-0.3.tar.bz2    

Hey Jan, am I grabbing the wrong packages?  I'm still seeing the error.

$ rpmbuild --rebuild https://fedorahosted.org/releases/r/p/rpmfluff/python-rpmfluff-0.3-3.fc12.src.rpm 2>&1 | grep -i "no such file"
grep: python-rpmfluff.spec: No such file or directory
grep: python-rpmfluff.spec: No such file or directory
grep: python-rpmfluff.spec: No such file or directory
grep: python-rpmfluff.spec: No such file or directory

In addition, the md5sum of the tarball inside the src.rpm doesn't match what is listed.  For example,

# rpm -ivh https://fedorahosted.org/releases/r/p/rpmfluff/python-rpmfluff-0.3-3.fc12.src.rpm

# wget https://fedorahosted.org/releases/r/p/rpmfluff/rpmfluff-0.3.tar.bz2

# md5sum rpmfluff-0.3.tar.bz2 /tmp/jlaska-rpm/SOURCES/rpmfluff-0.3.tar.bz2 
99a3b6a2d94f3d10b041ea4a86b2974d  rpmfluff-0.3.tar.bz2
cd00673f122358f29a2635b96c46a5bd  /tmp/jlaska-rpm/SOURCES/rpmfluff-0.3.tar.bz2

Comment 12 Jan Hutař 2010-01-28 09:47:38 UTC
Oh man, stupid me, should be release "4", not "3":

https://fedorahosted.org/releases/r/p/rpmfluff/rpmfluff-0.3.tar.bz2
https://fedorahosted.org/releases/r/p/rpmfluff/python-rpmfluff-0.3-4.fc12.src.rpm
 
99a3b6a2d94f3d10b041ea4a86b2974d  rpmfluff-0.3.tar.bz2



# wget https://fedorahosted.org/releases/r/p/rpmfluff/rpmfluff-0.3.tar.bz2
# wget https://fedorahosted.org/releases/r/p/rpmfluff/python-rpmfluff-0.3-4.fc12.src.rpm
rpmbuild --rebuild python-rpmfluff-0.3-4.fc12.src.rpm
# rpm -i python-rpmfluff-0.3-4.fc12.src.rpm
# md5sum /home/pok/rpmbuild/SOURCES/rpmfluff-0.3.tar.bz2 
99a3b6a2d94f3d10b041ea4a86b2974d
# md5sum rpmfluff-0.3.tar.bz2
99a3b6a2d94f3d10b041ea4a86b2974d

Sorry for this.

Comment 13 James Laska 2010-01-29 18:44:36 UTC
Sure enough, the md5sum's match now.  Thanks!

99a3b6a2d94f3d10b041ea4a86b2974d  rpmfluff-0.3.tar.bz2
99a3b6a2d94f3d10b041ea4a86b2974d  /tmp/jlaska-rpm/SOURCES/rpmfluff-0.3.tar.bz2

I still seem to be seeing the python distutils error during setup.py calls.  For example, during an rpmbuild ...

+ /usr/bin/python setup.py build
grep: python-rpmfluff.spec: No such file or directory
grep: python-rpmfluff.spec: No such file or directory

...

+ /usr/bin/python setup.py install --skip-build --root /tmp/jlaska-rpm/BUILDROOT/python-rpmfluff-0.3-4.fc12.x86_64
grep: python-rpmfluff.spec: No such file or directory
grep: python-rpmfluff.spec: No such file or directory
running install
running install_lib

It works fine when doing a 'make package' from your GIT repo since python-rpmfluff.spec is in the $PWD at the time.  However, when submitting the build using koji or using `rpmbuild --rebuild python-rpmfluff-3.4.src.rpm`, it fails.  I've corrected the problem locally by adding python-rpmfluff.spec to MANIFEST.in.

It appears there was also a typo in the %changelog section, I've included that change in a small patch at http://pastie.org/800746.

Comment 14 Jan Hutař 2010-02-12 12:00:43 UTC
Hello,
sorry for the late reply, but should be fixed now. I have placed version into the VERSION file and done some changes to the "release process" and it seems to be OK now:

https://fedorahosted.org/releases/r/p/rpmfluff/rpmfluff-0.3.tar.bz2
https://fedorahosted.org/releases/r/p/rpmfluff/python-rpmfluff-0.3-5.fc12.src.rpm

Comment 15 James Laska 2010-02-17 16:34:09 UTC
Thanks Jan, the package looks good from my tests.

* rpmlint output is clean - 2 packages and 1 specfiles checked; 0 errors, 0 warnings.
* The provided src.rpm successfully builds (http://koji.fedoraproject.org/koji/taskinfo?taskID=1994520).
* I've reexamined all MUST and SHOULD criteria listed at http://fedoraproject.org/wiki/Packaging:ReviewGuidelines and have found no new issues

I believe all that is needed is formal sign-off from someone with sponsor privileges.

Comment 16 Tom "spot" Callaway 2010-02-17 21:16:32 UTC
Looks good, thanks Jan and James, this package is APPROVED.

Jan, I've sponsored you into the "packager" group. Please continue through the New Package process from here: https://fedoraproject.org/wiki/PackageMaintainers/Join#Add_Package_to_CVS_and_Set_Owner

Comment 17 Jan Hutař 2010-02-18 13:12:17 UTC
New Package CVS Request
=======================
Package Name: python-rpmfluff
Short Description: Lightweight way of building RPMs, and sabotaging them
Owners: jhutar
Branches: F-11 F-12 EL-4 EL-5
InitialCC:

Comment 18 Jason Tibbitts 2010-02-19 19:06:13 UTC
CVS done (by process-cvs-requests.py).

I added an F-13 branch as well.
This ticket is also not owned by anyone; I'll fix that up.


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