Bug 812659

Summary: Review Request: par - paragraph reformatter
Product: [Fedora] Fedora Reporter: David Levine <par.packager>
Component: Package ReviewAssignee: Jason Tibbitts <j>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: j, notting, package-review
Target Milestone: ---Flags: j: fedora-review+
kevin: 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: 2012-07-11 22:00:41 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 David Levine 2012-04-15 19:32:39 UTC
Spec URL: http://www.cs.wustl.edu/~levine/par/par-1.52-2.spec
SRPM URL: http://www.cs.wustl.edu/~levine/par/par-1.52-2.src.rpm
Description: 
par is a filter which copies its input to its output, changing all
white characters (except newlines) to spaces, and reformatting each
paragraph.  Paragraphs are separated by protected, blank, and bodiless
lines (see the man page Terminology section for definitions), and
optionally delimited by indentation (see the d option in the Options
section).

This is my first package; sponsor needed.

Comment 1 David Levine 2012-04-16 00:32:16 UTC
Here's what rpmlint says:

par.i386: W: spelling-error Summary(en_US) reformatter -> reformatted, reformatting, reformatory
par.i386: W: spelling-error Summary(en_US) fmt -> ft, mt, fit
par.i386: W: spelling-error %description -l en_US bodiless -> bodices
1 packages and 0 specfiles checked; 0 errors, 3 warnings.

Comment 2 Ville Skyttä 2012-04-16 12:27:16 UTC
Not a review, just two comments:

File conflict: /usr/bin/par is also included in the par2cmdline package:
http://fedoraproject.org/wiki/Packaging:Conflicts#Binary_Name_Conflicts

Drop -s from install: http://fedoraproject.org/wiki/Packaging:Debuginfo

Comment 3 David Levine 2012-04-16 14:22:54 UTC
Spec URL: http://www.cs.wustl.edu/~levine/par/par-1.52-3.spec
SRPM URL: http://www.cs.wustl.edu/~levine/par/par-1.52-3.src.rpm

1) Renamed binary to /usr/bin/parr, man page to /usr/share/man/man1/parr.1.gz.
   (Did not update contents of the man page itself, pending resolution of
   conflict.)
2) Removed -s from install.


rpmlint output:

par.i386: W: spelling-error Summary(en_US) reformatter -> reformatted, reformatting, reformatory
par.i386: W: spelling-error Summary(en_US) fmt -> ft, mt, fit
par.i386: W: spelling-error %description -l en_US bodiless -> bodices
par.i386: W: unstripped-binary-or-object /usr/bin/parr
1 packages and 0 specfiles checked; 0 errors, 4 warnings.

Comment 5 Tom "spot" Callaway 2012-04-17 18:23:46 UTC
Okay, here are my initial set of comments:

* The following tags are obsolete and need to be removed:
Vendor, Packager

* The following tags are obsolete unless you plan on building for EPEL 5 or older:
- BuildRoot

* The following items are obsolete unless you plan on building for EPEL 5 or older:
- "rm -rf $RPM_BUILD_ROOT" at the beginning of %install
- a default %clean section that just contains "rm -rf $RPM_BUILD_ROOT"
- %defattr(-,root,root,755)

* I strongly advise that you always use macros like "%{buildroot}" instead of "%buildroot". While it isn't a huge deal in this relatively simple package, later, you may want to conditionalize macros (e.g. "%{?dist}"), and you will need to be using that syntax to do that cleanly.

* Please use "Source0" instead of "Source". Source0 should be a full URL to the upstream provided source tarball, rpm is smart enough to parse that. (Same is true for Patch1 since upstream provides it)

* In the Source0 URL, please use "%{name}" and "%{version}", so that as you update the package, that URL can remain relatively static (also prevents you from accidentally building a package with old source).

* In Release, please seriously consider using "%{?dist}" at the end of the numeric field. https://fedoraproject.org/wiki/Packaging:DistTag

* This code actually has a new license, instead of "Copyright only", please use:

License: Par

****
Clean all that up, and I'll come through and do a review.

Comment 6 David Levine 2012-04-19 01:46:31 UTC
Spec URL: http://www.cs.wustl.edu/~levine/par/par-1.52-4.spec
SRPM URL: http://www.cs.wustl.edu/~levine/par/par-1.52-4.fc16.src.rpm

Thank you both for your comments.  I tried to address all, except:

1) I retained the %defattr(-,root,root,755) for now.  Without it, /usr/share/doc/par-1.52/ is created with mode 2755.  rpmlint considers that an error:

  par.i386: E: non-standard-dir-perm /usr/share/doc/par-1.52 02755L

2) I didn't use macros in the Source0 URL because the name and version parts of its filename don't match the macro values (Par vs. par and 152 vs. 1.52).

3) And I restored the -s in the install of the binary.  The vast majority of binaries on my vanilla Fedora 16 are stripped, so I'm not sure why this one shouldn't be.  (Unless that changes with 17 or 18?)


And I'm not sure that renaming the executable is the best approach here.  It technically doesn't satisfy Packaging:Conflicts because upstream isn't doing the renaming.  And the other two choices under Binary_Name_Conflicts are for cases with the same or similar functionality, so they don't apply.

