tools, doc and stubdom fixes
v2 cover tools, doc and stubdom fixes
Olaf Hering (8):
stubdom/vtpm: include stdio.h for declaration of printf
tools: add with-xen-scriptdir configure option 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 | 8 +++-
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, 25 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 v2 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 v2 1/8] stubdom/vtpm: include stdio.h for declaration of printf
Olaf Hering, le mer. 02 oct. 2019 19:05:36 +0200, a ecrit:
Quoted 11 lines
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]>
Quoted 17 lines
--- 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
Signature · 13 lines
Samuel <P> moo <N> moo ? <D> P: keski t'arrive? :)) <P> moooo <N> moooooo ? <P> rien le net marche je suis content :) -+- #ens-mim - accro du net -+- _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v2 1/8] stubdom/vtpm: include stdio.h for declaration of printf
Samuel Thibault, le dim. 13 oct. 2019 18:20:39 +0200, a ecrit:
Quoted 12 lines
Olaf Hering, le mer. 02 oct. 2019 19:05:36 +0200, a ecrit:
Quoted 11 lines
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]>
Note that you miss an 'A' at the beginning of the line there.
Quoted 29 lines
Reviewed-by Samuel Thibault <[email protected]>Quoted 17 lines
--- 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 16Signature · 8 lines
Samuel <P> moo <N> moo ? <D> P: keski t'arrive? :)) <P> moooo <N> moooooo ? <P> rien le net marche je suis content :) -+- #ens-mim - accro du net -+-
Signature · 1 line
Samuel
Quoted 1 line
Ever heard of .cshrc?
That's a city in Bosnia. Right?
(Discussion in comp.os.linux.misc on the intuitiveness of commands.)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v2 1/8] stubdom/vtpm: include stdio.h for declaration of printf
Am Sun, 13 Oct 2019 18:21:27 +0200
schrieb Samuel Thibault <[email protected]>:
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Note that you miss an 'A' at the beginning of the line there.
Thanks for spotting.
Should I resend this patch?
Olaf
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v2 1/8] stubdom/vtpm: include stdio.h for declaration of printf
Olaf Hering, le dim. 13 oct. 2019 18:50:32 +0200, a ecrit:
Quoted 10 lines
Am Sun, 13 Oct 2019 18:21:27 +0200
schrieb Samuel Thibault <[email protected]>:Quoted 3 lines
Quoted 1 line
Quoted 1 line
Note that you miss an 'A' at the beginning of the line there.
Thanks for spotting.
Should I resend this patch?
With the fixed Acked-by and my Reviewed-by, yes.
Samuel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v2 1/8] stubdom/vtpm: include stdio.h for declaration of printf
Cc Juergen.
Looks pretty harmless for 4.13.
Quoted 13 lines · Samuel Thibault
Olaf Hering, le dim. 13 oct. 2019 18:50:32 +0200, a ecrit:
Quoted 10 lines
Am Sun, 13 Oct 2019 18:21:27 +0200
schrieb Samuel Thibault <[email protected]>:Quoted 3 lines
Quoted 1 line
Quoted 1 line
Note that you miss an 'A' at the beginning of the line there.
Thanks for spotting.
Should I resend this patch?
Quoted 8 lines
With the fixed Acked-by and my Reviewed-by, yes.
Samuel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v2 1/8] stubdom/vtpm: include stdio.h for declaration of printf
Quoted 3 lines · Wei Liu
Cc Juergen.
Looks pretty harmless for 4.13.
Yes.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 2/8 tools: add with-xen-scriptdir configure option
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, add a knob to configure to allow storing the hotplug scripts to libexec because they are not exactly configuration. The current default is unchanged, which is /etc/xen/scripts.
--- m4/paths.m4 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
m4/paths.m4 +7 -1
@@ -70,6 +70,12 @@ AC_ARG_WITH([libexec-leaf-dir], [libexec_subdir=$withval], [libexec_subdir=$PACKAGE_TARNAME]) +AC_ARG_WITH([xen-scriptdir], + AS_HELP_STRING([--with-xen-scriptdir=DIR], + [Path to directory for dom0 hotplug scripts. [SYSCONFDIR/xen/scripts]]), + [xen_scriptdir_path=$withval], + [xen_scriptdir_path=$sysconfdir/xen/scripts]) + AC_ARG_WITH([xen-dumpdir], AS_HELP_STRING([--with-xen-dumpdir=DIR], [Path to directory for domU crash dumps. [LOCALSTATEDIR/lib/xen/dump]]),
@@ -137,7 +143,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=$xen_scriptdir_path 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 v2 2/8] tools: add with-xen-scriptdir configure option
Am Wed, 2 Oct 2019 19:05:37 +0200
schrieb Olaf Hering <[email protected]>:
Quoted 1 line
add a knob to configure
Was this ever considered for merging, or are we done with this series?
Olaf
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 3/8 Use XEN_SCRIPT_DIR to refer to /etc/xen/scripts
In reply to Olaf HeringReplace 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 v2 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 v2 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 v2 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 v2 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 v2 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