Bug 1004257 - Review Request: python-pudb - console-based Python debugger
Summary: Review Request: python-pudb - console-based Python debugger
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Parag AN(पराग)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-04 09:54 UTC by Dhiru Kholia
Modified: 2014-03-25 03:44 UTC (History)
6 users (show)

Fixed In Version: python-pudb-2013.3.6-2.fc19
Clone Of:
Environment:
Last Closed: 2013-09-27 00:39:47 UTC
Type: ---
Embargoed:
panemade: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Dhiru Kholia 2013-09-04 09:54:37 UTC
Spec URL: https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb.spec
SRPM URL: https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb-2013.3.5-1.fc19.src.rpm

Description:

Hi,

I have just finished packaging "pudb" which is a full-screen, console-based Python debugger.

For more information on "pudb", please see https://pypi.python.org/pypi/pudb

I would appreciate a review so that I (and others) can do "yum install python-pudb" in the near future ;)

This is my first package, so be nice.

Fedora Account System Username: halfie

Comment 1 Christopher Meng 2013-09-04 11:54:13 UTC
First, do you have intention of supporting EL5?

Comment 2 Parag AN(पराग) 2013-09-04 12:59:09 UTC
I will check this package tomorrow. Meanwhile go through this  http://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group#Reviewing_packages and do unofficial reviews.

you can also read http://fedoraproject.org/wiki/PackageMaintainers/Join

then http://fedoraproject.org/wiki/Package_Review_Process

Comment 3 Dhiru Kholia 2013-09-04 13:52:06 UTC
(In reply to Christopher Meng from comment #1)
> First, do you have intention of supporting EL5?

I don't know. So, I will say "no" for now.

Comment 4 Christopher Meng 2013-09-04 13:57:59 UTC
Auh... You SHOULD know it, because you finally need to know it.

EL5 ships py2.4.

Comment 5 Dhiru Kholia 2013-09-04 14:15:14 UTC
build seems to be fine, https://koji.fedoraproject.org/koji/taskinfo?taskID=5893771

Comment 6 Parag AN(पराग) 2013-09-05 09:49:18 UTC
Review:-

+ package builds fine in mock (f21)

- rpmlint output on rpms gave
python3-pudb.noarch: E: non-executable-script /usr/lib/python3.3/site-packages/pudb/debugger.py 0644L /usr/bin/env
python3-pudb.noarch: W: no-manual-page-for-binary pudb3
python-pudb.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/pudb/debugger.py 0644L /usr/bin/env
python-pudb.noarch: W: no-manual-page-for-binary pudb
3 packages and 0 specfiles checked; 2 errors, 2 warnings.

+ Source verified with upstream as  (sha256sum)
tarball in srpm     : 3f99f6f1d85808f6f17ee86a2bb28845e86c9bb3e72868d6bfe10ef7e22bcfff
tarball from upstream : 3f99f6f1d85808f6f17ee86a2bb28845e86c9bb3e72868d6bfe10ef7e22bcfff


+ License is "MIT" and there is license text in any source file or own license text file.


Suggestions:
1) I assume you are not building this package on el5 and el6, so remove invalid buildroot. See http://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag

2) I assume you are not building this package on el5 and el6, so remove following from spec as its not needed anymore in Fedora
%if ! (0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif

If you want to build for EPEL then keep above.

3) BuildRequires: python-devel should be changed to python2-devel
See https://fedoraproject.org/wiki/:Python#BuildRequires

4) rpmlint output is showing non-executable-script error. To fix this add following line in %prep but before copying to py3dir
sed -i '1{\@^#! /usr/bin/env python@d}' pudb/debugger.py

5) I don't think you will need to write explicitly attr(0755, root, root) for /usr/bin/pudb. Remove attr().

6) source package does not include license text as a separate file from upstream, the packager SHOULD query upstream to include it.


Please bump the release tag when you will fix above issues and submit a new srpm.

