Bug 1003094

Summary: Review Request: python-xml2rfc - Python module for converting IETF RFC-2629 XML into txt
Product: [Fedora] Fedora Reporter: Paul Wouters <pwouters>
Component: Package ReviewAssignee: Mario Blättermann <mario.blaettermann>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mario.blaettermann, notting
Target Milestone: ---Flags: mario.blaettermann: fedora-review+
gwync: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-27 01:42:19 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:

Description Paul Wouters 2013-08-30 18:35:12 UTC
Spec URL: ftp://ftp.nohats.ca/python-xml2rfc/python-xml2rfc.spec
SRPM URL: ftp://ftp.nohats.ca/python-xml2rfc/python-xml2rfc-2.4.2-1.fc18.src.rpm
Description: Xml2rfc generates RFCs and IETF drafts from document source in XML
according to the dtd in RFC-2629.  It takes as input an xml file which
contains the text and meta-information about author names etc., and
transforms it into suitably formatted output. The input xml file should
follow the DTD given in RFC-2629 (or it's inofficial successor).

Fedora Account System Username: pwouters

Comment 1 Mario Blättermann 2013-08-30 20:20:36 UTC
The tarball contains a bundled egg-info which has to be removed for building the package:
rm -rf %{namewithoutpythonprefix}.egg-info

See http://fedoraproject.org/wiki/Packaging:Python_Eggs#Upstream_Eggs for more information.

PKG-INFO shouldn't be added to %doc. It is present from the egg-info anyway. Its content is similar to README and doesn't provide any additional info.

%install
rm -rf $RPM_BUILD_ROOT
The initial cleaning of buildroot is no longer needed because it is default anyway. It is only needed (probably...?) for EPEL5 packages.


%{python_sitelib}/%{namewithoutpythonprefix}/templates/*
%{python_sitelib}/%{namewithoutpythonprefix}/*.py*
%{python_sitelib}/%{namewithoutpythonprefix}/writers/*.py*

The folders %{python_sitelib}/%{namewithoutpythonprefix}/templates/ and %{python_sitelib}/%{namewithoutpythonprefix}/writers/ stay unowned. Actually it should be sufficient to just write
%{python_sitelib}/%{namewithoutpythonprefix}/*
to own the whole folder, its subfolders and the content.

Summary:        Python module for...
The package name already says that it is a Python module, you might write instead:
Summary:        Converting IETF RFC-2629 XML into txt


What about to run the tests in ./tests in a %check section?

Comment 2 Mario Blättermann 2013-08-31 08:09:30 UTC
Forgot to mention, to get the egg rebuilt from source, python-setuptools is probably needed as BuildRequires.

Comment 3 Paul Wouters 2013-08-31 19:23:02 UTC
Thanks for the feedback!

Spec URL: ftp://ftp.nohats.ca/python-xml2rfc/python-xml2rfc.spec
SRPM URL: ftp://ftp.nohats.ca/python-xml2rfc/python-xml2rfc-2.4.2-2.fc18.src.rpm

changelog:

* Sat Aug 31 2013 Paul Wouters <pwouters> - 2.4.2-2
- Fixup summary, remove cleaning buildroot, remove upstream egg-info
- Added BuildRequire for python-virtualenv to run tests
- Added commented check target - but it has issues to pass

Running the tests causes:

+ cd xml2rfc-2.4.2
+ virtualenv .
New python executable in ./bin/python
Installing setuptools............done.
Installing pip...............done.
+ make test
bin/python setup.py --quiet install
Building lxml version 3.2.3.
Building without Cython.
Using build configuration of libxslt 1.1.28
Building against libxml2/libxslt in the following directory: /usr/lib64
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
  warnings.warn(msg)
warning: no files found matching '*.txt' under directory 'src/lxml/tests'
src/lxml/lxml.etree.c: In function '__pyx_f_4lxml_5etree__xslt_resolve_from_python':
src/lxml/lxml.etree.c:136455:9: warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch]
src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_4XSLT_18__call__':
src/lxml/lxml.etree.c:140541:81: warning: passing argument 1 of '__pyx_f_4lxml_5etree_12_XSLTContext__copy' from incompatible pointer type [enabled by default]
src/lxml/lxml.etree.c:138476:52: note: expected 'struct __pyx_obj_4lxml_5etree__XSLTContext *' but argument is of type 'struct __pyx_obj_4lxml_5etree__BaseContext *'
src/lxml/lxml.etree.c: In function '__pyx_f_4lxml_5etree__copyXSLT':
src/lxml/lxml.etree.c:141947:79: warning: passing argument 1 of '__pyx_f_4lxml_5etree_12_XSLTContext__copy' from incompatible pointer type [enabled by default]
src/lxml/lxml.etree.c:138476:52: note: expected 'struct __pyx_obj_4lxml_5etree__XSLTContext *' but argument is of type 'struct __pyx_obj_4lxml_5etree__BaseContext *'
src/lxml/lxml.etree.c: At top level:
src/lxml/lxml.etree.c:12774:13: warning: '__pyx_f_4lxml_5etree_displayNode' defined but not used [-Wunused-function]
[ -d tests/failed/ ] && rm -f tests/failed/*
make: *** [test] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.gBJDWo (%check)

Comment 4 Paul Wouters 2013-08-31 19:31:36 UTC
Oops. also quickly fixed license in the -2 version

- Fix license to BSD with advertising

Comment 5 Paul Wouters 2013-09-01 01:40:39 UTC
Spec URL: ftp://ftp.nohats.ca/python-xml2rfc/python-xml2rfc.spec
SRPM URL: ftp://ftp.nohats.ca/python-xml2rfc/python-xml2rfc-2.4.2-3.fc18.src.rpm

changelog:

* Sun Sep 01 2013 Paul Wouters <pwouters> - 2.4.2-3
- Patch for paginated_txt.py by Miek, fixes my draft crasher

Comment 6 Mario Blättermann 2013-09-01 10:36:35 UTC
Scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=5878638

$ rpmlint -i -v *
python-xml2rfc.src: I: checking
python-xml2rfc.src: W: spelling-error Summary(en_US) txt -> text, ext, tit
The value of this tag appears to be misspelled. Please double-check.

python-xml2rfc.src: W: spelling-error %description -l en_US dtd -> std, dd, did
The value of this tag appears to be misspelled. Please double-check.

python-xml2rfc.src: W: spelling-error %description -l en_US xml -> XML, ml, x ml
The value of this tag appears to be misspelled. Please double-check.

python-xml2rfc.src: W: spelling-error %description -l en_US inofficial -> unofficial, in official, in-official
The value of this tag appears to be misspelled. Please double-check.

python-xml2rfc.src: I: checking-url https://pypi.python.org/pypi/xml2rfc/ (timeout 10 seconds)
python-xml2rfc.src:38: W: make-check-outside-check-section # make test
Make check or other automated regression test should be run in %check, as they
can be disabled with a rpm macro for short circuiting purposes.

python-xml2rfc.src: I: checking-url https://pypi.python.org/packages/source/x/xml2rfc/xml2rfc-2.4.2.tar.gz (timeout 10 seconds)
python-xml2rfc.noarch: I: checking
python-xml2rfc.noarch: W: spelling-error Summary(en_US) txt -> text, ext, tit
The value of this tag appears to be misspelled. Please double-check.

python-xml2rfc.noarch: W: spelling-error %description -l en_US dtd -> std, dd, did
The value of this tag appears to be misspelled. Please double-check.

python-xml2rfc.noarch: W: spelling-error %description -l en_US xml -> XML, ml, x ml
The value of this tag appears to be misspelled. Please double-check.

python-xml2rfc.noarch: W: spelling-error %description -l en_US inofficial -> unofficial, in official, in-official
The value of this tag appears to be misspelled. Please double-check.

python-xml2rfc.noarch: I: checking-url https://pypi.python.org/pypi/xml2rfc/ (timeout 10 seconds)
python-xml2rfc.noarch: W: file-not-utf8 /usr/share/doc/python-xml2rfc/LICENSE
The character encoding of this file is not UTF-8.  Consider converting it in
the specfile's %prep section for example using iconv(1).

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

python-xml2rfc.spec: I: checking-url https://pypi.python.org/packages/source/x/xml2rfc/xml2rfc-2.4.2.tar.gz (timeout 10 seconds)
2 packages and 1 specfiles checked; 0 errors, 11 warnings.


There some fixes needed:

inofficial → unofficial

LICENSE is not utf-8 and has to be converted.

The warning regarding the "make test" call is not critical, but can can be avoided by using %check instead of #check. The check section is needed anyway for the tests once they are working. Well, we can drop the tests for the time being, but it should be investigated why they fail. Maybe an extra Python module is required which needs to be packaged first?

BTW, python-setuptools-devel is provided virtually by python-setuptools, so the latter would be sufficient here.

Comment 7 Paul Wouters 2013-09-01 18:47:23 UTC
Spec URL: ftp://ftp.nohats.ca/python-xml2rfc/python-xml2rfc.spec
SRPM URL: ftp://ftp.nohats.ca/python-xml2rfc/python-xml2rfc-2.4.2-4.fc18.src.rpm

changelog:
* Sun Sep 01 2013 Paul Wouters <pwouters> - 2.4.2-4
- Fix typo, convert LICENSE to utf-8, make check fix and python-setuptools fix

Comment 8 Mario Blättermann 2013-09-03 20:06:50 UTC
Looks fine now.

APPROVED.

Comment 9 Mario Blättermann 2013-09-21 09:15:25 UTC
What about an SCM request?

Comment 10 Paul Wouters 2013-09-23 14:26:08 UTC
New Package SCM Request
=======================
Package Name: python-xml2rfc
Short Description: Python module for converting IETF RFC-2629 XML into txt
Owners: pwouters
Branches: f19 f20 el6
InitialCC:

Comment 11 Gwyn Ciesla 2013-09-23 15:16:02 UTC
Git done (by process-git-requests).

Comment 12 Mario Blättermann 2013-09-24 19:04:01 UTC
The packages for the requested Git branches have been built and introduced into the Bodhi update system, that's why the bug status should be ON_QA.