Bug 702989 - Review Request: itstool - Translate XML files with PO using ITS rules
Review Request: itstool - Translate XML files with PO using ITS rules
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Christopher Aillon
Fedora Extras Quality Assurance
:
: 713161 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-08 17:53 EDT by Shaun McCance
Modified: 2012-04-21 16:58 EDT (History)
8 users (show)

See Also:
Fixed In Version: itstool-1.1.2-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-15 21:37:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
caillon: fedora‑review+
limburgher: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Shaun McCance 2011-05-08 17:53:42 EDT
Spec URL: http://people.gnome.org/~shaunm/itstool-rpm/itstool.spec
SRPM URL: http://people.gnome.org/~shaunm/itstool-rpm/itstool-1.0.1-1.fc14.src.rpm
Description: ITS Tool is a Python program that converts between XML and PO using rules from the W3C Internationalization Tag Set (ITS). It's slated to replace xml2po from gnome-doc-utils in GNOME.

This is the first time I've made an RPM for others to use. I tried to follow the guidelines on the wiki. Please let me know if I've done anything wrong.
Comment 1 Mario Blättermann 2011-05-09 13:57:33 EDT
Hi Shaun,

if you are new to the packaging maintainers, I assume you need a sponsor, according to the guidelines. Am I right? If yes, you should set the flag "FE-NEEDSPONSOR" in "Blocks:".

Although I'm unable to act as a sponsor, I will have a look at your package anyway.
Comment 2 Mario Blättermann 2011-05-09 14:12:00 EDT
Koji scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3060852

$ rpmlint -v *
itstool.src: I: checking
itstool.src: I: checking-url http://itstool.org/ (timeout 10 seconds)
itstool.src: I: checking-url http://files.itstool.org/itstool/itstool-1.0.1.tar.bz2 (timeout 10 seconds)
itstool.noarch: I: checking
itstool.noarch: I: checking-url http://itstool.org/ (timeout 10 seconds)
itstool.noarch: W: no-manual-page-for-binary itstool
itstool.spec: I: checking-url http://files.itstool.org/itstool/itstool-1.0.1.tar.bz2 (timeout 10 seconds)
2 packages and 1 specfiles checked; 0 errors, 1 warnings.

Are you planning to add a manual page to itstool? Well, it is not mandatory, but would be fine to have it. Good old xml2po has a manpage, terribly outdated, but it has.
Comment 3 Shaun McCance 2011-05-09 14:19:27 EDT
Thanks. I will need a sponsor. I've mostly only worked on the source tarball
side of things.

I'll add a manpage for 1.0.2. I think other distros are more strict about that.
Comment 4 Christopher Aillon 2011-05-24 11:23:36 EDT
I'm able to sponsor, taking the review.
Comment 5 Christopher Aillon 2011-05-24 12:54:21 EDT
Seems good with, but a few small issues are outlined at the end of this large comment.

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


Packaging Guidelines notes:
* The BuildRoot tag can be dropped, as well as the rm -rf $RPM_BUILD_ROOT in %install, see http://fedoraproject.org/wiki/Packaging/Guidelines#BuildRoot_tag
* The %clean section can be dropped, see http://fedoraproject.org/wiki/Packaging/Guidelines#.25clean

* This package requires python at runtime, but the built package does not require python.  This is a MUST fix.  The preferred way to fix this in Fedora is to change your shebang to "#!/usr/bin/python -s" instead of "#!/usr/bin/env python", and rpm will automatically pick up the dep (right now, it picks up a dep for /usr/bin/env instead).  The alternative would be to manually add an explicit Requires line.  See http://fedoraproject.org/wiki/Packaging/Guidelines#Explicit_Requires  (as an additional sidenote: dmalcolm tells me that "#!/usr/bin/python -s" for all system binaries is likely to become a Fedora 16 goal, so would be nice to get that done upstream)
Comment 6 Shaun McCance 2011-05-26 16:27:29 EDT
Regarding the License field in the spec file, the COPYING file basically says "GPLv3+, but the ITS files can be modified and redistributed without restriction." I do have COPYING and COPYING.GPL3 in %doc, but should License say something else to reflect this? I assumed the License field is from a semi-controlled vocabulary. Presumably there are other packages that are GPL with exceptions.

I added a man page to git. rpmlint did warn about that.

I've always been told to use /usr/bin/env for python, perl, etc for portability. I don't know of any modern Linux distro that doesn't put python in /usr/bin, but I don't know about other Unixes. I guess I could just change it and wait for bug reports. (I notice that xml2po uses /usr/bin/python in the shebang, and I don't remember ever seeing a bug about that.)

So here's what I'll do:

* Drop BuildRoot, the "rm -rf $RPM_BUILD_ROOT" in %install, and %clean
* Change the shebang to "/usr/bin/python -s" upstream
* Roll a 1.0.2 with the shebang change and the man page
* Do a new spec file and SRPM with these changes

Anything else?
Comment 7 Christopher Aillon 2011-05-26 17:00:23 EDT
(In reply to comment #6)
> Regarding the License field in the spec file, the COPYING file basically says
> "GPLv3+, but the ITS files can be modified and redistributed without
> restriction." I do have COPYING and COPYING.GPL3 in %doc, but should License
> say something else to reflect this? I assumed the License field is from a
> semi-controlled vocabulary. Presumably there are other packages that are GPL
> with exceptions.

It said under the terms of your choosing, and leaving the spec License field at GPLv3+ would comply. If you wanted to change the spec file to reflect that, it's probably "GPLv3+ and Copyright Only" but I'm not entirely sure that this is a) correct and b) necessary.

