xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [Xen-devel] [RESEND v1 0/8] tools, doc and stubdom fixes
@ 2019-09-24 14:03 Olaf Hering
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 1/8] stubdom/vtpm: include stdio.h for declaration of printf Olaf Hering
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Olaf Hering @ 2019-09-24 14:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering

Resending due to lack of responses.

Olaf

Olaf Hering (8):
  stubdom/vtpm: include stdio.h for declaration of printf
  tools: move scripts from etc to libexec
  Use XEN_SCRIPT_DIR to refer to /etc/xen/scripts
  Remove tools/examples/README.incompatibilities
  tools: remove empty xl.conf
  Remove tools/examples/cpupool
  docs: substitute XEN_CONFIG_DIR in xl.conf.5
  docs: remove stale create example from xl.1

 .gitignore                                         |  3 ++
 docs/configure.ac                                  |  3 ++
 ...ration.5.pod => xl-disk-configuration.5.pod.in} |  2 +-
 ...ion.5.pod => xl-network-configuration.5.pod.in} |  4 +-
 docs/man/xl.1.pod.in                               | 11 +-----
 docs/man/{xl.conf.5.pod => xl.conf.5.pod.in}       |  8 ++--
 docs/misc/block-scripts.txt                        |  2 +-
 m4/paths.m4                                        |  2 +-
 stubdom/vtpm/vtpmblk.c                             |  1 +
 tools/examples/Makefile                            |  3 --
 tools/examples/README                              |  2 -
 tools/examples/README.incompatibilities            | 38 -------------------
 tools/examples/cpupool                             | 17 ---------
 tools/examples/xl.conf                             | 44 ----------------------
 tools/xl/xl_cmdtable.c                             |  2 +-
 15 files changed, 19 insertions(+), 123 deletions(-)
 rename docs/man/{xl-disk-configuration.5.pod => xl-disk-configuration.5.pod.in} (99%)
 rename docs/man/{xl-network-configuration.5.pod => xl-network-configuration.5.pod.in} (98%)
 rename docs/man/{xl.conf.5.pod => xl.conf.5.pod.in} (96%)
 delete mode 100644 tools/examples/README.incompatibilities
 delete mode 100644 tools/examples/cpupool
 delete mode 100644 tools/examples/xl.conf


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Xen-devel] [PATCH RESEND v1 1/8] stubdom/vtpm: include stdio.h for declaration of printf
  2019-09-24 14:03 [Xen-devel] [RESEND v1 0/8] tools, doc and stubdom fixes Olaf Hering
@ 2019-09-24 14:03 ` Olaf Hering
  2019-09-27 21:27   ` Daniel De Graaf
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec Olaf Hering
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Olaf Hering @ 2019-09-24 14:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Samuel Thibault, Olaf Hering, Quan Xu, Daniel De Graaf

The function read_vtpmblk uses printf(3), but stdio.h is not included
in this file. This results in a warning from gcc-7:

vtpmblk.c: In function 'read_vtpmblk':
vtpmblk.c:322:7: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
       printf("Expected: ");
vtpmblk.c:322:7: warning: incompatible implicit declaration of built-in function 'printf'
vtpmblk.c:322:7: note: include '<stdio.h>' or provide a declaration of 'printf'

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 stubdom/vtpm/vtpmblk.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/stubdom/vtpm/vtpmblk.c b/stubdom/vtpm/vtpmblk.c
index fe529ab5ac..681f0c01b6 100644
--- a/stubdom/vtpm/vtpmblk.c
+++ b/stubdom/vtpm/vtpmblk.c
@@ -20,6 +20,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <stdio.h>
 
 /*Encryption key and block sizes */
 #define BLKSZ 16

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
  2019-09-24 14:03 [Xen-devel] [RESEND v1 0/8] tools, doc and stubdom fixes Olaf Hering
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 1/8] stubdom/vtpm: include stdio.h for declaration of printf Olaf Hering
@ 2019-09-24 14:03 ` Olaf Hering
  2019-09-24 14:09   ` Ian Jackson
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 3/8] Use XEN_SCRIPT_DIR to refer to /etc/xen/scripts Olaf Hering
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Olaf Hering @ 2019-09-24 14:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering, Ian Jackson, Wei Liu

In the near future all fresh installations will have an empty /etc.
The content of this directory will not be controlled by the package
manager anymore. One of the reasons for this move is to make snapshots
more robust.

