Re: [Reproducible-builds] Bug#780259: perl: please make the output of Pod::Man reproducible

2015-03-31 Thread Russ Allbery
Niko Tyni  writes:

> A downside of this is that POD_MAN_DATE will affect all the manual pages
> generated by Pod::Man and remove the potentially useful indications of
> their recency. I can't really see how to avoid that, but possibly we
> should set POD_MAN_DATE to something that isn't really a timestamp at
> all, so as not to mislead readers. Given the check for a true value in
> devise_date(), an empty string isn't an option, but a space or 'N/A'
> come to mind.

Oh, ugh, I'm sorry.  Both of the relevant truth checks should just be
defined(); that's a bug.  It's entirely valid to want to omit that heading
entirely, and --date '' or POD_MAN_DATE='' should do the right thing.  (As
should --date 0, for that matter.)  I'll fix that in the next upstream
release.

-- 
Russ Allbery (r...@debian.org)   

___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds


Re: [Reproducible-builds] Bug#780259: perl: please make the output of Pod::Man reproducible

2015-03-31 Thread Niko Tyni
On Wed, Mar 11, 2015 at 10:01:07AM +, Chris Lamb wrote:

> While working on the "reproducible builds" effort [1], we have noticed
> that Pod::Man generates output that varies depending on the current
> timezone.
> 
> The attached patch fixes this by using GMT (~UTC) dates instead

Thanks. Unlike Axel, I'm not very worried about this creating confusion
for users far away from UTC, given that only the date part is embedded.
However, I agree that modifying TZ in the build environment would be a
more general (and probably sufficient) fix.

However, I have other concerns. Sorry for taking so long to voice them.

I'd like to note that there are two somewhat separate issues
with building reproducible packages involving Pod::Man. Both of these
derive from its longstanding feature of embedding the date part of the
mtime stamp of its source file.

A) the local time zone affects the mtime -> date conversion (this bug)

B) source files patched by the Debian packaging will have their
   mtime set to the current time when the package is extracted, and
   therefore the date in the manual page headers will vary with the
   build date

While the provided patch fixes A) but not B), I expect the fix for B)
would fix A) as well.

According to codesearch.debian.net, we have 819 packages in sid that patch
*.pm or *.pod files (my search was "\+\+\+ .*\.(pm|pod) path:debian/patches").
I would expect that most of these generate manual pages with Pod::Man.

I think the current reproducible builds test setup hasn't found these
yet because it is not comparing packages built on different days.

So B) seems worth fixing.

After trying unsuccessfully to get dpkg-source to set the mtime stamp
of patched files to the last debian/changelog entry (see #759404), we
ended up with a change in Pod::Man where it honours the POD_MAN_DATE
environment variable and uses that as the header rather than anything
based on mtime stamps (or timezones, for that matter.) This is properly
upstream and available in sid and jessie, see #759405.

A downside of this is that POD_MAN_DATE will affect all the manual pages
generated by Pod::Man and remove the potentially useful indications of
their recency. I can't really see how to avoid that, but possibly we
should set POD_MAN_DATE to something that isn't really a timestamp at
all, so as not to mislead readers. Given the check for a true value in
devise_date(), an empty string isn't an option, but a space or 'N/A'
come to mind.

So I argue that the best way to fix this bug in the long term is to
somehow set POD_MAN_DATE based on debian/changelog, as that fixes both A)
and B).  The patch provided in this bug seems more like an interim fix,
but I'm certainly glad that it helps the current testbed deployment.

As Holger noted in the TZ discussion, one problem is where to set such
environment variables. I think debhelper is the easier and most natural
place, particularly as it has already collected other patches related
to reproducible builds. The few packages (like perl itself) not using
debhelper can perfectly well set POD_MAN_DATE themselves.

(As an aside,I'm wondering if it would make sense to standardize on
 DEB_BUILD_OPTIONS=reproducible or something to trigger tweaks like this.)
-- 
Niko Tyni   nt...@debian.org

___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds


Re: [Reproducible-builds] Bug#780259: perl: please make the output of Pod::Man reproducible

2015-03-31 Thread Holger Levsen
Hi Axel,

On Dienstag, 31. März 2015, Axel Beckert wrote:
> So where is the difference between
> 
> * setting all files in a binary package to the time stamp defined by
>   the package's changelog entry, and
> 
> * running a build under a timezone defined by the package's changelog
>   entry -- or under UTC?

builds are run in arbitrary timezones, that's the problem to tackle here.


cheers,
Holger




signature.asc
Description: This is a digitally signed message part.
___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Re: [Reproducible-builds] Bug#780259: perl: please make the output of Pod::Man reproducible

2015-03-31 Thread Axel Beckert
Hi Chris,

Chris Lamb wrote:
> > * All packages are built with the same timezone.
> > 
> > For the reproducible builds project I would have expected that it does
> > the latter already anyways
> 
> Just replying quickly; we deliberately don't do this, and in fact
> rebuild twice with opposite timezones to expose exactly these issues.

So let me recapitulate:

AFAIK you're using debian/changelog's most recent entry's time stamp
to set the file time stamp of all files in a binary package to get
reproducible file time stamps.

This changelog entry's time stamp also includes a time zone.

So where is the difference between

* setting all files in a binary package to the time stamp defined by
  the package's changelog entry, and

* running a build under a timezone defined by the package's changelog
  entry -- or under UTC?

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE

___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds