From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uDGsBfn9W2O0JgAAbAwnHQ (envelope-from ) for ; Fri, 28 Oct 2022 18:06:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gGyHBPn9W2MOfwEAG6o9tA (envelope-from ) for ; Fri, 28 Oct 2022 18:06:17 +0200 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 C5813C815 for ; Fri, 28 Oct 2022 18:06:16 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooRry-00032q-Pl; Fri, 28 Oct 2022 12:06:06 -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 ) id 1ooRqw-0002Dd-Lw for bug-guix@gnu.org; Fri, 28 Oct 2022 12:05:14 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ooRqw-0003CG-9l for bug-guix@gnu.org; Fri, 28 Oct 2022 12:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ooRqw-0005UP-4M for bug-guix@gnu.org; Fri, 28 Oct 2022 12:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47584: [PATCH 2/3] WIP gnu: Change the Guile used for activation to one that has 'openat'. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Oct 2022 16:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47584 X-GNU-PR-Package: guix X-GNU-PR-Keywords: security patch To: 47584@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 47584-submit@debbugs.gnu.org id=B47584.166697305821028 (code B ref 47584); Fri, 28 Oct 2022 16:05:02 +0000 Received: (at 47584) by debbugs.gnu.org; 28 Oct 2022 16:04:18 +0000 Received: from localhost ([127.0.0.1]:34120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooRqD-0005T4-VE for submit@debbugs.gnu.org; Fri, 28 Oct 2022 12:04:18 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:56246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooRqA-0005Sb-Oa for 47584@debbugs.gnu.org; Fri, 28 Oct 2022 12:04:15 -0400 Received: from localhost.localdomain ([213.119.228.183]) by michel.telenet-ops.be with bizsmtp id dU4B2800F3y3Lwt06U4CSl; Fri, 28 Oct 2022 18:04:12 +0200 From: Maxime Devos Date: Fri, 28 Oct 2022 18:04:08 +0200 Message-Id: <20221028160409.31887-2-maximedevos@telenet.be> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221028160409.31887-1-maximedevos@telenet.be> References: <20221028160409.31887-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1666973052; bh=0F1Hr4edlP5OrtvRIA1MrDIoaH4G+4vNT8z/hev/rls=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NUQiwd7Uxzz2248r1Q2Su8Bdvo+Fr/6K9IBxjWQrh0l6CCUk5HcEQ0sMSWhzW/Ia7 kRTCQefqBs6DqBVaOkeAtj1EPB+2UbAXM2okAK28bTOLALV2x3BCsQtxKb359ojs/8 fd+eNOl/xAaOkNeZYPYfBfqnJSUzmb1zxl2MgSoDKPOQ/533VtMMSIVZrT1TkHNA6q w3ZSWCKBKcEEgHhjx/MF58eWF5dQc4G7orsmcID2kaH8bb0QUwWStV3+tyqyVNAktV R3KS3xXDTW8nBRmq04onRTHHG9ym0C+p+jNqimPDTdXUxuDzNxSfUGYQq/fF7nwNbT vcKaWBjCnxEbg== 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: , Sender: "bug-Guix" Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666973176; 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: content-transfer-encoding:content-transfer-encoding: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:dkim-signature; bh=0F1Hr4edlP5OrtvRIA1MrDIoaH4G+4vNT8z/hev/rls=; b=ayfQb6ZZdEGDk5uONtRuZy4aqK4jOWd1Lu3B2jZPPBSE/mME1IZCNPwpY3RQ6h91RGaOoM N6QtHfTCjDgDST1/3qkuNDNJP909yW0TacHTK2QyeIm8eY3pDKiURu5+MzHZGkYZjj7chL YW7FIwuMpBn0FVuwgWPRdWiP/KegkpK2rOqJ8cqqD/dvLdjo4GAtj0YmsxEkHTQPwYJy9z Vfwff6b3IHoHz4+oRAsUI6nofE7qG1A/RH+X5gl7rFKaxVwqK7QCjWgNeOgs+xOo5xZW8t y9VQhJF6XFHl7huEhRXI76AUuybMgWoQEOdsyj9FvsoGFE6gSFA1RNUdIy7zyw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666973176; a=rsa-sha256; cv=none; b=HsB2wd5fs4/Q8hPkJW5oh5RS2Z4trMLBwLFmE1DA23ghnwu/1iSoYQ+C8QdB13fYazWhQc HLuMwUO8KGo2TxtwOdRK0kU7WAl2QlQTtLAiwPe21UtySIVe+YQfvrbxD0xF9Id/nQrbig hb1s+FP01NuW7yIY9viez57KcAOC5sy/Od185UL/mLNC828uWkBhw8AxFpj6lMn/FNFnP5 kIKYMowXaBFEnwYoAaecClhjlWyPh6l1EC5HEavZTy82KoB8IdYZkMjLNhulUQvdjqRB+W D8RSj8CnuzxFJ9L0uiUjEmm3Y5UoWSdQen/MctnYZTHLSmq3divlsCW8K2qyhg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=NUQiwd7U; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 7.08 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=NUQiwd7U; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C5813C815 X-Spam-Score: 7.08 X-Migadu-Scanner: scn1.migadu.com X-TUID: mq3wJcp0Bci3 TODO: when doing "make check-system TESTS=ldap", I get a build failure of openssl@1.1.1l, I suspect it's a situation like again, though I haven't investigated yet. Test Summary Report ------------------- ../test/recipes/80-test_ssl_new.t (Wstat: 256 Tests: 29 Failed: 1) Failed test: 12 Non-zero exit status: 1 Files=158, Tests=2636, 157 wallclock secs ( 2.29 usr 0.18 sys + 104.74 cusr 28.04 csys = 135.25 CPU) Result: FAIL make[1]: *** [Makefile:208: _tests] Error 1 make[1]: Leaving directory '/tmp/guix-build-openssl-1.1.1l.drv-0/openssl-1.1.1l' make: *** [Makefile:205: tests] Error 2 Test suite failed, dumping logs. error: in phase 'check': uncaught exception: %exception #<&invoke-error program: "make" arguments: ("test") exit-status: 2 term-signal: #f stop-signal: #f> phase `check' failed after 157.1 seconds command "make" "test" failed with status 2 note: keeping build directory `/tmp/guix-build-openssl-1.1.1l.drv-1' builder for `/gnu/store/jhijsrxqh586l8ck61ppkhydkb158hj0-openssl-1.1.1l.drv' failed with exit code 1 build of /gnu/store/jhijsrxqh586l8ck61ppkhydkb158hj0-openssl-1.1.1l.drv failed [...] This is required by the next patch, in which 'mkdir-p/perms' uses 'openat'. * gnu/packages/guile.scm (guile-for-activation): New variable. * gnu/services.scm (activation-script)[actions]: Set #:guile to guile-for-activation. * gnu/packages/make-bootstrap.scm (%guile-static-stripped/initrd): New variable. * gnu/system/linux-initrd.scm (expression->initrd): Use %guile-static-stripped/initrd instead of %guile-static-stripped. --- gnu/packages/guile.scm | 5 +++++ gnu/packages/make-bootstrap.scm | 15 ++++++++++++--- gnu/services.scm | 5 ++++- gnu/system/linux-initrd.scm | 4 ++-- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 936fc8649f..1d1b0bd77b 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -460,6 +460,11 @@ (define-public guile-next gperf))) (synopsis "Development version of GNU Guile")))) +;; The important thing here is that this Guile has 'openat' and friends +;; for (gnu build activation), which at time of writing isn't available +;; in any release yet. +(define-public guile-for-activation guile-next) + (define* (make-guile-readline guile #:optional (name "guile-readline")) (package (name name) diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 4ea97368a9..8852caa406 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019, 2020 Marius Bakke ;;; Copyright © 2020 Mathieu Othacehe ;;; Copyright © 2021 Pierre Langlois +;;; Copyright © 2022 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,7 +58,8 @@ (define-module (gnu packages make-bootstrap) %mes-bootstrap-tarball %bootstrap-tarballs - %guile-static-stripped)) + %guile-static-stripped + %guile-static-stripped/initrd)) ;;; Commentary: ;;; @@ -794,14 +796,21 @@ (define* (make-guile-static-stripped static-guile) (synopsis "Minimal statically-linked and relocatable Guile"))) (define %guile-static-stripped - ;; A stripped static Guile 3.0 binary, for use in initrds - ;; and during bootstrap. + ;; A stripped static Guile 3.0 binary, for use during bootstrap. (make-guile-static-stripped (make-guile-static guile-3.0 '("guile-2.2-default-utf8.patch" "guile-3.0-linux-syscalls.patch" "guile-3.0-relocatable.patch")))) +;; Like %guile-static-stripped, but for use in initrds. +(define %guile-static-stripped/initrd + (make-guile-static-stripped + (make-guile-static guile-for-activation + '("guile-2.2-default-utf8.patch" + "guile-3.0-linux-syscalls.patch" + "guile-3.0-relocatable.patch")))) + (define (tarball-package pkg) "Return a package containing a tarball of PKG." (package diff --git a/gnu/services.scm b/gnu/services.scm index 2abef557d4..e051f9e821 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2021 raid5atemyhomework ;;; Copyright © 2020 Christine Lemmer-Webber ;;; Copyright © 2020, 2021 Brice Waegeneire +;;; Copyright © 2022 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -41,6 +42,7 @@ (define-module (gnu services) #:use-module (guix utils) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module ((gnu packages guile) #:select (guile-for-activation)) #:use-module (gnu packages hurd) #:use-module (gnu system setuid) #:use-module (srfi srfi-1) @@ -610,7 +612,8 @@ (define* (activation-service->script service) (define (activation-script gexps) "Return the system's activation script, which evaluates GEXPS." (define actions - (map (cut program-file "activate-service.scm" <>) gexps)) + (map (cut program-file "activate-service.scm" <> + #:guile guile-for-activation) gexps)) (program-file "activate.scm" (with-imported-modules (source-module-closure diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 4c4c78e444..b65d830a17 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -36,7 +36,7 @@ (define-module (gnu system linux-initrd) #:use-module ((gnu packages xorg) #:select (console-setup xkeyboard-config)) #:use-module ((gnu packages make-bootstrap) - #:select (%guile-static-stripped)) + #:select (%guile-static-stripped/initrd)) #:use-module (gnu system file-systems) #:use-module (gnu system mapped-devices) #:use-module (gnu system keyboard) @@ -62,7 +62,7 @@ (define-module (gnu system linux-initrd) (define* (expression->initrd exp #:key - (guile %guile-static-stripped) + (guile %guile-static-stripped/initrd) (gzip gzip) (name "guile-initrd") (system (%current-system))) -- 2.38.0