As a first step into this direction, move the hotplug scripts to libexec
because they are not exactly configuration.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 m4/paths.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/paths.m4 b/m4/paths.m4
index 89d3bb8312..0ccc92d0ff 100644
--- a/m4/paths.m4
+++ b/m4/paths.m4
@@ -137,7 +137,7 @@ AC_SUBST(INITD_DIR)
 XEN_CONFIG_DIR=$CONFIG_DIR/xen
 AC_SUBST(XEN_CONFIG_DIR)
 
-XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts
+XEN_SCRIPT_DIR=${LIBEXEC}/scripts
 AC_SUBST(XEN_SCRIPT_DIR)
 
 case "$host_os" in

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Xen-devel] [PATCH RESEND v1 3/8] Use XEN_SCRIPT_DIR to refer to /etc/xen/scripts
  2019-09-24 14:03 [Xen-devel] [RESEND v1 0/8] tools, doc and stubdom fixes Olaf Hering
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 1/8] stubdom/vtpm: include stdio.h for declaration of printf Olaf Hering
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec Olaf Hering
@ 2019-09-24 14:03 ` Olaf Hering
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 4/8] Remove tools/examples/README.incompatibilities Olaf Hering
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Olaf Hering @ 2019-09-24 14:03 UTC (permalink / raw)
  To: xen-devel
  Cc: Olaf Hering, Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
	Julien Grall, Jan Beulich

Now that scripts are stored in libexec, replace all hardcoded paths to
use XEN_SCRIPT_DIR to expand the actual location.

Update .gitignore.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 .gitignore                                                          | 3 +++
 docs/configure.ac                                                   | 3 +++
 .../{xl-disk-configuration.5.pod => xl-disk-configuration.5.pod.in} | 2 +-
 ...etwork-configuration.5.pod => xl-network-configuration.5.pod.in} | 4 ++--
 docs/man/xl.1.pod.in                                                | 2 +-
 docs/man/{xl.conf.5.pod => xl.conf.5.pod.in}                        | 6 +++---
 docs/misc/block-scripts.txt                                         | 2 +-
 tools/xl/xl_cmdtable.c                                              | 2 +-
 8 files changed, 15 insertions(+), 9 deletions(-)
 rename docs/man/{xl-disk-configuration.5.pod => xl-disk-configuration.5.pod.in} (99%)
 rename docs/man/{xl-network-configuration.5.pod => xl-network-configuration.5.pod.in} (98%)
 rename docs/man/{xl.conf.5.pod => xl.conf.5.pod.in} (97%)

diff --git a/.gitignore b/.gitignore
index 3ada0c4f0b..5aa4201d34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,7 +47,10 @@ dist/*
 docs/tmp.*
 docs/html/
 docs/man/xl.cfg.5.pod
+docs/man/xl-disk-configuration.5.pod
+docs/man/xl-network-configuration.5.pod
 docs/man/xl.1.pod
+docs/man/xl.conf.5.pod
 docs/man1/
 docs/man5/
 docs/man7/
diff --git a/docs/configure.ac b/docs/configure.ac
index e795bec04c..169480da6c 100644
--- a/docs/configure.ac
+++ b/docs/configure.ac
@@ -9,6 +9,9 @@ AC_CONFIG_FILES([
 ../config/Docs.mk
 man/xl.cfg.5.pod
 man/xl.1.pod
+man/xl-disk-configuration.5.pod
+man/xl-network-configuration.5.pod
+man/xl.conf.5.pod
 ])
 AC_CONFIG_AUX_DIR([../])
 
diff --git a/docs/man/xl-disk-configuration.5.pod b/docs/man/xl-disk-configuration.5.pod.in
similarity index 99%
rename from docs/man/xl-disk-configuration.5.pod
rename to docs/man/xl-disk-configuration.5.pod.in
index 7965d5dd73..95c23b4a92 100644
--- a/docs/man/xl-disk-configuration.5.pod
+++ b/docs/man/xl-disk-configuration.5.pod.in
@@ -257,7 +257,7 @@ automatically determine the most suitable backend.
 
 Specifies that B<target> is not a normal host path, but rather
 information to be interpreted by the executable program I<SCRIPT>,
-(looked for in F</etc/xen/scripts>, if it doesn't contain a slash).
+(looked for in F<@XEN_SCRIPT_DIR@>, if it doesn't contain a slash).
 
 These scripts are normally called "block-I<SCRIPT>".
 
diff --git a/docs/man/xl-network-configuration.5.pod b/docs/man/xl-network-configuration.5.pod.in
similarity index 98%
rename from docs/man/xl-network-configuration.5.pod
rename to docs/man/xl-network-configuration.5.pod.in
index e9ac3c5b9e..c3467c6e76 100644
--- a/docs/man/xl-network-configuration.5.pod
+++ b/docs/man/xl-network-configuration.5.pod.in
@@ -169,8 +169,8 @@ number. Likewise the default tap name is C<vifDOMID.DEVID-emu>.
 
 Specifies the hotplug script to run to configure this device (e.g. to
 add it to the relevant bridge). Defaults to
-C<XEN_SCRIPT_DIR/vif-bridge> but can be set to any script. Some example
-scripts are installed in C<XEN_SCRIPT_DIR>.
+C<@XEN_SCRIPT_DIR@/vif-bridge> but can be set to any script. Some example
+scripts are installed in C<@XEN_SCRIPT_DIR@>.
 
 
 =head2 ip
diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in
index 2f7375ed0a..3d64eaa5b2 100644
--- a/docs/man/xl.1.pod.in
+++ b/docs/man/xl.1.pod.in
@@ -571,7 +571,7 @@ See the corresponding option of the I<create> subcommand.
 =item B<-N> I<netbufscript>
 
 Use <netbufscript> to setup network buffering instead of the
-default script (/etc/xen/scripts/remus-netbuf-setup).
+default script (@XEN_SCRIPT_DIR@/remus-netbuf-setup).
 
 =item B<-F>
 
diff --git a/docs/man/xl.conf.5.pod b/docs/man/xl.conf.5.pod.in
similarity index 97%
rename from docs/man/xl.conf.5.pod
rename to docs/man/xl.conf.5.pod.in
index b1bde7d657..2beb2119a8 100644
--- a/docs/man/xl.conf.5.pod
+++ b/docs/man/xl.conf.5.pod.in
@@ -95,7 +95,7 @@ Configures the default hotplug script used by virtual network devices.
 
 The old B<vifscript> option is deprecated and should not be used.
 
-Default: C</etc/xen/scripts/vif-bridge>
+Default: C<@XEN_SCRIPT_DIR@/vif-bridge>
 
 =item B<vif.default.bridge="NAME">
 
@@ -121,13 +121,13 @@ Default: C<None>
 
 Configures the default script used by Remus to setup network buffering.
 
-Default: C</etc/xen/scripts/remus-netbuf-setup>
+Default: C<@XEN_SCRIPT_DIR@/remus-netbuf-setup>
 
 =item B<colo.default.proxyscript="PATH">
 
 Configures the default script used by COLO to setup colo-proxy.
 
-Default: C</etc/xen/scripts/colo-proxy-setup>
+Default: C<@XEN_SCRIPT_DIR@/colo-proxy-setup>
 
 =item B<output_format="json|sxp">
 
diff --git a/docs/misc/block-scripts.txt b/docs/misc/block-scripts.txt
index eabab100a8..8020787a52 100644
--- a/docs/misc/block-scripts.txt
+++ b/docs/misc/block-scripts.txt
@@ -18,7 +18,7 @@ Setup
 
 It is highly recommended that custom hotplug scripts as much as
 possible include and use the common Xen functionality.  If the script
-is run from the normal block script location (/etc/xen/scripts by
+is run from the normal block script location (/usr/lib/xen/scripts by
 default), then this can be done by adding the following to the top of
 the script:
 
diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c
index 5baa6023aa..21620222cd 100644
--- a/tools/xl/xl_cmdtable.c
+++ b/tools/xl/xl_cmdtable.c
@@ -518,7 +518,7 @@ struct cmd_spec cmd_table[] = {
       "-e                      Do not wait in the background (on <host>) for the death\n"
       "                        of the domain.\n"
       "-N <netbufscript>       Use netbufscript to setup network buffering instead of the\n"
-      "                        default script (/etc/xen/scripts/remus-netbuf-setup).\n"
+      "                        default script (" XEN_SCRIPT_DIR "/remus-netbuf-setup).\n"
       "-F                      Enable unsafe configurations [-b|-n|-d flags]. Use this option\n"
       "                        with caution as failover may not work as intended.\n"
       "-b                      Replicate memory checkpoints to /dev/null (blackhole).\n"

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Xen-devel] [PATCH RESEND v1 4/8] Remove tools/examples/README.incompatibilities
  2019-09-24 14:03 [Xen-devel] [RESEND v1 0/8] tools, doc and stubdom fixes Olaf Hering
                   ` (2 preceding siblings ...)
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 3/8] Use XEN_SCRIPT_DIR to refer to /etc/xen/scripts Olaf Hering
@ 2019-09-24 14:03 ` Olaf Hering
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 5/8] tools: remove empty xl.conf Olaf Hering
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Olaf Hering @ 2019-09-24 14:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering, Ian Jackson, Wei Liu

The referenced versions can not run staging anymore since a while.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 tools/examples/Makefile                 |  1 -
 tools/examples/README.incompatibilities | 38 ---------------------------------
 2 files changed, 39 deletions(-)
 delete mode 100644 tools/examples/README.incompatibilities

diff --git a/tools/examples/Makefile b/tools/examples/Makefile
index f86ed3a271..2a6c5444d4 100644
--- a/tools/examples/Makefile
+++ b/tools/examples/Makefile
@@ -3,7 +3,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 # Xen configuration dir and configs to go there.
 XEN_READMES = README
-XEN_READMES += README.incompatibilities
 
 XEN_CONFIGS += xlexample.hvm
 XEN_CONFIGS += xlexample.pvlinux
diff --git a/tools/examples/README.incompatibilities b/tools/examples/README.incompatibilities
deleted file mode 100644
index bb067bd419..0000000000
--- a/tools/examples/README.incompatibilities
+++ /dev/null
@@ -1,38 +0,0 @@
-Command Incompatibilities
-=========================
-
-Known incompatibilities with various commands on various distributions, and
-the workarounds we use.
-
-
-brctl
------
-
-brctl show <bridge> fails on SLES9 SP2.  Workaround is to use brctl show
-without arguments, and grep, though this would be difficult were you to need
-to check for a specific bridge-interface pair, since brctl does not show the 
-bridge name on every line.
-
-
-ifup / ifdown
--------------
-
-SuSE requires an extra parameter to ifup, which is created by calling getcfg
-appropriately.  See xen-network-common.sh for details.
-
-Gentoo doesn't have ifup/ifdown; appropriate alternatives are defined in
-xen-network-common.sh.
-
-
-ip
---
-
-Newer ip commands (from iproute2) do not accept the abbreviated syntax "ip r a
-..." etc.  "ip route add ..." must be used instead.
-
-
-sed
----
-
-\s is not supported in regexps on Debian etch (sed 4.1.2), Ubuntu 4.10.  We
-hand-craft character classes instead.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Xen-devel] [PATCH RESEND v1 5/8] tools: remove empty xl.conf
  2019-09-24 14:03 [Xen-devel] [RESEND v1 0/8] tools, doc and stubdom fixes Olaf Hering
                   ` (3 preceding siblings ...)
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 4/8] Remove tools/examples/README.incompatibilities Olaf Hering
@ 2019-09-24 14:03 ` Olaf Hering
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 6/8] Remove tools/examples/cpupool Olaf Hering
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 16+ messages in thread
From: Olaf Hering @ 2019-09-24 14:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering, Ian Jackson, Wei Liu

In the near future all fresh installations will have an empty /etc.
The content of this directory will not be controlled by the package
manager anymore. One of the reasons for this move is to make snapshots
more robust.

Installing empty configuration files is not helpful for an empty /etc
directory. The expected values are all described in xl.conf(5). There is
no need to duplicate this info into another file.

If the local admin really needs to tweak the defaults he will be able to
create this file with the desired content.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Dario Faggioli <dfaggioli@suse.com>
---
 tools/examples/Makefile |  1 -
 tools/examples/README   |  1 -
 tools/examples/xl.conf  | 44 --------------------------------------------
 3 files changed, 46 deletions(-)
 delete mode 100644 tools/examples/xl.conf

diff --git a/tools/examples/Makefile b/tools/examples/Makefile
index 2a6c5444d4..147ea590ef 100644
--- a/tools/examples/Makefile
+++ b/tools/examples/Makefile
@@ -6,7 +6,6 @@ XEN_READMES = README
 
 XEN_CONFIGS += xlexample.hvm
 XEN_CONFIGS += xlexample.pvlinux
-XEN_CONFIGS += xl.conf
 XEN_CONFIGS += cpupool
 
 XEN_CONFIGS += $(XEN_CONFIGS-y)
diff --git a/tools/examples/README b/tools/examples/README
index c3f24d59fa..48ace82189 100644
--- a/tools/examples/README
+++ b/tools/examples/README
@@ -26,7 +26,6 @@ xen-hotplug-common.sh - sourced by vif-common.sh
 xen-network-common.sh - sourced by vif-common.sh
 xen-script-common.sh  - sourced by xen-hotplug-common.sh
 oxenstored.conf     - configuration file for oxenstored
-xl.conf             - configuration file for xl
 xlexample.hvm       - a configuration script for creating a hvm domain with
                       'xl create'
 xlexample.pvlinux   - a configuration script for creating a pv domain with
diff --git a/tools/examples/xl.conf b/tools/examples/xl.conf
deleted file mode 100644
index 0446deb304..0000000000
--- a/tools/examples/xl.conf
+++ /dev/null
@@ -1,44 +0,0 @@
-## Global XL config file ##
-
-# Control whether dom0 is ballooned down when xen doesn't have enough
-# free memory to create a domain.  "auto" means only balloon if dom0
-# starts with all the host's memory.
-#autoballoon="auto"
-
-# full path of the lockfile used by xl during domain creation
-#lockfile="/var/lock/xl"
-
-# default output format used by "xl list -l"
-#output_format="json"
-
-# first block device to be used for temporary VM disk mounts
-#blkdev_start="xvda"
-
-# default option to run hotplug scripts from xl
-# if disabled the old behaviour will be used, and hotplug scripts will be
-# launched by udev.
-#run_hotplug_scripts=1
-
-# default backend domain to connect guest vifs to.  This can be any
-# valid domain identifier.
-#vif.default.backend="0"
-
-# default gateway device to use with vif-route hotplug script
-#vif.default.gatewaydev="eth0"
-
-# default vif script to use if none is specified in the guest config
-#vif.default.script="vif-bridge"
-
-# default bridge device to use with vif-bridge hotplug scripts
-#vif.default.bridge="xenbr0"
-
-# Reserve a claim of memory when launching a guest. This guarantees immediate
-# feedback whether the guest can be launched due to memory exhaustion
-# (which can take a long time to find out if launching huge guests).
-# see xl.conf(5) for details.
-#claim_mode=1
-
-# Specify global vcpu hard affinity masks. See xl.conf(5) for details.
-#vm.cpumask="0-7"
-#vm.pv.cpumask="0-3"
-#vm.hvm.cpumask="3-7"

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Xen-devel] [PATCH RESEND v1 6/8] Remove tools/examples/cpupool
  2019-09-24 14:03 [Xen-devel] [RESEND v1 0/8] tools, doc and stubdom fixes Olaf Hering
                   ` (4 preceding siblings ...)
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 5/8] tools: remove empty xl.conf Olaf Hering
@ 2019-09-24 14:03 ` Olaf Hering
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 7/8] docs: substitute XEN_CONFIG_DIR in xl.conf.5 Olaf Hering
  2019-09-24 14:03 ` [Xen-devel] [PATCH v1 8/8] docs: remove stale create example from xl.1 Olaf Hering
  7 siblings, 0 replies; 16+ messages in thread
