Bug 843525

Summary: rpmbuild silently autocorrects week day in changelog
Product: Red Hat Enterprise Linux 5 Reporter: Bond Masuda <bond.masuda>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DEFERRED QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.8CC: pmatilai
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-07 10:59:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bond Masuda 2012-07-26 14:28:21 UTC
Description of problem:

If an incorrect date is typed into the %changelog section of the spec file, rpmbuild will silently autocorrect the day of the week.

For example, if one puts the following entry in the changelog:

* Wed Jun 25 2012 FName LName <email> - 1.2.3

This date is incorrect and rpmbuild will build the package and silently correct that to "Mon Jun 25 2012" in the resulting RPM package. In my case, it was an honest mistake of typing "Jun" instead of "Jul".

I think it would be preferable if rpmbuild stop and display an error instead of silently continuing to build the RPM.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Panu Matilainen 2012-07-30 12:38:42 UTC
Heh, "autocorrection" is a rather nice way of saying "missing validation" :)
Thanks for reporting, fixed upstream now: http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=a29e5f9894e4d97322d34b0636e5a37bff509323

The fix isn't appropriate as-is for existing RHEL versions though, as it will cause build breakages for formerly working packages (bad dates in changelogs appear to be rather common) for what's really just a cosmetic issue. Spitting out a warning might be a possibility.

Comment 2 Panu Matilainen 2013-03-07 10:59:47 UTC
This request was evaluated by Red Hat Engineering for inclusion in a Red Hat Enterprise Linux maintenance release.

Red Hat does not currently plan to provide this change in a Red Hat Enterprise Linux update release for currently deployed products.

With the goal of minimizing risk of change for deployed systems, and in response to customer and partner requirements, Red Hat takes a conservative approach when evaluating enhancements for inclusion in maintenance updates for currently deployed products. The primary objectives of update releases are to enable new hardware platform support and to resolve critical defects. 

Invalid dates in changelogs are so widespread that adding even a warning is too disruptive for old releases. The next major release of Red Hat Enterprise Linux is likely to issue warnings about them however.