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 sKMSNck8717YaQAA0tVLHw (envelope-from ) for ; Sun, 21 Jun 2020 10:56:09 +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 +OfzMMk8716qKQAAB5/wlQ (envelope-from ) for ; Sun, 21 Jun 2020 10:56:09 +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 375B194053C for ; Sun, 21 Jun 2020 10:56:09 +0000 (UTC) Received: from localhost ([::1]:47428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmxdu-0002uD-EZ for larch@yhetil.org; Sun, 21 Jun 2020 06:56:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmxdr-0002tv-0K for guix-patches@gnu.org; Sun, 21 Jun 2020 06:56:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47744) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmxdq-0004q3-N7 for guix-patches@gnu.org; Sun, 21 Jun 2020 06:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jmxdq-00045d-M2 for guix-patches@gnu.org; Sun, 21 Jun 2020 06:56:02 -0400 Subject: bug#41961: [PATCH 1/1] services: childhurd: Support more than one instance. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Sun, 21 Jun 2020 10:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 41961 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: rekado@elephly.net, 41961-done@debbugs.gnu.org Mail-Followup-To: 41961@debbugs.gnu.org, janneke@gnu.org, janneke@gnu.org Received: via spool by 41961-done@debbugs.gnu.org id=D41961.159273695415701 (code D ref 41961); Sun, 21 Jun 2020 10:56:02 +0000 Received: (at 41961-done) by debbugs.gnu.org; 21 Jun 2020 10:55:54 +0000 Received: from localhost ([127.0.0.1]:59289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmxdi-00045A-7i for submit@debbugs.gnu.org; Sun, 21 Jun 2020 06:55:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmxdd-00044r-Gg for 41961-done@debbugs.gnu.org; Sun, 21 Jun 2020 06:55:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51864) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmxdY-0004oJ-0c; Sun, 21 Jun 2020 06:55:44 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=35074 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 1jmxdJ-00051N-Ts; Sun, 21 Jun 2020 06:55:31 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <20200620091656.6804-1-janneke@gnu.org> <20200620091918.6868-1-janneke@gnu.org> <87366o6chl.fsf@gnu.org> <875zbk3hzy.fsf@gnu.org> <87pn9s4utp.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sun, 21 Jun 2020 12:55:27 +0200 In-Reply-To: <87pn9s4utp.fsf@gnu.org> (Mathieu Othacehe's message of "Sun, 21 Jun 2020 11:44:18 +0200") Message-ID: <87wo40zo0w.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: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: QEuvOwvPWyO2 Mathieu Othacehe writes: >> Hmm...yes, this looked a bit awkward to me too. It's being used like >> this: >> >> o--8<---------------cut here---------------start------------->8--- >> (let ((image (hurd-vm-configuration-image config)) >> ...) >> (define vm-command >> #~(list >> (string-append #$qemu "/bin/qemu-system-i386") >> #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '()) >> "-m" (number->string #$memory-size) >> #$@net-options >> #$@options >> #+image)) > > What about having something like: > > (define vm-command > #~(list > (string-append #$qemu "/bin/qemu-system-i386") > #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '()) > "-m" (number->string #$memory-size) > #$@options > #+@(list "--hda" image))) > > instead? So we hardcode it. Simply changed to --8<---------------cut here---------------start------------->8--- (define vm-command #~(list (string-append #$qemu "/bin/qemu-system-i386") #$@(if (file-exists? "/dev/kvm") '("--enable-kvm") '()) "-m" (number->string #$memory-size) #$@net-options #$@options "--hda" #+image)) --8<---------------cut here---------------end--------------->8--- I guess that's better than the original fragile softcoding, because it's more robust and we have no usecase for changing '--hda' yet. Maybe I'm a bit too inclined to always enable the user to override stuff, even if I cannot imagine its use case yet :-) Pushed to master as, b7249aa4726193653e05e694ec4bb311aa4ec6c2. Thanks, Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com