From 47c146e173bb66deef722f00e3f82867d7c04864 Mon Sep 17 00:00:00 2001 From: Alex Tomlins Date: Thu, 31 Mar 2011 09:30:44 +0100 Subject: [PATCH 01/48] Added apt_proxy option to make debootstrap use a proxy. --- bin/xt-install-image | 11 ++++++++++- etc/xen-tools.conf | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/bin/xt-install-image b/bin/xt-install-image index cdac40a..acc4fad 100755 --- a/bin/xt-install-image +++ b/bin/xt-install-image @@ -757,12 +757,21 @@ sub do_debootstrap $EXTRA .= " --arch $CONFIG{'arch'}"; } + # + # Setup http_proxy so that debootstrap pulls files through the apt-proxy + # + my $PROXY = ''; + if ( $CONFIG{ 'apt_proxy' } ) + { + print("Using apt_proxy: $CONFIG{'apt_proxy'}\n"); + $PROXY = "http_proxy=\"$CONFIG{'apt_proxy'}\""; + } # # This is the command we'll run # my $command = - "$cmd $EXTRA $CONFIG{'dist'} $CONFIG{'location'} $CONFIG{'mirror'}"; + "$PROXY $cmd $EXTRA $CONFIG{'dist'} $CONFIG{'location'} $CONFIG{'mirror'}"; # # Run the command. diff --git a/etc/xen-tools.conf b/etc/xen-tools.conf index d606c9d..b241316 100644 --- a/etc/xen-tools.conf +++ b/etc/xen-tools.conf @@ -278,6 +278,9 @@ mirror = `xt-guess-suite-and-mirror --mirror` # mirror_maverick = http://archive.ubuntu.com/ubuntu # mirror_natty = http://archive.ubuntu.com/ubuntu +# If this is defined it will be used by debootstrap +# +# apt_proxy = # # Filesystem options for the different filesystems we support. From b0bae987464d5aae02505800dfe8cebc7adccb22 Mon Sep 17 00:00:00 2001 From: Alex Tomlins Date: Thu, 31 Mar 2011 09:39:39 +0100 Subject: [PATCH 02/48] Use configured apt_proxy in guests. --- etc/xen-tools.conf | 3 ++- hooks/dapper/20-setup-apt | 9 ++++++--- hooks/debian/20-setup-apt | 9 ++++++--- hooks/edgy/20-setup-apt | 9 ++++++--- hooks/intrepid/20-setup-apt | 9 ++++++--- hooks/karmic/20-setup-apt | 9 ++++++--- 6 files changed, 32 insertions(+), 16 deletions(-) diff --git a/etc/xen-tools.conf b/etc/xen-tools.conf index b241316..a3a1e25 100644 --- a/etc/xen-tools.conf +++ b/etc/xen-tools.conf @@ -278,7 +278,8 @@ mirror = `xt-guess-suite-and-mirror --mirror` # mirror_maverick = http://archive.ubuntu.com/ubuntu # mirror_natty = http://archive.ubuntu.com/ubuntu -# If this is defined it will be used by debootstrap +# If this is defined it will be used by debootstrap, and configured as the +# proxy for the guest # # apt_proxy = diff --git a/hooks/dapper/20-setup-apt b/hooks/dapper/20-setup-apt index 4fdd008..f255dfb 100755 --- a/hooks/dapper/20-setup-apt +++ b/hooks/dapper/20-setup-apt @@ -33,9 +33,12 @@ logMessage Script $0 starting # replicate that setup in our new guest via apt-config dump and save # the setting to the proxy guess file. # -logMessage The use of a proxy detected. -apt-config dump | grep -i Acquire::HTTP::Proxy \ - > ${prefix}/etc/apt/apt.conf.d/proxy-guess +if [ ${apt_proxy} ]; then + echo "Acquire::http::Proxy \"${apt_proxy}\";" > ${prefix}/etc/apt/apt.conf.d/01proxy +else + logMessage The use of a proxy detected. + apt-config dump | grep -i Acquire::HTTP::Proxy > ${prefix}/etc/apt/apt.conf.d/01proxy +fi # diff --git a/hooks/debian/20-setup-apt b/hooks/debian/20-setup-apt index 446cd67..b325602 100755 --- a/hooks/debian/20-setup-apt +++ b/hooks/debian/20-setup-apt @@ -32,9 +32,12 @@ logMessage Script $0 starting # replicate that setup in our new guest via apt-config dump and save # the setting to the proxy guess file. # -logMessage The use of a proxy detected. -apt-config dump | grep -i Acquire::HTTP::Proxy \ - > ${prefix}/etc/apt/apt.conf.d/proxy-guess +if [ ${apt_proxy} ]; then + echo "Acquire::http::Proxy \"${apt_proxy}\";" > ${prefix}/etc/apt/apt.conf.d/01proxy +else + logMessage The use of a proxy detected. + apt-config dump | grep -i Acquire::HTTP::Proxy > ${prefix}/etc/apt/apt.conf.d/01proxy +fi # diff --git a/hooks/edgy/20-setup-apt b/hooks/edgy/20-setup-apt index 4463ed5..5833c47 100755 --- a/hooks/edgy/20-setup-apt +++ b/hooks/edgy/20-setup-apt @@ -33,9 +33,12 @@ logMessage Script $0 starting # replicate that setup in our new guest via apt-config dump and save # the setting to the proxy guess file. # -logMessage The use of a proxy detected. -apt-config dump | grep -i Acquire::HTTP::Proxy \ - > ${prefix}/etc/apt/apt.conf.d/proxy-guess +if [ ${apt_proxy} ]; then + echo "Acquire::http::Proxy \"${apt_proxy}\";" > ${prefix}/etc/apt/apt.conf.d/01proxy +else + logMessage The use of a proxy detected. + apt-config dump | grep -i Acquire::HTTP::Proxy > ${prefix}/etc/apt/apt.conf.d/01proxy +fi # diff --git a/hooks/intrepid/20-setup-apt b/hooks/intrepid/20-setup-apt index 4463ed5..5833c47 100755 --- a/hooks/intrepid/20-setup-apt +++ b/hooks/intrepid/20-setup-apt @@ -33,9 +33,12 @@ logMessage Script $0 starting # replicate that setup in our new guest via apt-config dump and save # the setting to the proxy guess file. # -logMessage The use of a proxy detected. -apt-config dump | grep -i Acquire::HTTP::Proxy \ - > ${prefix}/etc/apt/apt.conf.d/proxy-guess +if [ ${apt_proxy} ]; then + echo "Acquire::http::Proxy \"${apt_proxy}\";" > ${prefix}/etc/apt/apt.conf.d/01proxy +else + logMessage The use of a proxy detected. + apt-config dump | grep -i Acquire::HTTP::Proxy > ${prefix}/etc/apt/apt.conf.d/01proxy +fi # diff --git a/hooks/karmic/20-setup-apt b/hooks/karmic/20-setup-apt index 4463ed5..5833c47 100755 --- a/hooks/karmic/20-setup-apt +++ b/hooks/karmic/20-setup-apt @@ -33,9 +33,12 @@ logMessage Script $0 starting # replicate that setup in our new guest via apt-config dump and save # the setting to the proxy guess file. # -logMessage The use of a proxy detected. -apt-config dump | grep -i Acquire::HTTP::Proxy \ - > ${prefix}/etc/apt/apt.conf.d/proxy-guess +if [ ${apt_proxy} ]; then + echo "Acquire::http::Proxy \"${apt_proxy}\";" > ${prefix}/etc/apt/apt.conf.d/01proxy +else + logMessage The use of a proxy detected. + apt-config dump | grep -i Acquire::HTTP::Proxy > ${prefix}/etc/apt/apt.conf.d/01proxy +fi # From accbe9e4e76806a33986bd024d58d58ca1e7ec48 Mon Sep 17 00:00:00 2001 From: Alex Tomlins Date: Thu, 31 Mar 2011 11:35:14 +0100 Subject: [PATCH 03/48] Allow specifying apt_proxy on the commandline. --- bin/xen-create-image | 15 +++++++++++++++ bin/xt-install-image | 2 ++ 2 files changed, 17 insertions(+) diff --git a/bin/xen-create-image b/bin/xen-create-image index dbfb865..70ebe9e 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -204,6 +204,10 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH. to choose a more or less close Debian mirror. See http://wiki.debian.org/DebianGeoMirror for details. + --apt_proxy=url + Specify a proxy to be used by debootstrap, and within + the guest. + --template=tmpl Specify which template file to use when creating the Xen configuration file. @@ -1364,6 +1368,7 @@ sub setupDefaultOptions foreach my $ubuntudist (qw(edgy feisty gutsy intrepid)) { $CONFIG{ 'mirror_'.$ubuntudist } = 'http://old-releases.ubuntu.com/ubuntu'; } + $CONFIG{ 'apt_proxy' } = ''; $CONFIG{ 'arch' } = ''; $CONFIG{ 'fs' } = 'ext3'; $CONFIG{ 'force' } = 0; @@ -1705,6 +1710,7 @@ sub parseCommandLineArguments "kernel=s", \&checkOption, "initrd=s", \&checkOption, "mirror=s", \&checkOption, + "apt_proxy=s", \&checkOption, "modules=s", \&checkOption, "lvm=s", \$install{ 'lvm' }, "image-dev=s", \$install{ 'image-dev' }, @@ -3571,6 +3577,15 @@ sub installSystem } + # + # Propagate --apt_proxy + # + if ( $CONFIG{ 'apt_proxy' } ) + { + $cmd .= " --apt_proxy=$CONFIG{'apt_proxy'}"; + } + + # # Show the user what they are installing # diff --git a/bin/xt-install-image b/bin/xt-install-image index acc4fad..37eb11e 100755 --- a/bin/xt-install-image +++ b/bin/xt-install-image @@ -27,6 +27,7 @@ xt-install-image - Install a fresh copy of GNU/Linux into a directory --config Read the specified config file in addition to the global configuration file. --mirror The mirror to use when installing with 'debootstrap'. + --apt_proxy The proxy to use when installing with 'debootstrap'. Installation Options: --install-method Specify the installation method to use. @@ -395,6 +396,7 @@ sub parseCommandLineArguments "cachedir=s", \$CONFIG{ 'cachedir' }, "config=s", \$CONFIG{ 'config' }, "mirror=s", \$CONFIG{ 'mirror' }, + "apt_proxy=s", \$CONFIG{ 'apt_proxy' }, # Help. "verbose", \$CONFIG{ 'verbose' }, From 09179f2dea6731aeed0c982eeb2ca7c30e1ac7e2 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Fri, 30 Mar 2012 17:22:59 +0200 Subject: [PATCH 04/48] Support Ubuntu 12.04 LTS Precise, update mirrors for discontinued releases --- Makefile | 1 + bin/xen-create-image | 10 +++++----- debian/changelog | 2 ++ etc/xen-tools.conf | 6 ++++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index a8abc20..528130a 100644 --- a/Makefile +++ b/Makefile @@ -189,6 +189,7 @@ install-hooks: -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d maverick.d -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d natty.d -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d oneiric.d + -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d precise.d cp hooks/common.sh ${prefix}/usr/lib/xen-tools diff --git a/bin/xen-create-image b/bin/xen-create-image index 85317d6..016b7d5 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -1351,17 +1351,17 @@ sub setupDefaultOptions $CONFIG{ 'mirror' } = ''; # Initialize per distribution mirror defaults: Debian - foreach my $debdist (qw(lenny squeeze wheezy sid testing stable unstable)) { + foreach my $debdist (qw(squeeze wheezy sid testing oldstable stable unstable)) { $CONFIG{ 'mirror_'.$debdist } = $CONFIG{ 'mirror' } } - foreach my $debdist (qw(sarge etch)) { + foreach my $debdist (qw(sarge etch lenny)) { $CONFIG{ 'mirror_'.$debdist } = 'http://archive.debian.org/debian'; } # Initialize per distribution mirror defaults: Ubuntu - foreach my $ubuntudist (qw(dapper hardy jaunty karmic lucid maverick natty oneiric)) { + foreach my $ubuntudist (qw(dapper hardy lucid maverick natty oneiric precise)) { $CONFIG{ 'mirror_'.$ubuntudist } = 'http://archive.ubuntu.com/ubuntu'; } - foreach my $ubuntudist (qw(edgy feisty gutsy intrepid)) { + foreach my $ubuntudist (qw(edgy feisty gutsy intrepid jaunty karmic)) { $CONFIG{ 'mirror_'.$ubuntudist } = 'http://old-releases.ubuntu.com/ubuntu'; } $CONFIG{ 'arch' } = ''; @@ -1913,7 +1913,7 @@ sub checkArguments # # Lucid and probably all later Ubuntus, too, don't work without pygrub # - if ( $CONFIG{ 'dist' } =~ /lucid|maverick|natty|oneiric/ ) + if ( $CONFIG{ 'dist' } =~ /lucid|maverick|natty|oneiric|precise/ ) { $CONFIG{ 'pygrub' } = 1; } diff --git a/debian/changelog b/debian/changelog index 59b383c..99afcf4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low - Correctly checks and documents valid values for disk_device. (Closes: #621499) * Support creating Ubuntu 11.10 Oneiric DomUs (LP: #848654) + * Support creating Ubuntu 12.04 Precise DomUs + * Update mirror list for discontinued releases of Debian and Ubuntu * Workaround for missing unit parsing in xen-create-nfs (Closes: #648814) * Fix wildcard vs regexp in memory configuration parsing. diff --git a/etc/xen-tools.conf b/etc/xen-tools.conf index ea72da8..47abfe0 100644 --- a/etc/xen-tools.conf +++ b/etc/xen-tools.conf @@ -263,7 +263,7 @@ mirror = `xt-guess-suite-and-mirror --mirror` # # mirror_sarge = http://archive.debian.org/debian # mirror_etch = http://archive.debian.org/debian -# mirror_lenny = http://cdn.debian.net/debian +# mirror_lenny = http://archive.debian.org/debian # mirror_squeeze = http://cdn.debian.net/debian # mirror_wheezy = http://cdn.debian.net/debian # mirror_sid = http://cdn.debian.net/debian @@ -273,11 +273,13 @@ mirror = `xt-guess-suite-and-mirror --mirror` # mirror_gutsy = http://old-releases.ubuntu.com/ubuntu # mirror_hardy = http://archive.ubuntu.com/ubuntu # mirror_intrepid = http://old-releases.ubuntu.com/ubuntu -# mirror_karmic = http://archive.ubuntu.com/ubuntu +# mirror_jaunty = http://old-releases.ubuntu.com/ubuntu +# mirror_karmic = http://old-releases.ubuntu.com/ubuntu # mirror_lucid = http://archive.ubuntu.com/ubuntu # mirror_maverick = http://archive.ubuntu.com/ubuntu # mirror_natty = http://archive.ubuntu.com/ubuntu # mirror_oneiric = http://archive.ubuntu.com/ubuntu +# mirror_precise = http://archive.ubuntu.com/ubuntu # From e1ff891a246ffab1f794a082771a212760ff8e09 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Fri, 24 Jun 2011 03:23:15 +0200 Subject: [PATCH 05/48] No more suggest evms-cli. It's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. Conflicts from cherry-pick: debian/changelog --- debian/changelog | 2 ++ debian/control | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 99afcf4..838907c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low * Support creating Ubuntu 11.10 Oneiric DomUs (LP: #848654) * Support creating Ubuntu 12.04 Precise DomUs * Update mirror list for discontinued releases of Debian and Ubuntu + * No more suggest evms-cli -- it's no more available on any supported + Dom0 distribution. Thanks to Markus Waldeck for the hint. * Workaround for missing unit parsing in xen-create-nfs (Closes: #648814) * Fix wildcard vs regexp in memory configuration parsing. diff --git a/debian/control b/debian/control index d32895e..1cbc92d 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: xen-tools Architecture: all Depends: debootstrap | cdebootstrap, perl-modules, libtext-template-perl, libconfig-inifiles-perl, libfile-slurp-perl, ${misc:Depends} Recommends: xen-hypervisor-amd64 | xen-hypervisor-i386 | xen-hypervisor-i386-pae, rinse, xen-shell, libexpect-perl -Suggests: reiserfsprogs, xfsprogs, xen-utils, cfengine2, evms-cli, btrfs-tools +Suggests: reiserfsprogs, xfsprogs, xen-utils, cfengine2, btrfs-tools Description: Tools to manage Xen virtual servers This package contains tools to manage Debian based Xen virtual servers. . From 4c7e7d8134f88cd522e80af98fcb734de9471983 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Fri, 30 Mar 2012 18:41:53 +0200 Subject: [PATCH 06/48] Debian package: Bump Standards-Version to 3.9.3 --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 838907c..4f903e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low * Workaround for missing unit parsing in xen-create-nfs (Closes: #648814) * Fix wildcard vs regexp in memory configuration parsing. + * Bump Standards-Version to 3.9.3 (no changes) * Fix Lintian warning copyright-refers-to-symlink-license. -- Axel Beckert Tue, 15 Nov 2011 22:32:56 +0100 diff --git a/debian/control b/debian/control index 1cbc92d..43aeb06 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: utils Priority: extra Maintainer: Axel Beckert Build-Depends: debhelper (>= 7.0.0), libtest-pod-perl, libtext-template-perl -Standards-Version: 3.9.1 +Standards-Version: 3.9.3 Homepage: http://xen-tools.org/software/xen-tools Vcs-Browser: http://gitorious.org/xen-tools/xen-tools Vcs-Git: git://gitorious.org/xen-tools/xen-tools.git From 359a6c13f0b9b68cf2e6cac36274d7b3d174b991 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Fri, 30 Mar 2012 18:43:47 +0200 Subject: [PATCH 07/48] Debian package: Fix lintian warning debian-rules-missing-recommended-target --- debian/changelog | 4 +++- debian/rules | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4f903e3..df187a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,7 +12,9 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low #648814) * Fix wildcard vs regexp in memory configuration parsing. * Bump Standards-Version to 3.9.3 (no changes) - * Fix Lintian warning copyright-refers-to-symlink-license. + * Fix the following Lintian warnings: + - copyright-refers-to-symlink-license + - debian-rules-missing-recommended-target -- Axel Beckert Tue, 15 Nov 2011 22:32:56 +0100 diff --git a/debian/rules b/debian/rules index 328a442..a7171b7 100755 --- a/debian/rules +++ b/debian/rules @@ -9,8 +9,9 @@ configure-stamp: touch configure-stamp -build: build-stamp - +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp build-stamp: configure-stamp dh_testdir touch build-stamp From f2e97be7868df9f4423e8ee277fda968be06d42e Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Fri, 30 Mar 2012 18:58:11 +0200 Subject: [PATCH 08/48] Reorder Debian changelog entry --- debian/changelog | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index df187a8..16c7127 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,14 +3,14 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low * New upstream snapshot - Correctly checks and documents valid values for disk_device. (Closes: #621499) - * Support creating Ubuntu 11.10 Oneiric DomUs (LP: #848654) - * Support creating Ubuntu 12.04 Precise DomUs - * Update mirror list for discontinued releases of Debian and Ubuntu + - Supports creating Ubuntu 11.10 Oneiric DomUs (LP: #848654) + - Supports creating Ubuntu 12.04 Precise DomUs + - Updated mirror list for discontinued releases of Debian and Ubuntu + - Workaround for missing unit parsing in xen-create-nfs (Closes: + #648814) + - Fix wildcard vs regexp in memory configuration parsing. * No more suggest evms-cli -- it's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. - * Workaround for missing unit parsing in xen-create-nfs (Closes: - #648814) - * Fix wildcard vs regexp in memory configuration parsing. * Bump Standards-Version to 3.9.3 (no changes) * Fix the following Lintian warnings: - copyright-refers-to-symlink-license From d8561d4b7df0ca98117ce81b425b0e3a4ba3373b Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Tue, 24 Apr 2012 19:51:01 +0200 Subject: [PATCH 09/48] Preliminary support for Ubuntu 12.10 Quantal Quetzal --- Makefile | 1 + bin/xen-create-image | 6 +++--- debian/changelog | 2 +- etc/xen-tools.conf | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 528130a..0feebd8 100644 --- a/Makefile +++ b/Makefile @@ -190,6 +190,7 @@ install-hooks: -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d natty.d -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d oneiric.d -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d precise.d + -cd ${prefix}/usr/lib/xen-tools/ && ln -s karmic.d quantal.d cp hooks/common.sh ${prefix}/usr/lib/xen-tools diff --git a/bin/xen-create-image b/bin/xen-create-image index 016b7d5..d3ae6d7 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -1358,10 +1358,10 @@ sub setupDefaultOptions $CONFIG{ 'mirror_'.$debdist } = 'http://archive.debian.org/debian'; } # Initialize per distribution mirror defaults: Ubuntu - foreach my $ubuntudist (qw(dapper hardy lucid maverick natty oneiric precise)) { + foreach my $ubuntudist (qw(dapper hardy lucid natty oneiric precise quantal)) { $CONFIG{ 'mirror_'.$ubuntudist } = 'http://archive.ubuntu.com/ubuntu'; } - foreach my $ubuntudist (qw(edgy feisty gutsy intrepid jaunty karmic)) { + foreach my $ubuntudist (qw(edgy feisty gutsy intrepid jaunty karmic maverick)) { $CONFIG{ 'mirror_'.$ubuntudist } = 'http://old-releases.ubuntu.com/ubuntu'; } $CONFIG{ 'arch' } = ''; @@ -1913,7 +1913,7 @@ sub checkArguments # # Lucid and probably all later Ubuntus, too, don't work without pygrub # - if ( $CONFIG{ 'dist' } =~ /lucid|maverick|natty|oneiric|precise/ ) + if ( $CONFIG{ 'dist' } =~ /lucid|maverick|natty|oneiric|precise|quantal/ ) { $CONFIG{ 'pygrub' } = 1; } diff --git a/debian/changelog b/debian/changelog index 838907c..20c7805 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,7 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low - Correctly checks and documents valid values for disk_device. (Closes: #621499) * Support creating Ubuntu 11.10 Oneiric DomUs (LP: #848654) - * Support creating Ubuntu 12.04 Precise DomUs + * Support creating Ubuntu 12.04 Precise and 12.10 Quantal DomUs * Update mirror list for discontinued releases of Debian and Ubuntu * No more suggest evms-cli -- it's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. diff --git a/etc/xen-tools.conf b/etc/xen-tools.conf index 47abfe0..8a0a876 100644 --- a/etc/xen-tools.conf +++ b/etc/xen-tools.conf @@ -280,6 +280,7 @@ mirror = `xt-guess-suite-and-mirror --mirror` # mirror_natty = http://archive.ubuntu.com/ubuntu # mirror_oneiric = http://archive.ubuntu.com/ubuntu # mirror_precise = http://archive.ubuntu.com/ubuntu +# mirror_quantal = http://archive.ubuntu.com/ubuntu # From 89e9a54b06daef9f6b54d43df87197f778a51980 Mon Sep 17 00:00:00 2001 From: Brian Bennett Date: Mon, 7 May 2012 21:18:36 +0200 Subject: [PATCH 10/48] Fix misbehaviour if the --ip option is passed multiple times According to xen-create-image(8) if --ip is passed multipe times then the first IP is used as the "system" IP and the rest are used as aliases. What actually happened is the last IP is the "system" IP and all other IP's are silently ignored. (Closes Debian bug #652110) --- bin/xen-create-image | 13 ++++++++++++- etc/xm.tmpl | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index d3ae6d7..df42c97 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -1648,7 +1648,12 @@ sub checkOption (ref $check eq 'CODE' and &$check( $value ) ) ) { # Option did validate, copy it - $CONFIG{ $option } = $value; + if ( $option eq "ip" ) + { + push @{ $CONFIG{ $option } }, $value; + } else { + $CONFIG{ $option } = $value; + } } else { # Option did _not_ validate die "ERROR: '$option' argument " . $types{ $type }{ 'message' }; @@ -3984,6 +3989,12 @@ sub runXenConfigCreation $command .= " --admins=$CONFIG{'admins'}"; } + # + # Make sure the template gets a list of all IPs + # + $ENV{ 'IP_ADDRESSES' } = $IP_ADDRESSES; + + logprint("\nCreating Xen configuration file\n"); runCommand($command); logprint("Done\n"); diff --git a/etc/xm.tmpl b/etc/xm.tmpl index e723486..c35d0de 100644 --- a/etc/xm.tmpl +++ b/etc/xm.tmpl @@ -135,7 +135,7 @@ name = '{$hostname}' $br = ",bridge=$bridge" } - $OUT .= "vif = [ 'ip=$ip1"; + $OUT .= "vif = [ 'ip=$IP_ADDRESSES"; $OUT .= "$m"; $OUT .= "$vn"; $OUT .= "$br"; From f55461b1bcb53e9e2a6381a6e4985c32012077fc Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 21:22:36 +0200 Subject: [PATCH 11/48] Mention Brian Bennett's fix in the Debian changelog --- debian/changelog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 580a15c..766f1dc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low - Workaround for missing unit parsing in xen-create-nfs (Closes: #648814) - Fix wildcard vs regexp in memory configuration parsing. + - Fix misbehaviour if --ip option is passed multiple times (Closes: + #652110; Thanks Brian Bennett!) * No more suggest evms-cli -- it's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. * Bump Standards-Version to 3.9.3 (no changes) @@ -16,7 +18,7 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low - copyright-refers-to-symlink-license - debian-rules-missing-recommended-target - -- Axel Beckert Tue, 15 Nov 2011 22:32:56 +0100 + -- Axel Beckert Mon, 07 May 2012 21:21:33 +0200 xen-tools (4.2.1-1) unstable; urgency=low From a9aea889d8abb5ca7b8d2efb815362f6ee6773e5 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 21:32:00 +0200 Subject: [PATCH 12/48] Support sources.list.d (i.e. when no sources.list exists; closes #650300) --- bin/xt-guess-suite-and-mirror | 64 ++++++++++++++++++----------------- debian/changelog | 1 + 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/bin/xt-guess-suite-and-mirror b/bin/xt-guess-suite-and-mirror index 4e437e1..4fc7fe5 100755 --- a/bin/xt-guess-suite-and-mirror +++ b/bin/xt-guess-suite-and-mirror @@ -68,7 +68,8 @@ my %fallback_suite = ( Debian => 'stable', Ubuntu => 'lucid' ); # Where to look for the sources.list to parse -my $sources_list_file = '/etc/apt/sources.list'; +my @sources_list_files = ( '/etc/apt/sources.list', + glob('/etc/apt/sources.list.d/*.list')); use File::Slurp; use Getopt::Long; @@ -108,48 +109,49 @@ if ($want_manual) { pod2usage( -verbose => 2 ); } -if (-r $sources_list_file) { - # sources.list exists, so it's something debianoid. +all_sources_list_files: foreach my $sources_list_file (@sources_list_files) { + if (-r $sources_list_file) { + # sources.list file exists, so it's something debianoid. - # read sources.list and split it into lines - my @sources_list = read_file($sources_list_file); + # read sources.list and split it into lines + my @sources_list = read_file($sources_list_file); - # Find the first line which is a Debian or Ubuntu mirror but not - # an updates, backports, volatile or security mirror. - foreach my $sources_list_entry (@sources_list) { - # Normalize line - chomp($sources_list_entry); - $sources_list_entry =~ s/^\s*(.*?)\s*$/$1/; + # Find the first line which is a Debian or Ubuntu mirror but not + # an updates, backports, volatile or security mirror. + foreach my $sources_list_entry (@sources_list) { + # Normalize line + chomp($sources_list_entry); + $sources_list_entry =~ s/^\s*(.*?)\s*$/$1/; - # Skip definite non-entries - next if $sources_list_entry =~ /^\s*($|#)/; + # Skip definite non-entries + next if $sources_list_entry =~ /^\s*($|#)/; - # Split up into fields - my @source_components = split(/\s+/, $sources_list_entry); + # Split up into fields + my @source_components = split(/\s+/, $sources_list_entry); - # Minimum number of components is 4 - next if $#source_components < 3; + # Minimum number of components is 4 + next if $#source_components < 3; - # Don't use deb-src entries. - next if $source_components[0] eq 'deb-src'; + # Don't use deb-src entries. + next if $source_components[0] eq 'deb-src'; - # Skip updates, backports, volatile or security mirror. - next if $source_components[2] !~ /^[a-z]+$/; + # Skip updates, backports, volatile or security mirror. + next if $source_components[2] !~ /^[a-z]+$/; - if ($source_components[1] =~ m(/debian/?$|/ubuntu/?$)) { - # Seems a typical mirror. Let's use that one + if ($source_components[1] =~ m(/debian/?$|/ubuntu/?$)) { + # Seems a typical mirror. Let's use that one - $mirror = $source_components[1]; - $suite = $source_components[2]; + $mirror = $source_components[1]; + $suite = $source_components[2]; - $found = 1; - last; - } + $found = 1; + last all_sources_list_files; + } + } + + warn "Couldn't parse $sources_list_file of the Dom0.\n" unless $found; } - - warn "Couldn't parse $sources_list_file of the Dom0.\n" unless $found; } - my $lsb_release = `which lsb_release`; chomp($lsb_release); diff --git a/debian/changelog b/debian/changelog index 766f1dc..93605d6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low - Fix wildcard vs regexp in memory configuration parsing. - Fix misbehaviour if --ip option is passed multiple times (Closes: #652110; Thanks Brian Bennett!) + - Supports /etc/apt/sources.list.d/ (Closes: #650300) * No more suggest evms-cli -- it's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. * Bump Standards-Version to 3.9.3 (no changes) From 3e44a19a6640d5eff9eadbbc9363d9131d068b9f Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 21:42:03 +0200 Subject: [PATCH 13/48] xt-guess-suite-and-mirror exits with non-zero if no proper mirror could be found --- bin/xt-guess-suite-and-mirror | 5 +++-- debian/changelog | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/xt-guess-suite-and-mirror b/bin/xt-guess-suite-and-mirror index 4fc7fe5..7bf4e16 100755 --- a/bin/xt-guess-suite-and-mirror +++ b/bin/xt-guess-suite-and-mirror @@ -148,10 +148,11 @@ all_sources_list_files: foreach my $sources_list_file (@sources_list_files) { last all_sources_list_files; } } - - warn "Couldn't parse $sources_list_file of the Dom0.\n" unless $found; } } +die "Couldn't find a useful entry in the sources.list files of the Dom0. Tried:\n ". + join("\n ", @sources_list_files)."\n" unless $found; + my $lsb_release = `which lsb_release`; chomp($lsb_release); diff --git a/debian/changelog b/debian/changelog index 93605d6..379adb2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,9 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low - Fix misbehaviour if --ip option is passed multiple times (Closes: #652110; Thanks Brian Bennett!) - Supports /etc/apt/sources.list.d/ (Closes: #650300) + - xt-guess-suite-and-mirror exits with non-zero if no proper mirror + could be extracted from /etc/apt/sources.list or + /etc/apt/sources.list.d/*.list (Thanks Phil Frost!) * No more suggest evms-cli -- it's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. * Bump Standards-Version to 3.9.3 (no changes) From ce626e3e9f9d5bcc292115e27c6f82c84fa4f434 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 21:50:36 +0200 Subject: [PATCH 14/48] Add dependency on openssh-client for ssh-keygen (Closes: #649108) --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 379adb2..bc05be0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,7 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low - xt-guess-suite-and-mirror exits with non-zero if no proper mirror could be extracted from /etc/apt/sources.list or /etc/apt/sources.list.d/*.list (Thanks Phil Frost!) + * Add dependency on openssh-client for ssh-keygen (Closes: #649108) * No more suggest evms-cli -- it's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. * Bump Standards-Version to 3.9.3 (no changes) diff --git a/debian/control b/debian/control index 43aeb06..2733130 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Vcs-Git: git://gitorious.org/xen-tools/xen-tools.git Package: xen-tools Architecture: all -Depends: debootstrap | cdebootstrap, perl-modules, libtext-template-perl, libconfig-inifiles-perl, libfile-slurp-perl, ${misc:Depends} +Depends: debootstrap | cdebootstrap, perl-modules, libtext-template-perl, libconfig-inifiles-perl, libfile-slurp-perl, ${misc:Depends}, openssh-client Recommends: xen-hypervisor-amd64 | xen-hypervisor-i386 | xen-hypervisor-i386-pae, rinse, xen-shell, libexpect-perl Suggests: reiserfsprogs, xfsprogs, xen-utils, cfengine2, btrfs-tools Description: Tools to manage Xen virtual servers From f4103617e6b67977ab25e44109028ccbbbbd0b42 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 22:00:03 +0200 Subject: [PATCH 15/48] Update README and long description in debian/control for new releases --- README | 9 ++++++--- debian/control | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README b/README index 001d779..db80872 100644 --- a/README +++ b/README @@ -29,7 +29,7 @@ About: * Etch 4.0 * Lenny 5.0 * Squeeze 6.0 - * Wheezy 7.0 (preliminary support as it's not yet available) + * Wheezy 7.0 * Sid (works at least at the moment of writing :-) Ubuntu: @@ -42,8 +42,11 @@ About: * Jaunty Jackaplope 9.04 * Karmic Koala 9.10 * Lucid Lynx 10.04 - * Maverick Meerkat 10.10 (works at least at the moment of writing :-) - * Natty Narwhal 11.04 (preliminary support as it's not yet available) + * Maverick Meerkat 10.10 + * Natty Narwhal 11.04 + * Oneiric Ocelot 11.10 + * Precise Pangolin 12.04 + * Quantal Quetzal 12.10 (preliminary support as it's not yet available) [1] There is an issue with debootstrap on hardy not installing ksyslogd This can be fixed by chrooting into the newly installed system diff --git a/debian/control b/debian/control index 2733130..dfaa30b 100644 --- a/debian/control +++ b/debian/control @@ -25,6 +25,7 @@ Description: Tools to manage Xen virtual servers * Debian 4.0 Etch * Debian 5.0 Lenny * Debian 6.0 Squeeze + * Debian 7.0 Wheezy * Debian Sid (Unstable) * Ubuntu 6.06 Dapper Drake (LTS) * Ubuntu 6.10 Edgy Eft @@ -36,3 +37,6 @@ Description: Tools to manage Xen virtual servers * Ubuntu 9.10 Karmic Koala * Ubuntu 10.04 Lucid Lynx (LTS) * Ubuntu 10.10 Maverick Meerkat + * Ubuntu 11.04 Natty Narwhal + * Ubuntu 11.10 Oneiric Ocelot + * Ubuntu 12.04 Precise Pangolin (LTS) From 81656a9ef57c4b4e3a8edee4f735568f4f56af8e Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Mon, 7 May 2012 22:16:39 +0200 Subject: [PATCH 16/48] only attempt to generate the ssh host keys if not already present --- hooks/dapper/70-install-ssh | 4 ++++ hooks/debian/70-install-ssh | 4 ++++ hooks/edgy/70-install-ssh | 4 ++++ hooks/intrepid/70-install-ssh | 4 ++++ hooks/karmic/70-install-ssh | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/hooks/dapper/70-install-ssh b/hooks/dapper/70-install-ssh index 8dfe2c5..e6eca32 100755 --- a/hooks/dapper/70-install-ssh +++ b/hooks/dapper/70-install-ssh @@ -36,20 +36,24 @@ mkdir -p ${prefix}/etc/ssh # # Second, Generate the Host RSA Key # +if [ ! -f ${prefix}/etc/ssh/ssh_host_rsa_key ]; then if ssh-keygen -t rsa -N "" -f ${prefix}/etc/ssh/ssh_host_rsa_key -C "root@${hostname}"; then logMessage "successfully generetaged Host RSA" else logMessage "failed to generate Host RSA Key" fi +fi # # Third, Generate the Host DSA Key # +if [ ! -f ${prefix}/etc/ssh/ssh_host_dsa_key ]; then if ssh-keygen -t dsa -N "" -f ${prefix}/etc/ssh/ssh_host_dsa_key -C "root@${hostname}"; then logMessage "successfully generetaged Host DSA" else logMessage "failed to generate Host DSA Key" fi +fi # # Install ssh diff --git a/hooks/debian/70-install-ssh b/hooks/debian/70-install-ssh index 8dfe2c5..e6eca32 100755 --- a/hooks/debian/70-install-ssh +++ b/hooks/debian/70-install-ssh @@ -36,20 +36,24 @@ mkdir -p ${prefix}/etc/ssh # # Second, Generate the Host RSA Key # +if [ ! -f ${prefix}/etc/ssh/ssh_host_rsa_key ]; then if ssh-keygen -t rsa -N "" -f ${prefix}/etc/ssh/ssh_host_rsa_key -C "root@${hostname}"; then logMessage "successfully generetaged Host RSA" else logMessage "failed to generate Host RSA Key" fi +fi # # Third, Generate the Host DSA Key # +if [ ! -f ${prefix}/etc/ssh/ssh_host_dsa_key ]; then if ssh-keygen -t dsa -N "" -f ${prefix}/etc/ssh/ssh_host_dsa_key -C "root@${hostname}"; then logMessage "successfully generetaged Host DSA" else logMessage "failed to generate Host DSA Key" fi +fi # # Install ssh diff --git a/hooks/edgy/70-install-ssh b/hooks/edgy/70-install-ssh index 8dfe2c5..e6eca32 100755 --- a/hooks/edgy/70-install-ssh +++ b/hooks/edgy/70-install-ssh @@ -36,20 +36,24 @@ mkdir -p ${prefix}/etc/ssh # # Second, Generate the Host RSA Key # +if [ ! -f ${prefix}/etc/ssh/ssh_host_rsa_key ]; then if ssh-keygen -t rsa -N "" -f ${prefix}/etc/ssh/ssh_host_rsa_key -C "root@${hostname}"; then logMessage "successfully generetaged Host RSA" else logMessage "failed to generate Host RSA Key" fi +fi # # Third, Generate the Host DSA Key # +if [ ! -f ${prefix}/etc/ssh/ssh_host_dsa_key ]; then if ssh-keygen -t dsa -N "" -f ${prefix}/etc/ssh/ssh_host_dsa_key -C "root@${hostname}"; then logMessage "successfully generetaged Host DSA" else logMessage "failed to generate Host DSA Key" fi +fi # # Install ssh diff --git a/hooks/intrepid/70-install-ssh b/hooks/intrepid/70-install-ssh index 8dfe2c5..e6eca32 100755 --- a/hooks/intrepid/70-install-ssh +++ b/hooks/intrepid/70-install-ssh @@ -36,20 +36,24 @@ mkdir -p ${prefix}/etc/ssh # # Second, Generate the Host RSA Key # +if [ ! -f ${prefix}/etc/ssh/ssh_host_rsa_key ]; then if ssh-keygen -t rsa -N "" -f ${prefix}/etc/ssh/ssh_host_rsa_key -C "root@${hostname}"; then logMessage "successfully generetaged Host RSA" else logMessage "failed to generate Host RSA Key" fi +fi # # Third, Generate the Host DSA Key # +if [ ! -f ${prefix}/etc/ssh/ssh_host_dsa_key ]; then if ssh-keygen -t dsa -N "" -f ${prefix}/etc/ssh/ssh_host_dsa_key -C "root@${hostname}"; then logMessage "successfully generetaged Host DSA" else logMessage "failed to generate Host DSA Key" fi +fi # # Install ssh diff --git a/hooks/karmic/70-install-ssh b/hooks/karmic/70-install-ssh index 8dfe2c5..e6eca32 100755 --- a/hooks/karmic/70-install-ssh +++ b/hooks/karmic/70-install-ssh @@ -36,20 +36,24 @@ mkdir -p ${prefix}/etc/ssh # # Second, Generate the Host RSA Key # +if [ ! -f ${prefix}/etc/ssh/ssh_host_rsa_key ]; then if ssh-keygen -t rsa -N "" -f ${prefix}/etc/ssh/ssh_host_rsa_key -C "root@${hostname}"; then logMessage "successfully generetaged Host RSA" else logMessage "failed to generate Host RSA Key" fi +fi # # Third, Generate the Host DSA Key # +if [ ! -f ${prefix}/etc/ssh/ssh_host_dsa_key ]; then if ssh-keygen -t dsa -N "" -f ${prefix}/etc/ssh/ssh_host_dsa_key -C "root@${hostname}"; then logMessage "successfully generetaged Host DSA" else logMessage "failed to generate Host DSA Key" fi +fi # # Install ssh From cfd615b62d9ed6dd98b7a8098e8c675258c82c21 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 22:18:34 +0200 Subject: [PATCH 17/48] Mention Vagrant Cascadian's patch in the changelog --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index bc05be0..3c54ded 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low - xt-guess-suite-and-mirror exits with non-zero if no proper mirror could be extracted from /etc/apt/sources.list or /etc/apt/sources.list.d/*.list (Thanks Phil Frost!) + - Only attempts to generate the ssh host keys if not already present + (Closes: #607236; Thanks Vagrant Cascadian!) * Add dependency on openssh-client for ssh-keygen (Closes: #649108) * No more suggest evms-cli -- it's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. From 1b4edee2d32d23de6c8643dbe6c439af4af169bd Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 22:55:33 +0200 Subject: [PATCH 18/48] Use $ips instead of $IP_ADDRESSES to keep variable names consistent Update t/xt-create-xen-config.t to cope with the new variable --- bin/xen-create-image | 2 +- etc/xm.tmpl | 2 +- t/xt-create-xen-config.t | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index df9700e..d116d33 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -3992,7 +3992,7 @@ sub runXenConfigCreation # # Make sure the template gets a list of all IPs # - $ENV{ 'IP_ADDRESSES' } = $IP_ADDRESSES; + $ENV{ 'ips' } = $IP_ADDRESSES; logprint("\nCreating Xen configuration file\n"); diff --git a/etc/xm.tmpl b/etc/xm.tmpl index c35d0de..e023560 100644 --- a/etc/xm.tmpl +++ b/etc/xm.tmpl @@ -135,7 +135,7 @@ name = '{$hostname}' $br = ",bridge=$bridge" } - $OUT .= "vif = [ 'ip=$IP_ADDRESSES"; + $OUT .= "vif = [ 'ip=$ips"; $OUT .= "$m"; $OUT .= "$vn"; $OUT .= "$br"; diff --git a/t/xt-create-xen-config.t b/t/xt-create-xen-config.t index 13539f5..e304f85 100755 --- a/t/xt-create-xen-config.t +++ b/t/xt-create-xen-config.t @@ -36,28 +36,28 @@ noMentionOf( "ip=", # is no mention of DHCP. # testOutputContains( "ip=192.168.1.1", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp' ); + memory => 128, ips => '192.168.1.1', dir => '/tmp' ); noMentionOf( "dhcp", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp' ); + memory => 128, ips => '192.168.1.1', dir => '/tmp' ); # # SCSI based systems: # testOutputContains( "xvda", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp' ); + memory => 128, ips => '192.168.1.1', dir => '/tmp' ); testOutputContains( "/dev/xvda1 ro", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp' ); + memory => 128, ips => '192.168.1.1', dir => '/tmp' ); noMentionOf( "hda1", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp' ); + memory => 128, ips => '192.168.1.1', dir => '/tmp' ); # # IDE based systems # testOutputContains( "hda1", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp', ide => 1 ); + memory => 128, ips => '192.168.1.1', dir => '/tmp', ide => 1 ); testOutputContains( "/dev/hda1 ro", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp', ide => 1 ); + memory => 128, ips => '192.168.1.1', dir => '/tmp', ide => 1 ); From 4d98232656d54632d54427d08a02395accde55d7 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 22:56:33 +0200 Subject: [PATCH 19/48] Replace tabs with spaces --- bin/xen-create-nfs | 30 +++++++++---------- bin/xt-guess-suite-and-mirror | 56 +++++++++++++++++------------------ 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/bin/xen-create-nfs b/bin/xen-create-nfs index 5b1dc3a..a118c94 100755 --- a/bin/xen-create-nfs +++ b/bin/xen-create-nfs @@ -385,23 +385,23 @@ sub testArguments # this code is borrowed for now... if ( exists($CONFIG{ 'memory' }) and - defined($CONFIG{ 'memory' }) ) { + defined($CONFIG{ 'memory' }) ) { - # - # The memory size: Convert Gb -> Mb. - # - if ( $CONFIG{ 'memory' } =~ /^(\d+)Gb.*$/i ) - { - $CONFIG{ 'memory' } = $1 * 1024; - } + # + # The memory size: Convert Gb -> Mb. + # + if ( $CONFIG{ 'memory' } =~ /^(\d+)Gb.*$/i ) + { + $CONFIG{ 'memory' } = $1 * 1024; + } - # - # Remove any trailing Mb. - # - if ( $CONFIG{ 'memory' } =~ /^(\d+)Mb.*$/i ) - { - $CONFIG{ 'memory' } = $1; - } + # + # Remove any trailing Mb. + # + if ( $CONFIG{ 'memory' } =~ /^(\d+)Mb.*$/i ) + { + $CONFIG{ 'memory' } = $1; + } } # All OK. diff --git a/bin/xt-guess-suite-and-mirror b/bin/xt-guess-suite-and-mirror index 7bf4e16..a8bb8c3 100755 --- a/bin/xt-guess-suite-and-mirror +++ b/bin/xt-guess-suite-and-mirror @@ -69,7 +69,7 @@ my %fallback_suite = ( Debian => 'stable', # Where to look for the sources.list to parse my @sources_list_files = ( '/etc/apt/sources.list', - glob('/etc/apt/sources.list.d/*.list')); + glob('/etc/apt/sources.list.d/*.list')); use File::Slurp; use Getopt::Long; @@ -111,43 +111,43 @@ if ($want_manual) { all_sources_list_files: foreach my $sources_list_file (@sources_list_files) { if (-r $sources_list_file) { - # sources.list file exists, so it's something debianoid. + # sources.list file exists, so it's something debianoid. - # read sources.list and split it into lines - my @sources_list = read_file($sources_list_file); + # read sources.list and split it into lines + my @sources_list = read_file($sources_list_file); - # Find the first line which is a Debian or Ubuntu mirror but not - # an updates, backports, volatile or security mirror. - foreach my $sources_list_entry (@sources_list) { - # Normalize line - chomp($sources_list_entry); - $sources_list_entry =~ s/^\s*(.*?)\s*$/$1/; + # Find the first line which is a Debian or Ubuntu mirror but not + # an updates, backports, volatile or security mirror. + foreach my $sources_list_entry (@sources_list) { + # Normalize line + chomp($sources_list_entry); + $sources_list_entry =~ s/^\s*(.*?)\s*$/$1/; - # Skip definite non-entries - next if $sources_list_entry =~ /^\s*($|#)/; + # Skip definite non-entries + next if $sources_list_entry =~ /^\s*($|#)/; - # Split up into fields - my @source_components = split(/\s+/, $sources_list_entry); + # Split up into fields + my @source_components = split(/\s+/, $sources_list_entry); - # Minimum number of components is 4 - next if $#source_components < 3; + # Minimum number of components is 4 + next if $#source_components < 3; - # Don't use deb-src entries. - next if $source_components[0] eq 'deb-src'; + # Don't use deb-src entries. + next if $source_components[0] eq 'deb-src'; - # Skip updates, backports, volatile or security mirror. - next if $source_components[2] !~ /^[a-z]+$/; + # Skip updates, backports, volatile or security mirror. + next if $source_components[2] !~ /^[a-z]+$/; - if ($source_components[1] =~ m(/debian/?$|/ubuntu/?$)) { - # Seems a typical mirror. Let's use that one + if ($source_components[1] =~ m(/debian/?$|/ubuntu/?$)) { + # Seems a typical mirror. Let's use that one - $mirror = $source_components[1]; - $suite = $source_components[2]; + $mirror = $source_components[1]; + $suite = $source_components[2]; - $found = 1; - last all_sources_list_files; - } - } + $found = 1; + last all_sources_list_files; + } + } } } die "Couldn't find a useful entry in the sources.list files of the Dom0. Tried:\n ". From 57e6d5d480b99f57d426546c2a4cf84296403925 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 22:55:33 +0200 Subject: [PATCH 20/48] Use $ips instead of $IP_ADDRESSES to keep variable names consistent Update t/xt-create-xen-config.t to cope with the new variable --- bin/xen-create-image | 2 +- etc/xm.tmpl | 2 +- t/xt-create-xen-config.t | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index df42c97..d41d528 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -3992,7 +3992,7 @@ sub runXenConfigCreation # # Make sure the template gets a list of all IPs # - $ENV{ 'IP_ADDRESSES' } = $IP_ADDRESSES; + $ENV{ 'ips' } = $IP_ADDRESSES; logprint("\nCreating Xen configuration file\n"); diff --git a/etc/xm.tmpl b/etc/xm.tmpl index c35d0de..e023560 100644 --- a/etc/xm.tmpl +++ b/etc/xm.tmpl @@ -135,7 +135,7 @@ name = '{$hostname}' $br = ",bridge=$bridge" } - $OUT .= "vif = [ 'ip=$IP_ADDRESSES"; + $OUT .= "vif = [ 'ip=$ips"; $OUT .= "$m"; $OUT .= "$vn"; $OUT .= "$br"; diff --git a/t/xt-create-xen-config.t b/t/xt-create-xen-config.t index 13539f5..e304f85 100755 --- a/t/xt-create-xen-config.t +++ b/t/xt-create-xen-config.t @@ -36,28 +36,28 @@ noMentionOf( "ip=", # is no mention of DHCP. # testOutputContains( "ip=192.168.1.1", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp' ); + memory => 128, ips => '192.168.1.1', dir => '/tmp' ); noMentionOf( "dhcp", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp' ); + memory => 128, ips => '192.168.1.1', dir => '/tmp' ); # # SCSI based systems: # testOutputContains( "xvda", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp' ); + memory => 128, ips => '192.168.1.1', dir => '/tmp' ); testOutputContains( "/dev/xvda1 ro", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp' ); + memory => 128, ips => '192.168.1.1', dir => '/tmp' ); noMentionOf( "hda1", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp' ); + memory => 128, ips => '192.168.1.1', dir => '/tmp' ); # # IDE based systems # testOutputContains( "hda1", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp', ide => 1 ); + memory => 128, ips => '192.168.1.1', dir => '/tmp', ide => 1 ); testOutputContains( "/dev/hda1 ro", - memory => 128, ip1 => '192.168.1.1', dir => '/tmp', ide => 1 ); + memory => 128, ips => '192.168.1.1', dir => '/tmp', ide => 1 ); From 7a01a08aa4b869c34039f9a8b1e70eb275d07345 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 22:56:33 +0200 Subject: [PATCH 21/48] Replace tabs with spaces --- bin/xen-create-nfs | 30 +++++++++---------- bin/xt-guess-suite-and-mirror | 56 +++++++++++++++++------------------ 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/bin/xen-create-nfs b/bin/xen-create-nfs index 5b1dc3a..a118c94 100755 --- a/bin/xen-create-nfs +++ b/bin/xen-create-nfs @@ -385,23 +385,23 @@ sub testArguments # this code is borrowed for now... if ( exists($CONFIG{ 'memory' }) and - defined($CONFIG{ 'memory' }) ) { + defined($CONFIG{ 'memory' }) ) { - # - # The memory size: Convert Gb -> Mb. - # - if ( $CONFIG{ 'memory' } =~ /^(\d+)Gb.*$/i ) - { - $CONFIG{ 'memory' } = $1 * 1024; - } + # + # The memory size: Convert Gb -> Mb. + # + if ( $CONFIG{ 'memory' } =~ /^(\d+)Gb.*$/i ) + { + $CONFIG{ 'memory' } = $1 * 1024; + } - # - # Remove any trailing Mb. - # - if ( $CONFIG{ 'memory' } =~ /^(\d+)Mb.*$/i ) - { - $CONFIG{ 'memory' } = $1; - } + # + # Remove any trailing Mb. + # + if ( $CONFIG{ 'memory' } =~ /^(\d+)Mb.*$/i ) + { + $CONFIG{ 'memory' } = $1; + } } # All OK. diff --git a/bin/xt-guess-suite-and-mirror b/bin/xt-guess-suite-and-mirror index 7bf4e16..a8bb8c3 100755 --- a/bin/xt-guess-suite-and-mirror +++ b/bin/xt-guess-suite-and-mirror @@ -69,7 +69,7 @@ my %fallback_suite = ( Debian => 'stable', # Where to look for the sources.list to parse my @sources_list_files = ( '/etc/apt/sources.list', - glob('/etc/apt/sources.list.d/*.list')); + glob('/etc/apt/sources.list.d/*.list')); use File::Slurp; use Getopt::Long; @@ -111,43 +111,43 @@ if ($want_manual) { all_sources_list_files: foreach my $sources_list_file (@sources_list_files) { if (-r $sources_list_file) { - # sources.list file exists, so it's something debianoid. + # sources.list file exists, so it's something debianoid. - # read sources.list and split it into lines - my @sources_list = read_file($sources_list_file); + # read sources.list and split it into lines + my @sources_list = read_file($sources_list_file); - # Find the first line which is a Debian or Ubuntu mirror but not - # an updates, backports, volatile or security mirror. - foreach my $sources_list_entry (@sources_list) { - # Normalize line - chomp($sources_list_entry); - $sources_list_entry =~ s/^\s*(.*?)\s*$/$1/; + # Find the first line which is a Debian or Ubuntu mirror but not + # an updates, backports, volatile or security mirror. + foreach my $sources_list_entry (@sources_list) { + # Normalize line + chomp($sources_list_entry); + $sources_list_entry =~ s/^\s*(.*?)\s*$/$1/; - # Skip definite non-entries - next if $sources_list_entry =~ /^\s*($|#)/; + # Skip definite non-entries + next if $sources_list_entry =~ /^\s*($|#)/; - # Split up into fields - my @source_components = split(/\s+/, $sources_list_entry); + # Split up into fields + my @source_components = split(/\s+/, $sources_list_entry); - # Minimum number of components is 4 - next if $#source_components < 3; + # Minimum number of components is 4 + next if $#source_components < 3; - # Don't use deb-src entries. - next if $source_components[0] eq 'deb-src'; + # Don't use deb-src entries. + next if $source_components[0] eq 'deb-src'; - # Skip updates, backports, volatile or security mirror. - next if $source_components[2] !~ /^[a-z]+$/; + # Skip updates, backports, volatile or security mirror. + next if $source_components[2] !~ /^[a-z]+$/; - if ($source_components[1] =~ m(/debian/?$|/ubuntu/?$)) { - # Seems a typical mirror. Let's use that one + if ($source_components[1] =~ m(/debian/?$|/ubuntu/?$)) { + # Seems a typical mirror. Let's use that one - $mirror = $source_components[1]; - $suite = $source_components[2]; + $mirror = $source_components[1]; + $suite = $source_components[2]; - $found = 1; - last all_sources_list_files; - } - } + $found = 1; + last all_sources_list_files; + } + } } } die "Couldn't find a useful entry in the sources.list files of the Dom0. Tried:\n ". From fcb6b0645c15e5709da8b779589d163e0018ff0b Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 23:42:31 +0200 Subject: [PATCH 22/48] Properly set $FAIL instead of just calling die() --- bin/xen-create-image | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index d116d33..3b16e7f 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -1251,7 +1251,7 @@ sub testXenConfig # Read the configuration file. # open( CONFIG, "<", "/etc/xen/xend-config.sxp" ) or - die "Failed to read /etc/xen/xend-config.sxp: $!"; + fail("Failed to read /etc/xen/xend-config.sxp: $!"); while () { next if ( !$_ || !length($_) ); @@ -1451,7 +1451,7 @@ sub readConfigurationFile my $line = ""; - open( FILE, "<", $file ) or die "Cannot read file '$file' - $!"; + open( FILE, "<", $file ) or fail("Cannot read file '$file' - $!"); while ( defined( $line = ) ) { @@ -1640,7 +1640,7 @@ sub checkOption my $type = $optionsTypes{ $option }; # First, check if type exists - die unless exists $types{ $type }; + fail("Type $type does not exist") unless exists $types{ $type }; my $check = $types{ $type }{ 'check' }; if ( @@ -1656,7 +1656,7 @@ sub checkOption } } else { # Option did _not_ validate - die "ERROR: '$option' argument " . $types{ $type }{ 'message' }; + fail("ERROR: '$option' argument " . $types{ $type }{ 'message' }); } } } @@ -2940,7 +2940,7 @@ sub createLoopbackImages eval {mkpath( $output, 0, 0755 );}; if ($@) { - die "Cannot create directory tree $output - $@"; + fail("Cannot create directory tree $output - $@"); } } @@ -3759,7 +3759,7 @@ sub findIP # Open and read the file. # open( RANGE, "<", $CONFIG{ 'ipfile' } ) or - die "Failed to read $CONFIG{'ipfile'} - $!"; + fail("Failed to read $CONFIG{'ipfile'} - $!"); my @lines = ; my @updated; close(RANGE); @@ -3790,7 +3790,7 @@ sub findIP # Now write out the new entries. # open( RANGE, ">", $CONFIG{ 'ipfile' } ) or - die "Failed to write to $CONFIG{'ipfile'} - $!"; + fail("Failed to write to $CONFIG{'ipfile'} - $!"); print RANGE join( "\n", @updated ); close(RANGE); @@ -4063,7 +4063,7 @@ sub setupRootPassword } else { - die "oops... unknown hashing method, should not happen!"; + fail("oops... unknown hashing method, should not happen!"); } my $hash = crypt($PASSWORD, $hash_method . $salt); @@ -4074,8 +4074,8 @@ sub setupRootPassword # my $tmp_shadow_path = "$shadow_path.tmp"; cp("$shadow_path","$tmp_shadow_path"); - open(TMP, "<", $tmp_shadow_path) or die $!; - open(SHADOW, ">", $shadow_path) or die $!; + open(TMP, "<", $tmp_shadow_path) or fail($!); + open(SHADOW, ">", $shadow_path) or fail($!); my $line; while(defined($line = )) { @@ -4116,6 +4116,23 @@ sub generatePassword { } +=begin doc + + Properly set $FAIL on die + +=end doc + +=cut + +sub fail +{ + logprint(@_); + $FAIL = 1; + exit 127; +} + + + =begin doc Print the given string to the logfile. From b5175f6f3b9290c8c19283f4fe59e90decba6c49 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 7 May 2012 23:42:31 +0200 Subject: [PATCH 23/48] Properly set $FAIL instead of just calling die() --- bin/xen-create-image | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index d41d528..959713c 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -1251,7 +1251,7 @@ sub testXenConfig # Read the configuration file. # open( CONFIG, "<", "/etc/xen/xend-config.sxp" ) or - die "Failed to read /etc/xen/xend-config.sxp: $!"; + fail("Failed to read /etc/xen/xend-config.sxp: $!"); while () { next if ( !$_ || !length($_) ); @@ -1451,7 +1451,7 @@ sub readConfigurationFile my $line = ""; - open( FILE, "<", $file ) or die "Cannot read file '$file' - $!"; + open( FILE, "<", $file ) or fail("Cannot read file '$file' - $!"); while ( defined( $line = ) ) { @@ -1640,7 +1640,7 @@ sub checkOption my $type = $optionsTypes{ $option }; # First, check if type exists - die unless exists $types{ $type }; + fail("Type $type does not exist") unless exists $types{ $type }; my $check = $types{ $type }{ 'check' }; if ( @@ -1656,7 +1656,7 @@ sub checkOption } } else { # Option did _not_ validate - die "ERROR: '$option' argument " . $types{ $type }{ 'message' }; + fail("ERROR: '$option' argument " . $types{ $type }{ 'message' }); } } } @@ -2940,7 +2940,7 @@ sub createLoopbackImages eval {mkpath( $output, 0, 0755 );}; if ($@) { - die "Cannot create directory tree $output - $@"; + fail("Cannot create directory tree $output - $@"); } } @@ -3759,7 +3759,7 @@ sub findIP # Open and read the file. # open( RANGE, "<", $CONFIG{ 'ipfile' } ) or - die "Failed to read $CONFIG{'ipfile'} - $!"; + fail("Failed to read $CONFIG{'ipfile'} - $!"); my @lines = ; my @updated; close(RANGE); @@ -3790,7 +3790,7 @@ sub findIP # Now write out the new entries. # open( RANGE, ">", $CONFIG{ 'ipfile' } ) or - die "Failed to write to $CONFIG{'ipfile'} - $!"; + fail("Failed to write to $CONFIG{'ipfile'} - $!"); print RANGE join( "\n", @updated ); close(RANGE); @@ -4063,7 +4063,7 @@ sub setupRootPassword } else { - die "oops... unknown hashing method, should not happen!"; + fail("oops... unknown hashing method, should not happen!"); } my $hash = crypt($PASSWORD, $hash_method . $salt); @@ -4074,8 +4074,8 @@ sub setupRootPassword # my $tmp_shadow_path = "$shadow_path.tmp"; cp("$shadow_path","$tmp_shadow_path"); - open(TMP, "<", $tmp_shadow_path) or die $!; - open(SHADOW, ">", $shadow_path) or die $!; + open(TMP, "<", $tmp_shadow_path) or fail($!); + open(SHADOW, ">", $shadow_path) or fail($!); my $line; while(defined($line = )) { @@ -4116,6 +4116,23 @@ sub generatePassword { } +=begin doc + + Properly set $FAIL on die + +=end doc + +=cut + +sub fail +{ + logprint(@_); + $FAIL = 1; + exit 127; +} + + + =begin doc Print the given string to the logfile. From 846266eedb7cefc929fa2d341c1fad4897a67cff Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Tue, 8 May 2012 00:11:23 +0200 Subject: [PATCH 24/48] Mention Alexander Mette in the changelog as he also sent a patch for #652110, just upstream --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3c54ded..1ec1195 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,7 +10,7 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low #648814) - Fix wildcard vs regexp in memory configuration parsing. - Fix misbehaviour if --ip option is passed multiple times (Closes: - #652110; Thanks Brian Bennett!) + #652110; Thanks Brian Bennett and Alexander Mette!) - Supports /etc/apt/sources.list.d/ (Closes: #650300) - xt-guess-suite-and-mirror exits with non-zero if no proper mirror could be extracted from /etc/apt/sources.list or From c74cb008979a0c8e880c5edf029fd658ff07b218 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Tue, 8 May 2012 00:27:39 +0200 Subject: [PATCH 25/48] Discontinue 4.2 branch and continue towards a 4.3 release --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1ec1195..73c06bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low +xen-tools (4.3~dev-1) UNRELEASED; urgency=low * New upstream snapshot - Correctly checks and documents valid values for @@ -25,7 +25,7 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low - copyright-refers-to-symlink-license - debian-rules-missing-recommended-target - -- Axel Beckert Mon, 07 May 2012 21:21:33 +0200 + -- Axel Beckert Tue, 08 May 2012 00:22:17 +0200 xen-tools (4.2.1-1) unstable; urgency=low From fefc8c11065744e1aeadb229bd9bd0b694d085d4 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Tue, 8 May 2012 00:41:21 +0200 Subject: [PATCH 26/48] Mention Alex Tomlins' --apt_proxy option --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index 73c06bc..7765ab7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,7 @@ xen-tools (4.3~dev-1) UNRELEASED; urgency=low /etc/apt/sources.list.d/*.list (Thanks Phil Frost!) - Only attempts to generate the ssh host keys if not already present (Closes: #607236; Thanks Vagrant Cascadian!) + - New option --apt_proxy (Thanks Alex Tomlins!) * Add dependency on openssh-client for ssh-keygen (Closes: #649108) * No more suggest evms-cli -- it's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. From 00586d1443cdec5017566a2be8deb882f3938e3a Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Tue, 8 May 2012 00:42:50 +0200 Subject: [PATCH 27/48] Add build-dependency on devscripts for checkbashisms used in t/portable-shells.t --- debian/changelog | 2 ++ debian/control | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7765ab7..1830f82 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,8 @@ xen-tools (4.3~dev-1) UNRELEASED; urgency=low (Closes: #607236; Thanks Vagrant Cascadian!) - New option --apt_proxy (Thanks Alex Tomlins!) * Add dependency on openssh-client for ssh-keygen (Closes: #649108) + * Add build-dependency on devscripts for checkbashisms used in + t/portable-shells.t * No more suggest evms-cli -- it's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. * Bump Standards-Version to 3.9.3 (no changes) diff --git a/debian/control b/debian/control index dfaa30b..13a9dcf 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: xen-tools Section: utils Priority: extra Maintainer: Axel Beckert -Build-Depends: debhelper (>= 7.0.0), libtest-pod-perl, libtext-template-perl +Build-Depends: debhelper (>= 7.0.0), libtest-pod-perl, libtext-template-perl, devscripts Standards-Version: 3.9.3 Homepage: http://xen-tools.org/software/xen-tools Vcs-Browser: http://gitorious.org/xen-tools/xen-tools From 8780d7d9eebf0bedcd1f200273bdbd9e611646b6 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Tue, 8 May 2012 00:48:12 +0200 Subject: [PATCH 28/48] Use dh_auto_test for build time tests and add according build-dependencies --- debian/changelog | 4 ++-- debian/control | 2 +- debian/rules | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1830f82..78c08de 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,8 +19,8 @@ xen-tools (4.3~dev-1) UNRELEASED; urgency=low (Closes: #607236; Thanks Vagrant Cascadian!) - New option --apt_proxy (Thanks Alex Tomlins!) * Add dependency on openssh-client for ssh-keygen (Closes: #649108) - * Add build-dependency on devscripts for checkbashisms used in - t/portable-shells.t + * Use dh_auto_test for build time tests and add according + build-dependencies on devscripts and libfile-slurp-perl. * No more suggest evms-cli -- it's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. * Bump Standards-Version to 3.9.3 (no changes) diff --git a/debian/control b/debian/control index 13a9dcf..0fbabbf 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: xen-tools Section: utils Priority: extra Maintainer: Axel Beckert -Build-Depends: debhelper (>= 7.0.0), libtest-pod-perl, libtext-template-perl, devscripts +Build-Depends: debhelper (>= 7.0.0), libtest-pod-perl, libtext-template-perl, libfile-slurp-perl, devscripts Standards-Version: 3.9.3 Homepage: http://xen-tools.org/software/xen-tools Vcs-Browser: http://gitorious.org/xen-tools/xen-tools diff --git a/debian/rules b/debian/rules index a7171b7..addafbf 100755 --- a/debian/rules +++ b/debian/rules @@ -28,6 +28,7 @@ install: build dh_testroot dh_prep + dh_auto_test make manpages make install prefix=`pwd`/debian/xen-tools From 7c64b9e7c9b363cdda38a43683ddaf76d9e4116b Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Tue, 8 May 2012 00:50:51 +0200 Subject: [PATCH 29/48] New --apt_proxy option will close #610457 --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 78c08de..28a16d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,7 +17,7 @@ xen-tools (4.3~dev-1) UNRELEASED; urgency=low /etc/apt/sources.list.d/*.list (Thanks Phil Frost!) - Only attempts to generate the ssh host keys if not already present (Closes: #607236; Thanks Vagrant Cascadian!) - - New option --apt_proxy (Thanks Alex Tomlins!) + - New option --apt_proxy (Closes: #610457; Thanks Alex Tomlins!) * Add dependency on openssh-client for ssh-keygen (Closes: #649108) * Use dh_auto_test for build time tests and add according build-dependencies on devscripts and libfile-slurp-perl. From 6a6d3876f6db03d5b17384473318414711d689ff Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Tue, 8 May 2012 00:58:56 +0200 Subject: [PATCH 30/48] Use $ENV{http_proxy} instead of prepending the command with a variable --- bin/xt-install-image | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/xt-install-image b/bin/xt-install-image index 37eb11e..2582bc5 100755 --- a/bin/xt-install-image +++ b/bin/xt-install-image @@ -762,18 +762,17 @@ sub do_debootstrap # # Setup http_proxy so that debootstrap pulls files through the apt-proxy # - my $PROXY = ''; if ( $CONFIG{ 'apt_proxy' } ) { print("Using apt_proxy: $CONFIG{'apt_proxy'}\n"); - $PROXY = "http_proxy=\"$CONFIG{'apt_proxy'}\""; + $ENV{'http_proxy'} = $CONFIG{'apt_proxy'}; } # # This is the command we'll run # my $command = - "$PROXY $cmd $EXTRA $CONFIG{'dist'} $CONFIG{'location'} $CONFIG{'mirror'}"; + "$cmd $EXTRA $CONFIG{'dist'} $CONFIG{'location'} $CONFIG{'mirror'}"; # # Run the command. From d0f85802bde041580961592491a497160b66073d Mon Sep 17 00:00:00 2001 From: John Hughes Date: Wed, 30 May 2012 19:40:12 +0200 Subject: [PATCH 31/48] Always write down root partition as first physical device Otherwise pygrub fails. Closes Debian bug report #609673 --- etc/xm.tmpl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/etc/xm.tmpl b/etc/xm.tmpl index e023560..c53970f 100644 --- a/etc/xm.tmpl +++ b/etc/xm.tmpl @@ -53,7 +53,17 @@ memory = '{$memory}' $OUT .= "disk = [\n"; for ( my $i = $#PARTITIONS; $i >= 0 ; $i-- ) { - $OUT .= " '$PARTITIONS[$i]{'imagetype'}$PARTITIONS[$i]{'image'},$device" . ( $i + 1 ) .",w',\n"; + if ( $PARTITIONS[$i]{'mountpoint'} eq '/' ) + { + $OUT .= " '$PARTITIONS[$i]{'imagetype'}$PARTITIONS[$i]{'image'},$device" . ( $i + 1 ) .",w',\n"; + } + } + for ( my $i = $#PARTITIONS; $i >= 0 ; $i-- ) + { + if ( $PARTITIONS[$i]{'mountpoint'} ne '/' ) + { + $OUT .= " '$PARTITIONS[$i]{'imagetype'}$PARTITIONS[$i]{'image'},$device" . ( $i + 1 ) .",w',\n"; + } } $OUT .= " ]\n"; } From 98e590eafafbb28b86b5517920e3612d00c04984 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 23:03:05 +0200 Subject: [PATCH 32/48] Changelog entry for John Hughes' fix for #609673 --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 28a16d0..9a22d31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,8 @@ xen-tools (4.3~dev-1) UNRELEASED; urgency=low - Only attempts to generate the ssh host keys if not already present (Closes: #607236; Thanks Vagrant Cascadian!) - New option --apt_proxy (Closes: #610457; Thanks Alex Tomlins!) + - Always write down root partition as first physical device, otherwise + pygrub fails (Closes: #609673) * Add dependency on openssh-client for ssh-keygen (Closes: #649108) * Use dh_auto_test for build time tests and add according build-dependencies on devscripts and libfile-slurp-perl. From 6018925b9794b8ab83e884c4f1d1b7deee16b397 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 20:40:51 +0200 Subject: [PATCH 33/48] No more expect at least one option to mkfs.* calls. Fixes btrfs creation. Closes Debian bug report #609982. --- bin/xen-create-image | 19 ++++--------------- debian/changelog | 2 ++ 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index 07051a4..4c2b385 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -3395,24 +3395,13 @@ sub createFilesystem # Split the command into "binary" + "args". Make sure that # the binary exists and is executable. # - if ( $command =~ /([^ ]+) (.*)$/ ) - { - my $binary = $1; - my $args = $2; + my ($binary, $args) = split(/ /, $command, 2); - if ( !defined( findBinary($binary) ) ) - { - logprint( - "The binary '$binary' required to create the filesystem $fs is missing\n" - ); - $FAIL = 1; - exit 127; - } - } - else + if ( !defined( findBinary($binary) ) ) { logprint( - "The filesystem creation hash is bogus for filesystem : $fs\n"); + "The binary '$binary' required to create the filesystem $fs is missing\n" + ); $FAIL = 1; exit 127; } diff --git a/debian/changelog b/debian/changelog index 9a22d31..d48e310 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,8 @@ xen-tools (4.3~dev-1) UNRELEASED; urgency=low - New option --apt_proxy (Closes: #610457; Thanks Alex Tomlins!) - Always write down root partition as first physical device, otherwise pygrub fails (Closes: #609673) + - No more expect at least one option to mkfs.* calls. Fixes btrfs + creation. (Closes: #609982) * Add dependency on openssh-client for ssh-keygen (Closes: #649108) * Use dh_auto_test for build time tests and add according build-dependencies on devscripts and libfile-slurp-perl. From 2277f433c144e0343ed202e15d533e0bbd9e27b3 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 20:51:30 +0200 Subject: [PATCH 34/48] roles/editor =~ s/logPrint/logMessage/ (as everywhere else) --- debian/changelog | 1 + roles/editor | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d48e310..0a4b941 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,7 @@ xen-tools (4.3~dev-1) UNRELEASED; urgency=low pygrub fails (Closes: #609673) - No more expect at least one option to mkfs.* calls. Fixes btrfs creation. (Closes: #609982) + - Fixes call to non-existent function logPrint (Closes: #673335) * Add dependency on openssh-client for ssh-keygen (Closes: #649108) * Use dh_auto_test for build time tests and add according build-dependencies on devscripts and libfile-slurp-perl. diff --git a/roles/editor b/roles/editor index 97c13af..68cefdc 100755 --- a/roles/editor +++ b/roles/editor @@ -76,7 +76,7 @@ for i in `find ${source} -name '*.sed' -print`; do # # Log it. # - logPrint "Running script $i - against ${prefix}/${file}" + logMessage "Running script $i - against ${prefix}/${file}" # # Invoke it. From 625a6f6282906b356f3b4cf92f2a0efb0e8be036 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 21:48:39 +0200 Subject: [PATCH 35/48] Make t/xen-tools.t not fail on package build Note down that t/xen-tools.t is not really functional yet --- KNOWN_BUGS | 9 +++++++++ t/xen-tools.t | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/KNOWN_BUGS b/KNOWN_BUGS index d723c1a..8d7dd5a 100644 --- a/KNOWN_BUGS +++ b/KNOWN_BUGS @@ -32,3 +32,12 @@ Bugs to fix before a 4.3 release * xen-list-images does not honour --extension * --extension='' (i.e. empty string) no more works + + +Bugs to fix later +----------------- + +t/xen-tools.t can't really test Xen::Tools as the latter requires a +local Xen installation. For proper testing, a dummy set of Xen +configuration files and configurable paths to them in Xen::Tools would +be necessary. diff --git a/t/xen-tools.t b/t/xen-tools.t index 461c81d..cf797a6 100755 --- a/t/xen-tools.t +++ b/t/xen-tools.t @@ -6,7 +6,7 @@ use strict; use warnings; -use Test::More tests => 1, skip_all => 'Xen::Tools is not used for now'; +use Test::More skip_all => 'Xen::Tools is not used for now'; SKIP: { skip "Test only works as root", 1 if $< > 0; @@ -17,5 +17,7 @@ SKIP: { my $xt = Xen::Tools->new( hostname => 'xen-tools-test' ); ok( $xt->isa('Xen::Tools') ); - } + }; } + +done_testing(); From 6201e24b510d0b147311ca331b93934db5e52718 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 21:57:31 +0200 Subject: [PATCH 36/48] Also disable initctl in the chroot, not only start-stop-daemon Closes LP#997063. Thanks xstasi on Lauchnpad for the patch --- debian/changelog | 2 ++ hooks/common.sh | 33 ++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0a4b941..c41fe94 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,8 @@ xen-tools (4.3~dev-1) UNRELEASED; urgency=low - No more expect at least one option to mkfs.* calls. Fixes btrfs creation. (Closes: #609982) - Fixes call to non-existent function logPrint (Closes: #673335) + - Also disable initctl in the chroot, not only start-stop-daemon + (LP: #997063; Thanks xstasi!) * Add dependency on openssh-client for ssh-keygen (Closes: #649108) * Use dh_auto_test for build time tests and add according build-dependencies on devscripts and libfile-slurp-perl. diff --git a/hooks/common.sh b/hooks/common.sh index 7cfde99..5d33a49 100755 --- a/hooks/common.sh +++ b/hooks/common.sh @@ -121,14 +121,16 @@ disableStartStopDaemon () { local prefix="$1" assert "$LINENO" "${prefix}" - local daemonfile="${prefix}/sbin/start-stop-daemon" + for starter in start-stop-daemon initctl; do + local daemonfile="${prefix}/sbin/${starter}" - mv "${daemonfile}" "${daemonfile}.REAL" - echo '#!/bin/sh' > "${daemonfile}" - echo "echo \"Warning: Fake start-stop-daemon called, doing nothing\"" >> "${daemonfile}" + mv "${daemonfile}" "${daemonfile}.REAL" + echo '#!/bin/sh' > "${daemonfile}" + echo "echo \"Warning: Fake ${starter} called, doing nothing\"" >> "${daemonfile}" - chmod 755 "${daemonfile}" - logMessage "start-stop-daemon disabled / made a stub." + chmod 755 "${daemonfile}" + logMessage "${starter} disabled / made a stub." + done } @@ -140,16 +142,17 @@ enableStartStopDaemon () { local prefix=$1 assert "$LINENO" "${prefix}" - local daemonfile="${prefix}/sbin/start-stop-daemon" - - # - # If the disabled file is present then enable it. - # - if [ -e "${daemonfile}.REAL" ]; then - mv "${daemonfile}.REAL" "${daemonfile}" - logMessage "start-stop-daemon restored to working order." - fi + for starter in start-stop-daemon initctl; do + local daemonfile="${prefix}/sbin/${starter}" + # + # If the disabled file is present then enable it. + # + if [ -e "${daemonfile}.REAL" ]; then + mv "${daemonfile}.REAL" "${daemonfile}" + logMessage "${starter} restored to working order." + fi + done } From 590aa44e7ca4331132be07774228cf423c02942e Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 22:40:51 +0200 Subject: [PATCH 37/48] TODO: wrong mirror displayed on startup summary --- KNOWN_BUGS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/KNOWN_BUGS b/KNOWN_BUGS index 8d7dd5a..0ba69ba 100644 --- a/KNOWN_BUGS +++ b/KNOWN_BUGS @@ -29,6 +29,9 @@ Bugs to fix before a 4.3 release * xen-create-image doesn't unmount the tempdir properly if /proc wasn't mounted inside +* xen-create-image says on startup summary that the Debian mirror is + used even if Ubuntu is going to be installed (and works) + * xen-list-images does not honour --extension * --extension='' (i.e. empty string) no more works From 0b820d867508b403e6686bb5ebb297e758676916 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 23:23:36 +0200 Subject: [PATCH 38/48] Update AUTHORS --- AUTHORS | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/AUTHORS b/AUTHORS index 8db37c1..a82f47a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -24,6 +24,12 @@ Contributions Justin Azoff - Added LVM support to xen-create-image. + Brian Bennett + - Made multiple times given --ip options work + + Vagrant Cascadian + - Less redundant SSH key generation + Edd Dumbill - Contributed APT sources.list file for Ubuntu's Dapper release. @@ -42,6 +48,9 @@ Contributions Joey Hess - Provided sample code for module copying and several useful bug reports + John Hughes + - Physical devices reordering for pygrub + Kirk Ismay - Added hook for automatic CFEngine installation. @@ -93,6 +102,11 @@ Contributions Gergely Tamas - Added patch to make initrd setup optional. + Alex Tomlins + - apt_proxy support + Ward Vandewege - Made several updates for Ubuntu support. + xstasi on Launchpad + - Proper upstart handling in the chroot From 9320ba661d24862513fff32ec94754f5f8cc1b8b Mon Sep 17 00:00:00 2001 From: Pieter Barrezeele Date: Wed, 30 May 2012 23:30:13 +0200 Subject: [PATCH 39/48] Don't verify the availability of lvm tools unless lvm is used --- bin/xen-create-image | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index 4c2b385..efa5cce 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -2420,7 +2420,7 @@ sub checkBinariesPresent } } } - else + elsif (defined( $CONFIG{ 'lvm' } ) ) { # LVM-specific binaries. From ef465d987912dc7c8bbafc0e919f3366e8673c73 Mon Sep 17 00:00:00 2001 From: Pieter Barrezeele Date: Wed, 30 May 2012 23:34:04 +0200 Subject: [PATCH 40/48] Add --finalrole to run role scripts after config file creation --- bin/xen-create-image | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bin/xen-create-image b/bin/xen-create-image index efa5cce..7de4282 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -146,6 +146,10 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH. Pass the named string literally to any role script. This is useful for site-specific roles. + --finalrole=role + Similar to role scripts. Run the specified role script(s) + after cfg file creation. + --roledir=/path/to/directory Specify the directory which contains the role scripts. This defaults to /etc/xen-tools/role.d/ @@ -712,6 +716,9 @@ Install an X11 server, using VNC and XDM installed system as their first argument, and anything passed as a role-arg will be passed allong as additional arguments. + NOTE: Role scripts are invoked before the config file generation. + If you need access to the config file from within your role, + use --finalrole. NOTE: Multiple role scripts may be invoked if you separate their names with commas. @@ -1057,6 +1064,12 @@ runRoleScripts( $CONFIG{ 'role' } ); runXenConfigCreation(); +# +# Run any specified role scripts. +# +runRoleScripts( $CONFIG{ 'finalrole' } ); + + # # Setup the password if the user wanted that. # @@ -1774,6 +1787,7 @@ sub parseCommandLineArguments "partitions=s", \&checkOption, "role=s", \&checkOption, "role-args=s", \&checkOption, + "finalrole=s", \&checkOption, "roledir=s", \&checkOption, "force", \$CONFIG{ 'force' }, "keep", \$CONFIG{ 'keep' }, From f18cda879615a786756dadcba32e94f714ad3d6b Mon Sep 17 00:00:00 2001 From: Pieter Barrezeele Date: Wed, 30 May 2012 23:37:09 +0200 Subject: [PATCH 41/48] Add --dontformat to skip filesystem creation --- bin/xen-create-image | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index 7de4282..6077b43 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -169,6 +169,11 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH. --tar-cmd NOP: Ignored. + --dontformat Do not format the devices specified for installation. + Useful if you want tighter control over the filesystem + creation. Requires the filesystems to be created + beforehand. + --vcpus=num Set the number of vcpus that the new instance will have instead of the default value of "1". @@ -1794,6 +1799,7 @@ sub parseCommandLineArguments "template=s", \&checkOption, "output=s", \&checkOption, "extension=s", \&checkOption, + "dontformat", \&checkOption, # Help options "debug", \$CONFIG{ 'debug' }, @@ -3423,12 +3429,12 @@ sub createFilesystem # # OK we have the command and the filesystem. Create it. # - logprint("\nCreating $fs filesystem on $image\n"); + logprint("\nCreating $fs filesystem on $image\n") unless ( $CONFIG{ 'dontformat' } ); $command .= " " . $image; - runCommand($command); - logprint("Done\n"); + runCommand($command) unless ( $CONFIG{ 'dontformat' } ); + logprint("Done\n") unless ( $CONFIG{ 'dontformat' } ); } From 953c692b5409ca8fb0ad39eabd42c174ea301a6c Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 23:37:36 +0200 Subject: [PATCH 42/48] Add Pieter Barrezeele to AUTHORS --- AUTHORS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AUTHORS b/AUTHORS index a82f47a..dc88adf 100644 --- a/AUTHORS +++ b/AUTHORS @@ -24,6 +24,10 @@ Contributions Justin Azoff - Added LVM support to xen-create-image. + Pieter Barrezeele + - Several small but useful enhancements + - Bugfixes + Brian Bennett - Made multiple times given --ip options work From e727fbbbbd089b7992204a95ad9b15a539bc7d11 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 23:39:24 +0200 Subject: [PATCH 43/48] Test for $CONFIG{dontformat} just once --- bin/xen-create-image | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index 6077b43..633d3b6 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -3426,15 +3426,17 @@ sub createFilesystem exit 127; } - # - # OK we have the command and the filesystem. Create it. - # - logprint("\nCreating $fs filesystem on $image\n") unless ( $CONFIG{ 'dontformat' } ); + unless ( $CONFIG{ 'dontformat' } ) { + # + # OK we have the command and the filesystem. Create it. + # + logprint("\nCreating $fs filesystem on $image\n"); - $command .= " " . $image; + $command .= " " . $image; - runCommand($command) unless ( $CONFIG{ 'dontformat' } ); - logprint("Done\n") unless ( $CONFIG{ 'dontformat' } ); + runCommand($command); + logprint("Done\n"); + } } From 9a0c6fa724314c6931211d9561a6e783964ef0b0 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 23:44:18 +0200 Subject: [PATCH 44/48] Fix some tab characters --- bin/xen-create-image | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/xen-create-image b/bin/xen-create-image index 633d3b6..f7bf256 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -147,8 +147,8 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH. This is useful for site-specific roles. --finalrole=role - Similar to role scripts. Run the specified role script(s) - after cfg file creation. + Similar to role scripts. Run the specified role script(s) + after cfg file creation. --roledir=/path/to/directory Specify the directory which contains the role scripts. @@ -723,7 +723,7 @@ Install an X11 server, using VNC and XDM NOTE: Role scripts are invoked before the config file generation. If you need access to the config file from within your role, - use --finalrole. + use --finalrole. NOTE: Multiple role scripts may be invoked if you separate their names with commas. From 6e0bfb965864b0ed0bb7a2d5ffb69abb507fda05 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 23:57:56 +0200 Subject: [PATCH 45/48] Update copyright years at several places --- LICENSE | 7 ++++++- bin/xen-create-image | 2 +- bin/xt-create-xen-config | 2 +- bin/xt-guess-suite-and-mirror | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index 6bdbe41..4909e79 100644 --- a/LICENSE +++ b/LICENSE @@ -2,7 +2,12 @@ xen-tools --------- -Copyright (c) 2005-2007 by Steve Kemp. All rights reserved. +Copyright (c) 2005-2009: Steve Kemp. All rights reserved. +Copyright (c) 2010-2012: The Xen-Tools Development Team, currently consisting of: + Axel Beckert , + Dmitry Nedospasov , and + Stéphane Jourdois + This project is free software. You may redistribute it under the terms of *either* the Perl Artistic License, or the GNU General diff --git a/bin/xen-create-image b/bin/xen-create-image index f7bf256..4c3b95f 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -761,7 +761,7 @@ Install an X11 server, using VNC and XDM =head1 LICENSE -Copyright (c) 2005-2009 by Steve Kemp, (c) 2010 by The Xen-Tools +Copyright (c) 2005-2009 by Steve Kemp, (c) 2010-2012 by The Xen-Tools Development Team. All rights reserved. This module is free software; diff --git a/bin/xt-create-xen-config b/bin/xt-create-xen-config index 8c7a7c9..759b28f 100755 --- a/bin/xt-create-xen-config +++ b/bin/xt-create-xen-config @@ -114,7 +114,7 @@ xt-create-config - Create a Xen configuration file for a new guest =head1 LICENSE -Copyright (c) 2005-2009 by Steve Kemp, (c) 2010 by The Xen-Tools +Copyright (c) 2005-2009 by Steve Kemp, (c) 2010-2012 by The Xen-Tools Development Team. All rights reserved. This module is free software; diff --git a/bin/xt-guess-suite-and-mirror b/bin/xt-guess-suite-and-mirror index a8bb8c3..bf8fa5c 100755 --- a/bin/xt-guess-suite-and-mirror +++ b/bin/xt-guess-suite-and-mirror @@ -39,7 +39,7 @@ xen-create-image(1) or the backticks feature in xen-tools.conf. =head1 LICENSE -Copyright (C) 2010 by The Xen-Tools Development Team. All rights +Copyright (C) 2010-2012 by The Xen-Tools Development Team. All rights reserved. This module is free software; you can redistribute it and/or modify it From a8bef1239177cb2dcfa26f7bddd32a6dc53128ca Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Wed, 30 May 2012 23:58:12 +0200 Subject: [PATCH 46/48] Update copyright years in debian/copyright --- debian/changelog | 3 ++- debian/copyright | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index c41fe94..1a362ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,8 +34,9 @@ xen-tools (4.3~dev-1) UNRELEASED; urgency=low * Fix the following Lintian warnings: - copyright-refers-to-symlink-license - debian-rules-missing-recommended-target + * debian/copyright: Update copyright years - -- Axel Beckert Tue, 08 May 2012 00:22:17 +0200 + -- Axel Beckert Wed, 30 May 2012 23:57:31 +0200 xen-tools (4.2.1-1) unstable; urgency=low diff --git a/debian/copyright b/debian/copyright index 6efadb7..0bce5e3 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,10 +4,10 @@ Tue, 20 Dec 2005 02:21:05 +0200. It was downloaded from http://xen-tools.org/software/xen-tools/ Copyright 2005-2009: Steve Kemp -Copyright 2010: The Xen-Tools Development Team, currently consisting of: - Axel Beckert , - Dmitry Nedospasov , and - Stéphane Jourdois +Copyright 2010-2012: The Xen-Tools Development Team, currently consisting of: + Axel Beckert , + Dmitry Nedospasov , and + Stéphane Jourdois License: From 0747b2fdd96d086a2c075c79e2d9a6ae3f91afa4 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Thu, 31 May 2012 00:35:00 +0200 Subject: [PATCH 47/48] Add a NEWS file with major changes starting from the 4.2 release --- NEWS | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 NEWS diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..9468487 --- /dev/null +++ b/NEWS @@ -0,0 +1,48 @@ +xen-tools 4.3 (released [TODO]) +================================ + +New Options +----------- + + --dontformat (xen-create-image) + --finalrole (xen-create-image) + --apt_proxy (xen-create-image) + +Newly Supported Distribution Releases +------------------------------------- + +* Ubuntu 11.10 Oneiric +* Ubuntu 12.04 Precise +* Ubuntu 12.10 Quantal DomUs + + +xen-tools 4.2.1 (released 17 Mar 2011) +====================================== + +Bugfix Release only + + +xen-tools 4.2 (released 05 Oct 2010) +==================================== + +First final release of the new Xen-Tools Team. + +Supports Ubuntu up to 11.04 (Natty) and Debian up to 7.0 (Wheezy). + + +New Options +----------- + + --debootstrap-cmd (xen-create-image and xt-install-image) + +New Features and Major Changes +------------------------------ + +* Uses hvc0 and xvda devices by default +* Also supports cdebootstrap +* Preliminary btrfs support. +* Uses GeoIP for Debian mirrors: Default Debian mirror is now + cdn.debian.net, see http://wiki.debian.org/DebianGeoMirror for + details. +* New helper program xt-guess-suite-and-mirror, used to find the + default mirror and suite. From 83f736f0dde7af965465a7a0563c34fe9ae416b6 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Thu, 31 May 2012 00:35:44 +0200 Subject: [PATCH 48/48] Add NEWS to debian/docs --- debian/changelog | 1 + debian/docs | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1a362ac..14aff86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,7 @@ xen-tools (4.3~dev-1) UNRELEASED; urgency=low build-dependencies on devscripts and libfile-slurp-perl. * No more suggest evms-cli -- it's no more available on any supported Dom0 distribution. Thanks to Markus Waldeck for the hint. + * Add NEWS to debian/docs. * Bump Standards-Version to 3.9.3 (no changes) * Fix the following Lintian warnings: - copyright-refers-to-symlink-license diff --git a/debian/docs b/debian/docs index 7944ff4..1166ded 100644 --- a/debian/docs +++ b/debian/docs @@ -4,3 +4,4 @@ SUPPORT BUGS TODO KNOWN_BUGS +NEWS