Comment 7 Dhiru Kholia 2013-09-05 12:24:47 UTC
(In reply to Parag AN(पराग) from comment #6)
> Review:-
> 
> + package builds fine in mock (f21)
> 
> - rpmlint output on rpms gave
> python3-pudb.noarch: E: non-executable-script
> /usr/lib/python3.3/site-packages/pudb/debugger.py 0644L /usr/bin/env
> python3-pudb.noarch: W: no-manual-page-for-binary pudb3
> python-pudb.noarch: E: non-executable-script
> /usr/lib/python2.7/site-packages/pudb/debugger.py 0644L /usr/bin/env
> python-pudb.noarch: W: no-manual-page-for-binary pudb
> 3 packages and 0 specfiles checked; 2 errors, 2 warnings.
> 
> + Source verified with upstream as  (sha256sum)
> tarball in srpm     :
> 3f99f6f1d85808f6f17ee86a2bb28845e86c9bb3e72868d6bfe10ef7e22bcfff
> tarball from upstream :
> 3f99f6f1d85808f6f17ee86a2bb28845e86c9bb3e72868d6bfe10ef7e22bcfff
> 
> 
> + License is "MIT" and there is license text in any source file or own
> license text file.
> 
> 
> Suggestions:
> 1) I assume you are not building this package on el5 and el6, so remove
> invalid buildroot. 

Removed BuildRoot tag.
 
> 2) I assume you are not building this package on el5 and el6, so remove
> following from spec as its not needed anymore in Fedora
> %if ! (0%{?rhel} > 5)
> %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
> distutils.sysconfig import get_python_lib; print(get_python_lib())")}
> %endif

Removed.

> If you want to build for EPEL then keep above.

I can't support EPEL builds (for now). Hence removed.
 
> 3) BuildRequires: python-devel should be changed to python2-devel
> See https://fedoraproject.org/wiki/:Python#BuildRequires

Done. 

> 4) rpmlint output is showing non-executable-script error. To fix this add
> following line in %prep but before copying to py3dir
> sed -i '1{\@^#! /usr/bin/env python@d}' pudb/debugger.py

Fixed.

> 5) I don't think you will need to write explicitly attr(0755, root, root)
> for /usr/bin/pudb. Remove attr().

Fixed.

> 6) source package does not include license text as a separate file from
> upstream, the packager SHOULD query upstream to include it.

I will ask upstream about this.

> Please bump the release tag when you will fix above issues and submit a new
> srpm.

Done.

https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb.spec

https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb-2013.3.5-2.fc19.src.rpm

http://koji.fedoraproject.org/koji/taskinfo?taskID=5898998

Comment 8 Parag AN(पराग) 2013-09-05 14:28:29 UTC
(In reply to Dhiru Kholia from comment #7)

> > 4) rpmlint output is showing non-executable-script error. To fix this add
> > following line in %prep but before copying to py3dir
> > sed -i '1{\@^#! /usr/bin/env python@d}' pudb/debugger.py
> 
> Fixed.

As suggested sed should be added before python3 conditional in %prep. The rpmlint output is still not silent.
here is how your %prep should look

---------------------------------------------------------------
%prep
%setup -q -n %{upstream_name}-%{version}
rm -rf %{module_name}.egg-info

sed -i '1{\@^#! /usr/bin/env python@d}' pudb/debugger.py

%if %{with python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
---------------------------------------------------------------

> > 5) I don't think you will need to write explicitly attr(0755, root, root)
> > for /usr/bin/pudb. Remove attr().
> 
> Fixed.

This is fixed for python3 subpackage but not for main python package. Fix this.


Also, do some package reviews and post the links here to those review comments.

Comment 9 Dhiru Kholia 2013-09-05 15:11:16 UTC
(In reply to Parag AN(पराग) from comment #8)
> (In reply to Dhiru Kholia from comment #7)
> 
> > > 4) rpmlint output is showing non-executable-script error. To fix this add
> > > following line in %prep but before copying to py3dir
> > > sed -i '1{\@^#! /usr/bin/env python@d}' pudb/debugger.py
> > 
> > Fixed.
> 
> As suggested sed should be added before python3 conditional in %prep. The
> rpmlint output is still not silent.
> here is how your %prep should look
> 
> ---------------------------------------------------------------
> %prep
> %setup -q -n %{upstream_name}-%{version}
> rm -rf %{module_name}.egg-info
> 
> sed -i '1{\@^#! /usr/bin/env python@d}' pudb/debugger.py
> 
> %if %{with python3}
> rm -rf %{py3dir}
> cp -a . %{py3dir}
> %endif
> ---------------------------------------------------------------

Thanks. Done.

> > > 5) I don't think you will need to write explicitly attr(0755, root, root)
> > > for /usr/bin/pudb. Remove attr().
> > 
> > Fixed.
> 
> This is fixed for python3 subpackage but not for main python package. Fix
> this.