From: Olaf Hering @ 2019-09-24 14:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering, Ian Jackson, Wei Liu

In the near future all fresh installations will have an empty /etc.
The content of this directory will not be controlled by the package
manager anymore. One of the reasons for this move is to make snapshots
more robust.

Installing empty configuration files is not helpful for an empty /etc
directory. The expected values are all described in xlcpupool.cfg(5).
There is no need to duplicate this info into another file.
The need for a dedicated file is also described in xl(1) cpupool-create.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 tools/examples/Makefile |  1 -
 tools/examples/README   |  1 -
 tools/examples/cpupool  | 17 -----------------
 3 files changed, 19 deletions(-)
 delete mode 100644 tools/examples/cpupool

diff --git a/tools/examples/Makefile b/tools/examples/Makefile
index 147ea590ef..64b2330b03 100644
--- a/tools/examples/Makefile
+++ b/tools/examples/Makefile
@@ -6,7 +6,6 @@ XEN_READMES = README
 
 XEN_CONFIGS += xlexample.hvm
 XEN_CONFIGS += xlexample.pvlinux
-XEN_CONFIGS += cpupool
 
 XEN_CONFIGS += $(XEN_CONFIGS-y)
 
diff --git a/tools/examples/README b/tools/examples/README
index 48ace82189..d134945eb7 100644
--- a/tools/examples/README
+++ b/tools/examples/README
@@ -13,7 +13,6 @@ block               - called by xen-backend.agent to bind/unbind dev
 block-common.sh     - sourced by block, block-*
 block-enbd          - binds/unbinds network block devices
 block-nbd           - binds/unbinds network block devices
