From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OOwsCeKTP2A1UQAA0tVLHw (envelope-from ) for ; Wed, 03 Mar 2021 13:49:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id AMTrBOKTP2DERgAAbx9fmQ (envelope-from ) for ; Wed, 03 Mar 2021 13:49:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4F1D1278B5 for ; Wed, 3 Mar 2021 14:49:21 +0100 (CET) Received: from localhost ([::1]:58592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHRsO-00026N-5Z for larch@yhetil.org; Wed, 03 Mar 2021 08:49:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHRs6-00024P-HY for bug-guix@gnu.org; Wed, 03 Mar 2021 08:49:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43872) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHRs6-0000jp-AR for bug-guix@gnu.org; Wed, 03 Mar 2021 08:49:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lHRs6-0004Vp-9J for bug-guix@gnu.org; Wed, 03 Mar 2021 08:49:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#45962: =?UTF-8?Q?=E2=80=98binutils-mesboot0=E2=80=99?= includes non-zero timestamps in ar archives Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 03 Mar 2021 13:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45962 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 45962@debbugs.gnu.org Received: via spool by 45962-submit@debbugs.gnu.org id=B45962.161477933617332 (code B ref 45962); Wed, 03 Mar 2021 13:49:02 +0000 Received: (at 45962) by debbugs.gnu.org; 3 Mar 2021 13:48:56 +0000 Received: from localhost ([127.0.0.1]:55418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHRrz-0004VT-Eg for submit@debbugs.gnu.org; Wed, 03 Mar 2021 08:48:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHRrw-0004VH-QI for 45962@debbugs.gnu.org; Wed, 03 Mar 2021 08:48:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36133) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHRrr-0000fB-H5; Wed, 03 Mar 2021 08:48:47 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36074 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lHRrq-0002KF-T9; Wed, 03 Mar 2021 08:48:47 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87im7ujgqz.fsf@inria.fr> Date: Wed, 03 Mar 2021 14:48:44 +0100 In-Reply-To: <87im7ujgqz.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 18 Jan 2021 18:29:24 +0100") Message-ID: <87lfb4s5z7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Cournoyer Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614779361; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=Rwt79u6pwvEWUn3jNgtEzwLOmfrdQQOyBoqn2ORzeDI=; b=jsSKrnrLH7GG5ut6e5VB+MghUyB7x+jUANMZGoCRG4zmwojdcFBn9s1QEC1ujEnALUBN5u Rzq+xV072EzC4ENQOFy/flIhOjrsJ2nUZX1x61VARbI/exVPqlIpqpradQYHd7tBHiRh/m drl2iDn+1/MA5Ilr8M/jM3ylBJn1l2C9lTZDZQ3Zo3SoD4U40M0lxrR9+Zsv0gnELOTM4u uxpptqp7KUehNzCE4NEYQNIXGMFUwvHseAb8aD/kg5nCTbPZlNg8Nf11tDBeEB3a/jjz/q QkvcC5q9Kqa8PeqfwNFL61xJNukGyaIVGJCqMxyZdmEIVP/7kuSxJEdoNVh9AA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614779361; a=rsa-sha256; cv=none; b=CT6Xr2B2liuzj1KD3nE9UO78WgWyvih2IT8rIsVkJLhnAF6/sd1AM/J0AsYbPNWpoz2qkH nbICDdDfht33P4YtDpmflhkAUw+U0I1o40OVdtrAoYRtBAyGsOEbwZnyR++pdYICfY+BRJ adRoW/HqFkUYpbxh5MImA3KHNioeWgCC3N/2h1xkIHGQAOOW+s1uQPrPZ5O/RuIHtVmFMw DAWoXzBb+7qdRdZSHt/QEHU1eLdha6194eHwINjSuU8MKtaWEvQfT3JPbu8rNcgOj9V7IM hV/ExKuE9nIEipXhCiVk0ciSraPPLyfxiXi2zXoOQRL1Z4nRU1tihJSwOCu0sg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.86 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 4F1D1278B5 X-Spam-Score: -2.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: WipfscNXDGwb --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Ludovic Court=C3=A8s skribis: > On #bootstrappable, mid-kid reported that =E2=80=98binutils-mesboot0=E2= =80=99 in > commencement.scm lacks =E2=80=98--enable-deterministic-archives=E2=80=99.= So I checked > if this had an effect by running: [...] > Apparently Binutils 2.14 didn=E2=80=99t have =E2=80=98--enable-determinis= tic-archives=E2=80=99 > so we=E2=80=99ll have to patch it. Sikonas on #bootstrappable provided a patch for that (thanks!) so I went ahead and gave it a try on =E2=80=98core-updates=E2=80=99 (Guix patch attac= hed). The binutils source gets patched and repacked, but then decompressing it fails: --8<---------------cut here---------------start------------->8--- building /gnu/store/fwz150xjaqbh8n02z6gsmpm9w8lxckak-binutils-mesboot0-2.14= .drv... starting phase `set-SOURCE-DATE-EPOCH' phase `set-SOURCE-DATE-EPOCH' succeeded after 0.0 seconds starting phase `set-paths' environment variable `PATH' set to `/gnu/store/70w6gnl3vzv2rsjhyjg0wsxl3pbn= pjb5-bash-mesboot0-2.05b/bin:/gnu/store/2wkjilvkdyb2wrb20ba82dhdpnx2732n-bz= ip2-mesboot-1.0.8/bin:/gnu/store/4nxicfzj8a390f4scxcgglhdqgbyhlkw-gzip-mesb= oot-1.2.4/bin:/gnu/store/6fgjdcl2qrrs7fvdznkx1gcbw6wjfrn0-patch-mesboot-2.5= .9/bin:/gnu/store/4lpagdav2gm022v1fgzcs8323xrggz4b-sed-mesboot0-1.18/bin:/g= nu/store/y70rava2vqf1nilr8smg54qqxdclvrz6-gash-utils-boot-0.1.0/bin:/gnu/st= ore/y9fy4r99q6pqisrw81fn92gk8mzbyzn1-tcc-boot-0.9.27/bin:/gnu/store/krnwfrk= i71dj6zicl2qwv6bdyqvsxgcg-make-mesboot0-3.80/bin:/gnu/store/xxnxdnjdlav4s8v= 3lfhg7x7amrqcrv57-gash-boot-0.2.0/bin:/gnu/store/aglbpf6bihv35pwpvdy6chxv31= 8hsafq-bootar-1a/bin:/gnu/store/lgi9x15a0w35mcpd7g1kb9274r6wy4pv-guile-boot= strap-2.0/bin' environment variable `BASH_LOADABLES_PATH' unset environment variable `C_INCLUDE_PATH' set to `/gnu/store/2wkjilvkdyb2wrb20b= a82dhdpnx2732n-bzip2-mesboot-1.0.8/include:/gnu/store/y9fy4r99q6pqisrw81fn9= 2gk8mzbyzn1-tcc-boot-0.9.27/include' environment variable `LIBRARY_PATH' set to `/gnu/store/2wkjilvkdyb2wrb20ba8= 2dhdpnx2732n-bzip2-mesboot-1.0.8/lib:/gnu/store/y70rava2vqf1nilr8smg54qqxdc= lvrz6-gash-utils-boot-0.1.0/lib:/gnu/store/y9fy4r99q6pqisrw81fn92gk8mzbyzn1= -tcc-boot-0.9.27/lib:/gnu/store/xxnxdnjdlav4s8v3lfhg7x7amrqcrv57-gash-boot-= 0.2.0/lib:/gnu/store/aglbpf6bihv35pwpvdy6chxv318hsafq-bootar-1a/lib:/gnu/st= ore/lgi9x15a0w35mcpd7g1kb9274r6wy4pv-guile-bootstrap-2.0/lib' phase `set-paths' succeeded after 0.0 seconds starting phase `install-locale' warning: failed to install 'en_US.utf8' locale: Invalid argument phase `install-locale' succeeded after 0.0 seconds starting phase `unpack' xz: cannot decompress from stdin Backtrace: In ice-9/boot-9.scm: 157: 5 [catch #t # ...] In unknown file: ?: 4 [apply-smob/1 #] In ice-9/boot-9.scm: 63: 3 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 2 [eval # #] In gash/guix-utils.scm: 138: 1 [call-with-decompressed-port xz ...] In unknown file: ?: 0 [scm-error misc-error #f "~A ~S" ("decompressed-port failure" (7)) = #f] ERROR: In procedure scm-error: ERROR: decompressed-port failure (7) error: in phase 'unpack': uncaught exception: srfi-34 #=20 phase `unpack' failed after 0.3 seconds command "tar" "xvf" "/gnu/store/ywf5j03423yiawix3z21xa14hyyvd83z-binutils-2= .14.tar.xz" failed with status 1 builder for `/gnu/store/fwz150xjaqbh8n02z6gsmpm9w8lxckak-binutils-mesboot0-= 2.14.drv' failed with exit code 1 --8<---------------cut here---------------end--------------->8--- Maxime, does that ring a bell? Could it be that this bootstrap =E2=80=98xz= =E2=80=99 is less capable, or could it be a Gash-Utils bug? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 890d57941f..5c523ae7ad 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -997,13 +997,15 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\" (inherit binutils) (name "binutils-mesboot0") (version "2.14") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/binutils/binutils-" - version ".tar.gz")) - (sha256 - (base32 - "1w8xp7k44bkijr974x9918i4p1sw4g2fcd5mxvspkjpg38m214ds")))) + (source (bootstrap-origin + (origin + (method url-fetch) + (uri (string-append "mirror://gnu/binutils/binutils-" + version ".tar.gz")) + (sha256 + (base32 + "1w8xp7k44bkijr974x9918i4p1sw4g2fcd5mxvspkjpg38m214ds")) + (patches (search-patches "binutils-2.14-deterministic-ar.pa= tch"))))) (inputs '()) (propagated-inputs '()) (native-inputs (%boot-tcc-inputs)) diff --git a/gnu/packages/patches/binutils-2.14-deterministic-ar.patch b/gn= u/packages/patches/binutils-2.14-deterministic-ar.patch new file mode 100644 index 0000000000..7f9310e994 --- /dev/null +++ b/gnu/packages/patches/binutils-2.14-deterministic-ar.patch @@ -0,0 +1,66 @@ +Old binutils do not have support for creating deterministic archives. +Backported from upstream commit 36e4dce69dd23bea9ea2258dea35f034b6d6351c + +Patch by Chris Demetriou (2009), adapted by +Andrius =C5=A0tikonas (2021). + +--- a/bfd/archive.c 2021-03-01 00:05:54.888301655 +0000 ++++ b/bfd/archive.c 2021-03-02 21:53:51.001617689 +0000 +@@ -1396,10 +1396,6 @@ + { + /* Assume we just "made" the member, and fake it. */ + struct bfd_in_memory *bim =3D (struct bfd_in_memory *) member->iost= ream; +- time (&status.st_mtime); +- status.st_uid =3D getuid (); +- status.st_gid =3D getgid (); +- status.st_mode =3D 0644; + status.st_size =3D bim->size; + } + else if (stat (filename, &status) !=3D 0) +@@ -1408,6 +1404,11 @@ + return NULL; + } +=20 ++ status.st_mtime =3D 0; ++ status.st_uid =3D 0; ++ status.st_gid =3D 0; ++ status.st_mode =3D 0644; ++ + amt =3D sizeof (struct ar_hdr) + sizeof (struct areltdata); + ared =3D (struct areltdata *) bfd_zalloc (abfd, amt); + if (ared =3D=3D NULL) +@@ -2003,13 +2004,11 @@ + stat (arch->filename, &statbuf); + memset ((char *) (&hdr), 0, sizeof (struct ar_hdr)); + sprintf (hdr.ar_name, RANLIBMAG); +- /* Remember the timestamp, to keep it holy. But fudge it a little. */ +- bfd_ardata (arch)->armap_timestamp =3D statbuf.st_mtime + ARMAP_TIME_OF= FSET; + bfd_ardata (arch)->armap_datepos =3D (SARMAG + + offsetof (struct ar_hdr, ar_date[0])); +- sprintf (hdr.ar_date, "%ld", bfd_ardata (arch)->armap_timestamp); +- sprintf (hdr.ar_uid, "%ld", (long) getuid ()); +- sprintf (hdr.ar_gid, "%ld", (long) getgid ()); ++ sprintf (hdr.ar_date, "%ld", 0); ++ sprintf (hdr.ar_uid, "%ld", 0); ++ sprintf (hdr.ar_gid, "%ld", 0); + sprintf (hdr.ar_size, "%-10d", (int) mapsize); + strncpy (hdr.ar_fmag, ARFMAG, 2); + for (i =3D 0; i < sizeof (struct ar_hdr); i++) +@@ -2082,6 +2081,8 @@ + struct ar_hdr hdr; + unsigned int i; +=20 ++ return TRUE; ++ + /* Flush writes, get last-write timestamp from file, and compare it + to the timestamp IN the file. */ + bfd_flush (arch); +@@ -2169,7 +2170,7 @@ + memset ((char *) (&hdr), 0, sizeof (struct ar_hdr)); + hdr.ar_name[0] =3D '/'; + sprintf (hdr.ar_size, "%-10d", (int) mapsize); +- sprintf (hdr.ar_date, "%ld", (long) time (NULL)); ++ sprintf (hdr.ar_date, "%ld", 0); + /* This, at least, is what Intel coff sets the values to. */ + sprintf ((hdr.ar_uid), "%d", 0); + sprintf ((hdr.ar_gid), "%d", 0); --=-=-=--