Red Hat Bugzilla – Bug 149976
spec file changelog date format is overly restrictive
Last modified: 2007-11-30 17:11:01 EST
Description of problem: The %changelog date format disallows dates
before 1997. Fair enough for RedHat packages perhaps, but it
surprised me when I aggregated some old changelogs for one of my
projects into a spec file. The offending line of code is in
if (time.tm_year < 1997 || time.tm_year >= 3000) return -1;
Its trivial, and looks pretty safe to relax this, say to a more
unix-epoch-like 1970, although all the way to 1900 may well be ok.
Version-Release number of selected component (if applicable): rpm-4.3.2-21
How reproducible: Reliable.
Steps to Reproduce:
1. Put a line with a date pre-1997 in a spec file changelog.
2. Build rpm.
error: bad date in %changelog: Thu Jan 05 1995 Michael Pope
It should just work:-).
No rpm package existed before 1997 because rpm had not been
While relaxing the restriction is quite easy to implement,
it will cause build failures with versions of rpm that do
not have the same (overly restrictive) policy.
I'll make the change in CVS head but it will be quite
a few years before a less restrictive date check is