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 0GGtNApLzl7sWgAA0tVLHw (envelope-from ) for ; Wed, 27 May 2020 11:12:10 +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 gECqMApLzl51NgAAB5/wlQ (envelope-from ) for ; Wed, 27 May 2020 11:12:10 +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 34752940416 for ; Wed, 27 May 2020 11:12:10 +0000 (UTC) Received: from localhost ([::1]:43252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtyj-0000dl-5I for larch@yhetil.org; Wed, 27 May 2020 07:12:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtyc-0000c6-60 for bug-guix@gnu.org; Wed, 27 May 2020 07:12:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36826) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdtyb-0001K9-SW for bug-guix@gnu.org; Wed, 27 May 2020 07:12:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jdtyb-0000uZ-MJ for bug-guix@gnu.org; Wed, 27 May 2020 07:12:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41541: merge wip-hurd-vm Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 27 May 2020 11:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41541 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Mathieu Othacehe Received: via spool by 41541-submit@debbugs.gnu.org id=B41541.15905778833456 (code B ref 41541); Wed, 27 May 2020 11:12:01 +0000 Received: (at 41541) by debbugs.gnu.org; 27 May 2020 11:11:23 +0000 Received: from localhost ([127.0.0.1]:48372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdtxy-0000tg-N2 for submit@debbugs.gnu.org; Wed, 27 May 2020 07:11:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdtxw-0000tQ-FA for 41541@debbugs.gnu.org; Wed, 27 May 2020 07:11:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34924) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtxr-0000xs-8p; Wed, 27 May 2020 07:11:15 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=41590 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jdtxq-0004JJ-EZ; Wed, 27 May 2020 07:11:14 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <87o8qavktf.fsf@gnu.org> <87tv01vgqy.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Wed, 27 May 2020 13:11:12 +0200 In-Reply-To: <87tv01vgqy.fsf@gnu.org> (Mathieu Othacehe's message of "Wed, 27 May 2020 12:01:25 +0200") Message-ID: <87pnap7hv3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 41541@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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-Spam-Score: -1.01 X-TUID: S6hycQETPH+X Mathieu Othacehe writes: Hello Mathieu, > That's a good summary of the (complex) situation, thank you! Yeah...well sorry for helping create such a mess :-) >> Mattieu is looking into cleaning up of >> >> b605a36031 * origin/wip-hurd-vm WIP hurd-directives > > About that, I'd like to limit at maximum the (if hurd ...) conditionals > in (gnu system image). Yes, please! > So for the "make-device-node", I would propose to "link" it to the > image definition, as proposed in the attached patch. > > I'll see if we can do something similar for the "extra-directives" and > the "boot-activation". This looks beautiful! It works for me when using this extra ugly patch (yes, it contains an IF that has to go :-) diff --git a/gnu/build/image.scm b/gnu/build/image.scm index 70f1a61b9d..f4727b8bf5 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -67,7 +67,8 @@ take the partition metadata size into account, take a 25%= margin." (define* (make-ext-image partition target root #:key (owner-uid 0) - (owner-gid 0)) + (owner-gid 0) + (options '())) "Handle the creation of EXT2/3/4 partition images. See 'make-partition-image'." (let ((size (partition-size partition)) @@ -82,6 +83,7 @@ take the partition metadata size into account, take a 25%= margin." "-E" ,(format #f "root_owner=3D~a:~a,~a" owner-uid owner-gid journal-options) ,@fs-options + ,@options ,target ,(format #f "~ak" (size-in-kib @@ -105,14 +107,14 @@ take the partition metadata size into account, take a= 25% margin." (string-append "::" file)))) (scandir root)))) =20 -(define* (make-partition-image partition-sexp target root) +(define* (make-partition-image partition-sexp target root #:key (options '= ())) "Create and return the image of PARTITION-SEXP as TARGET. Use the given ROOT directory to populate the image." (let* ((partition (sexp->partition partition-sexp)) (type (partition-file-system partition))) (cond ((string-prefix? "ext" type) - (make-ext-image partition target root)) + (make-ext-image partition target root #:options options)) ((string=3D? type "vfat") (make-vfat-image partition target root)) (else diff --git a/gnu/system/image.scm b/gnu/system/image.scm index db12a40cb4..3400e01b1a 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -277,13 +277,15 @@ used in the image." (computed-file "partition-image-root" root-builder #:options `(#:references-graphs ,inputs))) (type (partition-file-system partition)) + (options (if (hurd-target?) '("-o" "hurd" "-O" "ext_attr") '(= ))) (image-builder (with-imported-modules* (let ((inputs '#+(list e2fsprogs dosfstools mtools))) (set-path-environment-variable "PATH" '("bin" "sbin") inp= uts) (make-partition-image #$(partition->gexp partition) #$output - #$image-root))))) + #$image-root + #:options '#$options))))) (computed-file "partition.img" image-builder))) =20 (define (partition->config partition) until the point where it lacks the "/hurd" symlink from the directives. So, apart from removing the IF above in a nice way, we (you?) could try to find a nice way to insert extra-directives > @@ -168,6 +170,9 @@ of the directory of the 'system' derivation." > (populate-root-file-system system-directory root) ^ here=20 I guess...and then we'd be done. I'm not sure as to what extent the extra-directives is/was a kludge? Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com