-cpupool             - example configuration script for 'xl cpupool-create'
 external-device-migrate - called by xend for migrating external devices
 locking.sh          - locking functions to prevent concurrent access to
                       critical sections inside script files
diff --git a/tools/examples/cpupool b/tools/examples/cpupool
deleted file mode 100644
index 35e229e462..0000000000
--- a/tools/examples/cpupool
+++ /dev/null
@@ -1,17 +0,0 @@
-#============================================================================
-# Configuration setup for 'xm cpupool-create' or 'xl cpupool-create'.
-# This script sets the parameters used when a cpupool is created using
-# 'xm cpupool-create' or 'xl cpupool-create'.
-# You use a separate script for each cpupool you want to create, or 
-# you can set the parameters for the cpupool on the xm command line.
-#============================================================================
-
-# the name of the new cpupool
-name = "Example-Cpupool"
-
-# the scheduler to use: valid are e.g. credit, credit2 and rtds
-sched = "credit"
-
-# list of cpus to use
-cpus = ["2", "3"]
-

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Xen-devel] [PATCH RESEND v1 7/8] docs: substitute XEN_CONFIG_DIR in xl.conf.5
  2019-09-24 14:03 [Xen-devel] [RESEND v1 0/8] tools, doc and stubdom fixes Olaf Hering
                   ` (5 preceding siblings ...)
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 6/8] Remove tools/examples/cpupool Olaf Hering
@ 2019-09-24 14:03 ` Olaf Hering
  2019-09-24 14:03 ` [Xen-devel] [PATCH v1 8/8] docs: remove stale create example from xl.1 Olaf Hering
  7 siblings, 0 replies; 16+ messages in thread
From: Olaf Hering @ 2019-09-24 14:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering, Ian Jackson, Wei Liu

xl(1) opens xl.conf in XEN_CONFIG_DIR.
Substitute this variable also in the man page.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
---
 docs/man/xl.1.pod.in      | 2 +-
 docs/man/xl.conf.5.pod.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in
index 3d64eaa5b2..fb17153635 100644
--- a/docs/man/xl.1.pod.in
+++ b/docs/man/xl.1.pod.in
@@ -50,7 +50,7 @@ setup the bridge.
 
 If you specify the amount of memory dom0 has, passing B<dom0_mem> to
 Xen, it is highly recommended to disable B<autoballoon>. Edit
-B</etc/xen/xl.conf> and set it to 0.
+B<@XEN_CONFIG_DIR@/xl.conf> and set it to 0.
 
 =item run xl as B<root>
 
diff --git a/docs/man/xl.conf.5.pod.in b/docs/man/xl.conf.5.pod.in
index 2beb2119a8..7b13159476 100644
--- a/docs/man/xl.conf.5.pod.in
+++ b/docs/man/xl.conf.5.pod.in
@@ -1,6 +1,6 @@
 =head1 NAME
 
-/etc/xen/xl.conf - XL Global/Host Configuration 
+@XEN_CONFIG_DIR@/xl.conf - XL Global/Host Configuration
 
 =head1 DESCRIPTION
 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Xen-devel] [PATCH v1 8/8] docs: remove stale create example from xl.1
  2019-09-24 14:03 [Xen-devel] [RESEND v1 0/8] tools, doc and stubdom fixes Olaf Hering
                   ` (6 preceding siblings ...)
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 7/8] docs: substitute XEN_CONFIG_DIR in xl.conf.5 Olaf Hering
@ 2019-09-24 14:03 ` Olaf Hering
  7 siblings, 0 replies; 16+ messages in thread
From: Olaf Hering @ 2019-09-24 14:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering, Ian Jackson, Wei Liu

Maybe xm create had a feature to create a domU based on a configuration
file. xl create requires the '-f' option to refer to a file.
There is no code to look into XEN_CONFIG_DIR, so remove the example.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 docs/man/xl.1.pod.in | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/docs/man/xl.1.pod.in b/docs/man/xl.1.pod.in
index fb17153635..aa92da2d27 100644
--- a/docs/man/xl.1.pod.in
+++ b/docs/man/xl.1.pod.in
@@ -171,13 +171,6 @@ B<EXAMPLES>
 
 =over 4
 
-=item I<with config file>
-
-  xl create DebianLenny
-
-This creates a domain with the file /etc/xen/DebianLenny, and returns as
-soon as it is run.
-
 =item I<with extra parameters>
 
   xl create hvm.cfg 'cpus="0-3"; pci=["01:05.1","01:05.2"]'

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec Olaf Hering
@ 2019-09-24 14:09   ` Ian Jackson
  2019-09-24 14:15     ` Olaf Hering
  2019-09-24 14:17     ` Ian Jackson
  0 siblings, 2 replies; 16+ messages in thread
