AUTHORS | 16 ++++++ Makefile | 1 + README.markdown | 3 +- TODO.markdown | 8 +++ bin/xen-create-image | 102 ++--------------------------------- bin/xen-delete-image | 5 +- bin/xt-customize-image | 22 +++++++- debian/changelog | 17 ++++++ debian/control | 3 +- debian/dirs | 3 +- etc/xen-tools.conf | 5 +- hooks/common/20-setup-yum | 2 +- hooks/common/40-setup-networking-deb | 1 - hooks/debian/80-install-kernel | 13 ++++- lib/Xen/Tools/Common.pm | 5 +- t/perl-syntax.t | 3 ++ t/xen-delete-image.t | 2 +- 17 files changed, 99 insertions(+), 112 deletions(-) diff --git a/AUTHORS b/AUTHORS index 36f64ac..26c76a4 100644 --- a/AUTHORS +++ b/AUTHORS @@ -34,9 +34,15 @@ Contributions Vagrant Cascadian - Less redundant SSH key generation + Adrian C. (anrxc) + - Hook overrides + Edd Dumbill - Contributed APT sources.list file for Ubuntu's Dapper release. + Lionel FÉLICITÉ + - Bugfix for Centos 6 installation + Kevin Fullerton - Fixup for gentoos revised networking scripts. (dhcp) @@ -65,6 +71,9 @@ Contributions - Improved binary detection and good suggestions. - Better portability for non-bash shells. + Daniel Lintott + - Bugfix for Jessie and newer installations + Jorge Armando Medina - Fix for backward compatibility with xvc0 serial consoles @@ -97,6 +106,9 @@ Contributions - CentOS 6 support - CentOS 5 fixes + Patryk Ściborek + - Ubuntu-related bugfix + Radu Spineanu - Supplied many small tweaks, bugfixes, and suggestions. - Radu is also one of the former Debian package maintainers. @@ -116,5 +128,9 @@ Contributions Ward Vandewege - Made several updates for Ubuntu support. + Joan + - Bugfix for password interaction + - maxmem option + xstasi on Launchpad - Proper upstart handling in the chroot diff --git a/Makefile b/Makefile index 32819b4..99580a6 100644 --- a/Makefile +++ b/Makefile @@ -203,6 +203,7 @@ install-hooks: -cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d raring.d -cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d saucy.d -cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d trusty.d + -cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d utopic.d cp hooks/common.sh ${prefix}/usr/share/xen-tools cp -r hooks/common ${prefix}/usr/share/xen-tools diff --git a/README.markdown b/README.markdown index 8868933..d43d31d 100644 --- a/README.markdown +++ b/README.markdown @@ -56,7 +56,8 @@ known to work reliably, i.e.: * Quantal Quetzal 12.10 * Raring Ringtail 13.04 * Saucy Salamander 13.10 -* Trusty Tahr 14.04 (LTS, under development) +* Trusty Tahr 14.04 (LTS) +* Utopic Unicorn 14.10 (under development) [1]: http://bugs.debian.org/659360 "debootstrap in Wheezy can no more build Ubuntu Edgy or earlier" diff --git a/TODO.markdown b/TODO.markdown index ac53045..f78b985 100644 --- a/TODO.markdown +++ b/TODO.markdown @@ -195,6 +195,14 @@ Bugs to fix and features to add for 5.0 mount commands in `xen-update-image`. The calls to uname or lsb_release should be fine.) +* Make default source installation work on non-debianesk systems, e.g. + either don't use xt-guess-suite-and-mirror in xen-tools.conf or make + it work with e.g. Fedora. + +* Error messages triggered by xenRunning should rather say something + about "known to the Xen system" instead of "running". See + https://bugs.debian.org/703606 + Stuff from Steve's TODO list / Generic TODOs -------------------------------------------- diff --git a/bin/xen-create-image b/bin/xen-create-image index c52a37a..a3f9d08 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -151,9 +151,6 @@ and EVMS EXAMPLE. used the system will not have a swap entry added to its /etc/fstab file either. - --no-xen-ok Don't complain if xen seems not installed or xend is - not running. (Needed for the testsuite.) - --output=dir Specify the output directory to create the xen configuration file within. @@ -1196,95 +1193,6 @@ EOF exit 127; } } - - - # - # Test the system has a valid (network-script) + (vif-script) setup. - # - testXenConfig(); - -} - - - -=begin doc - - Test that the current Xen host has a valid network configuration, - this is designed to help newcomers to Xen. - -=end doc - -=cut - -sub testXenConfig -{ - - # wierdness. - return if ( !-d "/etc/xen" ); - - # - # Temporary hash. - # - my %cfg; - - # - # Read the configuration file. - # - open( CONFIG, "<", "/etc/xen/xend-config.sxp" ) or - fail("Failed to read /etc/xen/xend-config.sxp: $!"); - while () - { - next if ( !$_ || !length($_) ); - - # vif - if ( $_ =~ /^\(vif-script ([^)]+)/ ) - { - $cfg{ 'vif-script' } = $1; - } - - # network - if ( $_ =~ /^\(network-script ([^)]+)/ ) - { - $cfg{ 'network-script' } = $1; - } - } - close(CONFIG); - - if ( !defined( $cfg{ 'network-script' } ) || - !defined( $cfg{ 'vif-script' } ) ) - { - print < Sun, 15 Dec 2013 17:20:43 +0100 + xen-tools (4.4-1) unstable; urgency=low * New upstream release diff --git a/debian/control b/debian/control index 254b3ef..5c4b9bd 100644 --- a/debian/control +++ b/debian/control @@ -75,6 +75,7 @@ Description: Tools to manage Xen virtual servers * Ubuntu 12.10 Quantal Quetzal * Ubuntu 13.04 Raring Ringtail * Ubuntu 13.10 Saucy Salamander - * Ubuntu 14.04 Trusty Tahr (LTS, under development) + * Ubuntu 14.04 Trusty Tahr (LTS) + * Ubuntu 14.10 Utopic Unicorn (under development) * CentOS 5 * CentOS 6 diff --git a/debian/dirs b/debian/dirs index d9b8b71..00a4f8f 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1,4 +1,5 @@ /etc/xen-tools /etc/xen-tools/role.d +/etc/xen-tools/hooks.d /etc/xen-tools/skel -/usr/share/xen-tools \ No newline at end of file +/usr/share/xen-tools diff --git a/etc/xen-tools.conf b/etc/xen-tools.conf index cf036a4..d57ba5f 100644 --- a/etc/xen-tools.conf +++ b/etc/xen-tools.conf @@ -290,10 +290,11 @@ mirror = `xt-guess-suite-and-mirror --mirror` # mirror_natty = http://old-releases.ubuntu.com/ubuntu # mirror_oneiric = http://archive.ubuntu.com/ubuntu # mirror_precise = http://archive.ubuntu.com/ubuntu -# mirror_quantal = http://archive.ubuntu.com/ubuntu -# mirror_raring = http://archive.ubuntu.com/ubuntu +# mirror_quantal = http://old-releases.ubuntu.com/ubuntu +# mirror_raring = http://old-releases.ubuntu.com/ubuntu # mirror_saucy = http://archive.ubuntu.com/ubuntu # mirror_trusty = http://archive.ubuntu.com/ubuntu +# mirror_utopic = http://archive.ubuntu.com/ubuntu # If this is defined it will be used by debootstrap, and configured as the # proxy for the guest diff --git a/hooks/common/20-setup-yum b/hooks/common/20-setup-yum index 65968cb..ebae274 100755 --- a/hooks/common/20-setup-yum +++ b/hooks/common/20-setup-yum @@ -33,7 +33,7 @@ if [ ! -d ${prefix}/proc ]; then mkdir -p ${prefix}/proc fi mount -o bind /proc ${prefix}/proc -chroot ${prefix} /usr/bin/yum update +chroot ${prefix} /usr/bin/yum update -y umount ${prefix}/proc diff --git a/hooks/common/40-setup-networking-deb b/hooks/common/40-setup-networking-deb index 162d0b2..6ebc175 100755 --- a/hooks/common/40-setup-networking-deb +++ b/hooks/common/40-setup-networking-deb @@ -88,7 +88,6 @@ setupStaticNetworking () # # gateway address? # - gateway=''; if [ -n "${gateway}" ]; then gateway=" gateway ${gateway}" fi diff --git a/hooks/debian/80-install-kernel b/hooks/debian/80-install-kernel index 03a1190..af56ca8 100755 --- a/hooks/debian/80-install-kernel +++ b/hooks/debian/80-install-kernel @@ -29,7 +29,7 @@ if [ "${pygrub}" ]; then logMessage Script $0 starting # -# Resolve the correct architecutre +# Resolve the correct architecture # if [ "${arch}" = "i386" ]; then @@ -61,6 +61,17 @@ fi KERNEL_XEN_PKG="linux-image-xen-$XEN_ARCH" KERNEL_PKG="linux-image-$XEN_ARCH" +# Add "-pae" suffix for Debian releases after Squeeze. See +# https://bugs.debian.org/742778 for details. +if [ "${dist}" != "sarge" -a \ + "${dist}" != "etch" -a \ + "${dist}" != "lenny" -a \ + "${dist}" != "squeeze" -a \ + "$XEN_ARCH" = "686" ]; then + KERNEL_XEN_PKG="$KERNEL_XEN_PKG-pae" + KERNEL_PKG="$KERNEL_PKG-pae" +fi + logMessage Attempting to install the $KERNEL_XEN_PKG kernel image if chroot ${prefix} /usr/bin/apt-cache show $KERNEL_XEN_PKG > /dev/null 2>&1; then logMessage Package $KERNEL_XEN_PKG is available - installing diff --git a/lib/Xen/Tools/Common.pm b/lib/Xen/Tools/Common.pm index 0eecbd9..04599d5 100644 --- a/lib/Xen/Tools/Common.pm +++ b/lib/Xen/Tools/Common.pm @@ -128,7 +128,10 @@ sub xenRunning ($$) my $running = 0; - die "Couldn't determine Xen toolstack" unless $CONFIG->{'xm'}; + unless ($CONFIG->{'xm'}) { + warn "Couldn't determine Xen toolstack, skipping check for running DomUs."; + return 0; + } open( CMD, $CONFIG->{'xm'}." list $hostname 2>/dev/null |" ) or fail_with_config("Failed to run '".$CONFIG->{'xm'}." list $hostname'", $CONFIG); diff --git a/t/perl-syntax.t b/t/perl-syntax.t index 1cca99d..e56a279 100755 --- a/t/perl-syntax.t +++ b/t/perl-syntax.t @@ -51,6 +51,9 @@ sub checkFile # `tests/hook-tls.t` is too. return if ( $file =~ /hook-tls.t$/ ); + # Ignore cover_db files + return if ( $file =~ /^\.\/cover_db\// ); + # See if it is a perl file. my $isPerl = 0; diff --git a/t/xen-delete-image.t b/t/xen-delete-image.t index 4166966..e234687 100755 --- a/t/xen-delete-image.t +++ b/t/xen-delete-image.t @@ -75,7 +75,7 @@ close( IMAGE ); # So we need to run the deletion script and verify the images # are removed correctly. # -my $log = `perl -I./lib -I../lib ./bin/xen-delete-image --test --verbose --no-xen-ok --dir=$dir $hostname`; +my $log = `perl -I./lib -I../lib ./bin/xen-delete-image --test --verbose --dir=$dir $hostname`; ok ( $? == 0, 'Calling xen-delete-image returned exit code 0' ); print $log;