1
0
mirror of synced 2026-02-20 13:55:16 +00:00

Compare commits

..

60 Commits

Author SHA1 Message Date
Axel Beckert
2a9fdc71e7 Release as 4.8 and upload to unstable as 4.8-1 2019-02-09 01:57:46 +01:00
Axel Beckert
89795d71dc Add a DEP-12 debian/upstream/metadata file 2019-02-09 01:00:38 +01:00
Axel Beckert
2a3c3cebfb Add link to upstream changelog to README 2019-02-09 00:49:31 +01:00
Axel Beckert
2275c8f293 Clarification 2019-02-09 00:47:12 +01:00
Axel Beckert
449cc9a0bf Whitespace between footnote markers 2019-02-09 00:44:10 +01:00
Axel Beckert
baee245fbd Mark those Debian/Ubuntu releases which might fail inside chroot w/o vsyscall=emulate 2019-02-09 00:41:36 +01:00
Axel Beckert
ac55fba904 Mention netplan.io also in NEWS.markdown 2019-02-08 22:23:40 +01:00
Axel Beckert
2a476d1037 More Markdown formatting 2019-02-08 17:42:40 +01:00
Axel Beckert
19f30610a5 Proper Markdown formatting 2019-02-08 17:40:27 +01:00
Axel Beckert
a8df6e002f distributions.conf now supports arbitrary keyring files
Any tag ending in ".gpg" will be considered to be the according
keyring file in /usr/share/keyrings/. This is at least needed for some
Ubuntu releases which were eol'ed in the past few years, especially
because Ubuntu split up their keyrings much more finegrained than just
"archive" and "archive-removed-keys".
2019-02-08 17:37:11 +01:00
Axel Beckert
0d9a7cb12e Reenable release-testing of edgy and dapper since #659360 in debootstrap is now fixed 2019-02-08 17:11:05 +01:00
Axel Beckert
b05087b1cb Whitespace fix 2019-02-08 16:45:19 +01:00
Axel Beckert
58af2790a1 Add an explaining link under ASLR 2019-02-08 16:44:22 +01:00
Axel Beckert
1cda58c756 Make the footnotes compact description list
Hopefully, this is still recognised by modern browsers.
2019-02-08 16:41:30 +01:00
Axel Beckert
c66e5427ed File name and line numbers are not necessary for this warning → add \n 2019-02-08 16:40:08 +01:00
Axel Beckert
ad013d7b86 Try to make a footnote for the #659360 reference, as it's less important now 2019-02-08 16:39:07 +01:00
Axel Beckert
a6389c48df While officially being EoL, Ubuntu 17.10 Artful is still on the normal mirrors
So remove to eol tag again for now.
2019-02-08 15:13:58 +01:00
Axel Beckert
8d07785c3b More README fine-tuning 2019-02-08 14:51:39 +01:00
Axel Beckert
ead18c819a Fix wrong URL in README 2019-02-08 14:51:16 +01:00
Axel Beckert
e3ab23b55d README fine-tuning 2019-02-08 00:27:21 +01:00
Axel Beckert
82ecd4c6d2 Document potential need for the vsyscall=emulate kernel commandline option 2019-02-08 00:27:06 +01:00
Axel Beckert
f50d1e37a2 Only run xen-toolstack helper script if both, xm and xl are present
Avoids warning about deprecated helper script.
2019-02-07 16:26:06 +01:00
Axel Beckert
c774f81e80 More unconfusing of Emacs' syntax highlighting 2019-02-07 16:16:54 +01:00
Axel Beckert
c8316b0076 Unconfuse Emacs' syntax highlighting 2019-02-07 16:10:31 +01:00
Axel Beckert
d5c4589519 Fix copy and paste "typo" 2019-02-07 15:51:11 +01:00
Axel Beckert
17d868d38d Fix output redirection in release-testing script 2019-02-07 15:48:19 +01:00
Axel Beckert
42e7dca4bf Mark Ubuntu's devel alias as dont-test as debootstrap doesn't know about it 2019-02-07 15:35:12 +01:00
Axel Beckert
4872d18989 Many improvements for the release-testing script
* Don't abort on first failure, but log it and print a summary at the
  end.
* Allow to choose which distributions to test via environment variable
  $DISTRIBUTIONS.
* Don't overwrite log files from previous runs. Add a time stamp to
  the log file name instead.
2019-02-07 13:21:07 +01:00
Axel Beckert
1a5fd541cd Drop pygrub path detection from xm.tmpl
Xen prefers a path-less bootloader='pygrub'.
2019-02-07 03:28:54 +01:00
Axel Beckert
9817ff95c3 Suggest grub-xen-host
Support for pvgrub2 is not yet there, but it can be used already by
tweaking configuration files.
2019-02-07 02:54:11 +01:00
Axel Beckert
26427c9dc8 Set Ubuntu fallback suite to the latest LTS, i.e. 18.04 Bionic 2019-02-07 02:52:29 +01:00
Axel Beckert
5c76eb1a7d Migrate httpredir.debian.org → deb.debian.org 2019-02-07 02:50:20 +01:00
Axel Beckert
8723db0880 Fix copy & paste error in 9ee1f637 which prevented netplan to work 2019-02-07 02:48:17 +01:00
Axel Beckert
76221f5999 Add changelog items for previous commit 2019-02-04 02:04:21 +01:00
Pietro Stäheli
58306b9281 Add support for really random MAC addresses
Closes: #855703
2019-02-04 01:58:40 +01:00
Axel Beckert
7ce42e9781 Use ubuntu-keyring instead of now transitional ubuntu-archive-keyring
Keep the latter as alternative to allow one to install the xen-tools
package also on older Debian or Ubuntu releases.
2019-02-04 01:35:20 +01:00
Axel Beckert
3daa69256b Add changelog items for previous commit 2019-02-04 01:25:19 +01:00
Nico Boehr
5587dc796a Add support for LVM thin provisioning
This adds a parameter '--lvm_thin' to xen-create-image that allows you
to specify the thin pool where the thin logical volumes will be
created.

If '--lvm_thin' is not specified, nothing will change and thick
provisioned volumes will be created.

[Committer's note: Code logic taken from
https://github.com/youknow0/xen-tools-thin-provisioning/commit/a6f267ef
and adapted to current code. Needed more than just a rebase. All
trailing whitespace has been removed, too.]

Fixes xen-tools/xen-tools#47.
2019-02-04 01:14:57 +01:00
Axel Beckert
9ee1f63705 Create hooks/artful with new 40-setup-networking-deb-netplan
Since Ubuntu 17.10 Artful, Ubuntu has decided to use netplan instead
of ifupdown.

