Bug 882481

Summary: Review Request: python-doit - Automation Tool
Product: [Fedora] Fedora Reporter: José Matos <jamatos>
Component: Package ReviewAssignee: Mario Blättermann <mario.blaettermann>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: i, mario.blaettermann, notting
Target Milestone: ---Flags: mario.blaettermann: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-doit-0.21.0-2.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-01 01:39:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 882482    

Description José Matos 2012-12-01 10:15:16 UTC
Spec URL: http://jamatos.fedorapeople.org/python-doit.spec
SRPM URL: http://jamatos.fedorapeople.org/python-doit-0.18.0-1.fc17.src.rpm
Description:

python-doit is a build tool (in the same class as make, cmake, scons,
ant and others)

python-doit can be used as:
  * a build tool (generic and flexible)
  * home of your management scripts (it helps you organize and combine
   shell scripts and python scripts)
  * a functional tests runner (combine together different tools)
  * a configuration management system
  * manage computational pipelines


Fedora Account System Username: jamatos

Comment 1 José Matos 2012-12-02 00:46:23 UTC
I have updated the package to include a python3 sub-package. (since upstream says that it is supported)

Spec URL: http://jamatos.fedorapeople.org/python-doit.spec
SRPM URL: http://jamatos.fedorapeople.org/python-doit-0.18.0-2.fc18.src.rpm

Comment 2 Mario Blättermann 2012-12-02 18:06:42 UTC
Scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=4748905

From build.log:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-doit-0.18.0-2.fc19/distribute_setup.py", line 146, in use_setuptools
    import pkg_resources
ImportError: No module named 'pkg_resources'

The package "python-setuptools" is missing from BuildRequires.

Comment 3 José Matos 2012-12-02 18:30:05 UTC
Note that the error happens for python3 so at best it should be python3-setuptools

I am testing locally in mock to understand what the problem is.

Thank you for the report.

Comment 4 Mario Blättermann 2012-12-02 18:39:30 UTC
(In reply to comment #3)
> Note that the error happens for python3 so at best it should be
> python3-setuptools
> 
> I am testing locally in mock to understand what the problem is.
> 
> Thank you for the report.

In general, it's a good idea to have python-setuptools present. Probably you'll need it anyway to create the egg-info. That's why you should add both python-setuptools and python3-setuptools.

Comment 5 José Matos 2012-12-02 18:47:43 UTC
The local run using mock finished without any problems. I am without clues why this fails

in any here comes the -3 version that BR: python3-setuptools

Spec URL: http://jamatos.fedorapeople.org/python-doit.spec
SRPM URL: http://jamatos.fedorapeople.org/python-doit-0.18.0-3.fc18.src.rpm

Comment 6 José Matos 2012-12-02 18:57:35 UTC
Finishing the last message...

mock works locally on both F18 and F19.

That is why I have no ideas why this fails on koji.

Comment 7 José Matos 2012-12-02 22:30:38 UTC
OK, I understand now why it worked on mock but it failed on koji. The updated distribute_setup was loading it full version. Local mock allows that but koji (rightly so) does not.

Understanding that I removed the updated distribute_setup and now with the python3-setuptools it finally works both on koji and locally on mock.

As a proof I have this scratch build (it is version 3 with distribute_setup part commented, whereas version 4 removes it):
http://koji.fedoraproject.org/koji/taskinfo?taskID=4749504

So the new changes
Spec URL: http://jamatos.fedorapeople.org/python-doit.spec
SRPM URL: http://jamatos.fedorapeople.org/python-doit-0.18.0-4.fc18.src.rpm

Comment 8 José Matos 2012-12-03 17:37:53 UTC
New upstream release and a fix to guarantee that the installed /usr/bin/doit is the python 2 version

Spec URL: http://jamatos.fedorapeople.org/python-doit.spec
SRPM URL: http://jamatos.fedorapeople.org/python-doit-0.18.1-1.fc18.src.rpm

Comment 9 Mario Blättermann 2012-12-07 20:36:28 UTC
Scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=4767718

urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>

The same problem. Koji is unable to load external things - in general, or at least in this case. But once the package is approved, you have Koji only and you cannot upload packages which have been built in Mock... We need a proper solution in any case.

Comment 10 José Matos 2012-12-07 23:34:45 UTC
Koji does not allow to load external material, for obvious security reasons. :-)

Imagine that it allowed and later that site went rogue... an invitation to disaster. :-)

Thanks for looking into this, I will find out why it fails.

Comment 11 Mario Blättermann 2013-01-05 21:03:51 UTC
Any news here...?

Comment 12 José Matos 2013-01-05 21:48:35 UTC
Recovering from holidays. :-)

Comment 13 Yohan Graterol 2013-04-22 01:06:39 UTC
Hello Jose,

The test have errors, check it.

=================================== FAILURES ===================================
__________________________ TestCmdAction.test_failure __________________________
self = <tests.test_action.TestCmdAction object at 0x1c54c10>
    def test_failure(self):
        my_action = action.CmdAction("%s please fail" % PROGRAM)
        got = my_action.execute()
>       assert isinstance(got, TaskFailed)
E       assert isinstance(None, TaskFailed)
tests/test_action.py:51: AssertionError
=============== 1 failed, 445 passed, 1 skipped in 17.44 seconds ===============

I did reviewed your package with fedora-review to fedora-rawhide (Fedora 20)

Regards!

Comment 14 José Matos 2013-04-26 19:54:59 UTC
New spec/srpm for version 0.20 available at the usual place:

Spec URL: http://jamatos.fedorapeople.org/python-doit.spec
SRPM URL: http://jamatos.fedorapeople.org/python-doit-0.20-1.fc19.src.rpm

The %check section is commented because depending on the time where you run the tests either it run flawlessly or it fails with the error you saw above or there is yet another fail.

Actually the most frequent case is to fail twice, then to fail once like above and in some cases it does not fail at all.

Comment 15 José Matos 2013-04-26 20:28:03 UTC
FWIW the other error is:

=================================== FAILURES ===================================
_________________________ TestTaskActions.test_failure _________________________
self = <tests.test_task.TestTaskActions object at 0x2ba54d0>
    def test_failure(self):
        t = task.Task("taskX", ["%s 1 2 3" % PROGRAM])
        got = t.execute()

>       assert isinstance(got, TaskError)
E       assert isinstance(None, TaskError)
tests/test_task.py:226: AssertionError
=============== 1 failed, 468 passed, 1 skipped in 19.60 seconds ===============

Comment 16 José Matos 2013-05-03 18:15:25 UTC
New upstream version 0.21 available at the usual place. :-)

Spec URL: http://jamatos.fedorapeople.org/python-doit.spec
SRPM URL: http://jamatos.fedorapeople.org/python-doit-0.21.0-1.fc20.src.rpm

Comment 17 Christopher Meng 2013-05-05 15:15:17 UTC
*** Bug 957190 has been marked as a duplicate of this bug. ***

Comment 18 Mario Blättermann 2013-06-02 14:40:49 UTC
The files LICENSE and README should appear in both python2 and python3 versions. One can install them independently from each other, so the python3 package would remain without license declaration and basic docs. TODO.txt should be added to the -docs subpackage.
Or another way for the docs: Move all doc files to the -docs package and mark it as required by the python2 and python3 packages. This way the docs would be always present, independently from which python version is used.

Comment 19 Christopher Meng 2013-06-02 17:55:21 UTC
(In reply to Mario Blättermann from comment #18)
> The files LICENSE and README should appear in both python2 and python3
> versions. One can install them independently from each other, so the python3
> package would remain without license declaration and basic docs. TODO.txt
> should be added to the -docs subpackage.
> Or another way for the docs: Move all doc files to the -docs package and
> mark it as required by the python2 and python3 packages. This way the docs
> would be always present, independently from which python version is used.

Nice suggestion.

BTW, this package seems has test problem during %check section, can we ignore this section?

I need this package for another package, so...

Comment 20 José Matos 2013-06-05 08:25:09 UTC
(In reply to Mario Blättermann from comment #18)
> The files LICENSE and README should appear in both python2 and python3
> versions. One can install them independently from each other, so the python3
> package would remain without license declaration and basic docs. TODO.txt
> should be added to the -docs subpackage.
> Or another way for the docs: Move all doc files to the -docs package and
> mark it as required by the python2 and python3 packages. This way the docs
> would be always present, independently from which python version is used.

I chose the first option as it is the least invasive:

Spec URL: http://jamatos.fedorapeople.org/python-doit.spec
SRPM URL: http://jamatos.fedorapeople.org/python-doit-0.21.0-2.fc20.src.rpm

To have all the subpackages depending on -doc would defeat the reason to have a separate -doc in the first place.

(In reply to Christopher Meng from comment #19)
> (In reply to Mario Blättermann from comment #18)
> > The files LICENSE and README should appear in both python2 and python3
> > versions. One can install them independently from each other, so the python3
> > package would remain without license declaration and basic docs. TODO.txt
> > should be added to the -docs subpackage.
> > Or another way for the docs: Move all doc files to the -docs package and
> > mark it as required by the python2 and python3 packages. This way the docs
> > would be always present, independently from which python version is used.
> 
> Nice suggestion.
> 
> BTW, this package seems has test problem during %check section, can we
> ignore this section?

We should not but there is a strange random problem as it is documented in the package.

It fails sometimes in one or two places and sometimes it works. I took a look into debian package and there is not any special code for this case and after spending lots of time with it I am lost here.

> I need this package for another package, so...

FWIW I will be busy until next week so I will return to this in one week.

Comment 21 Mario Blättermann 2013-06-05 17:49:06 UTC
Scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=5473473

$ rpmlint -i -v *python3-doit.noarch: I: checking
python3-doit.noarch: W: spelling-error %description -l en_US cmake -> cake, make, c make
The value of this tag appears to be misspelled. Please double-check.

python3-doit.noarch: W: spelling-error %description -l en_US scons -> sons, cons, scones
The value of this tag appears to be misspelled. Please double-check.

python3-doit.noarch: I: checking-url http://python-doit.sourceforge.net/ (timeout 10 seconds)
python-doit.noarch: I: checking
python-doit.noarch: W: spelling-error %description -l en_US cmake -> cake, make, c make
The value of this tag appears to be misspelled. Please double-check.

python-doit.noarch: W: spelling-error %description -l en_US scons -> sons, cons, scones
The value of this tag appears to be misspelled. Please double-check.

python-doit.noarch: I: checking-url http://python-doit.sourceforge.net/ (timeout 10 seconds)
python-doit.noarch: W: non-conffile-in-etc /etc/bash_completion.d/doit
A non-executable file in your package is being installed in /etc, but is not a
configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

python-doit.noarch: W: no-manual-page-for-binary doit
Each executable in standard binary directories should have a man page.

python-doit.src: I: checking
python-doit.src: W: spelling-error %description -l en_US cmake -> cake, make, c make
The value of this tag appears to be misspelled. Please double-check.

python-doit.src: W: spelling-error %description -l en_US scons -> sons, cons, scones
The value of this tag appears to be misspelled. Please double-check.

python-doit.src: I: checking-url http://python-doit.sourceforge.net/ (timeout 10 seconds)
python-doit.src:98: W: macro-in-comment %{__python}
There is a unescaped macro after a shell style comment in the specfile. Macros
are expanded everywhere, so check if it can cause a problem in this case and
escape the macro with another leading % if appropriate.

python-doit.src:100: W: macro-in-comment %{py3dir}
There is a unescaped macro after a shell style comment in the specfile. Macros
are expanded everywhere, so check if it can cause a problem in this case and
escape the macro with another leading % if appropriate.

python-doit.src:101: W: macro-in-comment %{__python3}
There is a unescaped macro after a shell style comment in the specfile. Macros
are expanded everywhere, so check if it can cause a problem in this case and
escape the macro with another leading % if appropriate.

python-doit.src: I: checking-url http://pypi.python.org/packages/source/d/doit/doit-0.21.0.tar.gz (timeout 10 seconds)
python-doit-doc.noarch: I: checking
python-doit-doc.noarch: I: checking-url http://python-doit.sourceforge.net/ (timeout 10 seconds)
python-doit.spec:98: W: macro-in-comment %{__python}
There is a unescaped macro after a shell style comment in the specfile. Macros
are expanded everywhere, so check if it can cause a problem in this case and
escape the macro with another leading % if appropriate.

python-doit.spec:100: W: macro-in-comment %{py3dir}
There is a unescaped macro after a shell style comment in the specfile. Macros
are expanded everywhere, so check if it can cause a problem in this case and
escape the macro with another leading % if appropriate.

python-doit.spec:101: W: macro-in-comment %{__python3}
There is a unescaped macro after a shell style comment in the specfile. Macros
are expanded everywhere, so check if it can cause a problem in this case and
escape the macro with another leading % if appropriate.

python-doit.spec: I: checking-url http://pypi.python.org/packages/source/d/doit/doit-0.21.0.tar.gz (timeout 10 seconds)
4 packages and 1 specfiles checked; 0 errors, 14 warnings.


Some ignorable spelling errors. The macro-in-comment warnings should be fixed by escaping the percent signs. This doesn't block the review, you can do it after uploading it into the Git repo.


---------------------------------
key:

[+] OK
[.] OK, not applicable
[X] needs work
---------------------------------

[+] MUST: rpmlint must be run on the source rpm and all binary rpms the build produces. The output should be posted in the review.
[+] MUST: The package must be named according to the Package Naming Guidelines.
[+] MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption.
[+] MUST: The package must meet the Packaging Guidelines.
[+] MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines.
[+] MUST: The License field in the package spec file must match the actual license.
    MIT
[+] 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.
[+] MUST: The spec file must be written in American English.
[+] MUST: The spec file for the package MUST be legible.
[+] MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use sha256sum for this task as it is used by the sources file once imported into git. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this.
    $ sha256sum *
    933d51aef23a183e0754cdf3594be8f879dd96a7930723e1e8658606f227f4b4  doit-0.21.0.tar.gz
    933d51aef23a183e0754cdf3594be8f879dd96a7930723e1e8658606f227f4b4  doit-0.21.0.tar.gz.orig

[+] MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture.
[.] 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.
[+] 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.
[.] MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.
[.] 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.
[.] MUST: Packages must NOT bundle copies of system libraries.
[.] 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.
[+] 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.
[+] MUST: 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)
[+] MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example.
[+] MUST: Each package must consistently use macros.
[+] MUST: The package must contain code, or permissable content.
[.] 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).
[+] 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.
[.] MUST: Static libraries must be in a -static package.
[.] MUST: Development files must be in a -devel package.
[.] MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name}%{?_isa} = %{version}-%{release}
[.] MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.
[.] 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.
[+] 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. 
[+] MUST: All filenames in rpm packages must be valid UTF-8.


[.] 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.
[.] SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available.
[+] SHOULD: The reviewer should test that the package builds in mock.
    See Koji build above (which uses Mock anyway).
[+] SHOULD: The package should compile and build into binary rpms on all supported architectures.
[.] SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.
[.] SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity.
[.] SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency.
[.] 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.
[.] 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.
[.] SHOULD: your package should contain man pages for binaries/scripts. If it doesn't, work with upstream to add them where they make sense.


----------------

PACKAGE APPROVED

----------------

Comment 22 José Matos 2013-06-17 20:00:01 UTC
Thank you. :-)

