This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 628464

Summary: rpm changelog entries should be "date name <email> - ver-rel"
Product: [Community] Publican Reporter: Jens Petersen <petersen>
Component: publicanAssignee: Jeff Fearn <jfearn>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 1.6CC: jfearn, mmcallis, publican-list, r.landmann, rlerch, tmz, ville.skytta, wolfy
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: publican-2.2-0.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-08 16:42:55 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Jens Petersen 2010-08-30 02:49:04 EDT
Description of problem:
publican generates rpm changelog entries without a dash (minus) sign
between the developer's email address and the package version-release.

PackageKit doesn't parse the format with the dash
and shows changelog header parse error in gpk GUI.

How reproducible:
every time

Steps to Reproduce:
1. rpm -q --changelog product_book-ver-rel.noarch.rpm

Actual results:
rfc2822-date Author <email> version-release

Expected results:
rfc2822-date Author <email> - version-release

Additional info:
I am filing another bug for gpk to parse changelogs with the dash,
but "-" is the preferred format anyway and 
publican should really follow the normal format.
Comment 1 Jens Petersen 2010-08-30 02:50:08 EDT
Ryan, what version are you using BTW?
Comment 2 Jens Petersen 2010-08-30 03:01:07 EDT
Bug 628467 is the gnome-packagekit bug.
Comment 3 Jeff Fearn 2010-09-08 00:55:26 EDT
Perhaps a bug is required against rpmlint, since that is the tool specified in the packaging rules for validating these things.
Comment 4 Jens Petersen 2010-09-08 04:51:53 EDT
Fair point - reassigning for rpmlint for input.
Comment 5 Todd Zullinger 2010-09-08 09:50:57 EDT
Since the dash isn't required, adding a warning to rpmlint would annoy users who don't use one and are in compliance with the guidelines.  What's the benefit?

http://fedoraproject.org/wiki/Packaging:Guidelines#Changelogs says all of the following are acceptable:

* Fri Jun 23 2006 Jesse Keating <jkeating@redhat.com> - 0.6-4
- And fix the link syntax.

* Fri Jun 23 2006 Jesse Keating <jkeating@redhat.com> 0.6-4
- And fix the link syntax.

* Fri Jun 23 2006 Jesse Keating <jkeating@redhat.com>
- 0.6-4
- And fix the link syntax.

It does not, so far as I can see, specify that any of them are more correct than others.
Comment 6 Ville Skyttä 2010-09-08 13:17:46 EDT
I'm with Todd on this.  But if someone submits one, I'm willing to consider a rpmlint patch that adds checks for changelog name (and why not text while at it) formatting.  These should be made optional; quite possibly configurable regexps would do the trick.

Bouncing assignment back to publican; as far as I'm concerned this is NOTABUG wrt rpmlint.
Comment 7 Jeff Fearn 2010-09-08 17:32:51 EDT
I'm going to close this, since it's clear that there are multiple correct formats for change logs and that PK should support all of them.
Comment 8 Jens Petersen 2010-09-08 20:24:17 EDT
Ville, Todd - ok but do we agree that the " - " form is preferred?
I still think publican should use that by default.
Comment 9 Todd Zullinger 2010-09-08 22:03:44 EDT
While I tend to use the dashed form, I have no idea whether more people prefer that over any of the other acceptable forms.  Unless the guidelines are changed to force one style, any application looking to parse the changelog entries will have to cope with all valid forms, so it seems like a rather moot point.  I'm sure that we all have more important things to worry over than dashed or dashless. ;)
Comment 10 Ville Skyttä 2010-09-09 01:55:25 EDT
FWIW, my _personal_ preference is the dashed form and I believe it is the most used format in Fedora, but again I second Todd's previous comment.
Comment 11 Jens Petersen 2010-09-09 02:30:37 EDT
Let's wait for gpk to get fixed then...
Comment 12 Jens Petersen 2010-09-23 20:36:22 EDT
Reopening: please see bug 628467 comment 1.
Comment 13 Todd Zullinger 2010-09-23 21:04:47 EDT
Is the point that rpmlint should at least balk if it finds an entry of the format: A U Thor <author@example.org> - 1.0 ?  (With or without the hyphen, of course.)
Comment 14 Jeff Fearn 2010-09-23 21:57:18 EDT
This format is due to how the revnumber in the revision history is formatted, this is user generated content.

It would break a large number of books to start enforcing this straight away, so what I did was validate the revnumber and if it's not valid then it generates a warning and automatically appends '-0' to the revnumber used in the change log.

This automatic handling will be removed at a later date.

Fixed in build: 2.1-0.%{dist}.t76

Warning text:

WARNING: revnumber '0.1' does not match required format '(\d.)*-(\d.)*'. e.g. '0.1-0'.
WARNING: Appending '-0' to revnumber for change log use to avoid creating invalid change log entries.
WARNING: This automated handling is deprecated and will be removed from Publican in a future version, you should correct your revnumber's before this or your future builds will fail.

FYI I also added the dash after email address while I was there.
Comment 15 Fedora Update System 2010-10-06 01:49:19 EDT
publican-2.2-0.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/publican-2.2-0.fc13
Comment 16 Fedora Update System 2010-10-06 01:50:34 EDT
publican-2.2-0.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/publican-2.2-0.fc12
Comment 17 Fedora Update System 2010-10-06 01:50:37 EDT
publican-2.2-0.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/publican-2.2-0.fc14
Comment 18 Fedora Update System 2010-10-08 16:40:43 EDT
publican-2.2-0.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 19 Jeff Fearn 2011-04-18 02:03:55 EDT
(In reply to comment #14)
> This format is due to how the revnumber in the revision history is formatted,
> this is user generated content.
> 
> It would break a large number of books to start enforcing this straight away,
> so what I did was validate the revnumber and if it's not valid then it
> generates a warning and automatically appends '-0' to the revnumber used in the
> change log.

Just for histories sake I thought I'd add a note that this default behaviour has been removed in trunk and will ship in version 3.0.

This means invalid revision histories will cause the package action to fail with a complaint about the incorrect format. Remedial action will need to be take by the author before the SRPM will be built.