all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 28718@debbugs.gnu.org
Subject: [bug#28718] [PATCH] gnu: qemu: Add sysconfdir to configure-flags.
Date: Mon, 09 Oct 2017 14:24:42 +0300	[thread overview]
Message-ID: <87mv50o96t.fsf@gmail.com> (raw)
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")

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

Hello Ludovic,

ludo@gnu.org (Ludovic Courtès) 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=bridge0 # …
>>>
>>> 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’s a trick here: we
> do pass --sysconfdir=/etc, and sysconfdir=/tmp/etc is passed only during
> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-qemu-Add-sysconfdir-to-configure-flags.patch --]
[-- Type: text/x-patch, Size: 1002 bytes --]

From fcff3b4b2c53af7974786f7f4dd1633c9b634130 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
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


  reply	other threads:[~2017-10-09 11:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06  3:30 [bug#28718] [PATCH] gnu: qemu: Add sysconfdir to configure-flags Oleg Pykhalov
2017-10-06  4:38 ` [bug#28718] Status: " Oleg Pykhalov
2017-10-07 17:58 ` [bug#28718] " Leo Famulari
2017-10-07 20:34 ` Ludovic Courtès
2017-10-08  7:15   ` Oleg Pykhalov
2017-10-08 15:22     ` Ludovic Courtès
2017-10-09 11:24       ` Oleg Pykhalov [this message]
2017-10-09 19:37         ` bug#28718: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv50o96t.fsf@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=28718@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.