The macro-in-comment warnings are related with the following code:


# There is a race condition where sometimes there is none, one or two errors
# The error will be reported upstream
#%{__python} runtests.py

#pushd %{py3dir}
#%{__python3} runtests.py
#popd

My purpose here is to comment this code for now with the explicit stated purpose of enabling this code as soon as possible.

If you disagree I can double the % sign but I think that in this case it is harmless and an hopefully temporary measure.

Comment 23 José Matos 2013-06-17 22:52:48 UTC
New Package SCM Request
=======================
Package Name: python-doit
Short Description: Automation tool
Owners: jamatos
Branches: f18 f19

Comment 24 Gwyn Ciesla 2013-06-18 10:47:40 UTC
Git done (by process-git-requests).

Comment 25 Fedora Update System 2013-06-18 13:58:35 UTC
python-doit-0.21.0-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-doit-0.21.0-2.fc19

Comment 26 Fedora Update System 2013-06-18 13:59:41 UTC
python-doit-0.21.0-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-doit-0.21.0-2.fc18

Comment 27 Fedora Update System 2013-06-18 19:42:44 UTC
Package python-doit-0.21.0-2.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-doit-0.21.0-2.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-11184/python-doit-0.21.0-2.fc19
then log in and leave karma (feedback).

Comment 28 Fedora Update System 2013-07-01 01:39:06 UTC
python-doit-0.21.0-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 29 Fedora Update System 2013-07-01 01:43:59 UTC
python-doit-0.21.0-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.