Message ID | 109c05ead54c3e48a8df27794c8df56149343a37.1712437365.git.janneke@gnu.org |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 43F4027BBE9; Sat, 6 Apr 2024 22:19:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id ACAEF27BBE2 for <patchwork@mira.cbaines.net>; Sat, 6 Apr 2024 22:19:48 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1rtDRN-0000Sf-Dl; Sat, 06 Apr 2024 17:19:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rtDRF-0000N2-K2 for guix-patches@gnu.org; Sat, 06 Apr 2024 17:19:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rtDRF-0004T7-99 for guix-patches@gnu.org; Sat, 06 Apr 2024 17:19:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rtDRL-0000aP-Kn for guix-patches@gnu.org; Sat, 06 Apr 2024 17:19:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70169] [PATCH v2 09/12] maint: Remove %%CreationDate from generated EPS files Resent-From: Janneke Nieuwenhuizen <janneke@gnu.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 06 Apr 2024 21:19:07 +0000 Resent-Message-ID: <handler.70169.B70169.17124383232016@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70169 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70169@debbugs.gnu.org Received: via spool by 70169-submit@debbugs.gnu.org id=B70169.17124383232016 (code B ref 70169); Sat, 06 Apr 2024 21:19:07 +0000 Received: (at 70169) by debbugs.gnu.org; 6 Apr 2024 21:18:43 +0000 Received: from localhost ([127.0.0.1]:41139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1rtDQx-0000WK-76 for submit@debbugs.gnu.org; Sat, 06 Apr 2024 17:18:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <janneke@gnu.org>) id 1rtDQm-0000TC-6b for 70169@debbugs.gnu.org; Sat, 06 Apr 2024 17:18:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <janneke@gnu.org>) id 1rtDQa-0004JC-GA; Sat, 06 Apr 2024 17:18:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=42twIY8a4hIeSmKZ5QgsYFKpQnpkkZKIRC/7yIBrwc8=; b=GAQ3jS4HrMyhDW3+Flv1 O/DTm6zcKmOWYZHLcY6JRGc/YIKdPagGb6+IkgXDoeEyCRIclqinOHQN/Npk3HvbLujZEoOvJyrFk /QwW0gguJ4MR04jBF0CIsW7a0WigVFNtmK4mG3XjijNUa7Y/481HVBqvJGorMRpCyi4ogz8E0qXRc dvq04DetadI2KeAlUZ4hyLmrLvge48wNFzf6wjYVw1KvCLA06VC7lYi2dGj+QG+XPeCPG+Ys6FV6W M7mpkchQ59aXhhXSk5x6CKpuCsiSnagb/1Cvz/q2XsqiqgBDIc0sAIPhFy61VZTI23QBFR1fWUQ41 +RaThAB6cuSMlg==; From: Janneke Nieuwenhuizen <janneke@gnu.org> Date: Sat, 6 Apr 2024 23:18:01 +0200 Message-ID: <109c05ead54c3e48a8df27794c8df56149343a37.1712437365.git.janneke@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <cover.1712437365.git.janneke@gnu.org> References: <cover.1712437365.git.janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
Reproducible `make dist' tarball in defiance of Autotools and Gettext
|
|
Commit Message
Janneke Nieuwenhuizen
April 6, 2024, 9:18 p.m. UTC
* doc/local.mk (.dot.eps, png.eps): Remove %%CreationDate. Split single shell command into separate recipe lines, prefixed by $(AM_V_at). Change-Id: I5a03485c19c72f0c46411815c51290e52a8e5399 --- doc/local.mk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
Comments
Janneke Nieuwenhuizen <janneke@gnu.org> skribis: > * doc/local.mk (.dot.eps, png.eps): Remove %%CreationDate. Split single shell > command into separate recipe lines, prefixed by $(AM_V_at). > > Change-Id: I5a03485c19c72f0c46411815c51290e52a8e5399 > --- > doc/local.mk | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/doc/local.mk b/doc/local.mk > index c355bec8d7..60e36091ce 100644 > --- a/doc/local.mk > +++ b/doc/local.mk > @@ -152,12 +152,16 @@ DOT_OPTIONS = \ > mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" > > .dot.eps: > - $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \ > - mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" > + $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp" > + $(AM_V_at)grep -v ^%%CreationDate: "$(srcdir)/$@.tmp" > "$(srcdir)/$@.tmp2" > + $(AM_V_at)rm -f "$(srcdir)/$@.tmp" > + $(AM_V_at)mv "$(srcdir)/$@.tmp2" "$@" Apparently ‘dot’ (GraphViz) does not emit a ‘CreationDate’ header. Should we drop this change and add a line like this above the ‘mv’ line: @if grep -q CreationDate "$@.tmp"; then false; else true; fi to be on the safe side? > .png.eps: > - $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \ > - mv "$@-tmp.eps" "$@" > + $(AM_V_GEN)convert "$<" "$@-tmp.eps" > + $(AM_V_at)grep -v ^%%CreationDate: "$@-tmp.eps" > "$@-tmp2.eps" > + $(AM_V_at)rm -f "$@-tmp.eps" > + $(AM_V_at)mv "$@-tmp2.eps" "$@" Looking into the code of ImageMagick, I see: --8<---------------cut here---------------start------------->8--- timer=GetMagickTime(); (void) FormatMagickTime(timer,MaxTextExtent,date); (void) FormatLocaleString(buffer,MaxTextExtent, "%%%%CreationDate: %s\n",date); --8<---------------cut here---------------end--------------->8--- where ‘GetMagickTime’ honors ‘SOURCE_DATE_EPOCH’. Should we set ‘SOURCE_DATE_EPOCH’ and avoid the ‘grep’ trick? OTOH, an argument to keep this patch as-is is that it’ll resist to changes in ImageMagick/GraphViz. So maybe the comments above aren’t that relevant. Ludo’.
Ludovic Courtès writes: > Janneke Nieuwenhuizen <janneke@gnu.org> skribis: > >> * doc/local.mk (.dot.eps, png.eps): Remove %%CreationDate. Split single shell >> command into separate recipe lines, prefixed by $(AM_V_at). >> >> Change-Id: I5a03485c19c72f0c46411815c51290e52a8e5399 >> --- >> doc/local.mk | 12 ++++++++---- >> 1 file changed, 8 insertions(+), 4 deletions(-) >> >> diff --git a/doc/local.mk b/doc/local.mk >> index c355bec8d7..60e36091ce 100644 >> --- a/doc/local.mk >> +++ b/doc/local.mk >> @@ -152,12 +152,16 @@ DOT_OPTIONS = \ >> mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" >> >> .dot.eps: >> - $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \ >> - mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" >> + $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp" >> + $(AM_V_at)grep -v ^%%CreationDate: "$(srcdir)/$@.tmp" > "$(srcdir)/$@.tmp2" >> + $(AM_V_at)rm -f "$(srcdir)/$@.tmp" >> + $(AM_V_at)mv "$(srcdir)/$@.tmp2" "$@" > > Apparently ‘dot’ (GraphViz) does not emit a ‘CreationDate’ header. Ah, good catch. > Should we drop this change and add a line like this above the ‘mv’ line: Probably I just copied the grep to remove it without much looking or thinking :) > @if grep -q CreationDate "$@.tmp"; then false; else true; fi > > to be on the safe side? Let's do that, I'm adding it as $(AM_V_at)! grep -q %%CreationDate "$(srcdir)/$@.tmp" in v3. >> .png.eps: >> - $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \ >> - mv "$@-tmp.eps" "$@" >> + $(AM_V_GEN)convert "$<" "$@-tmp.eps" >> + $(AM_V_at)grep -v ^%%CreationDate: "$@-tmp.eps" > "$@-tmp2.eps" >> + $(AM_V_at)rm -f "$@-tmp.eps" >> + $(AM_V_at)mv "$@-tmp2.eps" "$@" > > Looking into the code of ImageMagick, I see: > > timer=GetMagickTime(); > (void) FormatMagickTime(timer,MaxTextExtent,date); > (void) FormatLocaleString(buffer,MaxTextExtent, > "%%%%CreationDate: %s\n",date); > > where ‘GetMagickTime’ honors ‘SOURCE_DATE_EPOCH’. Should we set > ‘SOURCE_DATE_EPOCH’ and avoid the ‘grep’ trick? Good catch; and it already works. > OTOH, an argument to keep this patch as-is is that it’ll resist to > changes in ImageMagick/GraphViz. So maybe the comments above aren’t > that relevant. Well, I like what we have now better; it's a bit sharper/cleaner anyway. Thanks! Janneke
diff --git a/doc/local.mk b/doc/local.mk index c355bec8d7..60e36091ce 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -152,12 +152,16 @@ DOT_OPTIONS = \ mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" .dot.eps: - $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \ - mv "$(srcdir)/$@.tmp" "$(srcdir)/$@" + $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp" + $(AM_V_at)grep -v ^%%CreationDate: "$(srcdir)/$@.tmp" > "$(srcdir)/$@.tmp2" + $(AM_V_at)rm -f "$(srcdir)/$@.tmp" + $(AM_V_at)mv "$(srcdir)/$@.tmp2" "$@" .png.eps: - $(AM_V_GEN)convert "$<" "$@-tmp.eps"; \ - mv "$@-tmp.eps" "$@" + $(AM_V_GEN)convert "$<" "$@-tmp.eps" + $(AM_V_at)grep -v ^%%CreationDate: "$@-tmp.eps" > "$@-tmp2.eps" + $(AM_V_at)rm -f "$@-tmp.eps" + $(AM_V_at)mv "$@-tmp2.eps" "$@" # We cannot add new dependencies to `%D%/guix.pdf' & co. (info "(automake) # Extending"). Using the `-local' rules is imperfect, because they may be