Redirecting to spot and FE-Legal for the definitive answer, though.
Comment 8 Christopher Aillon 2011-06-03 14:21:00 EDT
Spot, ping!
Comment 9 Tom "spot" Callaway 2011-06-03 14:38:02 EDT
I think License: GPLv3+ is appropriate here, unless you foresee a need for Fedora to distribute the ITS definitions under different terms.

Lifting FE-Legal.
Comment 10 Christopher Aillon 2011-06-03 18:01:08 EDT
(In reply to comment #9)
> I think License: GPLv3+ is appropriate here, unless you foresee a need for
> Fedora to distribute the ITS definitions under different terms.

Cool, that's what I thought.

(In reply to comment #6)
> So here's what I'll do:
> 
> * Drop BuildRoot, the "rm -rf $RPM_BUILD_ROOT" in %install, and %clean
> * Change the shebang to "/usr/bin/python -s" upstream
> * Roll a 1.0.2 with the shebang change and the man page
> * Do a new spec file and SRPM with these changes
> 
> Anything else?

I think that's it, once you provide a new spec/srpm for those, I'll approve the package and sponsor you.
Comment 11 Christopher Aillon 2011-06-14 11:50:20 EDT
*** Bug 713161 has been marked as a duplicate of this bug. ***
Comment 12 Zeeshan Ali 2011-06-14 15:18:25 EDT
Yikes, I should have checked if anyone else is already on this before starting. :( Anyways, my packages are here, just in case you want to have a look for some reason: http://zeenix.fedorapeople.org/
Comment 13 Shaun McCance 2011-06-27 15:19:03 EDT
http://people.gnome.org/~shaunm/itstool-rpm/itstool.spec
http://people.gnome.org/~shaunm/itstool-rpm/itstool-1.1.0-1.fc14.src.rpm

I made a new release upstream. It has some new features and some fixes, but notably for the RPM, it now contains a man page, and the shebang is #!/usr/bin/python -s. I updated the spec file to remove the build root and clean stuff, per the packaging guidelines, and added the man page to the spec file.
Comment 14 Christopher Aillon 2011-06-27 16:06:58 EDT
Thanks for the update.

F15 Scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=3164638

There's still an rpmlint issue, but that aside, I think this is ready for approval.

  itstool.noarch: W: incoherent-version-in-changelog 1.0.1-1 ['1.1.0-1.fc15', '1.1.0-1']

Please fix that by updating the rpm changelog before importing into git.

Approving and sponsoring.
Comment 15 Shaun McCance 2011-06-27 16:22:20 EDT
Added the changelog entry in the spec file and replaced the spec and srpm files at the above URLs.
Comment 16 Matthias Clasen 2011-07-05 11:02:19 EDT
Shaun, do you know what to do next here, or do you need help ?
Comment 17 Mario Blättermann 2011-07-05 14:25:25 EDT
(In reply to comment #15)
> Added the changelog entry in the spec file and replaced the spec and srpm files
> at the above URLs.

Each time you change anything in the spec file, please bump the release number and build a new package. There is no other way to track your changes really. The %changelog has always to reflect what you did, means, consecutive changelog entries may not have the same release number.
Comment 18 Christopher Aillon 2011-07-05 14:46:55 EDT
Mario, FWIW, I'm sponsoring and have already explained this to Shaun out of band.  In this case, there was no %changelog entry whatsoever for the new changes, so I asked him to simply add one and replace the existing spec.
Comment 19 Mario Blättermann 2011-07-05 14:50:51 EDT
OK, sorry for the noise ;)
Comment 20 Shaun McCance 2011-07-05 15:40:50 EDT
New Package SCM Request
=======================
Package Name: itstool
Short Description: Translate XML with PO files using rules from the W3C ITS
Owners: shaunm
Branches: f15
InitialCC:
Comment 21 Gwyn Ciesla 2011-07-05 16:07:35 EDT
Git done (by process-git-requests).
Comment 22 Matthias Clasen 2011-07-15 21:37:47 EDT
Build is done, so closing the bug
Comment 23 Andrea Veri 2012-04-17 07:56:29 EDT
Package Change Request
======================
Package Name: itstool
New Branches: el5 el6
Owners: averi
InitialCC: averi

I'll help mclasen maintaining itstool in both EL5 and EL6. He'll soon confirm my commit accesses on the relevant git branch.
Comment 24 Matthias Clasen 2012-04-17 07:59:34 EDT
You should be all set with commit access.
Comment 25 Gwyn Ciesla 2012-04-17 09:28:19 EDT
Git done (by process-git-requests).
Comment 26 Fedora Update System 2012-04-18 10:09:57 EDT
itstool-1.1.2-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/itstool-1.1.2-1.el6
Comment 27 Fedora Update System 2012-04-18 10:10:49 EDT
itstool-1.1.2-2.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/itstool-1.1.2-2.el5
Comment 28 Fedora Update System 2012-04-21 16:58:29 EDT
itstool-1.1.2-1.el6 has been pushed to the Fedora EPEL 6 stable repository.

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