From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1WBF-0008Hm-TK for guix-patches@gnu.org; Mon, 09 Oct 2017 07:25:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1WBC-0007mp-Lx for guix-patches@gnu.org; Mon, 09 Oct 2017 07:25:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48526) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1WBC-0007mh-HN for guix-patches@gnu.org; Mon, 09 Oct 2017 07:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e1WBC-00048f-6N for guix-patches@gnu.org; Mon, 09 Oct 2017 07:25:02 -0400 Subject: [bug#28718] [PATCH] gnu: qemu: Add sysconfdir to configure-flags. Resent-Message-ID: From: Oleg Pykhalov References: <87mv552bs5.fsf@gmail.com> <877ew6k88s.fsf@gnu.org> <87tvza3yaq.fsf@gmail.com> <87vajpekaj.fsf@gnu.org> Date: Mon, 09 Oct 2017 14:24:42 +0300 In-Reply-To: <87vajpekaj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sun, 08 Oct 2017 17:22:44 +0200") Message-ID: <87mv50o96t.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 28718@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Ludovic, ludo@gnu.org (Ludovic Court=C3=A8s) writes: [...] >>>> I've used this patch to run a QEMU VM with bridge interface. >>>> >>>> $ mkdir -p /tmp/etc/qemu >>>> $ echo 'allow bridge0' | tee -a /tmp/etc/qemu/bridge.conf >>>> # ip link add bridge0 type bridge >>>> # ip link set dev enp6s0 master bridge0 >>>> # ip link up bridge0 >>>> # dhclient bridge0 >>>> # qemu-system-x86_64 -net nic -net bridge,br=3Dbridge0 # =E2=80=A6 >>> >>> It feels wrong to me to default to /tmp/etc instead of /etc. >>> >>> Setting up a bridge requires root privileges anyway, so why not stick to >>> /etc instead of /tmp/etc? >> >> It's inspired by libvirt package recipe :-) > > Looking at commit a4b9392151 for libvirt, I think it=E2=80=99s a trick he= re: we > do pass --sysconfdir=3D/etc, and sysconfdir=3D/tmp/etc is passed only dur= ing > the install phase, which I think is a trick to avoid errors while > creating $(sysconfdir). But /etc is the actual sysconfdir AIUI. > > So, WDYT? :-) Thank you for investigation. I saw no reason not to use file-system convention at the beginning of discussion. Here is an another patch. Build finished successfully for me. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-qemu-Add-sysconfdir-to-configure-flags.patch >From fcff3b4b2c53af7974786f7f4dd1633c9b634130 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Fri, 6 Oct 2017 06:24:58 +0300 Subject: [PATCH] gnu: qemu: Add sysconfdir to configure-flags. * gnu/packages/virtualization.scm (qemu): Add sysconfdir to configure-flags. --- gnu/packages/virtualization.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index a8e54d684..4e384e79a 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -111,6 +111,7 @@ "--disable-debug-info" ; save build space "--enable-virtfs" ; just to be sure ,(string-append "--prefix=" out) + ,(string-append "--sysconfdir=/etc") ,@configure-flags)))))) (add-after 'install 'install-info (lambda* (#:key inputs outputs #:allow-other-keys) -- 2.14.2 --=-=-=--