Is there any precedent for installing a conflicting binary someplace other than /usr/bin/?  For my immediate use case, that would be fine because the binary is called by another, which must be informed of the path.  If not an option, any other suggestions?  par dates from 1993 so I'd like to avoid changing its name.

rpmlint output:
par.i386: W: spelling-error Summary(en_US) reformatter -> reformatted, reformatting, reformatory
par.i386: W: spelling-error Summary(en_US) fmt -> ft, mt, fit
par.i386: W: spelling-error %description -l en_US bodiless -> bodices
par.i386: W: invalid-license Par
1 packages and 0 specfiles checked; 0 errors, 4 warnings

Comment 7 David Levine 2012-05-16 02:53:10 UTC
Spec URL: http://www.cs.wustl.edu/~levine/par/par-1.52-5.spec
SRPM URL: http://www.cs.wustl.edu/~levine/par/par-1.52-5.fc16.src.rpm

After seeing the discussion about id-utils on the devel mailing list, I think that the par executable should be installed as /usr/lib/par/par.  So, par-1.52-5.spec installs these files:

/usr/lib/par/par
/usr/share/doc/par-1.52/par.doc
/usr/share/doc/par-1.52/releasenotes
/usr/share/man/man1/par.1.gz

The defattr directive can be removed if install explicitly creates the doc dir.


Output of rpmlint -o 'ValidLicenses ("Par")':

par.i386: W: spelling-error Summary(en_US) reformatter -> reformatted, reformatting, reformatory
par.i386: W: spelling-error Summary(en_US) fmt -> ft, mt, fit
par.i386: W: spelling-error %description -l en_US bodiless -> bodices
1 packages and 0 specfiles checked; 0 errors, 3 warnings.

Comment 8 David Levine 2012-07-04 18:20:03 UTC
Added a fc17 src rpm, with contents identical to the fc16 src rpm:

Spec URL: http://www.cs.wustl.edu/~levine/par/par-1.52-5.spec
SRPM URL: http://www.cs.wustl.edu/~levine/par/par-1.52-5.fc17.src.rpm

spot, will you have a chance to look at this?

Thanks very much,

David

Comment 9 Jason Tibbitts 2012-07-05 19:08:55 UTC
Note a note that spot isn't CC'd here so there's not much chance he would see your comment.

I personally do not see the point in /usr/lib/par/par.  If people are supposed to run this, why put it outside of the path?  Of course, I also don't see why the par2cmdline utility has claim the executable name.  This one has nearly 20 years of history, and the par2cmdline package only owns /usr/bin/par because of this line in the spec:

ln -sf par2 $RPM_BUILD_ROOT/%{_bindir}/par

So the par executable there isn't even part of upstream; it's just a fiction of the Fedora package.  I would file a bug to have it removed, and then this could go in properly, at least in rawhide.

Comment 10 David Levine 2012-07-06 01:24:29 UTC
Thanks.  I had already been in touch with the Fedora maintainer of par2cmdline.  He explained that it supports two versions of a format, and that the symlink allows one executable to support both.  I wasn't aware that upstream doesn't have that symlink.  I'll revisit with the maintainer.

Comment 11 David Levine 2012-07-08 19:55:50 UTC
Spec URL: http://www.cs.wustl.edu/~levine/par/par-1.52-6.spec
SRPM URL: http://www.cs.wustl.edu/~levine/par/par-1.52-6.fc17.src.rpm

Great news from the par2cmdline packager:

  The /usr/bin/par symlink has just been removed in Fedora Rawhide in
  package par2cmdline-0.4.tbb.20100203-10.fc18.

Thank you for the suggestion, Jason.

So we now have:
/usr/bin/par
/usr/share/doc/par-1.52/par.doc
/usr/share/doc/par-1.52/releasenotes
/usr/share/man/man1/par.1.gz

$ rpmlint -o 'ValidLicenses ("Par")' par
par.i686: W: spelling-error Summary(en_US) reformatter -> reformatted, reformatting, reformatory
par.i686: W: spelling-error Summary(en_US) fmt -> ft, mt, fit
par.i686: W: spelling-error %description -l en_US bodiless -> bodices
1 packages and 0 specfiles checked; 0 errors, 3 warnings.

Comment 12 Jason Tibbitts 2012-07-09 06:09:12 UTC
OK, looks pretty good.  Indeed, the Par license is acceptable even though rpmlint will complain about it until it gets an update.

Still one rpmlint complaint you missed, though:
  par-debuginfo.x86_64: E: empty-debuginfo-package
and indeed, the debuginfo package is missing sources.  The compiler is called with the proper flags, so at some point the binary is being stripped.  Turns out you're doing that yourself:
  install -s par %{buildroot}/%{_bindir}
You must not do this.  Just remove the '-s' from that line, so that the file with debugging info gets installed and rpmbuild can do the proper debuginfo extraction.

The only other thing I see after a quick review is that the summary is slightly pretentions.  It is generally best to avoid advertising-like statements in package summaries, since they don't add anything that the user might be looking for.  The "but better" doesn't really serve to describe what the package does.