Fixed now. I don't know why I missed this one :-)

Links
=====

https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb.spec

https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb-2013.3.5-2.fc19.src.rpm

http://koji.fedoraproject.org/koji/taskinfo?taskID=5899874

Comment 11 Paul Wouters 2013-09-05 16:20:24 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[-]: Package requires other packages for directories it uses.
[x]: Package uses nothing in %doc for runtime.
[x]: Package is not known to require ExcludeArch.
[x]: Package complies to the Packaging Guidelines
[-]: 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]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses found:
     "Unknown or generated". 21 files have unknown license. Detailed output of
     licensecheck in /vol/home/paul/1004257-python-pudb/licensecheck.txt
[x]: Package consistently uses macro is (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[-]: Large documentation must go in a -doc subpackage.
     Note: Documentation size is 20480 bytes in 2 files.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Each %files section contains %defattr if rpm < 4.4
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Fully versioned dependency in subpackages, if present.
[x]: Package use %makeinstall only when make install' ' DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package do not use a name that already exist
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local
[x]: Package successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).

Python:
[x]: Python eggs must not download any dependencies during the build process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[?]: If the source package does not include license text(s) as a separate file
     from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.

There is a tests/ directory with three tests. Can these be run from %check ?

[x]: Packages should try to preserve timestamps of original installed files.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: Dist tag is present.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: SourceX tarball generation or download is documented.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define.

===== EXTRA items =====

Generic:
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python-pudb-2013.3.5-3.fc20.noarch.rpm
python-pudb.noarch: W: no-manual-page-for-binary pudb
1 packages and 0 specfiles checked; 0 errors, 1 warnings.





ExecSum: Looks good to me.

