* [bug#28718] [PATCH] gnu: qemu: Add sysconfdir to configure-flags.
@ 2017-10-06 3:30 Oleg Pykhalov
2017-10-06 4:38 ` [bug#28718] Status: " Oleg Pykhalov
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Oleg Pykhalov @ 2017-10-06 3:30 UTC (permalink / raw)
To: 28718
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: [PATCH] gnu: qemu: Add sysconfdir to configure-flags. --]
[-- Type: text/x-patch, Size: 1005 bytes --]
From 371ba5aee9ef1412753fdb43230f107087f9651b 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..21fc7b784 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=/tmp/etc")
,@configure-flags))))))
(add-after 'install 'install-info
(lambda* (#:key inputs outputs #:allow-other-keys)
--
2.14.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#28718] Status: [PATCH] gnu: qemu: Add sysconfdir to configure-flags.
2017-10-06 3:30 [bug#28718] [PATCH] gnu: qemu: Add sysconfdir to configure-flags Oleg Pykhalov
@ 2017-10-06 4:38 ` Oleg Pykhalov
2017-10-07 17:58 ` [bug#28718] " Leo Famulari
2017-10-07 20:34 ` Ludovic Courtès
2 siblings, 0 replies; 8+ messages in thread
From: Oleg Pykhalov @ 2017-10-06 4:38 UTC (permalink / raw)
To: bug#28718
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 # …
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#28718] [PATCH] gnu: qemu: Add sysconfdir to configure-flags.
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 ` Leo Famulari
2017-10-07 20:34 ` Ludovic Courtès
2 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2017-10-07 17:58 UTC (permalink / raw)
To: Oleg Pykhalov; +Cc: 28718
[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]
On Fri, Oct 06, 2017 at 06:30:34AM +0300, Oleg Pykhalov wrote:
> From 371ba5aee9ef1412753fdb43230f107087f9651b 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.
Hi Oleg, thanks for the patch.
> ---
> gnu/packages/virtualization.scm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
> index a8e54d684..21fc7b784 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=/tmp/etc")
> ,@configure-flags))))))
> (add-after 'install 'install-info
> (lambda* (#:key inputs outputs #:allow-other-keys)
Can you describe the problem this patch aims to address? And, where does
QEMU look for its configuration when this flag is not set?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#28718] [PATCH] gnu: qemu: Add sysconfdir to configure-flags.
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
2 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2017-10-07 20:34 UTC (permalink / raw)
To: Oleg Pykhalov; +Cc: 28718
Hi Oleg,
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> From 371ba5aee9ef1412753fdb43230f107087f9651b 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..21fc7b784 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=/tmp/etc")
[...]
> 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?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#28718] [PATCH] gnu: qemu: Add sysconfdir to configure-flags.
2017-10-07 20:34 ` Ludovic Courtès
@ 2017-10-08 7:15 ` Oleg Pykhalov
2017-10-08 15:22 ` Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: Oleg Pykhalov @ 2017-10-08 7:15 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 28718
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 :-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#28718] [PATCH] gnu: qemu: Add sysconfdir to configure-flags.
2017-10-08 7:15 ` Oleg Pykhalov
@ 2017-10-08 15:22 ` Ludovic Courtès
2017-10-09 11:24 ` Oleg Pykhalov
0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2017-10-08 15:22 UTC (permalink / raw)
To: Oleg Pykhalov; +Cc: 28718
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> 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? :-)
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#28718] [PATCH] gnu: qemu: Add sysconfdir to configure-flags.
2017-10-08 15:22 ` Ludovic Courtès
@ 2017-10-09 11:24 ` Oleg Pykhalov
2017-10-09 19:37 ` bug#28718: " Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: Oleg Pykhalov @ 2017-10-09 11:24 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 28718
[-- 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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#28718: [PATCH] gnu: qemu: Add sysconfdir to configure-flags.
2017-10-09 11:24 ` Oleg Pykhalov
@ 2017-10-09 19:37 ` Ludovic Courtès
0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2017-10-09 19:37 UTC (permalink / raw)
To: Oleg Pykhalov; +Cc: 28718-done
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> 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.
Applied, thanks!
Ludo'.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-10-09 19:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2017-10-09 19:37 ` bug#28718: " Ludovic Courtès
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.