From: Ian Jackson @ 2019-09-24 14:09 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel, Wei Liu

Olaf Hering writes ("[PATCH RESEND v1 2/8] tools: move scripts from etc to libexec"):
> In the near future all fresh installations will have an empty /etc.

Err, no ?

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
  2019-09-24 14:09   ` Ian Jackson
@ 2019-09-24 14:15     ` Olaf Hering
  2019-09-24 14:17     ` Ian Jackson
  1 sibling, 0 replies; 16+ messages in thread
From: Olaf Hering @ 2019-09-24 14:15 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Wei Liu


[-- Attachment #1.1: Type: text/plain, Size: 258 bytes --]

Am Tue, 24 Sep 2019 15:09:58 +0100
schrieb Ian Jackson <ian.jackson@citrix.com>:

> Err, no ?

It will happen for sure:
https://github.com/thkukuk/atomic-updates_and_etc/blob/master/README.md
https://en.opensuse.org/openSUSE:Packaging_UsrEtc

Olaf

[-- Attachment #1.2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
  2019-09-24 14:09   ` Ian Jackson
  2019-09-24 14:15     ` Olaf Hering
@ 2019-09-24 14:17     ` Ian Jackson
  2019-09-24 15:19       ` Olaf Hering
  2019-09-30 16:43       ` Olaf Hering
  1 sibling, 2 replies; 16+ messages in thread