separate license file: did you ping upstream and ask to include one?
suggestion: can the tests/*.py be run in %check ?
nitpick: %build starts with python2 then python3. %install starts with 3. Make them consistent?



Rpmlint (installed packages)
----------------------------
# rpmlint python-pudb
python-pudb.noarch: W: no-manual-page-for-binary pudb
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
# echo 'rpmlint-done:'



Requires
--------
python-pudb (rpmlib, GLIBC filtered):
    /usr/bin/python
    python(abi)
    python-pygments
    python-urwid



Provides
--------
python-pudb:
    python-pudb

Comment 12 Dhiru Kholia 2013-09-05 18:11:49 UTC
(In reply to Paul Wouters from comment #11)
> separate license file: did you ping upstream and ask to include one?

Yes. I am now waiting for upstream's reply.

> suggestion: can the tests/*.py be run in %check ?

Files in "test" folder don't seem to be used at all. Also, those files aren't automated test script it seems.

> nitpick: %build starts with python2 then python3. %install starts with 3. Make them consistent?

Good catch. Fixed now.

New links,

Spec URL: https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb.spec
SRPM URL: https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb-2013.3.5-4.fc19.src.rpm

http://koji.fedoraproject.org/koji/taskinfo?taskID=5900906

Comment 13 Tadej Janež 2013-09-06 11:24:21 UTC
Hi!

(In reply to Dhiru Kholia from comment #12)
> New links,
> 
> Spec URL:
> https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb.spec

Just two more suggestions/questions from me:
- %{__python} is deprecated, you should use %{__python2} (see: https://fedoraproject.org/wiki/Packaging:Python#Macros)
- Regarding the executables in /usr/bin: are separate versions, pudb and pudb3,
needed to debug Python 2 and Python 3 programs?

Otherwise, looks fine to me.

P.S.: You get this if you announce the package on the devel mailing list ;-).

Comment 14 Parag AN(पराग) 2013-09-06 17:01:15 UTC
yes as per recently changed guidelines use %{__python2} macro. Also, please add what actually changed in spec from previous release. Don't add just "implemented fixes suggested in BZ #1004257".

If you can fix previous release changelog entries to some real change text that will be good.

Comment 15 Dhiru Kholia 2013-09-06 18:14:48 UTC
(In reply to Tadej Janež from comment #13)
> Just two more suggestions/questions from me:
> - %{__python} is deprecated, you should use %{__python2} (see:
> https://fedoraproject.org/wiki/Packaging:Python#Macros)

Fixed now.

> - Regarding the executables in /usr/bin: are separate versions, pudb and
> pudb3, needed to debug Python 2 and Python 3 programs?

Yes. Exactly.

Comment 16 Dhiru Kholia 2013-09-06 18:23:31 UTC
(In reply to Parag AN(पराग) from comment #14)
> yes as per recently changed guidelines use %{__python2} macro. Also, please
> add what actually changed in spec from previous release. Don't add just
> "implemented fixes suggested in BZ #1004257".
> 
> If you can fix previous release changelog entries to some real change text
> that will be good.

Fixed now.

Spec URL: https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb.spec
SRPM URL: https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb-2013.3.5-5.fc19.src.rpm

http://koji.fedoraproject.org/koji/taskinfo?taskID=5905996

http://koji.fedoraproject.org/koji/taskinfo?taskID=5905997

Comment 17 Dhiru Kholia 2013-09-06 18:50:41 UTC
(In reply to Parag AN(पराग) from comment #6)
> 6) source package does not include license text as a separate file from
> upstream, the packager SHOULD query upstream to include it.

Upstream has fixed this issue now in version "2013.3.6".

I have updated my .spec to build this new version of pudb.

Spec URL: https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb.spec
SRPM URL: https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb-2013.3.6-1.fc19.src.rpm

http://koji.fedoraproject.org/koji/taskinfo?taskID=5906333

http://koji.fedoraproject.org/koji/taskinfo?taskID=5906335

Comment 18 Parag AN(पराग) 2013-09-10 04:54:50 UTC
just change %{python_sitelib} to %{python_sitelib2}


APPROVED

Comment 19 Parag AN(पराग) 2013-09-10 04:56:25 UTC
Reporter mentioned on IRC that he has been sponsored in packager. I am clearing FE-NEEDSPONSOR.

Comment 20 Parag AN(पराग) 2013-09-10 05:19:00 UTC
ah! sorry it should be %{python2_sitelib}. Its new guidelines change. See /etc/rpm/macros.python2

Comment 21 Dhiru Kholia 2013-09-10 08:42:12 UTC
(In reply to Parag AN(पराग) from comment #20)
> ah! sorry it should be %{python2_sitelib}. Its new guidelines change. See
> /etc/rpm/macros.python2

Fixed now.

Spec URL: https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb.spec
SRPM URL: https://bitbucket.org/dhiru/packages/raw/master/pudb/python-pudb-2013.3.6-2.fc19.src.rpm

http://koji.fedoraproject.org/koji/taskinfo?taskID=5916981

Comment 22 Dhiru Kholia 2013-09-10 08:46:43 UTC
New Package SCM Request
=======================
Package Name: python-pudb
Short Description: A full-screen, console-based Python debugger
Owners: halfie
Branches: f19 f20
InitialCC: paragn

Comment 23 Gwyn Ciesla 2013-09-10 11:56:51 UTC
Requested package name python-pudb doesn't match bug summary pudb, please
correct.

Comment 24 Gwyn Ciesla 2013-09-10 18:05:07 UTC
Git done (by process-git-requests).

Comment 25 Fedora Update System 2013-09-17 05:59:06 UTC
python-pudb-2013.3.6-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-pudb-2013.3.6-2.fc19

Comment 26 Fedora Update System 2013-09-18 13:08:09 UTC
python-pudb-2013.3.6-2.fc19 has been pushed to the Fedora 19 testing repository.

Comment 27 Fedora Update System 2013-09-27 00:39:47 UTC
python-pudb-2013.3.6-2.fc19 has been pushed to the Fedora 19 stable repository.


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