arch_init: Use stateless configuration for default target_${target}.conf
PATCH 1/1 arch_init: Use stateless configuration for default target_${target}.conf
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).
--- Makefile | 8 ++++---- arch_init.c | 1 + configure | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-)
Makefile +4 -4
@@ -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))
arch_init.c +1 -0
@@ -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 */ };
configure +2 -0
@@ -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
Signature · 12 lines
1.9.1 --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
On 05/22/2015 09:42 AM, Ikey Doherty wrote:
meta-comment:
Quoted 8 lines
1.9.1
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
Quoted 4 lines
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
This disclaimer is unenforceable on publicly-archived mailing lists. Can you tweak your configuration so that mails from you don't spam the list with legalese, since some readers are uncomfortable answering emails with a bad disclaimer?
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
PATCH v2 1/1 arch_init: Use stateless configuration for default target_${target}.conf
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).
--- Makefile | 8 ++++---- arch_init.c | 1 + configure | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-)
Makefile +4 -4
@@ -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))
arch_init.c +1 -0
@@ -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 */ };
configure +2 -0
@@ -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
Signature · 1 line
1.9.1
Quoted 17 lines · Eric Blake
On 05/22/2015 09:42 AM, Ikey Doherty wrote:
meta-comment:
Quoted 8 lines
1.9.1
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47Quoted 4 lines
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Quoted 5 lines
This disclaimer is unenforceable on publicly-archived mailing lists. Can you tweak your configuration so that mails from you don't spam the list with legalese, since some readers are uncomfortable answering emails with a bad disclaimer?
My apologies, I thought I'd resolved that prior to sending. That's now corrected and I've resent.
- ikey
Signature · 13 lines
Clear Linux Project for Intel Architecture Intel Open Source Technology Center http://www.clearlinux.org --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Quoted 11 lines · Ikey Doherty
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
Quoted 61 lines
Signed-off-by Ikey Doherty <[email protected]>--- Makefile | 8 ++++---- arch_init.c | 1 + configure | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-)Makefile +4
-4@@ -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))arch_init.c +1
-0@@ -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 */ };configure +2
-0@@ -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
PATCH v3 1/2 arch_init: Drop target-x86_64.conf
The target-x86_64.conf sysconfig file has been empty and essentially ignored now for several years. This change removes the unused file to enable moving towards a stateless configuration.
--- Makefile | 7 +------ arch_init.c | 1 - sysconfigs/target/target-x86_64.conf | 0 3 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 sysconfigs/target/target-x86_64.conf
Makefile +1 -6
@@ -389,13 +389,8 @@ ifneq (,$(findstring qemu-ga,$(TOOLS))) endif endif -install-confdir: - $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)" -install-sysconfig: install-datadir install-confdir - $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" - -install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \ +install: all $(if $(BUILD_DOCS),install-doc) \ install-datadir install-localstatedir ifneq ($(TOOLS),) $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
arch_init.c +0 -1
@@ -136,7 +136,6 @@ static struct defconfig_file {bool userconfig; } default_config_files[] = { { CONFIG_QEMU_CONFDIR "/qemu.conf", true }, - { CONFIG_QEMU_CONFDIR "/target-" TARGET_NAME ".conf", true }, { NULL }, /* end of list */ };
sysconfigs/target/target-x86_64.conf deleted +0 -0
Signature · 1 line
1.9.1
PATCH v3 2/2 qemu-bridge-helper: Use stateless configuration for bridge.conf
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).
--- configure | 2 ++ qemu-bridge-helper.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-)
configure +2 -0
@@ -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-bridge-helper.c +9 -6
@@ -47,7 +47,8 @@#include <cap-ng.h> #endif -#define DEFAULT_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf" +#define DEFAULT_ACL_FILE CONFIG_QEMU_DEFAULTDIR "/bridge.conf" +#define SITE_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf"enum {ACL_ALLOW =0 ,
@@ -272,11 +273,13 @@ int main(int argc, char **argv)/* parse default acl file */ QSIMPLEQ_INIT (&acl_list); -if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { -fprintf (stderr,"failed to parse default acl file `%s'\n" , -DEFAULT_ACL_FILE ); - ret =EXIT_FAILURE ; - goto cleanup; +if (parse_acl_file (SITE_ACL_FILE , &acl_list) ==-1 ) { +if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { +fprintf (stderr,"failed to parse default acl file `%s'\n" , +DEFAULT_ACL_FILE ); + ret =EXIT_FAILURE ; + goto cleanup; + } }/* validate bridge against acl -- default policy is to deny
Signature · 1 line
1.9.1
Re: [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf
In reply to Ikey DohertyCCing maintainer.
Paolo
Quoted 47 lines · Ikey Doherty
The target-x86_64.conf sysconfig file has been empty and essentially ignored now for several years. This change removes the unused file to enable moving towards a stateless configuration.
Signed-off-by Ikey Doherty <[email protected]>--- Makefile | 7 +------ arch_init.c | 1 - sysconfigs/target/target-x86_64.conf | 0 3 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 sysconfigs/target/target-x86_64.confMakefile +1
-6@@ -389,13 +389,8 @@ ifneq (,$(findstring qemu-ga,$(TOOLS))) endif endif -install-confdir: - $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)" -install-sysconfig: install-datadir install-confdir - $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" - -install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \ +install: all $(if $(BUILD_DOCS),install-doc) \ install-datadir install-localstatedir ifneq ($(TOOLS),) $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))arch_init.c +0
-1@@ -136,7 +136,6 @@ static struct defconfig_file {bool userconfig; } default_config_files[] = { { CONFIG_QEMU_CONFDIR "/qemu.conf", true }, - { CONFIG_QEMU_CONFDIR "/target-" TARGET_NAME ".conf", true }, { NULL }, /* end of list */ };sysconfigs/target/target-x86_64.conf deleted +0
-0
Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf
In reply to Ikey DohertyCCing maintainer.
Paolo
Quoted 72 lines · Ikey Doherty
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).
Signed-off-by Ikey Doherty <[email protected]>--- configure | 2 ++ qemu-bridge-helper.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-)configure +2
-0@@ -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" ; thenqemu-bridge-helper.c +9
-6@@ -47,7 +47,8 @@#include <cap-ng.h> #endif -#define DEFAULT_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf" +#define DEFAULT_ACL_FILE CONFIG_QEMU_DEFAULTDIR "/bridge.conf" +#define SITE_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf"enum {ACL_ALLOW =0 ,@@ -272,11 +273,13 @@ int main(int argc, char **argv)/* parse default acl file */ QSIMPLEQ_INIT (&acl_list); -if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { -fprintf (stderr,"failed to parse default acl file `%s'\n" , -DEFAULT_ACL_FILE ); - ret =EXIT_FAILURE ; - goto cleanup; +if (parse_acl_file (SITE_ACL_FILE , &acl_list) ==-1 ) { +if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { +fprintf (stderr,"failed to parse default acl file `%s'\n" , +DEFAULT_ACL_FILE ); + ret =EXIT_FAILURE ; + goto cleanup; + } }/* validate bridge against acl -- default policy is to deny
Re: [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf
In reply to Ikey DohertyOn 05/26/2015 06:54 AM, Ikey Doherty wrote:
[meta-comment]
Quoted 11 lines
The target-x86_64.conf sysconfig file has been empty and essentially ignored now for several years. This change removes the unused file to enable moving towards a stateless configuration.
Signed-off-by Ikey Doherty <[email protected]>--- Makefile | 7 +------ arch_init.c | 1 - sysconfigs/target/target-x86_64.conf | 0 3 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 sysconfigs/target/target-x86_64.conf
When sending a v3 patch, it's better to do it as a new top-level thread rather than in-reply-to an existing thread (several maintainers use scripting tools that only look for top-level threads, and skip patches that are buried deep within threads). Also, when sending more than one patch in a series, include a 0/2 cover letter for the patches.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Re: [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf
In reply to Paolo BonziniQuoted 10 lines · Paolo Bonzini
CCing maintainer.
Paolo
Quoted 5 lines · Ikey Doherty
The target-x86_64.conf sysconfig file has been empty and essentially ignored now for several years. This change removes the unused file to enable moving towards a stateless configuration.
Signed-off-by Ikey Doherty <[email protected]>
Can you separate this into two patches? First deleting the empty target-x86_64.conf file from the tree & Makefile, then another patch deleting the
{ CONFIG_QEMU_CONFDIR "/target-" TARGET_NAME ".conf", true }
line in arch_init.c?
We can delete sysconfigs/target/target-x86_64.conf from our source tree immediately, but I am not sure we should disable loading of /etc/qemu/target-*.conf with no warning (users may have their own target-*.conf files in their systems).
We should probably warn about it in the 2.4 release announcement, and remove the arch_init.c line in 2.5.
I would even go further and argue for removing /etc/qemu config file auto-loading entirely in QEMU 2.5 (including qemu.conf and target-*.conf).
Quoted 42 lines
Quoted 42 lines
--- Makefile | 7 +------ arch_init.c | 1 - sysconfigs/target/target-x86_64.conf | 0 3 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 sysconfigs/target/target-x86_64.confMakefile +1
-6@@ -389,13 +389,8 @@ ifneq (,$(findstring qemu-ga,$(TOOLS))) endif endif -install-confdir: - $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)" -install-sysconfig: install-datadir install-confdir - $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" - -install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \ +install: all $(if $(BUILD_DOCS),install-doc) \ install-datadir install-localstatedir ifneq ($(TOOLS),) $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))arch_init.c +0
-1@@ -136,7 +136,6 @@ static struct defconfig_file {bool userconfig; } default_config_files[] = { { CONFIG_QEMU_CONFDIR "/qemu.conf", true }, - { CONFIG_QEMU_CONFDIR "/target-" TARGET_NAME ".conf", true }, { NULL }, /* end of list */ };sysconfigs/target/target-x86_64.conf deleted +0
-0
Signature · 1 line
Eduardo
Re: [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf
Quoted 10 lines · Eduardo Habkost
Can you separate this into two patches? First deleting the empty target-x86_64.conf file from the tree &
Makefile, then another patch deleting the
{CONFIG_QEMU_CONFDIR"/target-"TARGET_NAME".conf", true }
line inarch_init.c?We can delete
sysconfigs/target/target-x86_64.conffrom our source tree immediately, but I am not sure we should disable loading of/etc/qemu/target-*.confwith no warning (users may have their own target-*.conf files in their systems).
What is the usecase? Was /etc/qemu/target-*.conf actually meant to be user-customizable when it hosted the CPU models?
Paolo
Quoted 6 lines
We should probably warn about it in the 2.4 release announcement, and remove the
arch_init.cline in 2.5.I would even go further and argue for removing
/etc/qemuconfig file auto-loading entirely in QEMU 2.5 (including qemu.conf and target-*.conf).
Re: [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf
In reply to Eduardo HabkostQuoted 10 lines · Eduardo Habkost
Quoted 9 lines · Paolo Bonzini
CCing maintainer.
Paolo
Quoted 4 lines · Ikey Doherty
The target-x86_64.conf sysconfig file has been empty and essentially ignored now for several years. This change removes the unused file to enable moving towards a stateless configuration.
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Signed-off-by Ikey Doherty <[email protected]>Can you separate this into two patches? First deleting the empty target-x86_64.conf file from the tree &
Makefile, then another patch deleting the
{CONFIG_QEMU_CONFDIR"/target-"TARGET_NAME".conf", true }
line inarch_init.c?
Ack. End of day here, will submit a fresh patch-set tomorrow drawing any further conversations had here into consideration.
Quoted 4 lines
We can delete
sysconfigs/target/target-x86_64.conffrom our source tree immediately, but I am not sure we should disable loading of/etc/qemu/target-*.confwith no warning (users may have their own target-*.conf files in their systems).
Sure.
Quoted 7 lines
We should probably warn about it in the 2.4 release announcement, and remove the
arch_init.cline in 2.5.I would even go further and argue for removing
/etc/qemuconfig file auto-loading entirely in QEMU 2.5 (including qemu.conf and target-*.conf).
If that's needed/agreed-upon by tomorrow I can add that too, as another patch.
-ikey
Quoted 44 lines
Quoted 43 lines
Quoted 43 lines
--- Makefile | 7 +------ arch_init.c | 1 - sysconfigs/target/target-x86_64.conf | 0 3 files changed, 1 insertion(+), 7 deletions(-)delete mode 100644
sysconfigs/target/target-x86_64.confMakefile +1
-6@@ -389,13 +389,8 @@ ifneq (,$(findstring qemu-ga,$(TOOLS))) endif endif -install-confdir: - $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)" -install-sysconfig: install-datadir install-confdir - $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" - -install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \ +install: all $(if $(BUILD_DOCS),install-doc) \ install-datadir install-localstatedir ifneq ($(TOOLS),) $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))arch_init.c +0
-1@@ -136,7 +136,6 @@ static struct defconfig_file {bool userconfig; } default_config_files[] = { { CONFIG_QEMU_CONFDIR "/qemu.conf", true }, - { CONFIG_QEMU_CONFDIR "/target-" TARGET_NAME ".conf", true }, { NULL }, /* end of list */ };sysconfigs/target/target-x86_64.conf deleted +0
-0
Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf
In reply to Ikey DohertyQuoted 18 lines · Ikey Doherty
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).
Signed-off-by Ikey Doherty <[email protected]>--- configure | 2 ++ qemu-bridge-helper.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-)
[...]
Quoted 13 lines
qemu-bridge-helper.c +2
-4-#define DEFAULT_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf" +#define DEFAULT_ACL_FILE CONFIG_QEMU_DEFAULTDIR "/bridge.conf" +#define SITE_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf"enum {ACL_ALLOW =0 ,@@ -272,11 +273,13 @@ int main(int argc, char **argv)/* parse default acl file */ QSIMPLEQ_INIT (&acl_list); -if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { -fprintf (stderr,"failed to parse default acl file `%s'\n" , -DEFAULT_ACL_FILE );
qemu-bridge-helper.c int main(int argc, char **argv) · line 283
Quoted 10 lines
qemu-bridge-helper.c +7
-2- ret =EXIT_FAILURE ; - goto cleanup; +if (parse_acl_file (SITE_ACL_FILE , &acl_list) ==-1 ) { +if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { +fprintf (stderr,"failed to parse default acl file `%s'\n" , +DEFAULT_ACL_FILE ); + ret =EXIT_FAILURE ; + goto cleanup; + } }
This will make syntax errors on SITE_ACL_FILE cause partial loading of the rules on SITE_ACL_FILE, and trigger loading of DEFAULT_ACL_FILE, instead of aborting bridge-helper.
Wouldn't it be better to fallback to DEFAULT_ACL_FILE if and only if SITE_ACL_FILE is missing?
Signature · 1 line
Eduardo
Re: [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf
In reply to Paolo BonziniQuoted 9 lines · Paolo Bonzini
Quoted 6 lines · Eduardo Habkost
Can you separate this into two patches? First deleting the empty target-x86_64.conf file from the tree &
Makefile, then another patch deleting the
{CONFIG_QEMU_CONFDIR"/target-"TARGET_NAME".conf", true }
line inarch_init.c?
Quoted 7 lines
Quoted 4 lines
We can delete
sysconfigs/target/target-x86_64.conffrom our source tree immediately, but I am not sure we should disable loading of/etc/qemu/target-*.confwith no warning (users may have their own target-*.conf files in their systems).What is the usecase? Was
/etc/qemu/target-*.confactually meant to be user-customizable when it hosted the CPU models?
I don't know what's the use case, that's why I think we should really remove it. I only want to warn users before removing it, because I don't know if people are using it for anything else.
Signature · 1 line
Eduardo
Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf
In reply to Eduardo HabkostQuoted 48 lines · Eduardo Habkost
Quoted 18 lines · Ikey Doherty
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).
Signed-off-by Ikey Doherty <[email protected]>--- configure | 2 ++ qemu-bridge-helper.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-)[...]
Quoted 13 lines
qemu-bridge-helper.c +2
-4-#define DEFAULT_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf" +#define DEFAULT_ACL_FILE CONFIG_QEMU_DEFAULTDIR "/bridge.conf" +#define SITE_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf"enum {ACL_ALLOW =0 ,@@ -272,11 +273,13 @@ int main(int argc, char **argv)/* parse default acl file */ QSIMPLEQ_INIT (&acl_list); -if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { -fprintf (stderr,"failed to parse default acl file `%s'\n" , -DEFAULT_ACL_FILE );qemu-bridge-helper.c int main(int argc, char **argv) · line 283
Quoted 10 lines
qemu-bridge-helper.c +7
-2- ret =EXIT_FAILURE ; - goto cleanup; +if (parse_acl_file (SITE_ACL_FILE , &acl_list) ==-1 ) { +if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { +fprintf (stderr,"failed to parse default acl file `%s'\n" , +DEFAULT_ACL_FILE ); + ret =EXIT_FAILURE ; + goto cleanup; + } }This will make syntax errors on
SITE_ACL_FILEcause partial loading of the rules onSITE_ACL_FILE, and trigger loading ofDEFAULT_ACL_FILE, instead of aborting bridge-helper.
Quoted 3 lines
Wouldn't it be better to fallback to
DEFAULT_ACL_FILEif and only ifSITE_ACL_FILEis missing?
I could stat the file and fallback to default, and only parse_acl_file the one that exists. Better?
Signature · 3 lines
Clear Linux Project for Intel Architecture Intel Open Source Technology Center http://www.clearlinux.org
Re: [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf
In reply to Eduardo HabkostQuoted 6 lines · Eduardo Habkost
Quoted 2 lines
What is the usecase? Was
/etc/qemu/target-*.confactually meant to be user-customizable when it hosted the CPU models?I don't know what's the use case, that's why I think we should really remove it. I only want to warn users before removing it, because I don't know if people are using it for anything else.
There are definitely usecases for qemu.conf (iqn/username/password tuples for libiscsi, globally disabling KSM or memory dumps, globally enabling timestamps). Not that anyone's using it, but I would leave it alone.
However, I don't think target-x86_64.conf would be missed, and it's traditionally been something that is "owned by the package" (because the CPU models were there) so we should be able to treat it as private.
Paolo
Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf
In reply to Ikey DohertyQuoted 49 lines · Ikey Doherty
Quoted 48 lines · Eduardo Habkost
Quoted 18 lines · Ikey Doherty
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).
Signed-off-by Ikey Doherty <[email protected]>--- configure | 2 ++ qemu-bridge-helper.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-)[...]
Quoted 13 lines
qemu-bridge-helper.c +2
-4-#define DEFAULT_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf" +#define DEFAULT_ACL_FILE CONFIG_QEMU_DEFAULTDIR "/bridge.conf" +#define SITE_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf"enum {ACL_ALLOW =0 ,@@ -272,11 +273,13 @@ int main(int argc, char **argv)/* parse default acl file */ QSIMPLEQ_INIT (&acl_list); -if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { -fprintf (stderr,"failed to parse default acl file `%s'\n" , -DEFAULT_ACL_FILE );qemu-bridge-helper.c int main(int argc, char **argv) · line 283
Quoted 10 lines
qemu-bridge-helper.c +7
-2- ret =EXIT_FAILURE ; - goto cleanup; +if (parse_acl_file (SITE_ACL_FILE , &acl_list) ==-1 ) { +if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { +fprintf (stderr,"failed to parse default acl file `%s'\n" , +DEFAULT_ACL_FILE ); + ret =EXIT_FAILURE ; + goto cleanup; + } }This will make syntax errors on
SITE_ACL_FILEcause partial loading of the rules onSITE_ACL_FILE, and trigger loading ofDEFAULT_ACL_FILE, instead of aborting bridge-helper.
Quoted 6 lines
Quoted 3 lines
Wouldn't it be better to fallback to
DEFAULT_ACL_FILEif and only ifSITE_ACL_FILEis missing?I could stat the file and fallback to default, and only
parse_acl_filethe one that exists. Better?
Or you could simply call parse_acl_file(DEFAULT_ACL_FILE) only if parse_acl_file(SITE_ACL_FILE) set errno=ENOENT.
Signature · 1 line
Eduardo
Re: [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf
In reply to Paolo BonziniQuoted 10 lines · Paolo Bonzini
Quoted 6 lines · Eduardo Habkost
Quoted 2 lines
What is the usecase? Was
/etc/qemu/target-*.confactually meant to be user-customizable when it hosted the CPU models?I don't know what's the use case, that's why I think we should really remove it. I only want to warn users before removing it, because I don't know if people are using it for anything else.
Quoted 8 lines
There are definitely usecases for qemu.conf (iqn/username/password tuples for libiscsi, globally disabling KSM or memory dumps, globally enabling timestamps). Not that anyone's using it, but I would leave it alone.
However, I don't think target-x86_64.conf would be missed, and it's traditionally been something that is "owned by the package" (because the CPU models were there) so we should be able to treat it as private.
You convinced me. We can apply this patch and if we change our minds before 2.4.0 we can easily revert just the one-line arch_init.c. So there's no need to split this patch in two, anymore.
Signature · 1 line
Eduardo
Re: [Qemu-devel] [PATCH v3 1/2] arch_init: Drop target-x86_64.conf
In reply to Ikey DohertyQuoted 5 lines · Ikey Doherty
The target-x86_64.conf sysconfig file has been empty and essentially ignored now for several years. This change removes the unused file to enable moving towards a stateless configuration.
Signed-off-by Ikey Doherty <[email protected]>
I am queueing it in the x86 tree. Thanks!
Quoted 45 lines
--- Makefile | 7 +------ arch_init.c | 1 - sysconfigs/target/target-x86_64.conf | 0 3 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 sysconfigs/target/target-x86_64.confMakefile +1
-6@@ -389,13 +389,8 @@ ifneq (,$(findstring qemu-ga,$(TOOLS))) endif endif -install-confdir: - $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)" -install-sysconfig: install-datadir install-confdir - $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" - -install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \ +install: all $(if $(BUILD_DOCS),install-doc) \ install-datadir install-localstatedir ifneq ($(TOOLS),) $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))arch_init.c +0
-1@@ -136,7 +136,6 @@ static struct defconfig_file {bool userconfig; } default_config_files[] = { { CONFIG_QEMU_CONFDIR "/qemu.conf", true }, - { CONFIG_QEMU_CONFDIR "/target-" TARGET_NAME ".conf", true }, { NULL }, /* end of list */ };sysconfigs/target/target-x86_64.conf deleted +0
-0Signature · 1 line
1.9.1
Signature · 1 line
Eduardo
Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf
In reply to Ikey DohertyQuoted 31 lines · Ikey Doherty
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).
Signed-off-by Ikey Doherty <[email protected]>--- configure | 2 ++ qemu-bridge-helper.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-)configure +1
-0@@ -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=""
configure echo "mandir=$mandir" >> $config_host_mak · line 4550
Quoted 7 lines
configure +1
-0@@ -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
Changes to ./configure would make a nice separate commit where you can explain the file layout for stateless configuration.
That way it's also easier to cherry-pick or revert the ./configure change without bringing in the qemu-bridge-helper.c change.
Re: [Qemu-devel] [PATCH v3 2/2] qemu-bridge-helper: Use stateless configuration for bridge.conf
In reply to Eduardo HabkostQuoted 54 lines · Eduardo Habkost
Quoted 53 lines · Ikey Doherty
Quoted 51 lines · Eduardo Habkost
Quoted 18 lines · Ikey Doherty
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).
Signed-off-by Ikey Doherty <[email protected]>--- configure | 2 ++ qemu-bridge-helper.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-)[...]
Quoted 13 lines
qemu-bridge-helper.c +2
-4-#define DEFAULT_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf" +#define DEFAULT_ACL_FILE CONFIG_QEMU_DEFAULTDIR "/bridge.conf" +#define SITE_ACL_FILE CONFIG_QEMU_CONFDIR "/bridge.conf"enum {ACL_ALLOW =0 ,@@ -272,11 +273,13 @@ int main(int argc, char **argv)/* parse default acl file */ QSIMPLEQ_INIT (&acl_list); -if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { -fprintf (stderr,"failed to parse default acl file `%s'\n" , -DEFAULT_ACL_FILE );qemu-bridge-helper.c int main(int argc, char **argv) · line 283
Quoted 10 lines
qemu-bridge-helper.c +7
-2- ret =EXIT_FAILURE ; - goto cleanup; +if (parse_acl_file (SITE_ACL_FILE , &acl_list) ==-1 ) { +if (parse_acl_file (DEFAULT_ACL_FILE , &acl_list) ==-1 ) { +fprintf (stderr,"failed to parse default acl file `%s'\n" , +DEFAULT_ACL_FILE ); + ret =EXIT_FAILURE ; + goto cleanup; + } }This will make syntax errors on
SITE_ACL_FILEcause partial loading of the rules onSITE_ACL_FILE, and trigger loading ofDEFAULT_ACL_FILE, instead of aborting bridge-helper.Wouldn't it be better to fallback to
DEFAULT_ACL_FILEif and only ifSITE_ACL_FILEis missing?
Quoted 5 lines
Quoted 2 lines
I could stat the file and fallback to default, and only
parse_acl_filethe one that exists. Better?Or you could simply call
parse_acl_file(DEFAULT_ACL_FILE)only ifparse_acl_file(SITE_ACL_FILE)set errno=ENOENT.
Yes, please.
Stefan