Compare commits
127 Commits
debian-4.7
...
debian-4.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a39f24e754 | ||
|
|
8a623b30ba | ||
|
|
5730250725 | ||
|
|
ac04bed0f2 | ||
|
|
cf693d9e64 | ||
|
|
fc7c09596a | ||
|
|
7ebb0f41a4 | ||
|
|
00527f64b2 | ||
|
|
83c37b476a | ||
|
|
af6ceacc4c | ||
|
|
6cdd1eb63f | ||
|
|
97dd8fafc8 | ||
|
|
58899daffe | ||
|
|
239f1e4c88 | ||
|
|
1a27e59df7 | ||
|
|
b7486d427c | ||
|
|
6aeb8d9d11 | ||
|
|
f5dc8cbf37 | ||
|
|
4aa9428e3b | ||
|
|
a58cc83c80 | ||
|
|
965839812c | ||
|
|
a9593dabf0 | ||
|
|
ea95b1ef03 | ||
|
|
68c20b4e4e | ||
|
|
06b3faa1bf | ||
|
|
0da2ed1365 | ||
|
|
285d2c80b9 | ||
|
|
ed497ab39c | ||
|
|
85c0583819 | ||
|
|
c0cb19eefc | ||
|
|
67603c2d74 | ||
|
|
a816cc81ae | ||
|
|
01d7628770 | ||
|
|
1150835a89 | ||
|
|
17025182eb | ||
|
|
e7b2f1a3e7 | ||
|
|
fe4a18edef | ||
|
|
eab2940bf6 | ||
|
|
e8897649b7 | ||
|
|
2fba5cb90e | ||
|
|
19399ecc70 | ||
|
|
6f291cebe7 | ||
|
|
54d93cf3ed | ||
|
|
b40759e8d8 | ||
|
|
f5e7a2d441 | ||
|
|
79650b9d70 | ||
|
|
8c7d398001 | ||
|
|
f6c6c35b40 | ||
|
|
d7b794bc2c | ||
|
|
d278bdc89e | ||
|
|
284657f8bc | ||
|
|
4ac4ae5987 | ||
|
|
61ac300e43 | ||
|
|
967bdcfaa9 | ||
|
|
7fbad420c9 | ||
|
|
94514a3604 | ||
|
|
7c8d466a53 | ||
|
|
7dbb76941d | ||
|
|
a11c9bf126 | ||
|
|
2a9fdc71e7 | ||
|
|
89795d71dc | ||
|
|
2a3c3cebfb | ||
|
|
2275c8f293 | ||
|
|
449cc9a0bf | ||
|
|
baee245fbd | ||
|
|
ac55fba904 | ||
|
|
2a476d1037 | ||
|
|
19f30610a5 | ||
|
|
a8df6e002f | ||
|
|
0d9a7cb12e | ||
|
|
b05087b1cb | ||
|
|
58af2790a1 | ||
|
|
1cda58c756 | ||
|
|
c66e5427ed | ||
|
|
ad013d7b86 | ||
|
|
a6389c48df | ||
|
|
8d07785c3b | ||
|
|
ead18c819a | ||
|
|
e3ab23b55d | ||
|
|
82ecd4c6d2 | ||
|
|
f50d1e37a2 | ||
|
|
c774f81e80 | ||
|
|
c8316b0076 | ||
|
|
d5c4589519 | ||
|
|
17d868d38d | ||
|
|
42e7dca4bf | ||
|
|
4872d18989 | ||
|
|
1a5fd541cd | ||
|
|
9817ff95c3 | ||
|
|
26427c9dc8 | ||
|
|
5c76eb1a7d | ||
|
|
8723db0880 | ||
|
|
76221f5999 | ||
|
|
58306b9281 | ||
|
|
7ce42e9781 | ||
|
|
3daa69256b | ||
|
|
5587dc796a | ||
|
|
9ee1f63705 | ||
|
|
cfd4406a93 | ||
|
|
647efb0e12 | ||
|
|
0a351b4dfb | ||
|
|
dccf78c65e | ||
|
|
3a15c11a7e | ||
|
|
19e117b9f3 | ||
|
|
f1052fcdaa | ||
|
|
b9e0284a43 | ||
|
|
26a698bbd6 | ||
|
|
1ad05c0d66 | ||
|
|
8f527122c5 | ||
|
|
c3b8d7fda5 | ||
|
|
53800af963 | ||
|
|
a78388dd1e | ||
|
|
07e56db75c | ||
|
|
1634fe5e80 | ||
|
|
f1083cfa55 | ||
|
|
6485f686b7 | ||
|
|
207c73c7bb | ||
|
|
fff2eccbe3 | ||
|
|
e6ffe50bb6 | ||
|
|
76a35e28d1 | ||
|
|
de1eea7fa2 | ||
|
|
422f682b37 | ||
|
|
326bd72ebb | ||
|
|
52c39a7c09 | ||
|
|
230167d84a | ||
|
|
87dd127cf8 | ||
|
|
f065541445 |
17
.travis.yml
17
.travis.yml
@@ -1,5 +1,9 @@
|
||||
language: perl
|
||||
perl:
|
||||
- "5.32"
|
||||
- "5.30"
|
||||
- "5.28"
|
||||
- "5.26"
|
||||
- "5.24"
|
||||
- "5.22"
|
||||
- "5.20"
|
||||
@@ -8,17 +12,26 @@ perl:
|
||||
- "5.14"
|
||||
- "5.12"
|
||||
- "5.10"
|
||||
- "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
|
||||
|
||||
23
Makefile
23
Makefile
@@ -14,7 +14,7 @@
|
||||
#
|
||||
TMPDIR ?= /tmp
|
||||
DIST_PREFIX = ${TMPDIR}
|
||||
VERSION = 4.7
|
||||
VERSION = 4.9.1
|
||||
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
|
||||
@@ -183,6 +184,8 @@ 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 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
|
||||
@@ -218,7 +221,16 @@ 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 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
|
||||
|
||||
@@ -258,6 +270,7 @@ manpages:
|
||||
#
|
||||
release: orig-tar-gz
|
||||
gpg --armour --detach-sign ../$(BASE)-$(VERSION).tar.gz
|
||||
cp -p ../$(BASE)-$(VERSION).tar.gz.asc ../$(BASE)_$(DEBVERSION).orig.tar.gz.asc
|
||||
git tag -s -m "Release as $(VERSION)" "release-$(VERSION)"
|
||||
|
||||
tarball: test tidy fixup-perms update-version update-modules clean changelog
|
||||
@@ -282,13 +295,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/
|
||||
|
||||
|
||||
#
|
||||
|
||||
108
NEWS.markdown
108
NEWS.markdown
@@ -1,3 +1,109 @@
|
||||
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)
|
||||
===================================
|
||||
|
||||
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 +149,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
|
||||
|
||||
@@ -4,6 +4,7 @@ xen-tools
|
||||
[](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,36 @@ 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)
|
||||
* Bullseye 11 (knows about this future release name)
|
||||
* Stretch 9
|
||||
* 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
|
||||
|
||||
(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 +71,33 @@ 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
|
||||
* Eoan Ermine 19.10
|
||||
* Focal Fossa 20.04 (LTS)
|
||||
* Groovy Gorilla 20.10
|
||||
* Hirsute Hippo 21.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 +142,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 +154,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 +287,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
|
||||
|
||||
@@ -55,6 +55,16 @@ 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.
|
||||
|
||||
* 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
|
||||
--------------------------------------------
|
||||
|
||||
|
||||
@@ -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.9.1';
|
||||
|
||||
|
||||
#
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3124,9 +3224,12 @@ sub createLVMBits
|
||||
# The commands to create the volume.
|
||||
#
|
||||
my $disk_cmd =
|
||||
"lvcreate $CONFIG{'lvm'} ".
|
||||
($lvm_needs_yes ? '--yes' : '').
|
||||
" -L $partition->{'size'} -n $disk";
|
||||
"lvcreate ".
|
||||
($lvm_needs_yes ? '--yes ' : '').
|
||||
($CONFIG{ 'lvm_thin' } ?
|
||||
"-T $CONFIG{'lvm'}/$CONFIG{'lvm_thin'} -V" :
|
||||
"$CONFIG{'lvm'} -L").
|
||||
" $partition->{'size'} -n $disk";
|
||||
|
||||
#
|
||||
# Create the volume
|
||||
@@ -3163,6 +3266,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 +3631,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 +4495,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.";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ $CONFIG{ 'template' } = '/etc/xen-tools/xm-nfs.tmpl';
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.7';
|
||||
my $RELEASE = '4.9.1';
|
||||
|
||||
|
||||
# store version number away.
|
||||
|
||||
@@ -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.9.1';
|
||||
|
||||
|
||||
#
|
||||
@@ -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;
|
||||
}
|
||||
@@ -265,12 +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' },
|
||||
"lvm=s", \$install{ 'lvm' },
|
||||
"evms=s", \$install{ 'evms' },
|
||||
"zpool=s", \$install{ 'zpool' },
|
||||
"extension:s", \$CONFIG{ 'extension' },
|
||||
"hostname=s@", \$CONFIG{ 'hostname' },
|
||||
"test", \$CONFIG{ 'test' },
|
||||
@@ -281,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;
|
||||
|
||||
@@ -309,7 +359,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 +369,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 +384,7 @@ sub checkArguments
|
||||
print " --dir\n";
|
||||
print " --evms\n";
|
||||
print " --lvm\n";
|
||||
print " --zpool\n";
|
||||
exit 2;
|
||||
}
|
||||
}
|
||||
@@ -478,6 +529,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
|
||||
{
|
||||
|
||||
@@ -106,7 +106,7 @@ $CONFIG{ 'extension' } = '.cfg';
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.7';
|
||||
my $RELEASE = '4.9.1';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ my %CONFIG;
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.7';
|
||||
my $RELEASE = '4.9.1';
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -113,7 +113,7 @@ my %CONFIG;
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.7';
|
||||
my $RELEASE = '4.9.1';
|
||||
|
||||
|
||||
#
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ $CONFIG{ 'extension' } = '.cfg';
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.7';
|
||||
my $RELEASE = '4.9.1';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ my %CONFIG;
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.7';
|
||||
my $RELEASE = '4.9.1';
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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.9.1';
|
||||
|
||||
# Init
|
||||
my $mirror = '';
|
||||
|
||||
@@ -113,7 +113,7 @@ my %CONFIG;
|
||||
#
|
||||
# Release number.
|
||||
#
|
||||
my $RELEASE = '4.7';
|
||||
my $RELEASE = '4.9.1';
|
||||
|
||||
|
||||
#
|
||||
@@ -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
15
debian/NEWS
vendored
@@ -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
|
||||
|
||||
128
debian/changelog
vendored
128
debian/changelog
vendored
@@ -1,3 +1,124 @@
|
||||
xen-tools (4.9.1-1) unstable; urgency=medium
|
||||
|
||||
* New upstream bugfix release.
|
||||
+ Fix missing "|" in regex in Debian's 20-setup-apt. (Closes: #997668)
|
||||
+ Make test xt/gitignore.t work with git releases ≥ 2.32.0.
|
||||
+ Travis CI: stop testing again Perl "dev". It no more seems to exist.
|
||||
+ Also create an .orig.tar.xz signature upon "make release".
|
||||
* Declare compliance with Debian Policy 4.6.0. (No changes needed.)
|
||||
|
||||
-- Axel Beckert <abe@debian.org> Sun, 24 Oct 2021 05:38:40 +0200
|
||||
|
||||
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.
|
||||
|
||||
[ 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.
|
||||
* Use "$(MAKE)" instead of "make" in debian/rules.
|
||||
* debian/control: Drop "Testsuite: autopkgtest" header, no more needed.
|
||||
* Switch "activate" trigger to "activate-noawait".
|
||||
* 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.
|
||||
|
||||
[ 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
|
||||
|
||||
* New upstream release
|
||||
@@ -11,7 +132,7 @@ xen-tools (4.7-1) unstable; urgency=medium
|
||||
+ Knows about Ubuntu's "devel" alias.
|
||||
+ Risen default values for RAM sizes in /etc/xen-tools/xen-tools.cfg
|
||||
to cope with risen resource consumption and availability.
|
||||
(Closes: #776487)
|
||||
(Closes: #849867)
|
||||
+ Default file system is now ext4 (instead of ext3).
|
||||
+ Fixes inconsistent/non-functional handling of --nopygrub
|
||||
parameter. Thanks Daniel Reichelt for the bug report and patch!
|
||||
@@ -920,7 +1041,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
|
||||
|
||||
@@ -934,7 +1055,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
|
||||
|
||||
@@ -1065,4 +1186,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
|
||||
|
||||
|
||||
1
debian/compat
vendored
1
debian/compat
vendored
@@ -1 +0,0 @@
|
||||
9
|
||||
34
debian/control
vendored
34
debian/control
vendored
@@ -1,8 +1,8 @@
|
||||
Source: xen-tools
|
||||
Section: utils
|
||||
Priority: extra
|
||||
Priority: optional
|
||||
Maintainer: Axel Beckert <abe@debian.org>
|
||||
Build-Depends: debhelper (>= 9~),
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
devscripts,
|
||||
git,
|
||||
libdata-validate-domain-perl,
|
||||
@@ -13,15 +13,16 @@ Build-Depends: debhelper (>= 9~),
|
||||
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: 3.9.8
|
||||
Standards-Version: 4.6.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
|
||||
Testsuite: autopkgtest
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: xen-tools
|
||||
Architecture: all
|
||||
@@ -40,14 +41,17 @@ Depends: debootstrap | cdebootstrap,
|
||||
${misc:Depends},
|
||||
${perl:Depends}
|
||||
Recommends: debian-archive-keyring,
|
||||
debootstrap (>= 1.0.117~),
|
||||
e2fsprogs,
|
||||
libexpect-perl,
|
||||
lvm2,
|
||||
rinse (>= 1.9.1-1),
|
||||
ubuntu-archive-keyring,
|
||||
ubuntu-keyring | ubuntu-archive-keyring,
|
||||
xen-hypervisor,
|
||||
xen-utils
|
||||
Suggests: btrfs-tools,
|
||||
Suggests: btrfs-progs | btrfs-tools,
|
||||
cfengine2,
|
||||
grub-xen-host,
|
||||
reiserfsprogs,
|
||||
xfsprogs
|
||||
Description: Tools to manage Xen virtual servers
|
||||
@@ -64,9 +68,11 @@ 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 11 Bullseye (future release name)
|
||||
* Debian 9 Stretch
|
||||
* 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
|
||||
@@ -90,6 +96,14 @@ 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
|
||||
* 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
|
||||
|
||||
4
debian/rules
vendored
4
debian/rules
vendored
@@ -6,7 +6,9 @@
|
||||
dh $@
|
||||
|
||||
override_dh_auto_test:
|
||||
make non-author-test
|
||||
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
|
||||
$(MAKE) non-author-test
|
||||
endif
|
||||
|
||||
override_dh_installchangelogs:
|
||||
dh_installchangelogs NEWS.markdown
|
||||
|
||||
2
debian/triggers
vendored
2
debian/triggers
vendored
@@ -1 +1 @@
|
||||
activate update-initramfs
|
||||
activate-noawait update-initramfs
|
||||
|
||||
12
debian/upstream/metadata
vendored
Normal file
12
debian/upstream/metadata
vendored
Normal 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
|
||||
2
debian/watch
vendored
2
debian/watch
vendored
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# uscan version number - not the version of the software.
|
||||
#
|
||||
version=3
|
||||
version=4
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -6,28 +6,32 @@
|
||||
#
|
||||
# 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
|
||||
lenny = debian eol
|
||||
squeeze = debian eol default-keyring
|
||||
wheezy = debian
|
||||
jessie = debian
|
||||
stretch = debian
|
||||
buster = debian dont-test
|
||||
bullseye = 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
|
||||
|
||||
# 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 +42,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 +51,15 @@ 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 eol pygrub ubuntu-archive-keyring.gpg
|
||||
bionic = 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
|
||||
devel = ubuntu pygrub dont-test
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
#
|
||||
##
|
||||
|
||||
15
etc/xm.tmpl
15
etc/xm.tmpl
@@ -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}'
|
||||
|
||||
@@ -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
|
||||
|
||||
1
hooks/artful/01-disable-daemons
Symbolic link
1
hooks/artful/01-disable-daemons
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/01-disable-daemons
|
||||
1
hooks/artful/05-shadowconfig-on
Symbolic link
1
hooks/artful/05-shadowconfig-on
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/05-shadowconfig-on
|
||||
1
hooks/artful/15-disable-hwclock
Symbolic link
1
hooks/artful/15-disable-hwclock
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/15-disable-hwclock
|
||||
1
hooks/artful/20-setup-apt
Symbolic link
1
hooks/artful/20-setup-apt
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/20-setup-apt
|
||||
1
hooks/artful/25-generate-locale
Symbolic link
1
hooks/artful/25-generate-locale
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/25-generate-locale
|
||||
1
hooks/artful/30-disable-gettys
Symbolic link
1
hooks/artful/30-disable-gettys
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/30-disable-gettys
|
||||
1
hooks/artful/35-setup-users
Symbolic link
1
hooks/artful/35-setup-users
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/35-setup-users
|
||||
147
hooks/artful/40-setup-networking-deb-netplan
Executable file
147
hooks/artful/40-setup-networking-deb-netplan
Executable file
@@ -0,0 +1,147 @@
|
||||
#!/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
|
||||
# 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
|
||||
#
|
||||
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}]
|
||||
${gate}
|
||||
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
|
||||
1
hooks/artful/50-setup-hostname
Symbolic link
1
hooks/artful/50-setup-hostname
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/50-setup-hostname-deb
|
||||
1
hooks/artful/60-copy-host-files
Symbolic link
1
hooks/artful/60-copy-host-files
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/60-copy-host-files
|
||||
1
hooks/artful/65-copy-user-files
Symbolic link
1
hooks/artful/65-copy-user-files
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/65-copy-user-files
|
||||
1
hooks/artful/70-install-ssh
Symbolic link
1
hooks/artful/70-install-ssh
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/70-install-ssh-deb
|
||||
1
hooks/artful/75-fixup-securetty
Symbolic link
1
hooks/artful/75-fixup-securetty
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/75-fixup-securetty
|
||||
1
hooks/artful/80-install-kernel-ubuntu
Symbolic link
1
hooks/artful/80-install-kernel-ubuntu
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/80-install-kernel-ubuntu
|
||||
1
hooks/artful/80-install-modules
Symbolic link
1
hooks/artful/80-install-modules
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/80-install-modules-deb
|
||||
1
hooks/artful/81-install-modules-init-tools
Symbolic link
1
hooks/artful/81-install-modules-init-tools
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/81-install-modules-init-tools
|
||||
1
hooks/artful/82-install-grub-legacy
Symbolic link
1
hooks/artful/82-install-grub-legacy
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/82-install-grub-legacy
|
||||
1
hooks/artful/90-make-fstab
Symbolic link
1
hooks/artful/90-make-fstab
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/90-make-fstab
|
||||
1
hooks/artful/99-clean-image
Symbolic link
1
hooks/artful/99-clean-image
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/99-clean-image-deb
|
||||
1
hooks/artful/99-enable-daemons
Symbolic link
1
hooks/artful/99-enable-daemons
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/99-enable-daemons
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
#
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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|wheezy|jessie|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
|
||||
|
||||
#
|
||||
|
||||
@@ -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.
|
||||
|
||||
1
hooks/karmic/80-install-kernel-ubuntu
Symbolic link
1
hooks/karmic/80-install-kernel-ubuntu
Symbolic link
@@ -0,0 +1 @@
|
||||
../common/80-install-kernel-ubuntu
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
95
t/hook-apt.t
Executable 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");
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ if (which('git') and -d '.git') {
|
||||
use_ok( 'Git' );
|
||||
|
||||
# First, check that no tracked files are ignored
|
||||
my $cmd = Git::command_output_pipe('ls-files', '--ignored', '--exclude-standard');
|
||||
my $cmd = Git::command_output_pipe('ls-files', '--cached', '--ignored', '--exclude-standard');
|
||||
my $output;
|
||||
while (<$cmd>) { $output .= "--> $_" }
|
||||
close $cmd;
|
||||
|
||||
43
xt/no-tabs.t
43
xt/no-tabs.t
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user