From patchwork Thu Jun 3 19:46:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Dong X-Patchwork-Id: 29877 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6734C27BC81; Thu, 3 Jun 2021 20:47:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E5D5F27BC78 for ; Thu, 3 Jun 2021 20:47:15 +0100 (BST) Received: from localhost ([::1]:50846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lotJC-0001Cl-TS for patchwork@mira.cbaines.net; Thu, 03 Jun 2021 15:47:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lotJ0-0001CU-RE for guix-patches@gnu.org; Thu, 03 Jun 2021 15:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33149) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lotJ0-0004VN-Fb for guix-patches@gnu.org; Thu, 03 Jun 2021 15:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lotJ0-0001OV-DL for guix-patches@gnu.org; Thu, 03 Jun 2021 15:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48726] [PATCH v2] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility Resent-From: Carl Dong Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 03 Jun 2021 19:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48726 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: ludo@gnu.org Cc: 48726@debbugs.gnu.org, Carl Dong Received: via spool by 48726-submit@debbugs.gnu.org id=B48726.16227495965321 (code B ref 48726); Thu, 03 Jun 2021 19:47:02 +0000 Received: (at 48726) by debbugs.gnu.org; 3 Jun 2021 19:46:36 +0000 Received: from localhost ([127.0.0.1]:44695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lotIa-0001Nl-90 for submit@debbugs.gnu.org; Thu, 03 Jun 2021 15:46:36 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:58587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lotIY-0001NX-Dr for 48726@debbugs.gnu.org; Thu, 03 Jun 2021 15:46:35 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 49B4CCB7; Thu, 3 Jun 2021 15:46:28 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 03 Jun 2021 15:46:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carldong.me; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=2jcWAhO+2TtKA Wr+xQCtEXMbdwR5bwvofA7l5h00R5g=; b=li7reL3hAQQxGjbPbWrvz642YoXLW nPdLLC9r6v8VGbtrv6Xwbkgnb3pmSkmC7+KeKiHU17+O2+3echg1bS9/biMbMCCh 2tcFK0LQ/W7CGoYi5rpBEwVwhhtV2kU6PW8sCKFmSv6Z+b2CsWtlpLViqeOT2X4t UlKkhMMEPVTf4tkj2FpFllMehPFdsclrMnGX4YsFrt7EixuhVXgkzi4My5O+uEXl 2E0DjGBRRRXxUMVxUdajUlgG29ipVOrJgv9LRGztunjAbIphmtxXaI2be+LByY3o fxq07CHaehXTkZuMrIYX4vu+u0JAL4MWEcRga7vXHXDWBUr6vjMvbPIUA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=2jcWAhO+2TtKAWr+xQCtEXMbdwR5bwvofA7l5h00R5g=; b=btTAqWuS 3amEO2csV6eIGU8doffmxZICLxDzTdXJpOCoNfvcSrVJ18BihOwJJv/shNXJLQkn htdIeJIN92HGGAMEBFy7G4NtiKA2jNpozg8MLClKgxVj2/bBi6O9RuEZfSRRIxVc SQ2IMuDpDkW2TUiJgZdzk8ev10hMjcDAhdmok260RscB4z62uwb5y8/pT7V16pDr IXEVlAKrIFeUQAGSA6b27Y9krEzfNUR19PgqihHbtRZg9BQiXDiO0upnco0pz5Je iNqsGcxTpY9GGcXxzxV6d+cyBxiHgK1cM25fLtOdiFk5vBxIty0SZKianBSIfduA ZLqjuWp2qBd1IQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdelledgudegtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpeevrghrlhcuffhonhhguceotghonhhtrggtthestggrrhhl ughonhhgrdhmvgeqnecuggftrfgrthhtvghrnhepheevvdelveduledtveegiefhvddtke evkeeuheevgeekjeekuedvveffgfefgfdtnecuffhomhgrihhnpehgihhthhhusgdrtgho mhdprhgvphhrohguuhgtihgslhgvqdgsuhhilhgushdrohhrghenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegtohhnthgrtghtsegtrghrlhgu ohhnghdrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Jun 2021 15:46:27 -0400 (EDT) From: Carl Dong Date: Thu, 3 Jun 2021 15:46:08 -0400 Message-Id: <20210603194607.1101579-1-contact@carldong.me> X-Mailer: git-send-email 2.31.1 In-Reply-To: <87im2xz3j8.fsf@gnu.org> References: <87im2xz3j8.fsf@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Does this look correct? * gnu/packages/patches/nsis-source-date-epoch.patch: New patch. * gnu/packages/installers.scm (make-nsis)[source]: Apply it. --- gnu/local.mk | 1 + gnu/packages/installers.scm | 3 ++- .../patches/nsis-source-date-epoch.patch | 23 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/nsis-source-date-epoch.patch diff --git a/gnu/local.mk b/gnu/local.mk index 792ebac1e1..db96f55bf0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1464,6 +1464,7 @@ dist_patch_DATA = \ %D%/packages/patches/network-manager-plugin-path.patch \ %D%/packages/patches/nginx-socket-cloexec.patch \ %D%/packages/patches/nsis-env-passthru.patch \ + %D%/packages/patches/nsis-source-date-epoch.patch \ %D%/packages/patches/nss-increase-test-timeout.patch \ %D%/packages/patches/nss-3.56-pkgconfig.patch \ %D%/packages/patches/ntfs-3g-CVE-2019-9755.patch \ diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm index 775b91f0f7..c768a367aa 100644 --- a/gnu/packages/installers.scm +++ b/gnu/packages/installers.scm @@ -42,7 +42,8 @@ (sha256 (base32 "1sbwx5vzpddharkb7nj4q5z3i5fbg4lan63ng738cw4hmc4v7qdn")) - (patches (search-patches "nsis-env-passthru.patch")))) + (patches (search-patches "nsis-env-passthru.patch" + "nsis-source-date-epoch.patch")))) (build-system scons-build-system) (native-inputs `(("xgcc" ,xgcc) ("xbinutils" ,xbinutils) diff --git a/gnu/packages/patches/nsis-source-date-epoch.patch b/gnu/packages/patches/nsis-source-date-epoch.patch new file mode 100644 index 0000000000..744c2a8011 --- /dev/null +++ b/gnu/packages/patches/nsis-source-date-epoch.patch @@ -0,0 +1,23 @@ +Honour SOURCE_DATE_EPOCH for VERSION default + +Merged upstream as cd3f1024a37a332f1d4fa96a817ca80dfa2a478c, but not yet in a +release. GitHub PR: https://github.com/kichik/nsis/pull/13 + +Python snippet from: https://reproducible-builds.org/docs/source-date-epoch/#python + + +diff --git a/SConstruct b/SConstruct +index e8252c9..41786f2 100755 +--- a/SConstruct ++++ b/SConstruct +@@ -95,8 +95,8 @@ default_doctype = 'html' + if defenv.WhereIs('hhc', os.environ['PATH']): + default_doctype = 'chm' + +-from time import strftime, gmtime +-cvs_version = strftime('%d-%b-%Y.cvs', gmtime()) ++import time ++cvs_version = time.strftime('%d-%b-%Y.cvs', time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) + + opts = Variables() +