From: Ian Jackson @ 2019-09-24 14:17 UTC (permalink / raw)
  To: Olaf Hering, xen-devel, Wei Liu

Ian Jackson writes ("Re: [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec"):
> Olaf Hering writes ("[PATCH RESEND v1 2/8] tools: move scripts from etc to libexec"):
> > In the near future all fresh installations will have an empty /etc.
> 
> Err, no ?

More constructively:

I think the ability of the admin to edit these scripts is important
and I have used it myself in the past.  With my Debian Xen maintainer
hat on I have no intention of moving these files out of /etc.

If the maintainer of Xen in some other distro wishes to put these
files in /usr/lib and consequently make them harder to edit then
(1) my advice as Xen upstream tools maintainer is that this would be a
bad idea (2) if that maintainer wants to persist with this then they
should do this in the packages for their distro.

In support of (2), I would welcome patches that make it easier for a
distro maintainer to make these kind of choices.

Right now my view is that I do not think it would be appropriate to
change the upstream default, regardless of the installation target
operating system, but I might be open to argument on that for specific
target operating systems if the appropriate distro maintainers were to
make a case.

I hope this helps.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
  2019-09-24 14:17     ` Ian Jackson
@ 2019-09-24 15:19       ` Olaf Hering
  2019-09-30 16:49         ` Ian Jackson
  2019-09-30 16:43       ` Olaf Hering
  1 sibling, 1 reply; 16+ messages in thread
