1
0
mirror of synced 2026-02-20 22:05:15 +00:00

Compare commits

..

53 Commits

Author SHA1 Message Date
Axel Beckert
00527f64b2 Release as 4.9 and upload to Debian Unstable as 4.9-1 2020-12-29 12:23:16 +01:00
Axel Beckert
83c37b476a Start all Debian releases since Stretch (9) with pygrub by default 2020-12-29 12:05:39 +01:00
Axel Beckert
af6ceacc4c Fix typo in current changelog entry 2020-12-28 05:08:18 +01:00
Axel Beckert
6cdd1eb63f Add debian/changelog and NEWS.md entry for GL MR !1 2020-12-28 02:22:37 +01:00
Wolfgang Karall
97dd8fafc8 Use 'defaults' and not the IO-bottleneck of the decade 'sync' in the options for the root filesystem. 2020-12-28 02:19:20 +01:00
Axel Beckert
58899daffe Add debian/changelog and NEWS.md entry for GH #57 2020-12-27 17:13:41 +01:00
Axel Beckert
239f1e4c88 Merge branch 'cli-fix' of https://github.com/frootmig/xen-tools 2020-12-27 17:09:24 +01:00
Axel Beckert
1a27e59df7 This will become a feature release, too: Update version and NEWS.md 2020-12-27 17:02:04 +01:00
Axel Beckert
b7486d427c Add debian/changelog entry for GH #58 and reformat its comments a bit 2020-12-27 16:58:06 +01:00
Axel Beckert
6aeb8d9d11 Merge branch 'netplan-p2p-support' of https://github.com/frootmig/xen-tools 2020-12-27 16:40:55 +01:00
Axel Beckert
f5dc8cbf37 Add debian/changelog entry for GH #62 2020-12-27 15:56:23 +01:00
Axel Beckert
4aa9428e3b Merge branch 'arm64-debian' of https://github.com/ianmclinden/xen-tools 2020-12-27 15:50:56 +01:00
Axel Beckert
a58cc83c80 Adapt distributions.conf defaults to Ubuntu keyrings of 2018
As of now, Debian's ubuntu-keyring package hasn't been updated for
more than two years. See https://bugs.debian.org/978438
2020-12-27 15:22:03 +01:00
Axel Beckert
965839812c Bump recommended debootstrap version to 1.0.117 2020-12-27 14:34:13 +01:00
Axel Beckert
a9593dabf0 Update list of supported distributions in README and debian/control 2020-12-21 00:35:56 +01:00
Axel Beckert
ea95b1ef03 t/hook-apt.t: Special case for Perl 5.10
File::Copy in Perl 5.10 does not copy permissions, so let's fix it
there and check for it elsewhere.

This reverts the two commits 06b3faa1bf
and 68c20b4e4e which did not help to fix
this issue as the initially suspected noexec mount wasn't really
there. Hopefully this finally resolves the test failures with Perl
5.10 in the new t/hook-apt.t.
2020-12-20 22:40:57 +01:00
Axel Beckert
68c20b4e4e Travis CI: Make sure shell scripts in .travis.yml also work with bash, not just dash and zsh 2020-12-20 20:48:17 +01:00
Axel Beckert
06b3faa1bf Travis CI before_install: Make sure we can execute scripts in /tmp/
Those build failures with Perl 5.10 seem to neither be related to
xen-tools nor to Perl but to how the git repo is unpacked on Travis CI
as executable bits are either missing or /tmp/ is mounted with
"noexec".

So add some code to before_install to 1) output some debug information
on that issue and 2) abort early if executing scripts in /tmp/ fails.
2020-12-20 19:54:11 +01:00
Axel Beckert
0da2ed1365 Fix test suite failures in a Sid chroot
Problem was that the commented variant only was a new, $dist-security
one, but is also written if the security repo is disabled with other
distributions than sid/unstable.
2020-12-20 08:47:31 +01:00
Axel Beckert
285d2c80b9 Use regexp to check for $dist/updates vs $dist-security
If the security repo will be  enabled or not currently depends on the
host's sources.list. So the resulting files differ depending on the
host where the test is run. Add a TODO item to break with that
"feature".

Also mention in the TODO list that a repo on archive.debian.org should
be used instead security.debian.org if the release is EoL. Currently
the security mirror is hardcoded into the hook.
2020-12-20 08:33:47 +01:00
Axel Beckert
ed497ab39c Some 5.0 TODOs around the security APT repo 2020-12-20 08:13:56 +01:00
Axel Beckert
85c0583819 Add test for $dist/updates vs $dist-security
Uses Test::File::Contents, add it to .travis.yml and the according
package as build-dependency in debian/control.
2020-12-20 06:44:12 +01:00
Axel Beckert
c0cb19eefc Add debian/changelog entry for previous commit 2020-12-19 08:25:42 +01:00
Axel Beckert
67603c2d74 Merge pull request #40 from blbradley/grub-silent-failure-fix
fix update-grub chroot silent failure