40-setup-networking-deb-netplan has been contributed by Arno and Peter.
(see https://github.com/xen-tools/xen-tools/issues/51#issuecomment-412019510)

Closes xen-tools/xen-tools#51.

Since we have to make a variant of hooks/karmic/ as hook/artful/,
rename hooks/karmic/80-install-kernel (which previously was unique to
hooks/karmic/) to hooks/common/80-install-kernel-ubuntu and add
symlinks to it from hooks/karmic/ and hook/artful/.
2019-02-03 23:30:45 +01:00
Axel Beckert
cfd4406a93 Add preliminary support for future Debian and recent Ubuntu releases
Partially addresses GH #51
2019-02-03 22:50:36 +01:00
Axel Beckert
647efb0e12 Check $DEB_BUILD_OPTIONS and $DEB_BUILD_PROFILES in override_dh_auto_test
Fixes lintian warning
override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS.
2019-02-03 19:42:03 +01:00
Axel Beckert
0a351b4dfb Separate upstream and packaging changelog items 2019-02-03 19:37:26 +01:00
Axel Beckert
dccf78c65e Set "Rules-Requires-Root: no" 2019-02-03 19:34:57 +01:00
Axel Beckert
3a15c11a7e Declare compliance with Debian Policy 4.3.0
No other changes were required.
2019-02-03 19:34:57 +01:00
Axel Beckert
19e117b9f3 Bump debhelper compatibility level to 10
Update versioned debhelper build-dependency accordingly.

Only using dh compat level 10 allows one to still build the package on
Debian 9 Stretch without backports (debhelper 10.x), on Ubuntu 18.04
LTS (debehlper 11.x) and on Ubuntu 16.04 LTS with backports (debhelper
10.x).
2019-02-03 19:34:50 +01:00
Axel Beckert
f1052fcdaa Add changelog and NEWS entries for Yuri's pull-request #42 2019-02-03 17:41:09 +01:00
Axel Beckert
b9e0284a43 Drop --quiet from installDebianPackageAndRecommends
See https://github.com/xen-tools/xen-tools/pull/42#issuecomment-212903567
2019-02-03 17:38:22 +01:00
Axel Beckert
26a698bbd6 Merge branch 'no-progress-in-logs' of https://github.com/YSakhno/xen-tools into YSakhno-no-progress-in-logs 2019-02-03 17:35:52 +01:00
Axel Beckert
1ad05c0d66 Mention ZFS support in changelog and NEWS, bump version to 4.8 (unreleased) 2019-02-03 17:32:29 +01:00
Axel Beckert
8f527122c5 Merge branch 'zfs-volume' of https://github.com/brigriffin/xen-tools into brigriffin-zfs-volume 2019-02-03 17:25:08 +01:00
Axel Beckert
c3b8d7fda5 Add some more details to previous changelog item 2019-02-03 17:20:51 +01:00
Jelmer Vernooij
53800af963 Trim trailing whitespace.
Fixes lintian: file-contains-trailing-whitespace
See https://lintian.debian.org/tags/file-contains-trailing-whitespace.html for more details.
2019-02-03 17:20:22 +01:00
Axel Beckert
a78388dd1e Bump version number to 4.7.1 (yet unreleased) 2019-02-03 17:12:35 +01:00
Axel Beckert
07e56db75c Merge branch 'debian' 2019-02-03 17:09:10 +01:00
Marc
1634fe5e80 Remove tabs 2018-05-06 00:01:16 +02:00
Marc
f1083cfa55 Add support for ZFS volumes 2018-05-05 23:14:00 +02:00
Axel Beckert
422f682b37 Fix comments wrt. /etc/xen-tools/skel/ 2017-08-04 00:45:11 +02:00
Axel Beckert
326bd72ebb Also fix wrong bug number for #849867 in upstream changelog 2017-01-23 01:39:23 +01:00
Yuri Sakhno
230167d84a Small fix due to some messages being written to stderr rather than stdout 2016-04-20 14:24:08 +03:00
Yuri Sakhno
87dd127cf8 Eliminate progress reporting which is useless in logs 2016-04-20 11:45:39 +03:00
51 changed files with 736 additions and 114 deletions

View File

@@ -14,7 +14,7 @@
#
TMPDIR ?= /tmp
DIST_PREFIX = ${TMPDIR}
VERSION = 4.7
VERSION = 4.8
DEBVERSION = $(shell echo $(VERSION)|sed 's/\(rc\|pre\|beta\|alpha\)/~\1/')
BASE = xen-tools
VCS = git
@@ -183,6 +183,7 @@ install-hooks:
-cd ${prefix}/usr/share/xen-tools/ && ln -s debian.d stretch.d
-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 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
@@ -218,7 +219,12 @@ install-hooks:
-cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d xenial.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d yakkety.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d zesty.d
-cd ${prefix}/usr/share/xen-tools/ && ln -s karmic.d devel.d
mkdir -p ${prefix}/usr/share/xen-tools/artful.d/
cp -R hooks/artful/*-* ${prefix}/usr/share/xen-tools/artful.d/
-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 devel.d
cp hooks/common.sh ${prefix}/usr/share/xen-tools
cp -r hooks/common ${prefix}/usr/share/xen-tools

View File

@@ -1,3 +1,51 @@
xen-tools 4.8 (released 9 Feb 2019)
===================================
New Features
------------
* Support for ZFS volumes (by Marc Bigler, GH #50)
* Support for LVM thin provisioning (by Nico Boehr, GH #47)
* Support for really random MAC addresses upon every `xen-create-image`
invocation by using the new option `--randommac`. (by Pietro Stäheli,
closes Debian bug report #855703)
* `distributions.conf` now supports arbitrary keyring files in
`/usr/share/keyrings/`. (Needed for some EoL Ubuntu releases.)
* Support for netplan.io network configuration as used in recent
Ubuntu releases. (Hook by Arno and Peter, GH #51)
Bug Fixes
---------
* Minor documentation fixes.
* Eliminate progress reporting which is useless in logs. (Yuri Sakhno,
GH #42)
* Drop `pygrub` path detection from `xm.tmpl`, Xen prefers a path-less
`bootloader='pygrub'`.
Distribution Releases Changes
-----------------------------
* Support for
+ Ubuntu 17.10 Artful Aardvark
+ Ubuntu 18.04 Bionic Beaver (LTS) (GH #51)
+ Ubuntu 18.10 Cosmic Cuttlefish
* Preliminary support for Ubuntu 19.04 Disco Dingo
* Knows about code name for Debian 12 (Bookworm).
* Considers Ubuntu Yakkety, Zesty and Artful being EoL.
* Set Ubuntu fallback suite to the latest LTS, i.e. 18.04 Bionic.
Other Changes
-------------
* Change all occurrences of `httpredir.debian.org` to
`deb.debian.org` except those for the `debian-archive`. The latter
now point to `archive.debian.org` directly.
* Many improvements for the `release-testing` script.
* Only run `xen-toolstack` helper script if both, `xm` and `xl` are
present. Avoids warning about deprecated helper script.
xen-tools 4.7 (released 23 Jan 2017)
====================================
@@ -43,7 +91,7 @@ Other Changes
* Risen default values for RAM sizes in /etc/xen-tools/xen-tools.cfg
to cope with risen resource consumption and availability. (Closes
Debian bug report #776487)
Debian bug report #849867)
* Default file system is now ext4 (instead of ext3).
Test Suite

View File

@@ -4,6 +4,7 @@ xen-tools
[![Travis CI Build Status](https://api.travis-ci.org/xen-tools/xen-tools.svg)](https://travis-ci.org/xen-tools/xen-tools)
* [Homepage](https://www.xen-tools.org/software/xen-tools)
* [Change Log](https://github.com/xen-tools/xen-tools/blob/master/NEWS.markdown)
* Official Git Repositories:
* [at GitHub](https://github.com/xen-tools/xen-tools) (primary, includes [Issue Tracker](https://github.com/xen-tools/xen-tools/issues))
* [at GitLab](https://gitlab.com/xen-tools/xen-tools) (secondary, doesn't support the `git://` protocol.)
@@ -31,34 +32,35 @@ known to work reliably, i.e.:
### Debian
* Sarge 3.1 (i386 and DomU only)
* Etch 4.0 (Dom0 no more tested)
* Lenny 5.0 (Dom0 no more tested)
* Squeeze 6.0 (Dom0 no more tested)
* Wheezy 7
* Sarge 3.1 (i386 and DomU only) [¹](#1)
* Etch 4.0 (Dom0 no more tested) [¹](#1)
* Lenny 5.0 (Dom0 no more tested) [¹](#1)
* Squeeze 6.0 (Dom0 no more tested) [¹](#1)
* Wheezy 7 (Dom0 no more tested) [¹](#1)
* Jessie 8
* Stretch 9 (under development)
* Buster 10 (knows about this future release name)
* Stretch 9
* Buster 10 (under development)
* Bullseye 11 (knows about this future release name)
* Bookworm 12 (knows about this future release name)
* Sid (always under development; works at least at the moment of writing :-)
### Ubuntu
(only DomUs tested)
* Dapper Drake 6.06 (LTS, needs editing of `/usr/share/debootstrap/scripts/dapper` since at least debootstrap version 1.0.37, see [#659360][1])
* Edgy Eft 6.10 (needs editing of `/usr/share/debootstrap/scripts/edgy` since at least debootstrap version 1.0.37, see [#659360][1])
* Feisty Fawn 7.04
* Gutsy Gibbon 7.10
* Hardy Heron 8.04 (LTS, see [Installing Ubuntu 8.04 as DomU][2])
* Interpid Ibex 8.10
* Jaunty Jackaplope 9.04
* Karmic Koala 9.10
* Lucid Lynx 10.04 (LTS)
* Maverick Meerkat 10.10
* Natty Narwhal 11.04
* Oneiric Ocelot 11.10
* Precise Pangolin 12.04 (LTS)
* Dapper Drake 6.06 (LTS) [¹](#1) [²](#2)
* Edgy Eft 6.10 [¹](#1) [²](#2)
* Feisty Fawn 7.04 [¹](#1)
* Gutsy Gibbon 7.10 [¹](#1)
* Hardy Heron 8.04 (LTS, see [Installing Ubuntu 8.04 as DomU][2]) [¹](#1)
* Interpid Ibex 8.10 [¹](#1)
* Jaunty Jackaplope 9.04 [¹](#1)
* Karmic Koala 9.10 [¹](#1)
* Lucid Lynx 10.04 (LTS) [¹](#1)
* Maverick Meerkat 10.10 [¹](#1)
* Natty Narwhal 11.04 [¹](#1)
* Oneiric Ocelot 11.10 [¹](#1)
* Precise Pangolin 12.04 (LTS) [¹](#1)
* Quantal Quetzal 12.10
* Raring Ringtail 13.04
* Saucy Salamander 13.10
@@ -68,7 +70,29 @@ known to work reliably, i.e.:
* Wily Werewolf 15.10
* Xenial Xerus 16.04 (LTS)
* Yakkety Yak 16.10
* Zesty Zapus 17.04 (under development)
* Zesty Zapus 17.04
* Artful Aardvark 17.10
* Bionic Beaver 18.04 (LTS)
* Cosmic Cuttlefish 18.10
* Disco Dingo 19.04 (under development)
### Footnotes
<dl compact="compact">
<dt><a id="1" name="1">¹</a></dt><dd>
Installation with `xen-create-image` and updating with
`xen-update-image` might fail with newer kernels/distributions as Dom0
without `vsyscall=emulate` on the kernel commandline.
</dd><dt><a id="2" name="2">²</a></dt><dd>
At least between debootstrap version 1.0.37
and 1.0.93 (including) these distributions needs editing of
`/usr/share/debootstrap/scripts/edgy`, see [#659360][1].
</dd></dl>
[1]: https://bugs.debian.org/659360
"debootstrap in Wheezy can no more build Ubuntu Edgy or earlier"
@@ -113,7 +137,7 @@ To use these tools you'll need the following software:
* [File::Which](https://metacpan.org/release/File-Which)
([Debian Package libfile-which-perl](https://packages.debian.org/libfile-which-perl))
* and some more modules which are part of the Perl core and hence do not need to be installed separately.
* Make, if you are not installing through a package manager
* "Make", if you are not installing through a package manager.
You can try to install RPM-based distributions such as CentOS, or
Fedora Core, but you will need a correctly installed and configured
@@ -125,6 +149,22 @@ users via a login shell you can have a look at the (currently
unmaintained) [xen-shell](https://xen-tools.org/software/xen-shell/)
project.
### Caveats
For security reasons (avoid risk to circumvent [ASLR][3]), recent kernels
have disabled the `vsyscall` mapping. Unfortunately older
distributions don't run and hence can't be bootstrapped without it.
To enable trapping and enabling emulate calls into the fixed
vsyscall address mapping and hence to run and bootstrap older Linux
distributions in a chroot (as xen-tools does), you need to add
`vsyscall=emulate` to the kernel commandline, e.g. by adding it to
`GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`, then running
`update-grub` afterwards and finally reboot.
[3]: https://en.wikipedia.org/wiki/Address_space_layout_randomization
"Address Space Layout Randomization"
Installation
------------
@@ -242,11 +282,15 @@ test case would be a useful bonus.
### Known/Open Issues
* [xen-tools Issue Tracker at GitHub](https://github.com/xen-tools/xen-tools/issues/new)
You can check the following ressources for known or open issues:
* [xen-tools Issue Tracker at GitHub](https://github.com/xen-tools/xen-tools/issues)
(primary upstream bug tracker)
* [Mailing list archives of the xen-tools mailing lists](https://xen-tools.org/software/xen-tools/lists.html)
(might contain, loose, non-formal bug reports)
* [TODO file in the source code](https://github.com/xen-tools/xen-tools/blob/master/TODO.markdown)
* [xen-tools in the Debian Bug Tracking System](https://bugs.debian.org/xen-tools)
* [xen-tools in Ubuntu's Launchpad](https://bugs.launchpad.net/ubuntu/+source/xen-tools)
--
The Xen-Tools Developer Team

View File

@@ -55,6 +55,10 @@ Bugs to fix and features to add for 5.0
`xen-create-image` first. Which probably both would be a good
idea.
* Maybe check for `vsyscall=emulate` in `GRUB_CMDLINE_LINUX_DEFAULT`
in `/etc/default/grub` if trying to install an affected Linux
distribution.
Stuff from Steve's TODO list / Generic TODOs
--------------------------------------------

View File

@@ -245,12 +245,12 @@ and EVMS EXAMPLE.
--mirror=url Setup the mirror to use when installing via
debootstrap. (Default value: mirror used in
/etc/apt/sources.list or for Debian
"http://httpredir.debian.org/debian/" and for Ubuntu
"http://deb.debian.org/debian/" and for Ubuntu
"http://archive.ubuntu.com/ubuntu/")
The above mentioned Debian mirror hostname
automatically tries to choose a more or less close
Debian mirror. See http://httpredir.debian.org/ for
Debian mirror. See http://deb.debian.org/ for
details.
--apt_proxy=protocol://hostname:port/
@@ -296,6 +296,8 @@ and EVMS EXAMPLE.
flags, but the specific MAC address will only be used
for the first interface.)
--randommac Creates a random MAC address.
--netmask=123.456.789.ABC
Setup the netmask for the new instance.
@@ -321,14 +323,14 @@ and EVMS EXAMPLE.
Subdirectories will be created for each guest.
If you do not wish to use loopback images specify
--lvm or --evms. (These three options are mutually
exclusive.)
--lvm, --evms or --zpool. (These four options are
mutually exclusive.)
--evms=lvm2/container
Specify the container to save images within,
i.e. '--evms lvm2/mycontainer'. If you do not wish to
use EVMS specify --dir or --lvm. (These three options
are mutually exclusive.)
use EVMS specify --dir, --lvm or --zpool. (These four
options are mutually exclusive.)
--hostname=host.example.org
Set the hostname of the new guest system. Ideally
@@ -337,9 +339,20 @@ and EVMS EXAMPLE.
out of it for various purposes.
--lvm=vg Specify the volume group to save images within.
If you do not wish to use LVM specify --dir or --evms.
(These three options are mutually exclusive.)
If you do not wish to use LVM specify --dir, --evms or
--zpool. (These three options are mutually exclusive.)
--lvm_thin=thin pool
Specify the thin pool name on which thin LVM volumes
are created.
This enables thin provisioned LVM volumes. Note that
you need a LVM version which supports this.
--zpool=pool Specify the ZFS pool to save images within. A new ZFS
volume will be created for each guest.
If you do not wish to use ZFS specify --dir, --evms or
--lvm. (These four options are mutually exclusive.)
=head1 NOTES
@@ -859,7 +872,7 @@ my $MOUNT_POINT = undef;
#
# Release number.
#
my $RELEASE = '4.7';
my $RELEASE = '4.8';
#
@@ -1004,7 +1017,8 @@ if ( !@PARTITIONS )
populatePartitionsData()
if ( ( $CONFIG{ 'dir' } ) ||
( $CONFIG{ 'evms' } ) ||
( $CONFIG{ 'lvm' } ) );
( $CONFIG{ 'lvm' } ) ||
( $CONFIG{ 'zpool' } ) );
}
@@ -1056,12 +1070,20 @@ elsif ( $CONFIG{ 'image-dev' } )
#
usePhysicalDevice();
}
elsif ( $CONFIG{ 'zpool' } )
{
#
# Create our ZFS volumes
#
createZFSBits();
}
else
{
# Can't happen we didn't get an installation type.
logprint( "Error: No recognised installation type.\n".
"Please specify a directory, lvm, or evms volume to use.\n" );
"Please specify a directory, lvm, zpool, or evms volume to use.\n" );
$CONFIG{'FAIL'} = 1;
exit 127;
}
@@ -1292,9 +1314,13 @@ sub setupDefaultOptions
$CONFIG{ 'mirror_'.$debdist } = $MIRROR{$dist.'_archive'} or
die $dist.'_archive not defined in /etc/xen-tools/mirrors.conf';
my $removed_keys = "/usr/share/keyrings/$dist-archive-removed-keys.gpg";
if ($debdistinfo !~ /default-keyring/ and -s $removed_keys) {
if ($debdistinfo =~ /(\S*\.gpg)($|\s)/ and -s "/usr/share/keyrings/${1}") {
$CONFIG{ 'keyring_'.$debdist } = "/usr/share/keyrings/${1}";
} elsif ($debdistinfo !~ /default-keyring/ and -s $removed_keys) {
$CONFIG{ 'keyring_'.$debdist } = $removed_keys;
}
} elsif ($debdistinfo =~ /(\S*\.gpg)($|\s)/ and -s "/usr/share/keyrings/${1}") {
$CONFIG{ 'keyring_'.$debdist } = "/usr/share/keyrings/${1}";
} else {
$CONFIG{ 'mirror_'.$debdist } = $MIRROR{$dist} or
die $dist.' not defined in /etc/xen-tools/mirrors.conf';
@@ -1560,6 +1586,7 @@ sub parseCommandLineArguments
$install{ 'dir' } = undef;
$install{ 'lvm' } = undef;
$install{ 'image-dev' } = undef;
$install{ 'zpool' } = undef;
#
# Parse options.
@@ -1589,6 +1616,7 @@ sub parseCommandLineArguments
"apt_proxy=s", \&checkOption,
"modules=s", \&checkOption,
"lvm=s", \$install{ 'lvm' },
"zpool=s", \$install{ 'zpool' },
"image-dev=s", \$install{ 'image-dev' },
"swap-dev=s", \$install{ 'swap-dev' },
"serial_device=s", \&checkOption,
@@ -1608,6 +1636,7 @@ sub parseCommandLineArguments
"hostname=s", \&checkOption,
"ip=s@", \&checkOption,
"mac=s", \&checkOption,
"randommac", \$CONFIG{ 'randommac' },
"netmask=s", \&checkOption,
"broadcast=s", \&checkOption,
"nameserver=s", \&checkOption,
@@ -1655,6 +1684,7 @@ sub parseCommandLineArguments
"output=s", \&checkOption,
"extension:s", \&checkOption,
"dontformat", \&checkOption,
"lvm_thin=s", \$CONFIG{ 'lvm_thin' },
# Help options
"debug!", \$CONFIG{ 'debug' },
@@ -1687,7 +1717,7 @@ sub parseCommandLineArguments
#
# Now make ensure that the command line setting of '--lvm', '--evms'
# 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' } )
@@ -1696,6 +1726,7 @@ sub parseCommandLineArguments
$CONFIG{ 'evms' } = undef;
$CONFIG{ 'lvm' } = undef;
$CONFIG{ 'image-dev' } = undef;
$CONFIG{ 'zpool' } = undef;
}
if ( $install{ 'evms' } )
{
@@ -1703,6 +1734,7 @@ sub parseCommandLineArguments
$CONFIG{ 'evms' } = $install{ 'evms' };
$CONFIG{ 'lvm' } = undef;
$CONFIG{ 'image-dev' } = undef;
$CONFIG{ 'zpool' } = undef;
}
if ( $install{ 'lvm' } )
{
@@ -1710,6 +1742,15 @@ sub parseCommandLineArguments
$CONFIG{ 'evms' } = undef;
$CONFIG{ 'lvm' } = $install{ 'lvm' };
$CONFIG{ 'image-dev' } = undef;
$CONFIG{ 'zpool' } = undef;
}
if ( $install{ 'zpool' } )
{
$CONFIG{ 'dir' } = undef;
$CONFIG{ 'evms' } = undef;
$CONFIG{ 'lvm' } = undef;
$CONFIG{ 'image-dev' } = undef;
$CONFIG{ 'zpool' } = $install{ 'zpool' };
}
if ( $install{ 'image-dev' } )
{
@@ -1717,6 +1758,7 @@ sub parseCommandLineArguments
$CONFIG{ 'evms' } = undef;
$CONFIG{ 'lvm' } = undef;
$CONFIG{ 'image-dev' } = $install{ 'image-dev' };
$CONFIG{ 'zpool' } = undef;
$CONFIG{ 'size' } = undef;
$CONFIG{ 'swap' } = undef;
@@ -1745,13 +1787,13 @@ sub testRootUser
{
if ( $EFFECTIVE_USER_ID != 0 )
{
my $err = <<E_O_ROOT;
my $err = <<EOROOT;
In order to use this script you must be running with root privileges.
(This is necessary to mount the disk images which are created.)
E_O_ROOT
EOROOT
logprint($err);
$CONFIG{'FAIL'} = 1;
@@ -2082,10 +2124,18 @@ EOF
#
# If we don't have a MAC address specified then generate one.
# If randommac is specified, generate random MAC.
#
if ( !$CONFIG{ 'mac' } )
{
$CONFIG{ 'mac' } = generateMACAddress();
if ( $CONFIG{ 'randommac' } )
{
$CONFIG{ 'mac' } = generateRandomMACAddress();
}
else
{
$CONFIG{ 'mac' } = generateMACAddress();
}
}
#
@@ -2134,7 +2184,7 @@ EOF
=begin doc
Generate a 'random' MAC address.
Generate a pseudo-random MAC address.
The MAC address is constructed based upon :
@@ -2192,6 +2242,36 @@ sub generateMACAddress
=begin doc
Generate a MAC address based on the Xen prefix and a really random local part.
=end doc
=cut
sub generateRandomMACAddress
{
#
# Start with the xen prefix
#
my $mac = '00:16:3E';
#
# Generate random local part and append to $mac
#
for ( my $count=0; $count < 3; $count++ )
{
$mac = $mac . ":" . sprintf("%02X", int(rand(255)));
}
return ( $mac );
}
=begin doc
Make sure we have a log directory, and create an empty logfile
@@ -2328,6 +2408,26 @@ sub checkBinariesPresent
}
}
}
elsif (defined( $CONFIG{ 'zpool' } ) )
{
# ZFS-specific binaries.
my @zfs = qw ( zfs );
foreach my $file (@zfs)
{
if ( !defined( which($file) ) )
{
logprint("The following binary is required to run this tool\n");
logprint("\t$file\n");
logprint(
"(This is only required for ZFS volumes, which you've selected)\n"
);
$CONFIG{'FAIL'} = 1;
exit 127;
}
}
}
}
@@ -3126,7 +3226,11 @@ sub createLVMBits
my $disk_cmd =
"lvcreate $CONFIG{'lvm'} ".
($lvm_needs_yes ? '--yes' : '').
" -L $partition->{'size'} -n $disk";
' '.
($CONFIG{ 'lvm_thin' } ?
"-T $CONFIG{'lvm'}/$CONFIG{'lvm_thin'} -V" :
'-L').
" $partition->{'size'} -n $disk";
#
# Create the volume
@@ -3163,6 +3267,112 @@ sub createLVMBits
=begin doc
This function is responsible for creating two new ZFS volumes within
a given ZFS pool.
=end doc
=cut
sub createZFSBits
{
#
# Check whether the ZFS volume exists already, and if so abort
# unless '--force' is specified.
#
foreach my $partition (@PARTITIONS)
{
my $disk = $CONFIG{ 'hostname' } . '-' . $partition->{ 'name' };
my $zfs_disk = "/dev/$CONFIG{'zpool'}/$disk";
my $zfs_vol = "$CONFIG{'zpool'}/$disk";
if ( -e $zfs_disk )
{
# Delete if forcing
if ( $CONFIG{ 'force' } )
{
unless ( xenRunning($CONFIG{ 'hostname' }, \%CONFIG)) {
logprint(
"Removing $zfs_disk - since we're forcing the install\n");
runCommand("zfs destroy $zfs_vol", \%CONFIG);
runCommand("sync", \%CONFIG);
logprint(
"Sleeping a few seconds to avoid ZFS race conditions...\n");
sleep(3);
} else {
fail("ERROR: Xen guest $CONFIG{'hostname'} appears to be running.\nAborting.\n");
}
}
else
{
logprint("The ZFS volume already exists. Aborting.\n");
logprint("Specify '--force' to delete and recreate\n");
$CONFIG{'FAIL'} = 2;
exit 127;
}
}
}
foreach my $partition (@PARTITIONS)
{
my $disk = $CONFIG{ 'hostname' } . '-' . $partition->{ 'name' };
my $zfs_disk = "/dev/$CONFIG{'zpool'}/$disk";
my $zfs_vol = "$CONFIG{'zpool'}/$disk";
#
# Save the image path to the partitions array
#
$partition->{ 'imagetype' } = 'phy:';
$partition->{ 'image' } = $zfs_disk;
#
# The commands to create the volume.
#
my $disk_cmd =
"zfs create ".
($CONFIG{'image'} eq 'sparse' ? '-s' : '').
" -V $partition->{'size'} $zfs_vol";
#
# Create the volume
#
runCommand($disk_cmd, \%CONFIG);
sleep(2);
#
# Make sure that worked.
#
if ( !-e "$zfs_disk" )
{
logprint(
"The ZFS volume creation failed to create $zfs_disk.\n"
);
logprint("aborting\n");
$CONFIG{'FAIL'} = 1;
exit 127;
}
#
# Finally create the filesystem / swap
#
if ( $partition->{ 'type' } eq 'swap' )
{
createSwap($zfs_disk);
}
else
{
createFilesystem( $zfs_disk, $partition->{ 'type' } );
}
}
}
=begin doc
This function is responsible for creating two new logical volumes within
@@ -3422,6 +3632,10 @@ sub mountImage
{
$mount_cmd = "mount $mount_type $image $mountpoint";
}
elsif ( $CONFIG{ 'zpool' } )
{
$mount_cmd = "mount $mount_type $image $mountpoint";
}
else
{
$mount_cmd = "mount $mount_type -o loop $image $mountpoint";
@@ -4282,12 +4496,15 @@ END
$option = "--evms=$CONFIG{'evms'}"
} elsif ($CONFIG{ 'dir' }) {
$option = "--dir=$CONFIG{'dir'}"
} elsif ($CONFIG{ 'zpool' }) {
$option = "--zpool=$CONFIG{'zpool'}"
}
if ($option) {
runCommand("xen-delete-image $option --hostname=$CONFIG{'hostname'}", \%CONFIG);
} else {
die "Assertion that either --dir, --lvm, or --dir are given".
die "Assertion that either --dir, --lvm, --dir or --zpool are given".
" failed.\nThis is probably a bug, please report it.";
}
}

View File

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

View File

@@ -24,6 +24,7 @@ xen-delete-image - Delete previously created Xen instances.
--dir Specify the output directory where images were previously saved.
--evms Specify the EVMS container to use.
--lvm Specify the LVM volume to use.
--zpool Specify the ZFS pool to use.
Specifying hosts:
--hostname Specify the image name to delete.
@@ -51,6 +52,9 @@ Specify the hostname to delete.
=item B<--lvm>
Specify the LVM volume group where images were previously saved.
=item B<--zpool>
Specify the ZFS pool where images were previously saved.
=item B<--manual>
Read the manual for this script.
@@ -163,7 +167,7 @@ my %CONFIG;
#
# Release number.
#
my $RELEASE = '4.7';
my $RELEASE = '4.8';
#
@@ -204,12 +208,12 @@ checkArguments();
#
if ( ( !$CONFIG{ 'test' } ) && ( $EFFECTIVE_USER_ID != 0 ) )
{
print <<E_O_ROOT;
print <<EOROOT;
This script is not running with root privileges, so the configuration
file(s) beneath /etc/xen will not be removed.
E_O_ROOT
EOROOT
exit 127;
}
@@ -271,6 +275,7 @@ sub parseCommandLineArguments
"dry-run", \$CONFIG{ 'dry-run' },
"lvm=s", \$CONFIG{ 'lvm' },
"evms=s", \$CONFIG{ 'evms' },
"zpool=s", \$CONFIG{ 'zpool' },
"extension:s", \$CONFIG{ 'extension' },
"hostname=s@", \$CONFIG{ 'hostname' },
"test", \$CONFIG{ 'test' },
@@ -309,7 +314,7 @@ sub checkArguments
#
# When testing we only care about loopback images, not disk images.
#
if ( $CONFIG{ 'test' } and ( $CONFIG{ 'lvm' } or $CONFIG{ 'evms' } ))
if ( $CONFIG{ 'test' } and ( $CONFIG{ 'lvm' } or $CONFIG{ 'evms' } or $CONFIG{ 'zpool' } ))
{
print "Error: --test only works with --dir.\n";
exit 1;
@@ -319,7 +324,7 @@ sub checkArguments
# Make sure we got one and only one installation method.
#
my $count = 0;
foreach my $type (qw/dir lvm evms/)
foreach my $type (qw/dir lvm evms zpool/)
{
$count += 1 if defined( $CONFIG{ $type } );
}
@@ -334,6 +339,7 @@ sub checkArguments
print " --dir\n";
print " --evms\n";
print " --lvm\n";
print " --zpool\n";
exit 2;
}
}
@@ -478,6 +484,37 @@ sub deleteXenImage
}
}
}
elsif ( defined( $CONFIG{ 'zpool' } ) )
{
#
# ZFS volumes
#
#
# TODO: Check we're not mounted.
#
if ( -e "/dev/$CONFIG{'zpool'}/$hostname-swap" )
{
if ($CONFIG{ 'dry-run' }) {
print "Would remove ZFS swap volume /dev/$CONFIG{'zpool'}/$hostname-swap\n";
} else {
print "Removing swap volume\n";
runCommand("zfs destroy -R $CONFIG{'zpool'}/$hostname-swap", \%PER_HOST_CONFIG);
}
}
if ( -e "/dev/$CONFIG{'zpool'}/$hostname-disk" )
{
if ($CONFIG{ 'dry-run' }) {
print "Would remove ZFS disk volume /dev/$CONFIG{'zpool'}/$hostname-disk\n";
} else {
print "Removing ZFS disk volume\n";
runCommand("zfs destroy -R $CONFIG{'zpool'}/$hostname-disk", \%PER_HOST_CONFIG);
}
}
}
else
{

View File

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

View File

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

View File

@@ -113,7 +113,7 @@ my %CONFIG;
#
# Release number.
#
my $RELEASE = '4.7';
my $RELEASE = '4.8';
#
@@ -149,13 +149,13 @@ checkArguments();
#
if ( $EFFECTIVE_USER_ID != 0 )
{
print <<E_O_ROOT;
print <<EOROOT;
This script is not running with root privileges.
root privileges are required to successfully mount the disk image(s).
E_O_ROOT
EOROOT
exit;
}

View File

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

View File

@@ -100,7 +100,7 @@ my %CONFIG;
#
# Release number.
#
my $RELEASE = '4.7';
my $RELEASE = '4.8';
@@ -221,7 +221,7 @@ sub checkArguments
if ( !-d $dir )
{
print <<E_OR;
print <<EOR;
We\'re trying to configure an installation of $CONFIG{'dist'} in
$CONFIG{'location'} - but there is no hook directory for us to use.
@@ -231,7 +231,7 @@ sub checkArguments
We\'d expect the hook directory to be : $dir
Aborting.
E_OR
EOR
exit 1;
}

View File

@@ -52,9 +52,9 @@ full text of the license.
# Fallback to Debian or Ubuntu in case we can't find anything
my $fallback = 'Debian';
# Which mirrors to use if everything else fails (httpredir.debian.org
# Which mirrors to use if everything else fails (deb.debian.org
# redirects to a working mirror nearby)
my %fallback_mirror = ( Debian => 'http://httpredir.debian.org/debian/',
my %fallback_mirror = ( Debian => 'http://deb.debian.org/debian/',
Ubuntu => 'http://archive.ubuntu.com/ubuntu/' );
# Which suite to use if everything else fails. For Debian "stable"
@@ -62,7 +62,7 @@ my %fallback_mirror = ( Debian => 'http://httpredir.debian.org/debian/',
# have aliases like stable or testing, so we take the nearest LTS
# release which is 10.04 at the time of writing.
my %fallback_suite = ( Debian => 'stable',
Ubuntu => 'lucid' );
Ubuntu => 'bionic' );
# Where to look for the sources.list to parse
my @sources_list_files = ( '/etc/apt/sources.list',
@@ -79,7 +79,7 @@ use strict;
#
# Release number.
#
my $RELEASE = '4.7';
my $RELEASE = '4.8';
# Init
my $mirror = '';

View File

@@ -113,7 +113,7 @@ my %CONFIG;
#
# Release number.
#
my $RELEASE = '4.7';
my $RELEASE = '4.8';
#
@@ -414,7 +414,7 @@ sub checkArguments
if ( !-d $dir )
{
print <<E_OR;
print <<EOR;
We are trying to configure an installation of $CONFIG{'dist'} in
$CONFIG{'location'} - but there is no hook directory for us to use.
@@ -424,7 +424,7 @@ sub checkArguments
We would expect the hook directory to be $dir.
Aborting.
E_OR
EOR
exit 1;
}

15
debian/NEWS vendored
View File

@@ -1,3 +1,18 @@
xen-tools (4.8-1) unstable; urgency=medium
For security reasons (avoid risk to circumvent ASLR), recent
kernels have disabled the vsyscall mapping. Unfortunately older
distributions don't run and hence can't be bootstrapped without it.
To enable trapping and enabling emulate calls into the fixed
vsyscall address mapping and hence to run and bootstrap older Linux
distributions in a chroot (as xen-tools does), you need to add
"vsyscall=emulate" to the kernel commandline, e.g. by adding it to
GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, then running
"update-grub" afterwards and finally reboot.
-- Axel Beckert <abe@debian.org> Thu, 07 Feb 2019 17:40:03 +0100
xen-tools (4.4~beta1-1) unstable; urgency=low
* Exported environment variables no more contain dashes ("-"). Dashes in

60
debian/changelog vendored
View File

@@ -1,5 +1,40 @@
xen-tools (4.7-2) UNRELEASED; urgency=medium
xen-tools (4.8-1) unstable; urgency=medium
* New upstream release.
[ Marc Bigler ]
+ Add support for ZFS volumes. (GH #50)
[ Yuri Sakhno ]
+ Eliminate progress reporting which is useless in logs. (GH #42)
[ Axel Beckert ]
+ Add preliminary support for future Debian 12 Bookworm release.
+ Add support for Ubuntu releases from 17.10 Artful to 19.04 Disco.
- Create hooks/artful with new 40-setup-networking-deb-netplan by
Arno Bakker and Peter. (Fixes xen-tools/xen-tools#51)
- Rename hooks/karmic/80-install-kernel to
hooks/common/80-install-kernel-ubu and add according symlinks.
+ Change all occurrences of httpredir.debian.org to deb.debian.org
except those for the debian-archive. The latter now point to
archive.debian.org directly.
+ Set Ubuntu fallback suite to the latest LTS, i.e. 18.04 Bionic.
+ Drop pygrub path detection from xm.tmpl, Xen prefers a path-less
bootloader='pygrub'.
+ Many improvements for the release-testing script.
+ Only run xen-toolstack helper script if both, xm and xl are
present. Avoids warning about deprecated helper script.
+ distributions.conf now supports arbitrary keyring files in
/usr/share/keyrings/. (Needed for some EoL Ubuntu releases.)
[ Nico Boehr ]
+ Add support for LVM thin provisioning.
[ Pietro Stäheli ]
+ Add support for option --randommac for really random MAC addresses
upon every xen-create-image invocation. (Closes: #855703)
[ Axel Beckert ]
* Fix wrong bug number for #849867 in previous changelog entry.
* Declare compliance with Debian Policy 4.1.3.
+ Change Priority from extra to optional.
@@ -9,8 +44,28 @@ xen-tools (4.7-2) UNRELEASED; urgency=medium
* Recommend e2fsprogs. (Closes: #887236)
* Prefer btrfs-progs over now transitional package btrfs-tools. (Closes:
#878910)
* Bump debhelper compatibility level to 10.
+ Update versioned debhelper build-dependency accordingly.
+ Only using dh compat level 10 allows one to still build the package
on Debian 9 Stretch without backports, on Ubuntu 18.04 LTS and on
Ubuntu 16.04 LTS with backports.
* Declare compliance with Debian Policy 4.3.0. (No changes needed.)
* Set "Rules-Requires-Root: no".
* Check $DEB_BUILD_OPTIONS and $DEB_BUILD_PROFILES in
override_dh_auto_test. Fixes according lintian warning.
* Use ubuntu-keyring instead of now transitional ubuntu-archive-keyring,
but keep the latter as alternative to allow one to install the
xen-tools package also on older Debian or Ubuntu releases.
* Suggest grub-xen-host despite the proper support for it is not
finished.
* Add a note about "vsyscall=emulate" and older Linux distributions to
debian/NEWS. Thanks to James Clarke and Jason Crain for the hint!
* Add a DEP-12 debian/upstream/metadata file.
-- Axel Beckert <abe@debian.org> Mon, 23 Jan 2017 01:36:27 +0100
[ Jelmer Vernooij ]
* Trim trailing whitespace from debian/changelog. (GH #54)
-- Axel Beckert <abe@debian.org> Sat, 09 Feb 2019 01:56:51 +0100
xen-tools (4.7-1) unstable; urgency=medium
@@ -1079,4 +1134,3 @@ xen-tools (0.4-1) unstable; urgency=low
* Initial release (Closes: #344081)
-- Radu Spineanu <radu@debian.org> Tue, 20 Dec 2005 02:21:05 +0200

2
debian/compat vendored
View File

@@ -1 +1 @@
9
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 (>= 9~),
Build-Depends: debhelper (>= 10~),
devscripts,
git,
libdata-validate-domain-perl,
@@ -17,10 +17,11 @@ Build-Depends: debhelper (>= 9~),
libtest-pod-coverage-perl,
libtest-pod-perl,
libtext-template-perl
Standards-Version: 4.1.3
Standards-Version: 4.3.0
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
Rules-Requires-Root: no
Package: xen-tools
Architecture: all
@@ -43,11 +44,12 @@ Recommends: debian-archive-keyring,
libexpect-perl,
lvm2,
rinse (>= 1.9.1-1),
ubuntu-archive-keyring,
ubuntu-keyring | ubuntu-archive-keyring,
xen-hypervisor,
xen-utils
Suggests: btrfs-progs | btrfs-tools,
cfengine2,
grub-xen-host,
reiserfsprogs,
xfsprogs
Description: Tools to manage Xen virtual servers
@@ -64,9 +66,10 @@ Description: Tools to manage Xen virtual servers
* Debian 6.0 Squeeze
* Debian 7 Wheezy
* Debian 8 Jessie
* Debian 9 Stretch (under development)
* Debian 10 Buster (future release name)
* Debian 9 Stretch
* Debian 10 Buster (under development)
* Debian 11 Bullseye (future release name)
* Debian 12 Bookworm (future release name)
* Debian Sid (Unstable)
* Ubuntu 6.06 Dapper Drake (LTS)
* Ubuntu 6.10 Edgy Eft
@@ -90,6 +93,10 @@ Description: Tools to manage Xen virtual servers
* Ubuntu 15.10 Wily Werewolf
* Ubuntu 16.04 Xenial Xerus (LTS)
* Ubuntu 16.10 Yakkety Yak
* Ubuntu 17.04 Zesty Zapus (preliminary support, under development)
* Ubuntu 17.04 Zesty Zapus
* 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)
* CentOS 5
* CentOS 6

2
debian/rules vendored
View File

@@ -6,7 +6,9 @@
dh $@
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
$(MAKE) non-author-test
endif
override_dh_installchangelogs:
dh_installchangelogs NEWS.markdown

12
debian/upstream/metadata vendored Normal file
View File

@@ -0,0 +1,12 @@
%YAML 1.1
---
# https://wiki.debian.org/UpstreamMetadata
Bug-Database: https://github.com/xen-tools/xen-tools/issues
Bug-Submit: https://github.com/xen-tools/xen-tools/issues/new
Changelog: https://github.com/xen-tools/xen-tools/blob/master/NEWS.markdown
Contact: mailto:xen-tools-discuss@xen-tools.org
Security-Contact: mailto:abe@debian.org
Name: Xen-Tools
Homepage: https://xen-tools.org/
Repository: https://github.com/xen-tools/xen-tools.git
Repository-Browse: https://github.com/xen-tools/xen-tools

View File

@@ -6,6 +6,7 @@
#
# Known distributions: debian, ubuntu
# Known keywords: eol, pygrub, default-keyring, dont-test
# Known generic keywords: *.gpg (uses the according /usr/share/keyrings/….gpg file)
#
sarge = debian eol
etch = debian eol
@@ -14,8 +15,9 @@ squeeze = debian eol default-keyring
wheezy = debian
jessie = debian
stretch = debian
buster = debian dont-test
buster = debian
bullseye = debian dont-test
bookwork = debian dont-test
sid = debian
testing = debian
@@ -24,10 +26,11 @@ oldstable = debian
stable = debian
unstable = debian
# dapper and edgy currently need manual adjustments in debootstrap's
# configuration, see #659360
dapper = ubuntu eol dont-test
edgy = ubuntu eol dont-test
# Between at least debootstrap 1.0.37 and 1.0.93 (including), dapper
# and edgy may need manual adjustments in debootstrap's configuration,
# see https://bugs.debian.org/659360
dapper = ubuntu eol
edgy = ubuntu eol
feisty = ubuntu eol
gutsy = ubuntu eol
hardy = ubuntu eol
@@ -38,7 +41,7 @@ lucid = ubuntu eol pygrub
maverick = ubuntu eol pygrub
natty = ubuntu eol pygrub
oneiric = ubuntu eol pygrub
precise = ubuntu pygrub
precise = ubuntu pygrub ubuntu-archive-removed-keys.gpg
quantal = ubuntu eol pygrub
raring = ubuntu eol pygrub
saucy = ubuntu eol pygrub
@@ -47,7 +50,11 @@ utopic = ubuntu eol pygrub
vivid = ubuntu eol pygrub
wily = ubuntu eol pygrub
xenial = ubuntu pygrub
yakkety = ubuntu pygrub
zesty = ubuntu pygrub
yakkety = ubuntu eol pygrub
zesty = ubuntu eol pygrub ubuntu-keyring-2012-archive.gpg
artful = ubuntu pygrub
bionic = ubuntu pygrub
cosmic = ubuntu pygrub
disco = ubuntu pygrub
devel = ubuntu pygrub
devel = ubuntu pygrub dont-test

View File

@@ -1,7 +1,7 @@
# xen-tools default mirror configuration file
debian = http://httpredir.debian.org/debian
debian_archive = http://httpredir.debian.org/debian-archive/debian
debian = http://deb.debian.org/debian
debian_archive = http://archive.debian.org/debian
ubuntu = http://archive.ubuntu.com/ubuntu
ubuntu_archive = http://old-releases.ubuntu.com/ubuntu

View File

@@ -54,6 +54,14 @@
##
# lvm = vg0
#
##
#
# If you have ZFS available and wish to use it then you may specify a
# ZFS pool name here instead
#
##
# zpool = xenpool0
#
##

View File

@@ -20,20 +20,7 @@
{
if ( $pygrub )
{
my $pygrub_bin = '';
foreach my $pygrub_path (reverse glob('/usr/lib/xen-default/bin/pygrub
/usr/lib/xen-*/bin/pygrub
/usr/*bin/pygrub
/usr/local/bin/pygrub')) {
if (-x $pygrub_path) {
$pygrub_bin = $pygrub_path;
last;
}
}
die "pygrub not found" unless $pygrub_bin;
$OUT .= "bootloader = '$pygrub_bin'\n";
$OUT .= "bootloader = 'pygrub'\n";
}
}
vcpus = '{$vcpus}'

View File

@@ -1,10 +1,13 @@
#!/bin/sh
#!/bin/bash
set -e
exec 2>&1 | tee xen-tools-release-testing.log
exec 2>&1
exec > >( tee xen-tools-release-testing-$(date -Iseconds).log )
DISTRIBUTIONS=$(awk '!/^#|^$|dont-test/ {print $1}' /etc/xen-tools/distributions.conf)
if [ -z "$DISTRIBUTIONS" ]; then
DISTRIBUTIONS=$(awk '!/^#|^$|dont-test/ {print $1}' /etc/xen-tools/distributions.conf)
fi
echo Deleting old release-testing artefacts
for dist in $DISTRIBUTIONS; do
@@ -18,7 +21,30 @@ seconds=10
printf "Sleeping for %i seconds to avoid LVM race conditions: " $seconds
for i in $(seq 1 $seconds); do sleep 1; printf "%i " $i; done; printf '\n';
SUCCEEDED=''
FAILED=''
# From now on we just want to log failures, not abort.
set +e
for dist in $DISTRIBUTIONS; do
echo "*** Creating xen-tools-release-testing-$dist..."
xen-create-image --verbose --hostname "xen-tools-release-testing-$dist" --dist $dist --force "$@"
if [ "$?" -eq '0' ]; then
SUCCEEDED="$dist $SUCCEEDED"
else
FAILED="$dist $FAILED"
fi
done
echo ''
echo '======================================================================'
if [ -z "$FAILED" ]; then
echo '*** All tests succeeded! ***'
elif [ -z "$SUCCEEDED" ]; then
echo '*** All tests failed! ***'
else
echo "*** These distributions succeeded: $SUCCEEDED ***"
echo "*** These distributions failed: $FAILED ***"
fi

View File

@@ -0,0 +1 @@
../common/01-disable-daemons

View File

@@ -0,0 +1 @@
../common/05-shadowconfig-on

View File

@@ -0,0 +1 @@
../common/15-disable-hwclock

1
hooks/artful/20-setup-apt Symbolic link
View File

@@ -0,0 +1 @@
../common/20-setup-apt

View File

@@ -0,0 +1 @@
../common/25-generate-locale

View File

@@ -0,0 +1 @@
../common/30-disable-gettys

1
hooks/artful/35-setup-users Symbolic link
View File

@@ -0,0 +1 @@
../common/35-setup-users

View File

@@ -0,0 +1,128 @@
#!/bin/sh
#
# This script sets up the /etc/netplan/interface file for the new
# image.
#
# Steve
# --
# https://steve.fi/
prefix=$1
#
# Source our common functions
#
if [ -e /usr/share/xen-tools/common.sh ]; then
. /usr/share/xen-tools/common.sh
else
. ./hooks/common.sh
fi
# From: https://serverfault.com/questions/54981/linux-command-line-tool-to-work-with-netmasks-cidr-notation
mask2cdr ()
{
# Assumes there's no "255." after a non-255 byte in the mask
local x=${1##*255.}
set -- 0^^^128^192^224^240^248^252^254^ $(( (${#1} - ${#x})*2 )) ${x%%.*}
x=${1%%$3*}
echo $(( $2 + (${#x}/4) ))
}
#
# Log our start
#
logMessage Script $0 starting
#
# Make sure we have an /etc/netplan directory.
#
mkdir -p ${prefix}/etc/netplan
#
# A function to setup DHCP for our new image.
#
setupDynamicNetworking ()
{
#
# The host is using DHCP.
#
cat <<E_O_DHCP > ${prefix}/etc/netplan/01-netcfg.yaml
# Arno: Configure VM interface eth0 via DHCP
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: true
E_O_DHCP
}
#
# A function to setup static IP addresses for our new image.
#
setupStaticNetworking ()
{
# Arno
cidr='24';
if [ -n "${netmask}" ]; then
cidr="$(mask2cdr ${netmask})"
fi
#
# We have a static IP address
#
cat <<E_O_STATIC >${prefix}/etc/netplan/01-netcfg.yaml
# Arno: Set static IP for VM interface eth0
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses: [${ip1}/${cidr}]
gateway4: ${gateway}
nameservers:
addresses: [${nameserver}]
E_O_STATIC
# Arno: no support for multiple interfaces
#
# Hooks are run chrooted, hence the resolv.conf is moved
# temporarily to /etc/resolv.conf.old. Use that file, it
# will be restored after hooks are run.
#
if [ '' != "$nameserver" ]; then
rm -f ${prefix}/etc/resolv.conf.old
for ns in $nameserver; do
echo "nameserver $ns" >>${prefix}/etc/resolv.conf.old
done
else
cp /etc/resolv.conf ${prefix}/etc/resolv.conf.old
fi
}
#
# Call the relevant function
#
if [ -z "${dhcp}" ]; then
logMessage "Setting up static networking"
setupStaticNetworking
else
logMessage "Setting up DHCP networking"
setupDynamicNetworking
fi
#
# Log our finish
#
logMessage Script $0 finished

View File

@@ -0,0 +1 @@
../common/50-setup-hostname-deb

View File

@@ -0,0 +1 @@
../common/60-copy-host-files

View File

@@ -0,0 +1 @@
../common/65-copy-user-files

1
hooks/artful/70-install-ssh Symbolic link
View File

@@ -0,0 +1 @@
../common/70-install-ssh-deb

View File

@@ -0,0 +1 @@
../common/75-fixup-securetty

View File

@@ -0,0 +1 @@
../common/80-install-kernel-ubuntu

View File

@@ -0,0 +1 @@
../common/80-install-modules-deb

View File

@@ -0,0 +1 @@
../common/81-install-modules-init-tools

View File

@@ -0,0 +1 @@
../common/82-install-grub-legacy

1
hooks/artful/90-make-fstab Symbolic link
View File

@@ -0,0 +1 @@
../common/90-make-fstab

1
hooks/artful/99-clean-image Symbolic link
View File

@@ -0,0 +1 @@
../common/99-clean-image-deb

View File

@@ -0,0 +1 @@
../common/99-enable-daemons

View File

@@ -96,7 +96,7 @@ installDebianPackageAndRecommends ()
#
# Install the packages
#
DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes install "$@"
DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes install "$@" 2>&1 | sed --expression="s/\rExtracting templates from packages: [0-9]\+%//g;s/(Reading database ... \([0-9]\+%\)\?\r//g"
#
# Remove the policy-rc.d script.

View File

@@ -1,7 +1,6 @@
#!/bin/sh
#
# Copy files from a 'skel' directory, if present, into the
# new images
# Copy some specific files from host nachine into the new images
#

View File

@@ -38,7 +38,7 @@ if [ -d /etc/xen-tools/skel ]; then
else
logMessage skel directory, /etc/xen-tools/skell, not present ignoring.
logMessage skel directory, /etc/xen-tools/skel, not present ignoring.
fi

View File

@@ -0,0 +1 @@
../common/80-install-kernel-ubuntu

View File

@@ -129,7 +129,7 @@ sub xenRunning ($$)
my $running = 0;
unless ($CONFIG->{'xm'}) {
warn "Couldn't determine Xen toolstack, skipping check for running DomUs."
warn "Couldn't determine Xen toolstack, skipping check for running DomUs.\n"
unless $ENV{AS_INSTALLED_TESTING};
return 0;
}
@@ -161,18 +161,19 @@ sub findXenToolstack
{
my $helper = '/usr/lib/xen-common/bin/xen-toolstack';
if (-x $helper) {
my $xm = which('xm');
my $xl = which('xl');
if ($xm and $xl and -x $helper) {
my $toolstack = `$helper`;
chomp($toolstack);
return $toolstack if $toolstack;
}
my $xm = which('xm');
if ($xm and system("$xm list >/dev/null 2>/dev/null") == 0) {
return $xm;
}
my $xl = which('xl');
if ($xl and system("$xl list >/dev/null 2>/dev/null") == 0) {
return $xl;
}