So one thing that must be fixed, and one minor thing.

* source files match upstream.  sha256sum:
  33dcdae905f4b4267b4dc1f3efb032d79705ca8d2122e17efdecfd8162067082
   Par152.tar.gz
  cc2e2c7943b73d9ea893717f669ec7f1665188dd8bedd45aeaca027c30b056bb
   par_1.52-i18n.3.diff.gz
* package meets naming and versioning guidelines.
* specfile is properly named, is cleanly written and uses macros consistently.
? summary is a bit pretentious.
* description is OK.
* dist tag is present.
* license field matches the actual license.
* license is open source-compatible.
* license text included in package (in par.doc)
* latest version is being packaged.
* BuildRequires are proper (none).
* compiler flags are appropriate.
* package builds in mock (rawhide, x86_64).
* package installs properly.
X debuginfo package is empty.
X rpmlint has a valid complaint.
* final provides and requires are sane:
   par = 1.52-6.fc18
   par(x86-64) = 1.52-6.fc18
  =
   (none)

* no bundled libraries.
* owns the directories it creates.
* doesn't own any directories it shouldn't.
* no duplicates in %files.
* file permissions are appropriate.
* code, not content.
* documentation is small, so no -doc subpackage is necessary.
* %docs are not necessary for the proper functioning of the package.
* no static libraries.
* no libtool .la files.

Comment 13 David Levine 2012-07-09 17:06:17 UTC
Spec URL: http://www.cs.wustl.edu/~levine/par/par-1.52-7.spec
SRPM URL: http://www.cs.wustl.edu/~levine/par/par-1.52-7.fc17.src.rpm

I had already gone back and forth on the -s.  Without it, there's a warning from rpmlint complaining about not having it :-/

The par summary that says that it's better than fmt has been floating around since 2002, at least.  And its man page justifies the claim.  But I changed it to be something that I think is less pretentious but still helpful.

$ rpm -qf `which rpmlint`
rpmlint-1.4-6.fc17.noarch
$ rpmlint -o 'ValidLicenses ("Par")' par
par.i386: W: spelling-error Summary(en_US) reformatter -> reformatted, reformatting, reformatory
par.i386: W: spelling-error Summary(en_US) fmt -> ft, mt, fit
par.i386: W: spelling-error %description -l en_US bodiless -> bodices
par.i386: W: unstripped-binary-or-object /usr/bin/par
1 packages and 0 specfiles checked; 0 errors, 4 warnings.

Comment 14 Jason Tibbitts 2012-07-09 17:41:37 UTC
I did test taking out the -s and I get no additional rpmlint warnings.  This is building on rawhide x86_64 and i686 and testing the packages with rpmlint 1.4-6.fc17.  But I'm rather confused about how you get an actual i386 build; Fedora hasn't built i386 packages, or used package names with "i386", for quite some time now.  Here's a scratch build: 
  http://koji.fedoraproject.org/koji/taskinfo?taskID=4227580
Note that no "i386" packages generated.  Grabbing the i686 packages and running rpmlint on them complains about nothing save the license tag.

Anyway, the current package looks good.  You have been sponsored in the account system, and once the permissions propagate you will be able to make your SCM request.  Please feel free to meet me on IRC in #fedora-devel if you need guidance through the process of getting your package into the system.

APPROVED

Comment 15 David Levine 2012-07-09 18:05:01 UTC
Thank you.

I verified that I don't have any ~/.rpm* files.  I'm running vanilla Fedora 17 on an older Pentium.  uname -a reports it as an i686:
  Linux sna 3.3.4-5.fc17.i686 #1 SMP Mon May 7 17:45:26 UTC 2012 i686 i686 i386 GNU/Linux

But whatever rpmbuild uses to detect the arch is calling it an i386.  Any suggestions on where to look next, or report it?

$ rpmbuild --showrc 2>&1 | head -12
ARCHITECTURE AND OS:
build arch            : i386
compatible build archs: pentium3 i686 i586 i486 i386 noarch fat
build os              : Linux
compatible build os's : Linux
install arch          : pentium3
install os            : Linux
compatible archs      : pentium3 i686 i586 i486 i386 noarch fat
compatible os's       : Linux

RPMRC VALUES:
optflags              : -O2 -g -march=pentium3

Comment 16 David Levine 2012-07-09 18:11:22 UTC
Disregard Comment 15.  I installed redhat-rpm-config and now rpmbuild --showrc reports the build arch as an i686.

Comment 17 Jason Tibbitts 2012-07-09 18:13:44 UTC
I do hope you know that you should be doing test builds in mock or in our buildsystem.  Doing local builds does not properly test buildability.

Comment 18 David Levine 2012-07-09 21:21:11 UTC
New Package SCM Request
=======================
Package Name: par
Short Description: Paragraph reformatter, vaguely like fmt, but more elaborate
Owners: levined
Branches:
InitialCC:

Comment 19 Kevin Fenzi 2012-07-10 22:26:37 UTC
Git done (by process-git-requests).