While it probably would be nicer to mount it at the beginning and umount it at the end, we have too many hooks already doing this and changing this seems a bigger task.
2020-12-19 08:21:05 +01:00
Axel Beckert
a816cc81ae Declare compliance with Debian Policy 4.5.1
No other changes were required.
2020-12-19 08:13:20 +01:00
Axel Beckert
01d7628770 Bump debhelper compatibility level to 13
Build-depend on "debhelper-compat (= 13)" to replace debian/compat.
2020-12-19 08:08:53 +01:00
Axel Beckert
1150835a89 Bump debian/watch version from 3 to 4
Thanks Lintian!
2020-12-19 08:07:11 +01:00
Axel Beckert
17025182eb Bump version in Makefile and all scripts 2020-12-19 08:06:48 +01:00
Axel Beckert
e7b2f1a3e7 Add debian/changelog entry for previous commit 2020-12-19 07:54:18 +01:00
Andreas Sundstrom
fe4a18edef Fix support for lvm_thin
Closes: #942244
2020-12-19 07:52:31 +01:00
Axel Beckert
eab2940bf6 Reimplement $dist/updates vs $dist-security more backwards-compatible
This reverts most code, but not the implemented functionality of
commit 2fba5cb90e.

Requiring a config file change to still be able to install old
distributions would make a bump of the major version necessary
according to Semantic Versioning. Let's avoid that:

The list of distributions with the old path scheme is finite and will
never change again. Hence it's ok and especially backwards compatible
to hardcode this list in hooks/debian/20-setup-apt.

It's also less and more obvious (but not necessarily easier to read)
code. But it's all in one place and not scattered over three files.
And it's just one line instead like a dozen or two dozens.

Closes: #972749 (kinda again)
2020-12-19 07:38:37 +01:00
Axel Beckert
e8897649b7 Fix mostly trailing whitespace in generated sources.list 2020-12-19 06:49:29 +01:00
Axel Beckert
2fba5cb90e Debian DomUs: Distinguish between $dist/updates and $dist-security
From Debian 11 Bullseye onwards, debian uses $dist-security instead of
$dist/updates as distribution part in /etc/apt/sources.list.

Mark those distributions with the old-style subdirectory path with
"security-subdir" in distributions.conf.

Thanks to Paul Wise for the bug report (and hence reminding me of
this) and for the suggestions on how to implement this (even if I
didn't follow them for the sake of simplicity and no additional
dependencies).

Closes: #972749
2020-12-19 06:49:29 +01:00
Axel Beckert
19399ecc70 Add preliminary support for Debian 13 Trixie 2020-11-15 00:33:10 +01:00
Axel Beckert
6f291cebe7 Full code name of Ubuntu 21.04 is now known 2020-10-30 19:40:21 +01:00
Axel Beckert
54d93cf3ed Travis CI: Use https://travis-perl.github.io/init 2020-10-23 18:47:55 +02:00
Axel Beckert
b40759e8d8 Travis CI: Test more Perl versions
Enable fast finish and allow "bleed" to fail.
2020-10-23 14:44:13 +02:00
Axel Beckert
f5e7a2d441 Fix no-tabs.t failing on Travis CI: Replace all_perl_files_ok() 2020-10-23 14:42:24 +02:00
Axel Beckert
79650b9d70 Add preliminary support for Ubuntu 21.04 Hirsute H… 2020-10-23 13:03:09 +02:00
Axel Beckert
8c7d398001 Drop "dont-test" flag from bullseye 2020-10-23 08:01:33 +02:00
Axel Beckert
f6c6c35b40 Support running tests verbosely with Make target "test-verbose" 2020-10-23 08:00:14 +02:00
Axel Beckert
d7b794bc2c Makefile: Actually install xen-resize-guest tool
Thanks lintian for the spare-manual-page warning!
2020-10-11 02:09:07 +02:00
Axel Beckert
d278bdc89e Mark Debian 8 Jessie as EoL
Reasoning:

Debian 8 Jessie has still (external) ELTS until 2022. But
debian-internal LTS has ended and it will likely vanish from the
normal mirrors soon. And it is already available in the archive. (And
some architectures are already only available in the archive.)

Also mention marking Debian 7 Wheezy as EoL in NEWS.markdown. (Was
already mentioned in debian/changelog.)
2020-10-11 01:59:42 +02:00
Axel Beckert
284657f8bc distributions.conf: Fix typo in release name of future Debian release
Debian 12 will be called bookworm, not bookwork.
2020-10-11 01:58:09 +02:00
Axel Beckert
4ac4ae5987 Update list of Ubuntu releases up to Groovy Gorilla 2020-10-11 01:53:43 +02:00
Axel Beckert
61ac300e43 Fix four-letter day of week abbrev. in old debian/changelog entries
See discussions in https://bugs.debian.org/971974 and
https://bugs.debian.org/971975
2020-10-11 01:34:33 +02:00
Ian McLinden
967bdcfaa9 Add debian install rules for arm64 2020-05-14 12:16:09 -05:00
voja
7fbad420c9 Added p2p support for Ubuntu netplan networking 2019-04-17 20:01:48 +02:00
voja
94514a3604 Fix storage commandline options not overriding xen-tools.conf settings
Was already fixed in xen-create-image, but neither in
xen-delete-image nor in xen-update-image. Use the same code as in
xen-create-image in those two tools, too.
2019-04-17 19:50:47 +02:00
Axel Beckert
7c8d466a53 Recommend deboootstrap ≥ 1.0.110~
At least debootstrap 1.0.110 (Buster/Sid) or 1.0.110~bpo9+1
(Stretch-Backports) is required for:

* working bootstrapping of Ubuntu 6.06 Dapper and 6.10 Edgy (see
  #659360).

* Support of Ubuntu 17.10 Artful, 18.04 LTS Bionic, 18.10 Cosmic, and
  19.04 Disco.
2019-04-16 13:30:37 +02:00
Axel Beckert
7dbb76941d Mark Debian 7 Wheezy as EoL 2019-04-16 13:23:55 +02:00
Axel Beckert
a11c9bf126 Travis CI: Also test against Perl 5.26 and 5.28 2019-04-02 17:38:14 +02:00
Brandon Bradley
f065541445 fix update-grub chroot silent failure 2016-02-17 15:55:14 -06:00
27 changed files with 463 additions and 80 deletions

View File

@@ -1,5 +1,9 @@
language: perl
perl:
- "5.32"
- "5.30"
- "5.28"
- "5.26"
- "5.24"
- "5.22"
- "5.20"
@@ -8,17 +12,27 @@ perl:
- "5.14"
- "5.12"
- "5.10"
- "dev"
- "blead"
matrix:
fast_finish: true
allow_failures:
- perl: blead
before_install:
- sudo apt-get update
- sudo apt-get install devscripts dpkg-dev lsb-release
- eval $(curl https://travis-perl.github.io/init)
- build-perl
- perl -V
install:
- yes '' | cpanm --verbose --notest --skip-satisfied Data::Validate::Domain Data::Validate::IP Data::Validate::URI File::Slurp File::Which Log::Message Term::UI Test::NoTabs Test::Pod::Coverage Test::Pod Text::Template Devel::Cover::Report::Coveralls Sort::Versions
- yes '' | cpanm --verbose --notest --skip-satisfied Data::Validate::Domain Data::Validate::IP Data::Validate::URI File::Slurp File::Which Log::Message Term::UI Test::NoTabs Test::Pod::Coverage Test::Pod Text::Template Devel::Cover::Report::Coveralls Sort::Versions Test::File::Contents
- export RELEASE_TESTING=1 AUTOMATED_TESTING=1 AUTHOR_TESTING=1 HARNESS_OPTIONS=j10:c HARNESS_TIMER=1 PATH=bin:${PERLBREW_PATH}:${PATH}
script:
- make test
- make test-verbose
after_success:
- prove --exec 'env PERL5OPT=-MDevel::Cover=-ignore_re,^(t/|/usr) perl' t/*.t

View File

@@ -14,7 +14,7 @@
#
TMPDIR ?= /tmp
DIST_PREFIX = ${TMPDIR}
VERSION = 4.8
VERSION = 4.9
DEBVERSION = $(shell echo $(VERSION)|sed 's/\(rc\|pre\|beta\|alpha\)/~\1/')
BASE = xen-tools
VCS = git
@@ -132,6 +132,7 @@ install-bin:
cp bin/xen-delete-image ${prefix}/usr/bin
cp bin/xen-list-images ${prefix}/usr/bin
cp bin/xen-update-image ${prefix}/usr/bin
cp bin/xen-resize-guest ${prefix}/usr/bin
cp bin/xt-guess-suite-and-mirror ${prefix}/usr/bin
chmod 755 ${prefix}/usr/bin/xen-create-image
chmod 755 ${prefix}/usr/bin/xen-create-nfs
@@ -184,6 +185,7 @@ install-hooks:
-cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d buster.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d bullseye.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d bookworm.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d trixie.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d sid.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d unstable.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d testing.d
@@ -224,6 +226,10 @@ install-hooks:
-cd ${prefix}/usr/share/xen-tools/ && ln -s artful.d bionic.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s artful.d cosmic.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s artful.d disco.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s artful.d eoan.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s artful.d focal.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s artful.d groovy.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s artful.d hirsute.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s artful.d devel.d
cp hooks/common.sh ${prefix}/usr/share/xen-tools
cp -r hooks/common ${prefix}/usr/share/xen-tools
@@ -288,13 +294,15 @@ orig-tar-gz: tarball
#
# Run the test suite.
#
test-verbose : VERBOSE = -v
test-verbose: test
test: non-author-test author-test
non-author-test: update-modules
prove --shuffle t/
prove $(VERBOSE) --shuffle t/
author-test:
prove xt/
prove $(VERBOSE) xt/
#

View File

@@ -1,3 +1,61 @@
xen-tools 4.9 (released 29 Dec 2020)
====================================
New Features
------------
* Add Debian install rules for arm64. (GH #62; PR by Ian McLinden
@ianmclinden)
* Add netplan p2p support for Ubuntu. (GH #58; PR by Volker Janzen
@frootmig)
Bug Fixes
---------
* Fix typo in release name of the future Debian 12 release.
* Makefile: Actually install xen-resize-guest tool. (Thanks to
Debian's Lintian tool reporting that there is a man-page without
binary installed!)
* Distinguish between those Debian releases using `$dist/updates` for
security updates and those who use `$dist-security`. Thanks to Paul
Wise for the bug report. (Closes Debian bug report #972749.)
* Fix support for `lvm_thin`. Thanks to Andreas Sundstrom for the bug
report and patch! (Closes Debian bug report #942244.)
* Mount `/proc` and `/dev` before calling update-grub. Thanks to
Brandon Bradley for the bug report and patch. (Closes Debian bug
report #815021.)
* Fix storage commandline options not overriding `xen-tools.conf`
settings also in `xen-update-image` and `xen-delete-image`. (GH #57;
patch by Volker Janzen @frootmig)
Distribution Releases Changes
-----------------------------
* Support for
+ Ubuntu 19.10 Eoan Ermine (EoL)
+ Ubuntu 20.04 Focal Fossa (LTS)
+ Ubuntu 20.10 Groovy Gorilla
* Preliminary support for
+ Debian 13 Trixie
+ Ubuntu 21.04 Hirsute Hippo
* Declare the following releases as EoL:
+ Ubuntu 17.10 Artful Aardvark (Was missing in previous release
despite mentioned in this file.)
+ Ubuntu 18.10 Cosmic Cuttlefish
+ Ubuntu 19.04 Disco Dingo
+ Debian 7 Wheezy
+ Debian 8 Jessie
* Start all Debian releases since Stretch (9) with pygrub by default.
Other Changes
-------------
* Support running tests verbosely with Make target "test-verbose".
* Drop "dont-test" flag from bullseye.
* partitions/sample-server: Change options=sync to
options=defaults. (GL MR !1; patch by Wolfgang Karall)
xen-tools 4.8 (released 9 Feb 2019)
===================================

View File

@@ -39,9 +39,10 @@ known to work reliably, i.e.:
* Wheezy 7 (Dom0 no more tested) [¹](#1)
* Jessie 8
* Stretch 9
* Buster 10 (under development)
* Bullseye 11 (knows about this future release name)
* Buster 10
* Bullseye 11 (under development)
* Bookworm 12 (knows about this future release name)
* Trixie 13 (knows about this future release name)
* Sid (always under development; works at least at the moment of writing :-)
### Ubuntu
@@ -74,7 +75,11 @@ known to work reliably, i.e.:
* Artful Aardvark 17.10
* Bionic Beaver 18.04 (LTS)
* Cosmic Cuttlefish 18.10
* Disco Dingo 19.04 (under development)
* Disco Dingo 19.04
* Eoan Ermine 19.10
* Focal Fossa 20.04 (LTS)
* Groovy Gorilla 20.10
* Hirsute Hippo 21.04 (under development)
### Footnotes

View File

@@ -59,6 +59,12 @@ Bugs to fix and features to add for 5.0
in `/etc/default/grub` if trying to install an affected Linux
distribution.
* Drop checking the host's sources.list to decide upon including the
security repo or not.
* Make a difference wrt. to the security repo for EoL releases.
Stuff from Steve's TODO list / Generic TODOs
--------------------------------------------

View File

@@ -872,7 +872,7 @@ my $MOUNT_POINT = undef;
#
# Release number.
#
my $RELEASE = '4.8';
my $RELEASE = '4.9';
#
@@ -3224,12 +3224,11 @@ sub createLVMBits
# The commands to create the volume.
#
my $disk_cmd =
"lvcreate $CONFIG{'lvm'} ".
($lvm_needs_yes ? '--yes' : '').
' '.
"lvcreate ".
($lvm_needs_yes ? '--yes ' : '').
($CONFIG{ 'lvm_thin' } ?
"-T $CONFIG{'lvm'}/$CONFIG{'lvm_thin'} -V" :
'-L').
"$CONFIG{'lvm'} -L").
" $partition->{'size'} -n $disk";
#

View File

@@ -121,7 +121,7 @@ $CONFIG{ 'template' } = '/etc/xen-tools/xm-nfs.tmpl';
#
# Release number.
#
my $RELEASE = '4.8';
my $RELEASE = '4.9';
# store version number away.

View File

@@ -167,7 +167,7 @@ my %CONFIG;
#
# Release number.
#
my $RELEASE = '4.8';
my $RELEASE = '4.9';
#
@@ -269,13 +269,25 @@ sub parseCommandLineArguments
my $VERSION = 0;
$CONFIG{ 'dry-run' } = 0;
#
# We record the installation method here because we want
# to ensure that we allow the method supplied upon the command line
# to overwrite the one we might have ready read from the configuration
# file.
#
my %install;
$install{ 'evms' } = undef;
$install{ 'dir' } = undef;
$install{ 'lvm' } = undef;
$install{ 'zpool' } = undef;
# Parse options.
#
GetOptions( "dir=s", \$CONFIG{ 'dir' },
GetOptions( "dir=s", \$install{ 'dir' },
"dry-run", \$CONFIG{ 'dry-run' },
"lvm=s", \$CONFIG{ 'lvm' },
"evms=s", \$CONFIG{ 'evms' },
"zpool=s", \$CONFIG{ 'zpool' },
"lvm=s", \$install{ 'lvm' },
"evms=s", \$install{ 'evms' },
"zpool=s", \$install{ 'zpool' },
"extension:s", \$CONFIG{ 'extension' },
"hostname=s@", \$CONFIG{ 'hostname' },
"test", \$CONFIG{ 'test' },
@@ -286,6 +298,39 @@ sub parseCommandLineArguments
"version", \$VERSION
);
#
# Now make ensure that the command line setting of '--lvm', '--evms', '--zpool'
# and '--dir=x' override anything specified in the configuration file.
#
if ( $install{ 'dir' } )
{
$CONFIG{ 'dir' } = $install{ 'dir' };
$CONFIG{ 'evms' } = undef;
$CONFIG{ 'lvm' } = undef;
$CONFIG{ 'zpool' } = undef;
}
if ( $install{ 'evms' } )
{
$CONFIG{ 'dir' } = undef;
$CONFIG{ 'evms' } = $install{ 'evms' };
$CONFIG{ 'lvm' } = undef;
$CONFIG{ 'zpool' } = undef;
}
if ( $install{ 'lvm' } )
{
$CONFIG{ 'dir' } = undef;
$CONFIG{ 'evms' } = undef;
$CONFIG{ 'lvm' } = $install{ 'lvm' };
$CONFIG{ 'zpool' } = undef;
}
if ( $install{ 'zpool' } )
{
$CONFIG{ 'dir' } = undef;
$CONFIG{ 'evms' } = undef;
$CONFIG{ 'lvm' } = undef;
$CONFIG{ 'zpool' } = $install{ 'zpool' };
}
pod2usage(1) if $HELP;
pod2usage( -verbose => 2 ) if $MANUAL;

View File

@@ -106,7 +106,7 @@ $CONFIG{ 'extension' } = '.cfg';
#
# Release number.
#
my $RELEASE = '4.8';
my $RELEASE = '4.9';

View File

@@ -111,7 +111,7 @@ my %CONFIG;
#
# Release number.
#
my $RELEASE = '4.8';
my $RELEASE = '4.9';
#

View File

@@ -113,7 +113,7 @@ my %CONFIG;
#
# Release number.
#
my $RELEASE = '4.8';
my $RELEASE = '4.9';
#
@@ -344,15 +344,52 @@ sub parseCommandLineArguments
my $MANUAL = 0;
my $VERSION = 0;
#
# We record the installation method here because we want
# to ensure that we allow the method supplied upon the command line
# to overwrite the one we might have ready read from the configuration
# file.
#
my %install;
$install{ 'evms' } = undef;
$install{ 'dir' } = undef;
$install{ 'lvm' } = undef;
# Parse options.
#
GetOptions( "dir=s", \$CONFIG{ 'dir' },
"lvm=s", \$CONFIG{ 'lvm' },
"evms=s", \$CONFIG{ 'evms' },
GetOptions( "dir=s", \$install{ 'dir' },
"lvm=s", \$install{ 'lvm' },
"evms=s", \$install{ 'evms' },
"help", \$HELP,
"manual", \$MANUAL,
"version", \$VERSION );
#
# Now make ensure that the command line setting of '--lvm', '--evms', '--zpool'
# and '--dir=x' override anything specified in the configuration file.
#
if ( $install{ 'dir' } )
{
$CONFIG{ 'dir' } = $install{ 'dir' };
$CONFIG{ 'evms' } = undef;
$CONFIG{ 'lvm' } = undef;
$CONFIG{ 'zpool' } = undef;
}
if ( $install{ 'evms' } )
{
$CONFIG{ 'dir' } = undef;
$CONFIG{ 'evms' } = $install{ 'evms' };
$CONFIG{ 'lvm' } = undef;
$CONFIG{ 'zpool' } = undef;
}
if ( $install{ 'lvm' } )
{
$CONFIG{ 'dir' } = undef;
$CONFIG{ 'evms' } = undef;
$CONFIG{ 'lvm' } = $install{ 'lvm' };
$CONFIG{ 'zpool' } = undef;
}
pod2usage(1) if $HELP;
pod2usage( -verbose => 2 ) if $MANUAL;

View File

@@ -148,7 +148,7 @@ $CONFIG{ 'extension' } = '.cfg';
#
# Release number.
#
my $RELEASE = '4.8';
my $RELEASE = '4.9';

View File

@@ -100,7 +100,7 @@ my %CONFIG;
#
# Release number.
#
my $RELEASE = '4.8';
my $RELEASE = '4.9';

View File

@@ -79,7 +79,7 @@ use strict;
#
# Release number.
#
my $RELEASE = '4.8';
my $RELEASE = '4.9';
# Init
my $mirror = '';

View File

@@ -113,7 +113,7 @@ my %CONFIG;
#
# Release number.
#
my $RELEASE = '4.8';
my $RELEASE = '4.9';
#

45
debian/changelog vendored
View File

@@ -1,3 +1,44 @@
xen-tools (4.9-1) unstable; urgency=medium
* New upstream bugfix and minor feature release.
+ Mark Debian 7 Wheezy and 8 Jessie as EoL.
+ Update list of Ubuntu and Debian releases.
+ distributions.conf: Fix typo in release name of future Debian 12
release (bookwork → bookworm).
+ Actually install xen-resize-guest tool. (Thanks lintian for the
spare-manual-page warning!)
+ Distinguish between those Debian releases using $dist/updates for
security updates and those who use $dist-security. Thanks Paul Wise!
(Closes: #972749)
- Add test for this; needs libtest-file-contents-perl as build-dep.
+ Fix support for lvm_thin. Thanks to Andreas Sundstrom for the bug
report and patch! (Closes: #942244)
+ Mount /proc and /dev before calling update-grub. Thanks to Brandon
Bradley for the bug report and patch. (Closes: #815021)
+ Add Debian install rules for arm64. (GH #62; patch by Ian McLinden)
+ Add netplan p2p support for Ubuntu. (GH #58; patch by Volker Janzen)
+ Fix storage commandline options not overriding xen-tools.conf
settings also in xen-update-image and xen-delete-image. (GH #57;
patch by Volker Janzen)
+ partitions/sample-server: Change options=sync to
options=defaults. (GL MR !1; patch by Wolfgang Karall)
+ Start all Debian releases since Stretch (9) with pygrub by default.
* Recommend deboootstrap ≥ 1.0.117~ for working bootstrapping of Ubuntu
6.06 Dapper and 6.10 Edgy (see #659360) and for support of Ubuntu
17.10 Artful, 18.04 LTS Bionic, 18.10 Cosmic, 19.04 Disco, 19.10 Eoan,
and 20.04 Focal.
* Fix non-RFC-conforming four-letter day of week abbreviations in
ancient debian/changelog entries.
* Bump debian/watch version from 3 to 4. Thanks Lintian!
* Bump debhelper compatibility level to 13.
+ Build-depend on "debhelper-compat (= 13)" to replace debian/compat.
* Declare compliance with Debian Policy 4.5.1. (No changes required.)
* Adapt distributions.conf defaults to the fact that Debian Unstable
still ships Ubuntu keyrings as of 2018, see #978438.
-- Axel Beckert <abe@debian.org> Tue, 29 Dec 2020 12:19:51 +0100
xen-tools (4.8-1) unstable; urgency=medium
* New upstream release.
@@ -989,7 +1030,7 @@ xen-tools (2.1-2) unstable; urgency=high
- Fixed several typos in the configuration file, and scripts.
(Closes: #375382)
-- Steve Kemp <skx@debian.org> Thur, 29 Jun 2006 10:31:23 +0000
-- Steve Kemp <skx@debian.org> Thu, 29 Jun 2006 10:31:23 +0000
xen-tools (2.1-1) unstable; urgency=high
@@ -1003,7 +1044,7 @@ xen-tools (2.1-1) unstable; urgency=high
* Urgency set to high primarily because of the failure to create
swap devices.
-- Steve Kemp <skx@debian.org> Thur, 23 Jun 2006 10:08:32 +0000
-- Steve Kemp <skx@debian.org> Thu, 23 Jun 2006 10:08:32 +0000
xen-tools (2.0-1) unstable; urgency=low

1
debian/compat vendored
View File

@@ -1 +0,0 @@
10

19
debian/control vendored
View File

@@ -2,7 +2,7 @@ Source: xen-tools
Section: utils
Priority: optional
Maintainer: Axel Beckert <abe@debian.org>
Build-Depends: debhelper (>= 10~),
Build-Depends: debhelper-compat (= 13),
devscripts,
git,
libdata-validate-domain-perl,
@@ -13,11 +13,12 @@ Build-Depends: debhelper (>= 10~),
liblog-message-perl | perl (<< 5.17.0),
libterm-ui-perl | perl (<< 5.17.0),
libsort-versions-perl,
libtest-file-contents-perl,
libtest-notabs-perl,
libtest-pod-coverage-perl,
libtest-pod-perl,
libtext-template-perl
Standards-Version: 4.3.0
Standards-Version: 4.5.1
Homepage: https://xen-tools.org/software/xen-tools
Vcs-Browser: https://github.com/xen-tools/xen-tools
Vcs-Git: https://github.com/xen-tools/xen-tools.git
@@ -40,6 +41,7 @@ Depends: debootstrap | cdebootstrap,
${misc:Depends},
${perl:Depends}
Recommends: debian-archive-keyring,
debootstrap (>= 1.0.117~),
e2fsprogs,
libexpect-perl,
lvm2,
@@ -67,9 +69,10 @@ Description: Tools to manage Xen virtual servers
* Debian 7 Wheezy
* Debian 8 Jessie
* Debian 9 Stretch
* Debian 10 Buster (under development)
* Debian 11 Bullseye (future release name)
* Debian 12 Bookworm (future release name)
* Debian 10 Buster
* Debian 11 Bullseye (under development)
* Debian 12 Bookworm (knows about this future release name)
* Debian 13 Trixie (knows about this future release name)
* Debian Sid (Unstable)
* Ubuntu 6.06 Dapper Drake (LTS)
* Ubuntu 6.10 Edgy Eft
@@ -97,6 +100,10 @@ Description: Tools to manage Xen virtual servers
* Ubuntu 17.10 Artful Aardvark
* Ubuntu 18.04 Bionic Beaver (LTS)
* Ubuntu 18.10 Cosmic Cuttlefish
* Ubuntu 19.04 Disco Dingo (preliminary support, under development)
* Ubuntu 19.04 Disco Dingo
* Ubuntu 19.10 Eoan Ermine
* Ubuntu 20.04 Focal Fossa (LTS)
* Ubuntu 20.10 Groovy Gorilla
* Ubuntu 21.04 Hirsute Hippo (preliminary support, under development)
* CentOS 5
* CentOS 6

2
debian/watch vendored
View File

@@ -4,7 +4,7 @@
#
# uscan version number - not the version of the software.
#
version=3
version=4
#

View File

@@ -12,19 +12,20 @@ sarge = debian eol
etch = debian eol
lenny = debian eol
squeeze = debian eol default-keyring
wheezy = debian
jessie = debian
stretch = debian
buster = debian
bullseye = debian dont-test
bookwork = debian dont-test
sid = debian
wheezy = debian eol
jessie = debian eol
stretch = debian pygrub
buster = debian pygrub
bullseye = debian pygrub
bookworm = debian pygrub dont-test
trixie = debian pygrub dont-test
sid = debian pygrub
testing = debian
testing = debian pygrub
oldoldstable = debian dont-test
oldstable = debian
stable = debian
unstable = debian
oldstable = debian pygrub
stable = debian pygrub
unstable = debian pygrub
# Between at least debootstrap 1.0.37 and 1.0.93 (including), dapper
# and edgy may need manual adjustments in debootstrap's configuration,
@@ -52,9 +53,13 @@ wily = ubuntu eol pygrub
xenial = ubuntu pygrub
yakkety = ubuntu eol pygrub
zesty = ubuntu eol pygrub ubuntu-keyring-2012-archive.gpg
artful = ubuntu pygrub
artful = ubuntu eol pygrub ubuntu-archive-keyring.gpg
bionic = ubuntu pygrub
cosmic = ubuntu pygrub
disco = ubuntu pygrub
cosmic = ubuntu eol pygrub ubuntu-archive-keyring.gpg
disco = ubuntu eol pygrub ubuntu-archive-keyring.gpg
eoan = ubuntu eol pygrub ubuntu-archive-keyring.gpg
focal = ubuntu pygrub
groovy = ubuntu pygrub
hirsute = ubuntu pygrub
devel = ubuntu pygrub dont-test

View File

@@ -72,6 +72,25 @@ setupStaticNetworking ()
if [ -n "${netmask}" ]; then
cidr="$(mask2cdr ${netmask})"
fi
# p2p code by Volker Janzen
gate=" gateway4: ${gateway}";
point='';
if [ -n "${p2p}" ]; then
# For a p2p setup the gateway4 keyword is replaced by the
# following on-link default route, when it matches the
# gateway4.
if [ "${p2p}" = "${gateway}" ]; then
gate=" routes:
- to: 0.0.0.0/0
via: ${p2p}
on-link: true"
else
gate="${gate}
routes:
- to: ${p2p}
on-link: true"
fi
fi
#
# We have a static IP address
@@ -84,7 +103,7 @@ network:
ethernets:
eth0:
addresses: [${ip1}/${cidr}]
gateway4: ${gateway}
${gate}
nameservers:
addresses: [${nameserver}]
E_O_STATIC

View File

@@ -40,7 +40,11 @@ fi
if [ ! -e ${prefix}/boot/grub/default ]; then
echo default > ${prefix}/boot/grub/default
fi
mount -o bind /proc ${prefix}/proc
mount -o bind /dev ${prefix}/dev
chroot ${prefix} /usr/sbin/update-grub
umount ${prefix}/proc
umount ${prefix}/dev
else
logMessage "pygrub not set, skipping grub-legacy installation"

View File

@@ -66,23 +66,51 @@ if ( test "${dist}" "!=" "sid" && test "${dist}" "!=" "unstable" && \
test -e /etc/apt/sources.list && \
grep ^deb.*security -r /etc/apt/sources.list /etc/apt/sources.list.d >/dev/null 2>/dev/null ) ; then
cat <<E_O_APT >> ${prefix}/etc/apt/sources.list
#
# Security updates
#
if echo "${dist}" | egrep -q '\b(sarge|etch|lenny|squeeze|wheezyjessie|stretch|buster)\b'; then
cat <<E_O_APT >> ${prefix}/etc/apt/sources.list
#
# Security updates
#
deb http://security.debian.org/ ${dist}/updates main contrib non-free
deb-src http://security.debian.org/ ${dist}/updates main contrib non-free
E_O_APT
else
cat <<E_O_APT >> ${prefix}/etc/apt/sources.list
#
# Security updates
#
deb http://security.debian.org/ ${dist}-security main contrib non-free
deb-src http://security.debian.org/ ${dist}-security main contrib non-free
E_O_APT
fi
else
cat <<E_O_APT >> ${prefix}/etc/apt/sources.list
#
# Security updates - Uncomment to enable.
#
if echo "${dist}" | egrep -q '\b(sarge|etch|lenny|squeeze|wheezyjessie|stretch|buster)\b'; then
cat <<E_O_APT >> ${prefix}/etc/apt/sources.list
#
# Security updates - Uncomment to enable.
#
# deb http://security.debian.org/ ${dist}/updates main contrib non-free
# deb-src http://security.debian.org/ ${dist}/updates main contrib non-free
E_O_APT
else
cat <<E_O_APT >> ${prefix}/etc/apt/sources.list
#
# Security updates - Uncomment to enable.
#
# deb http://security.debian.org/ ${dist}-security main contrib non-free
# deb-src http://security.debian.org/ ${dist}-security main contrib non-free
E_O_APT
fi
fi
#

View File

@@ -36,12 +36,16 @@ if [ "${arch}" = "i386" ]; then
XEN_ARCH="686"
elif [ "${arch}" = "amd64" ]; then
XEN_ARCH="amd64"
elif [ "${arch}" = "arm64" ]; then
XEN_ARCH="arm64"
elif [ -z "${arch}" ]; then
UNAME_ARCH=`uname -m`
if [ "${UNAME_ARCH}" = "i686" ]; then
XEN_ARCH="686"
elif [ "${UNAME_ARCH}" = "x86_64" ]; then
XEN_ARCH="amd64"
elif [ "${UNAME_ARCH}" = "aarch64" ]; then
XEN_ARCH="arm64"
else
logMessage Unknown kernel architecture ${UNAME_ARCH}.
logMessage Please report this as bug to xen-tools-dev@xen-tools.org.

View File

@@ -2,7 +2,7 @@
size=1G
type=ext3
mountpoint=/
options=sync,errors=remount-ro
options=defaults,errors=remount-ro
[swap]
size=2G

95
t/hook-apt.t Executable file
View File

@@ -0,0 +1,95 @@
#!perl -w
#
# Test that the /etc/inittab file is modified as we expect.
#
# Steve
# --
#
use strict;
use Test::More;
use Test::File::Contents;
use File::Temp;
use File::Copy;
use File::Path qw(make_path);
my $hook_dir = $ENV{AS_INSTALLED_TESTING} ? '/usr/share/xen-tools' : 'hooks';
foreach my $dist (qw(stretch buster bullseye bookworm sid)) {
testHook( $dist );
}
done_testing();
sub testHook
{
my ( $dist ) = ( @_ );
my $ea = 'etc/apt';
my $easl = "$ea/sources.list";
my $hook = "$hook_dir/" .
(
$ENV{AS_INSTALLED_TESTING} ?
$dist :
'debian'
) . '/20-setup-apt';
#
# Create a temporary directory to use as prefix
#
my $dir = File::Temp::tempdir( CLEANUP => 1 );
make_path( "$dir/$ea/apt.conf.d", { chmod => 0755 });
make_path( "$dir/bin", { chmod => 0755 });
my $tmphook = "$dir/bin/20-setup-apt";
#
# Make sure that worked.
#
ok( -d $dir, "temporary directory created OK [$dist]" );
ok( -d "$dir/bin",
"bin inside temporary directory created OK [$dist]" );
ok( -d "$dir/$ea",
"$ea inside temporary directory created OK [$dist]" );
# Create a copy of the 20-setup-apt hook to be able to comment out
# the chroot + apt-get update call.
File::Copy::cp( $hook, $tmphook );
ok( -e "$tmphook", "hook exists in temporary directory [$dist]" );
# File::Copy in Perl 5.10 does not copy permissions, so let's fix
# it there and check for it elsewhere.
if ($] < 5.011) {
chmod(0755, $tmphook);
} else {
ok( -x "$tmphook", "hook is executable in temporary directory [$dist]" );
}
no warnings qw(qw);
is(system(qw(sed -e s/chroot/#chroot/ -i), $tmphook) >> 8, 0,
"chroot call in hook could be deactivated [$dist]");
use warnings qw(qw);
#
# Set up some variables expected by the hook
#
$ENV{dist} = $dist;
$ENV{mirror} = 'http://deb.debian.org/debian';
#
# Call the hook
#
is(system($tmphook, $dir) >> 8, 0,
"hook for $dist exited with zero return code");
ok( -e "$dir/$easl", "A sources.list file has been created. [$dist]" );
if ($dist =~ /stretch|buster/) {
file_contents_like( "$dir/$easl", qr(\b${dist}/updates\b),
"sources.list contains $dist/updates");
file_contents_unlike( "$dir/$easl", qr(\b${dist}-security\b),
"sources.list doesn't contain $dist-security");
} else {
file_contents_like( "$dir/$easl", qr(\b${dist}-security\b),
"sources.list contains $dist-security");
file_contents_unlike( "$dir/$easl", qr(\b${dist}/updates\b),
"sources.list doesn't contain $dist/updates");
}
}

View File

@@ -9,11 +9,9 @@
use strict;
use File::Find;
use Test::More;
use Test::NoTabs;
# Check all Perl files
all_perl_files_ok();
#
# Find all the files beneath the current directory,
# and call 'checkFile' with the name.
@@ -54,25 +52,36 @@ sub checkFile
my $isShell = 0;
my $isPerl = 0;
# Read the file.
open( INPUT, "<", $file );
foreach my $line ( <INPUT> )
{
if ( ( $line =~ /\/bin\/sh/ ) ||
( $line =~ /\/bin\/bash/ ) )
if ( $file =~ /\.sh$/ ) {
$isShell = 1;
} elsif ( $file =~ /\.(pl|pm|t)$/ ) {
$isPerl = 1;
} else {
# Read the file.
open( INPUT, "<", $file );
foreach my $line ( <INPUT> )
{
$isShell = 1;
last;
}
if ( $line =~ /\/usr\/bin\/perl/ )
{
last;
if ( ( $line =~ /^#! *\/bin\/sh/ ) ||
( $line =~ /^#! *\/bin\/bash/ ) )
{
$isShell = 1;
last;
}
if ( $line =~ /^#!.*\bperl\b/ )
{
$isPerl = 1;
last;
}
}
close( INPUT );
}
close( INPUT );
#
# Run check if it is a shell file.
#
notabs_ok( $file ) if $isShell;
notabs_ok( $file ) if $isShell or $isPerl;
}
done_testing();