From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cCfXNk9utV6RGwAA0tVLHw (envelope-from ) for ; Fri, 08 May 2020 14:35:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id APuWIlxutV58YQAAB5/wlQ (envelope-from ) for ; Fri, 08 May 2020 14:36:12 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::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 ACC66940F51 for ; Fri, 8 May 2020 14:36:09 +0000 (UTC) Received: from localhost ([::1]:38126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX46j-0008Lt-Sc for larch@yhetil.org; Fri, 08 May 2020 10:36:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX46c-0008Ll-EC for bug-guix@gnu.org; Fri, 08 May 2020 10:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34489) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX46c-0004PL-4n for bug-guix@gnu.org; Fri, 08 May 2020 10:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jX46c-0003NG-0L for bug-guix@gnu.org; Fri, 08 May 2020 10:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41028: Channel/inferior error with core-updates: Unbound variable: call-with-new-thread Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 08 May 2020 14:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41028 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Christopher Baines , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 41028-done@debbugs.gnu.org id=D41028.158894852712928 (code D ref 41028); Fri, 08 May 2020 14:36:01 +0000 Received: (at 41028-done) by debbugs.gnu.org; 8 May 2020 14:35:27 +0000 Received: from localhost ([127.0.0.1]:46035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX462-0003MS-RU for submit@debbugs.gnu.org; Fri, 08 May 2020 10:35:27 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:52095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX460-0003MA-Uo for 41028-done@debbugs.gnu.org; Fri, 08 May 2020 10:35:25 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D140C5C01DC; Fri, 8 May 2020 10:35:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 08 May 2020 10:35:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm2; bh=XtcV1OFhV4IxWxLEhem4nvS2Hy De+gTqtC/eLlThpKs=; b=xdbKx4Wb8NNRC1Zc33HdEOXpuhi/An3Scq3IoObI85 hLv6WLkgvskVSBYsvv3WDBqWI4sa0GAsxOUyfK+wWApSQoHONQor6PTibL0G4UyJ cKBDZ0vY2tjw7SdQt6hV+khZWyfRmo6lLRMu5xcH4dv9vWX3t6L7rmNVV8rvLJdX XX51zE3FmxP1AL9h0K390MyGPepu9qCbjgUgKZH8TS6q81OBE7GAA6v1+iYH7aKO 3tts/icj6CGrZy4Oei0NpsoNAO+QJwRQThIaxIOJTp7UGYV24nePWtovkVdcKPpa On7xbNuZuYsYTujlPJXHLuHfuWJHD4eQrCWUMot4H9+A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type: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=fm2; bh=XtcV1O FhV4IxWxLEhem4nvS2HyDe+gTqtC/eLlThpKs=; b=i1pBhpQGtCYfEy+T/l9/4w XVeYlIOcTRoDDs6oWA9FyEpUCd8trP3R0jCSTTwC3uaEZEcDwRYJHGEN0ic7jiRz Od5gwFKUkLF9PPrjfzb5P0+KEaYz57avkAeirzNdgZY1kSoQj97SAf0wA6CEKrvl 4koMc0uuz/W1sqPIER5CXc+XXLNqDIe14NcQPro6Jgy+CgVRH1Vo8F86Bi2j8+yg sTmSMr6bw2r1BdY08DYhgRX++Wf6j33/qCtgqq1QhkvLk7MusAmAW+JzkNlJ7KOv r5Y2eH+k/EmHvaXcIWjSR52VbYFOwlZixAjmdTpANQknuL/vgFEi6IQlV4rZtLWQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrkeefgddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffgffkfggtgesghdtreertderjeenucfhrhhomhepofgrrhhiuhhs uceurghkkhgvuceomhgsrghkkhgvsehfrghsthhmrghilhdrtghomheqnecuggftrfgrth htvghrnhepudekhfdvffeivedvffeiffejveejuddtvdeigfekjeegtdeguefhieekgfel iefgnecuffhomhgrihhnpehgnhhurdhorhhgnecukfhppeekgedrvddtvddrieekrdejhe enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmsggr khhkvgesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Received: from localhost (ti0006q161-2604.bb.online.no [84.202.68.75]) by mail.messagingengine.com (Postfix) with ESMTPA id 018513280067; Fri, 8 May 2020 10:35:18 -0400 (EDT) From: Marius Bakke In-Reply-To: <87sggag42e.fsf@cbaines.net> References: <87h7wymj8a.fsf@cbaines.net> <87a72kg2qd.fsf@gnu.org> <87k11oduzx.fsf@gnu.org> <87sggag42e.fsf@cbaines.net> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Fri, 08 May 2020 16:35:16 +0200 Message-ID: <875zd6336j.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 41028-done@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 X-Spam-Score: -2.01 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=fastmail.com header.s=fm2 header.b=xdbKx4Wb; dkim=fail (rsa verify failed) header.d=messagingengine.com header.s=fm2 header.b=i1pBhpQG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Scan-Result: default: False [-2.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.4990203044532]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; FREEMAIL_FROM(0.00)[fastmail.com]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.10), country: US(-0.00), ip: 2001:470:142::17(-0.50)]; R_DKIM_REJECT(1.00)[fastmail.com:s=fm2,messagingengine.com:s=fm2]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; DKIM_TRACE(0.00)[fastmail.com:-,messagingengine.com:-]; MAILLIST(-0.20)[mailman]; SIGNED_PGP(-2.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:+,4:+,5:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[mbakke@fastmail.com,bug-guix-bounces@gnu.org]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[gnu.org:email,cbaines.net:email,fastmail.com:email]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain,text/x-patch]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[10]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[fastmail.com : SPF not aligned (relaxed),none] X-TUID: chA2wBKiE6Yn --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Christopher Baines writes: > Ludovic Court=C3=A8s writes: > >> Ludovic Court=C3=A8s skribis: >> >>> The attached patches add a mechanism to patch the Guix source tree, and >>> then use that mechanism to add the missing (ice-9 threads) import. With >>> this I can do: >>> >>> ./pre-inst-env guix time-machine \ >>> --commit=3De02c2f85b36ce1c733bd908a210ce1182bdd2560 -- build linux= -libre >>> >>> =E2=80=A6 which is a simple way to do what the manifest above was about. >> >> Given the enthusiasm expressed on IRC, I went ahead and pushed. :-) >> >> ff3ca7979e channels: Add patch for . >> 053b10c3ef channels: Add mechanism to patch checkouts of the 'guix cha= nnel. >> 4ba425060a channels: Add 'latest-channel-instance'. >> >> So=E2=80=A6 it might be that today is merge day? > > Wonderful :) I've had a chance to try this out now, and it works. I was > able to reconfigure my system. > > One even more niche issue is that because I'm using this channel in my > system configuration, the patching happens as root, but it's the cached > channel in my users home directory that's patched. This means that > build-self.scm becomes owned by root. > > I noticed this when I went to pull: > > =E2=86=92 guix pull --branch=3Dcore-updates > Updating channel 'guix' from Git repository at 'https://git.savannah.gn= u.org/git/guix.git'... > guix pull: error: Git error: could not open '/home/chris/.cache/guix/ch= eckouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq/build-aux/buil= d-self.scm' for writing: Permission denied > > > I'm not sure what the neat way of addressing this is, but maybe the file > ownership can be recorded prior to patching, and reset afterwards if > it's changed. I took a stab at exactly this: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-channels-Preserve-permissions-when-patching-https-bu.patch Content-Transfer-Encoding: quoted-printable From=20993dd0d36ba8e67af5c60d73cb1f9d60741f5418 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 8 May 2020 16:23:55 +0200 Subject: [PATCH] channels: Preserve permissions when patching . * guix/channels.scm (%bug-41028-patch): Record permissions before invoking SUBSTITUTE* and reset afterwards if file permissions differ from the curren= t user. =2D-- guix/channels.scm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/guix/channels.scm b/guix/channels.scm index 0fa036446c..a102d5bc35 100644 =2D-- a/guix/channels.scm +++ b/guix/channels.scm @@ -393,10 +393,21 @@ to '%package-module-path'." (not (string-contains content "(ice-9 threads)")))) =20 (define (add-missing-ice-9-threads-import source) =2D ;; Add (ice-9 threads) import in the gexp of 'compute-guix-derivat= ion'. =2D (substitute* (string-append source "/" %self-build-file) =2D (("^ +\\(use-modules \\(ice-9 match\\)\\)") =2D (object->string '(use-modules (ice-9 match) (ice-9 threads)))))) + (let* ((self-build-file (string-append source "/" %self-build-file)) + ;; Record permissions so that we can reset it afterwards in c= ase + ;; we run this as the root user (see ). + ;; TODO: Ideally SUBSTITUTE* would preserve permissions itsel= f. + (stat (stat self-build-file)) + (owner (stat:uid stat)) + (group (stat:gid stat))) + + ;; Add (ice-9 threads) import in the gexp of 'compute-guix-derivat= ion'. + (substitute* self-build-file + (("^ +\\(use-modules \\(ice-9 match\\)\\)") + (object->string '(use-modules (ice-9 match) (ice-9 threads))))) + + (unless (and (eq? (getuid) owner) (eq? (getgid) group)) + (chown self-build-file owner group)))) =20 (patch missing-ice-9-threads-import? add-missing-ice-9-threads-import))) =20 =2D-=20 2.26.2 --=-=-= Content-Type: text/plain WDYT? Currently in the process of testing it locally, feedback appreciated. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl61biQACgkQoqBt8qM6 VPoFoAf/UKOIozWoTgGoPdH/k7NVKYeD1BJPMzS+1QtO9fwwnJf5bgtOIt0mPeti gdgrgVYYg+Jk1WQRFMLEil5EdUgjMQiqP2OgpK/UwVmMMR3e8HESngn9jtB02hUq 2sq6ZeALV4PL/gPIukObTt/BjluexVZpD5qaKcaRjC/JKLs87SM7zlMGY6Cqut5c vAOZYqjCRrggvlqwj4HIR51XavUHylIh26vQY2g9pecDrdCKkfCAGOg55+jZfogm ypIrP2yUszIssZ4bUK21OIKE7+WmZtLhWyjrqCOkvDPJFbtvY4BXDzmuYXhISpdU 09eE+aIhrd0hDQVEgt5BKw+bVVHFdg== =xxKC -----END PGP SIGNATURE----- --==-=-=--