From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#27593: [PATCH v2] gnu: groff: Remove timestamps. Date: Sun, 09 Jul 2017 21:51:08 +0200 Message-ID: <87eftpv177.fsf@gnu.org> References: <20170706025451.312ddebe@scratchpost.org> <20170706014708.16491-1-dannym@scratchpost.org> <87wp7hahpm.fsf@fastmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUIFS-0007Jg-6v for bug-guix@gnu.org; Sun, 09 Jul 2017 15:52:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUIFO-0006GD-BD for bug-guix@gnu.org; Sun, 09 Jul 2017 15:52:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56501) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUIFO-0006Fw-7d for bug-guix@gnu.org; Sun, 09 Jul 2017 15:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dUIFN-0002a4-UI for bug-guix@gnu.org; Sun, 09 Jul 2017 15:52:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87wp7hahpm.fsf@fastmail.com> (Marius Bakke's message of "Sun, 09 Jul 2017 15:00:05 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Marius Bakke Cc: 27593@debbugs.gnu.org Marius Bakke skribis: > Danny Milosavljevic writes: > >> Fixes . >> >> * gnu/packages/groff.scm (groff)[source]: Remove timestamps. >> --- >> gnu/packages/groff.scm | 18 +++++++++++++++++- >> 1 file changed, 17 insertions(+), 1 deletion(-) >> >> diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm >> index 46e1ccf23..1a74194a6 100644 >> --- a/gnu/packages/groff.scm >> +++ b/gnu/packages/groff.scm >> @@ -40,7 +40,23 @@ >> (uri (string-append "mirror://gnu/groff/groff-" version >> ".tar.gz")) >> (sha256 (base32 >> - "1998v2kcs288d3y7kfxpvl369nqi06zbbvjzafyvyl3pr7baj= j1s")))) >> + "1998v2kcs288d3y7kfxpvl369nqi06zbbvjzafyvyl3pr7baj= j1s")) >> + (modules '((guix build utils))) >> + (snippet >> + '(begin >> + (substitute* "mdate.sh" >> + (("^LANGUAGE=3D") " >> + >> +echo \"1 Jan 1970\" >> +exit 0 >> + >> +")) > > It would be more obvious what's going on if we substitute the "mdate.sh" > invocation from the Makefile instead. OTOH, this is more > future-proof. No strong opinion, but feels a bit "hacky". > > Note that you can use \n here. > >> + (substitute* '("src/devices/grops/ps.cpp" >> + "src/devices/grohtml/post-html.cpp" >> + "src/roff/troff/input.cpp") >> + (("time\\(0\\)") "0")) >> + (substitute* "src/devices/gropdf/gropdf.pl" >> + (("\\(time\\)") "(0)")))))) > > Are all of these really a cause of indeterminism in the build process? > It looks like this could make "legitimate" uses of groff return epoch 0 > at runtime, I'm not sure if that is okay. > > Which output files are fixed by these substitutions? Are there other > ways to deal with the indeterminism, e.g. substitute them in place? Sometimes it=E2=80=99s better to make such changes available as a .patch fi= le so that we can more clearly see from the context that we=E2=80=99re patching t= he right thing. Perhaps that=E2=80=99s one such case here. BTW, looking at issues.yml in git://git.debian.org/git/reproducible/notes.git leads me to: https://wiki.debian.org/ReproducibleBuilds/TimestampsInDocumentationGener= atedByGroff Debian has a SOURCE_DATE_EPOCH patch: http://sources.debian.net/patches/groff/1.22.3-9/source-date-epoch.patch/ Perhaps we could just use that? That way, the default behavior of groff would remained unchanged. Apparently upstream wasn=E2=80=99t convinced by the idea of SOURCE_DATE_EPO= CH, so we could also restart the discussion with upstream in parallel. However, it would be nice to commit this groff change quickly so we can go on with core-updates builds. :-) Thoughts? Ludo=E2=80=99.