Bug 1275057 - Review Request: python-appstream - Parse AppStream files when you don't have libappstream-glib
Review Request: python-appstream - Parse AppStream files when you don't have ...
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: William Moreno
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-10-25 09:12 EDT by Ralph Bean
Modified: 2015-11-23 15:57 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-23 15:57:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
williamjmorenor: fedora‑review+

Attachments (Terms of Use)

  None (edit)
Description Ralph Bean 2015-10-25 09:12:02 EDT
Spec URL: http://ralph.fedorapeople.org//python-appstream.spec
SRPM URL: http://ralph.fedorapeople.org//python-appstream-0.2-1.fc22.src.rpm

If you want to parse AppStream files in Python you probably should
just install libappstream-glib, and use the GObjectIntrospection bindings
for that. AppStreamGlib is a much better library than this and handles
many more kinds of component.

If AppStreamGlib is not available to you (e.g. you're trying to run in an
OpenShift instance on RHEL 6.2), this project might be somewhat useful.
Comment 1 Ralph Bean 2015-10-25 09:12:07 EDT
This package built on koji:  http://koji.fedoraproject.org/koji/taskinfo?taskID=11577332
Comment 2 Ralph Bean 2015-10-25 09:22:44 EDT
I only intend to build this for epel-6 and the 0.2 release from upstream has problems on python-2.7 (so, any Fedora release).  For whoever reviews this, you'll need to use an el6 buildroot.
Comment 3 Upstream Release Monitoring 2015-10-26 09:37:11 EDT
ralph's scratch build of python-appstream-0.3-1.fc22.src.rpm for el6-candidate completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11582265
Comment 4 Ralph Bean 2015-10-26 09:38:25 EDT
Latest upstream, which builds for both rawhide and epel6:

Spec URL: http://threebean.org/rpm/SPECS/python-appstream.spec
SRPM URL: http://threebean.org/rpm/SRPMS/python-appstream-0.3-1.fc22.src.rpm
Comment 5 Ralph Bean 2015-10-29 14:38:23 EDT
Latest upstream, with some bugfixes:

Spec URL: http://threebean.org/rpm/SPECS/python-appstream.spec
SRPM URL: http://threebean.org/rpm/SRPMS/python-appstream-0.5-1.fc22.src.rpm
Comment 6 Upstream Release Monitoring 2015-10-29 14:55:33 EDT
williamjmorenor's scratch build of python-appstream-0.5-1.fc22.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11630504
Comment 7 William Moreno 2015-10-29 17:42:35 EDT
This package it is only for epel6? Or you are goint to build for Fedora and Epel7?

It may be usefull in Fedora, but Python Packaging Guidelines for Fedora have changed a lot from epel6.

If you are to build for Fedora at less consider:

1- Use the $%license macro and define it in %%files for epel6 with:
%{!?_licensedir:%global license %%doc}
%license LICENSE

2- Use a %if 0%{?fedora} conditional to build a python2-appstream and use the python-provides macro.

3- In %%files use a %if 0%{?rhel} && 0%{?rhel} <= 6 to create the python-appstream rpm and use a %if 0%{?fedora} to create the python2-appstream rpm.

In the other hand this spec build fine in epel6 but fails in the others build.

Comment 8 William Moreno 2015-10-29 17:46:11 EDT
Epel7 and Fedora Builds all then fails in %%chech with python2.7 the check pass fine with python2.6 in epel6, will yoo go only for epel6?
Comment 9 William Moreno 2015-10-29 17:58:00 EDT
Sorry for the last to comments, I was looking at the 0.2 version.

I am working with the 0.5 versión but now the epel6 fails in check:

The problem is with %%check again:
+ python test.py
Traceback (most recent call last):
  File "test.py", line 147, in <module>
Comment 10 Ralph Bean 2015-10-30 10:38:15 EDT
Doh!  Good catch.

I do only plan to ship it for epel6.

Upstream recommends that people not use this module when they can instead use appstream-glib (which is available in Fedora and RHEL7).  This lib is just a tool to be used when that better lib is not available (like, on EL6 for instance).
Comment 11 Upstream Release Monitoring 2015-10-30 10:52:47 EDT
ralph's scratch build of python-appstream-0.8-1.fc22.src.rpm for el6-candidate completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11640811
Comment 13 William Moreno 2015-11-03 18:25:51 EST
OK last package build fine in epel 6 and 7 and all suported Fedoras, I will rerun the review.

Comment 14 Upstream Release Monitoring 2015-11-03 18:29:51 EST
williamjmorenor's scratch build of python-appstream-0.8-1.fc22.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11692174
Comment 15 William Moreno 2015-11-05 15:46:48 EST
Package Aproved

I am fine whit this packaging for epel6

If you want to package for Fedora and epel 7 you MUST:

1. Use the License Macro
2. Drop python3 conditionals
3. Provide a python2 and python3 subpackage
4. Use the python provides macro

===== MUST items =====
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
[x]: License field in the package spec file matches the actual license.
[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
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
[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]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
[x]: Package complies to the Packaging Guidelines
[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).
[x]: 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 %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[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
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

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

===== SHOULD items =====
[X]: 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).
[?]: 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
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
[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
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.
Comment 16 Ralph Bean 2015-11-06 10:13:57 EST
Thanks William!  I filed the new package request in pkgdb.
Comment 17 Gwyn Ciesla 2015-11-06 10:37:56 EST
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/python-appstream
Comment 18 Fedora Update System 2015-11-06 11:04:52 EST
python-appstream-0.8-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-1211b6095b
Comment 19 Fedora Update System 2015-11-08 13:48:00 EST
python-appstream-0.8-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'yum --enablerepo=epel-testing update python-appstream'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-1211b6095b
Comment 20 Fedora Update System 2015-11-23 15:57:15 EST
python-appstream-0.8-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

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