From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxCwt-0002qj-Mj for qemu-devel@nongnu.org; Tue, 26 May 2015 07:23:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxCwq-0006x4-Ew for qemu-devel@nongnu.org; Tue, 26 May 2015 07:23:07 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:34168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxCwq-0006w5-73 for qemu-devel@nongnu.org; Tue, 26 May 2015 07:23:04 -0400 Received: by wicmc15 with SMTP id mc15so61651450wic.1 for ; Tue, 26 May 2015 04:23:03 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <55645794.3020202@redhat.com> Date: Tue, 26 May 2015 13:23:00 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <555FA687.8020208@redhat.com> <1432638689-17159-1-git-send-email-michael.i.doherty@intel.com> In-Reply-To: <1432638689-17159-1-git-send-email-michael.i.doherty@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] arch_init: Use stateless configuration for default target_${target}.conf List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ikey Doherty , qemu-devel@nongnu.org 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 > --- > 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 >