On 4 June 2015 at 00:19, Daniel Kahn Gillmor <d...@fifthhorseman.net> wrote:
> On Wed 2015-06-03 08:24:51 -0400, Brendan O'Dea wrote:
>> My inclination is instead to do something fairly specific to your
>> project: If the environment variable DEB_BUILD_CHANGELOG (or something
>> similar) is set, then the file to which it refers will be used to find
>> the latest revision date, and that date will be used on the manual
>> pages.  Presumably the build system could set this prior to
>> build/test?
> i think this could work, but it might not apply particularly well to
> anyone outside of debian who uses help2man.  I note that help2man is a
> native package -- do you know if it's used outside of debian at all?

help2man is part of the GNU project, but since I'm the upstream and
the debian maintainer I build it as a native package, dupload the
results to Debian and upload the tarball to ftp.gnu.org at the same

The idea was that unless that environment variable was set, the
behaviour would be unchanged: the current date would be used.  It
seems unlikely that DEB_BUILD_CHANGELOG would be set accidentally.

> Making the help2man run dpkg-parsechangelog also seems a little hairier
> than it ought to be, and introduces a dependency on dpkg-dev which seems
> a little weird.

I wasn't going to use dpkg-parsechangelog, it is a sufficiently
standard format that a simple capturing regex would suffice.

> If the build system is going to set environment variables, maybe it
> could set an environment variable with a parseable date string
> (ISO-8601?) and help2man could look at that environment variable and
> extract a string from it?  (ideally this extraction step would be
> TZ-independent, too)

That would also work, and if your reproducible build environment was
to pull the changelog date and stick it into an environment variable,
then you should only need to patch the tools rather than the Makefile
of every package which uses them.

At worst, for the tools you can't patch, you're in the same place you
are now--having to patch all the Makefiles, and even that is perhaps
easier as you already have the date:

  --date=${DEB_BUILD_CHANGELOG_DATE:-$(date --iso-8601=seconds)}


Reproducible-builds mailing list

Reply via email to