From: Olaf Hering @ 2019-09-24 15:19 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Wei Liu


[-- Attachment #1.1: Type: text/plain, Size: 1056 bytes --]

Am Tue, 24 Sep 2019 15:17:43 +0100
schrieb Ian Jackson <ian.jackson@citrix.com>:

> I think the ability of the admin to edit these scripts is important and I have used it myself in the past. 

Since they are scripts, they can be edited in any location. To me it is not clear what the case would be to diverge from the vendor provided variant.

IMO these are part of the Xen tools, there is nothing to configure in these scripts. If for whatever reason the local admin must run his own variant, at least for disk= and vif= the location can be changed with 'script='.

I'm sure they are in /etc because in the early days of Xen there was a hope the local admin would do all the work to connect backends and frontends in a way he likes. I think this is not true since more than a decade, the scripts are always tied to the tools version. The API is now mature since a while, there are very few changes in the past years.


A configure knob could be added to set XEN_SCRIPT_DIR at build time, if there is really a usecase for such knob.


Olaf

[-- Attachment #1.2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Xen-devel] [PATCH RESEND v1 1/8] stubdom/vtpm: include stdio.h for declaration of printf
  2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 1/8] stubdom/vtpm: include stdio.h for declaration of printf Olaf Hering
@ 2019-09-27 21:27   ` Daniel De Graaf
  0 siblings, 0 replies; 16+ messages in thread
From: Daniel De Graaf @ 2019-09-27 21:27 UTC (permalink / raw)
  To: Olaf Hering, xen-devel; +Cc: Samuel Thibault, Quan Xu

On 9/24/19 10:03 AM, Olaf Hering wrote:
> The function read_vtpmblk uses printf(3), but stdio.h is not included
> in this file. This results in a warning from gcc-7:
> 
> vtpmblk.c: In function 'read_vtpmblk':
> vtpmblk.c:322:7: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
>         printf("Expected: ");
> vtpmblk.c:322:7: warning: incompatible implicit declaration of built-in function 'printf'
> vtpmblk.c:322:7: note: include '<stdio.h>' or provide a declaration of 'printf'
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
  2019-09-24 14:17     ` Ian Jackson
  2019-09-24 15:19       ` Olaf Hering
@ 2019-09-30 16:43       ` Olaf Hering
  1 sibling, 0 replies; 16+ messages in thread
From: Olaf Hering @ 2019-09-30 16:43 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Wei Liu


[-- Attachment #1.1: Type: text/plain, Size: 404 bytes --]

Am Tue, 24 Sep 2019 15:17:43 +0100
schrieb Ian Jackson <ian.jackson@citrix.com>:

> I might be open to argument on that for specific target operating systems if the appropriate distro maintainers were to make a case.

I provided reasons why the current default is not appropriate, and the change should be applied.

Did you come up with a reason why the provided reasons are incorrect?


Olaf

[-- Attachment #1.2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
  2019-09-24 15:19       ` Olaf Hering
@ 2019-09-30 16:49         ` Ian Jackson
  0 siblings, 0 replies; 16+ messages in thread
From: Ian Jackson @ 2019-09-30 16:49 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel, Wei Liu

Olaf Hering writes ("Re: [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec"):
> Am Tue, 24 Sep 2019 15:17:43 +0100
> schrieb Ian Jackson <ian.jackson@citrix.com>:
> > I think the ability of the admin to edit these scripts is important and I have used it myself in the past. 
> 
> Since they are scripts, they can be edited in any location. To me it is not clear what the case would be to diverge from the vendor provided variant.

Editing files in /usr is not really a good idea.  They will be
overwritten by eg security updates.

> IMO these are part of the Xen tools, there is nothing to configure in these scripts. If for whatever reason the local admin must run his own variant, at least for disk= and vif= the location can be changed with 'script='.

As I say I have on occasion wanted to edit these to work around bugs
or do strange things.  I don't think taking a copy of the script and
editing that is a better idea than treating the script as a
configuration file.

> I'm sure they are in /etc because in the early days of Xen there was a hope the local admin would do all the work to connect backends and frontends in a way he likes. I think this is not true since more than a decade, the scripts are always tied to the tools version. The API is now mature since a while, there are very few changes in the past years.

The scripts are not "tied to the tools version".  They are shipped
with the tools, sure, but we have maintained the interface.  There are
even out-of-tree scripts.  (I think iscsi has one, for example.)

They are in /etc for the same reason as boot scripts, dhclient hooks,
and so on, are in /etc.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-09-30 16:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24 14:03 [Xen-devel] [RESEND v1 0/8] tools, doc and stubdom fixes Olaf Hering
2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 1/8] stubdom/vtpm: include stdio.h for declaration of printf Olaf Hering
2019-09-27 21:27   ` Daniel De Graaf
2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec Olaf Hering
2019-09-24 14:09   ` Ian Jackson
2019-09-24 14:15     ` Olaf Hering
2019-09-24 14:17     ` Ian Jackson
2019-09-24 15:19       ` Olaf Hering
2019-09-30 16:49         ` Ian Jackson
2019-09-30 16:43       ` Olaf Hering
2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 3/8] Use XEN_SCRIPT_DIR to refer to /etc/xen/scripts Olaf Hering
2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 4/8] Remove tools/examples/README.incompatibilities Olaf Hering
2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 5/8] tools: remove empty xl.conf Olaf Hering
2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 6/8] Remove tools/examples/cpupool Olaf Hering
2019-09-24 14:03 ` [Xen-devel] [PATCH RESEND v1 7/8] docs: substitute XEN_CONFIG_DIR in xl.conf.5 Olaf Hering
2019-09-24 14:03 ` [Xen-devel] [PATCH v1 8/8] docs: remove stale create example from xl.1 Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).