tools, doc and stubdom fixes
cover tools, doc and stubdom fixes
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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH RESEND 1/8 stubdom/vtpm: include stdio.h for declaration of printf
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'
--- stubdom/vtpm/vtpmblk.c | 1 + 1 file changed, 1 insertion(+)
stubdom/vtpm/vtpmblk.c +1 -0
@@ -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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH RESEND v1 1/8] stubdom/vtpm: include stdio.h for declaration of printf
Quoted 10 lines · Olaf Hering
The function
read_vtpmblkuses printf(3), butstdio.his 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 <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH RESEND 2/8 tools: move scripts from etc to libexec
In reply to Olaf HeringIn 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.
--- m4/paths.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
m4/paths.m4 +1 -1
@@ -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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [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"):
Quoted 1 line
In the near future all fresh installations will have an empty /etc.
Err, no ?
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
Am Tue, 24 Sep 2019 15:09:58 +0100
schrieb Ian Jackson <[email protected]>:
Quoted 1 line
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
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
In reply to Ian JacksonIan Jackson writes ("Re: [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec"):
Quoted 4 lines
Olaf Hering writes ("[PATCH RESEND v1 2/8] tools: move scripts from etc to libexec"):
Quoted 1 line
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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
Am Tue, 24 Sep 2019 15:17:43 +0100
schrieb Ian Jackson <[email protected]>:
Quoted 1 line
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
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
Olaf Hering writes ("Re: [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec"):
Quoted 5 lines
Am Tue, 24 Sep 2019 15:17:43 +0100
schrieb Ian Jackson <[email protected]>:Quoted 1 line
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.
Quoted 1 line
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.
Quoted 1 line
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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH RESEND v1 2/8] tools: move scripts from etc to libexec
In reply to Ian JacksonAm Tue, 24 Sep 2019 15:17:43 +0100
schrieb Ian Jackson <[email protected]>:
Quoted 1 line
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
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH RESEND 3/8 Use XEN_SCRIPT_DIR to refer to /etc/xen/scripts
In reply to Olaf HeringNow that scripts are stored in libexec, replace all hardcoded paths to use XEN_SCRIPT_DIR to expand the actual location.
Update .gitignore.
---
.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%).gitignore +3 -0
@@ -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/
docs/configure.ac +3 -0
@@ -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([../])
docs/man/xl-disk-configuration.5.pod.in renamed from docs/man/xl-disk-configuration.5.pod +1 -1
@@ -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>".
docs/man/xl-network-configuration.5.pod.in renamed from docs/man/xl-network-configuration.5.pod +2 -2
@@ -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
docs/man/xl.1.pod.in +1 -1
@@ -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>
docs/man/xl.conf.5.pod.in renamed from docs/man/xl.conf.5.pod +3 -3
@@ -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">
docs/misc/block-scripts.txt +1 -1
@@ -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:
tools/xl/xl_cmdtable.c +1 -1
@@ -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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH RESEND 4/8 Remove tools/examples/README.incompatibilities
In reply to Olaf HeringThe referenced versions can not run staging anymore since a while.
--- tools/examples/Makefile | 1 - tools/examples/README.incompatibilities | 38 --------------------------------- 2 files changed, 39 deletions(-) delete mode 100644 tools/examples/README.incompatibilities
tools/examples/Makefile +0 -1
@@ -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
tools/examples/README.incompatibilities deleted +0 -38
@@ -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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH RESEND 5/8 tools: remove empty xl.conf
In reply to Olaf HeringIn 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.
--- 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
tools/examples/Makefile +0 -1
@@ -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)
tools/examples/README +0 -1
@@ -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
tools/examples/xl.conf deleted +0 -44
44 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH RESEND 6/8 Remove tools/examples/cpupool
In reply to Olaf HeringIn 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.
--- tools/examples/Makefile | 1 - tools/examples/README | 1 - tools/examples/cpupool | 17 ----------------- 3 files changed, 19 deletions(-) delete mode 100644 tools/examples/cpupool
tools/examples/Makefile +0 -1
@@ -6,7 +6,6 @@ XEN_READMES = README XEN_CONFIGS += xlexample.hvm XEN_CONFIGS += xlexample.pvlinux -XEN_CONFIGS += cpupool XEN_CONFIGS += $(XEN_CONFIGS-y)
tools/examples/README +0 -1
@@ -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
tools/examples/cpupool deleted +0 -17
@@ -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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH RESEND 7/8 docs: substitute XEN_CONFIG_DIR in xl.conf.5
In reply to Olaf Heringxl(1) opens xl.conf in XEN_CONFIG_DIR.
Substitute this variable also in the man page.
--- docs/man/xl.1.pod.in | 2 +- docs/man/xl.conf.5.pod.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
docs/man/xl.1.pod.in +1 -1
@@ -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>
docs/man/xl.conf.5.pod.in +1 -1
@@ -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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH 8/8 docs: remove stale create example from xl.1
In reply to Olaf HeringMaybe 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.
--- docs/man/xl.1.pod.in | 7 ------- 1 file changed, 7 deletions(-)
docs/man/xl.1.pod.in +0 -7
@@ -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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel