[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] arch_init: Use stateless configuration for d
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2] arch_init: Use stateless configuration for default target_${target}.conf |
Date: |
Tue, 26 May 2015 13:23:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 26/05/2015 13:11, Ikey Doherty wrote:
> The goal of stateless, and thus this change, is to separate OS configuration
> from system administrator configuration. With this change we will read the
> default configuration data from /usr/share/defaults/qemu, in the absence of
> an overriding site administrator configuration in /etc/qemu.
>
> A key advantage of this change is enabling a sane and immutable default OS
> configuration, that is resiliant to upgrades. Ultimate power is still left
> to the system administrator, with the ability to override the defaults if
> required. Lastly, given that the sane defaults are always available, the
> administrator may simply remove their site-config files to reset the
> configuration to the "factory defaults" (i.e. OS configuration).
The patch does make sense, however the target-x86_64.conf file has now
been empty for three years and we probably should just stop honoring it.
In addition, there is another file in /etc/qemu, namely bridge.conf.
Stateless configuration would make a lot of sense for that file. Can
you modify your patch to kill target-$TARGET_NAME.conf altogether, and
to use stateless configuration for bridge.conf?
Paolo
> Signed-off-by: Ikey Doherty <address@hidden>
> ---
> Makefile | 8 ++++----
> arch_init.c | 1 +
> configure | 2 ++
> 3 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index d945804..52635da 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -390,12 +390,12 @@ endif
> endif
>
> install-confdir:
> - $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)"
> + $(INSTALL_DIR) "$(DESTDIR)$(qemu_defaultdir)"
>
> -install-sysconfig: install-datadir install-confdir
> - $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf
> "$(DESTDIR)$(qemu_confdir)"
> +install-defaultconfig: install-datadir install-confdir
> + $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf
> "$(DESTDIR)$(qemu_defaultdir)"
>
> -install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \
> +install: all $(if $(BUILD_DOCS),install-doc) install-defaultconfig \
> install-datadir install-localstatedir
> ifneq ($(TOOLS),)
> $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
> diff --git a/arch_init.c b/arch_init.c
> index 23d3feb..f23fb1f 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -137,6 +137,7 @@ static struct defconfig_file {
> } default_config_files[] = {
> { CONFIG_QEMU_CONFDIR "/qemu.conf", true },
> { CONFIG_QEMU_CONFDIR "/target-" TARGET_NAME ".conf", true },
> + { CONFIG_QEMU_DEFAULTDIR "/target-" TARGET_NAME ".conf", true },
> { NULL }, /* end of list */
> };
>
> diff --git a/configure b/configure
> index f758f32..a0b6477 100755
> --- a/configure
> +++ b/configure
> @@ -4303,6 +4303,7 @@ fi
> qemu_confdir=$sysconfdir$confsuffix
> qemu_moddir=$libdir$confsuffix
> qemu_datadir=$datadir$confsuffix
> +qemu_defaultdir="$datadir/defaults$confsuffix"
> qemu_localedir="$datadir/locale"
>
> tools=""
> @@ -4543,6 +4544,7 @@ echo "mandir=$mandir" >> $config_host_mak
> echo "sysconfdir=$sysconfdir" >> $config_host_mak
> echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
> echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
> +echo "qemu_defaultdir=$qemu_defaultdir" >> $config_host_mak
> echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
> echo "qemu_moddir=$qemu_moddir" >> $config_host_mak
> if test "$mingw32" = "no" ; then
>
- [Qemu-devel] [PATCH] arch_init: Use stateless configuration for default target_${target}.conf, Ikey Doherty, 2015/05/22
- Re: [Qemu-devel] [PATCH] arch_init: Use stateless configuration for default target_${target}.conf, Eric Blake, 2015/05/22
- [Qemu-devel] [PATCH v2] arch_init: Use stateless configuration for default target_${target}.conf, Ikey Doherty, 2015/05/26
- Re: [Qemu-devel] [PATCH v2] arch_init: Use stateless configuration for default target_${target}.conf,
Paolo Bonzini <=
- [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf, Ikey Doherty, 2015/05/26
- [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf, Ikey Doherty, 2015/05/26
- Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf, Paolo Bonzini, 2015/05/26
- Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf, Eduardo Habkost, 2015/05/26
- Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf, Ikey Doherty, 2015/05/26
- Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf, Eduardo Habkost, 2015/05/26
- Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf, Stefan Hajnoczi, 2015/05/27
- Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf, Stefan Hajnoczi, 2015/05/27
- Re: [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf, Paolo Bonzini, 2015/05/26
- Re: [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf, Eduardo Habkost, 2015/05/26