|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 07/11] config: ExtraDebs: replace with DebianExtraPackages
`ExtraDebs' is a silly name. Also the semantics are rather
inflexible; we might want to install specific packages rather than
the contents of a whole directory.
And, document it.
This variable has only just been introduced, so hopefully it is OK to
replace and rename it now without causing too much disruption.
(osstest's own production runs each use their own copy of the config,
so they will be fine. It's just downstreams, or users whose config is
set up to use one not in their own tree, who will be affected.)
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
------------------------------
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
README | 9 +++++++++
production-config | 8 ++++----
ts-xen-install | 46 ++++++++++++++++++++++++++++++++++++++++------
3 files changed, 53 insertions(+), 10 deletions(-)
diff --git a/README b/README
index 7b7bc52..2dfd4de 100644
--- a/README
+++ b/README
@@ -537,6 +537,15 @@ DebianNonfreeFirmware
grep-dctrl (for example because it's not Debian) then you must set
this to the empty string, by writing DebianNonfreeFirmware=''
+DebianExtraPackages_<firmware>_<arch>_<suite> [<item>... ]
+ Extra packages, or directories of them, to install on every Debian
+ host (dom0). Each variable is a space-separated list of items.
+ Each <item> is relative to Images unless it starts with `/' or `./'.
+ It should be one of the following:
+ <directory-name>/ update packages, dpkg -iGROEB
+ [.../]<package>_<version>_<pkgarch>.deb install package, dpkg -iB
+ [.../]<package>_<version>_.deb install _<hostarch>.deb
+
Tftp*
Settings related to the tftp server:
diff --git a/production-config b/production-config
index aa414d0..d89e89a 100644
--- a/production-config
+++ b/production-config
@@ -106,10 +106,10 @@ MicrocodeUpdateI386 microcode.x86.2015-06-12.cpio
# Update with ./mg-netgrub-loader-update
TftpGrubVersion XXXX-XX-XX
-ExtraDebs_uefi_i386_jessie 2018-04-01
-ExtraDebs_uefi_amd64_jessie 2018-04-01
-ExtraDebs_uefi_i386_stretch 2018-04-01
-ExtraDebs_uefi_amd64_stretch 2018-04-01
+DebianExtraPackages_uefi_i386_jessie extradebs-uefi-i386-2018-04-01/
+DebianExtraPackages_uefi_amd64_jessie extradebs-uefi-amd64-2018-04-01/
+DebianExtraPackages_uefi_i386_stretch extradebs-uefi-i386-2018-04-01/
+DebianExtraPackages_uefi_amd64_stretch extradebs-uefi-amd64-2018-04-01/
XenUsePath /usr/groups/xencore/systems/bin/xenuse
XenUseUser osstest
diff --git a/ts-xen-install b/ts-xen-install
index 17f7662..d3a9d11 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -20,6 +20,7 @@ use DBI;
BEGIN { unshift @INC, qw(.); }
use Osstest;
use File::Path;
+use File::Basename;
use POSIX;
use Osstest::Debian;
use Osstest::TestSupport;
@@ -66,14 +67,47 @@ sub packages () {
if toolstack($ho)->{ExtraPackages};
}
+sub some_extradebs ($) {
+ my ($items) = @_;
+ my $cfgvar = join('_', @$items);
+ my $specs = $c{$cfgvar};
+ if (!length $specs) {
+ logm("$cfgvar: no extra debs");
+ return;
+ }
+ my $counter = 0;
+ my $rsync_installed;
+ foreach my $spec (split /\s+/, $specs) {
+ my $path = $spec;
+ $path = "$c{Images}/$path" unless $path =~ m{^/|^\./};
+ my ($ontarget, $dpkgopts);
+ if ($path =~ m{/$}) {
+ $ontarget = "extrapackages-$cfgvar-$counter"; $counter++;
+ $dpkgopts = '-iGROEB';
+ logm("$cfgvar: updating packages from directory $path");
+ target_install_packages($ho, 'rsync') unless $rsync_installed++;
+ target_putfile_root($ho,300, "$path/.", $ontarget, '-r');
+ } elsif ($path =~ m{\.deb$}) {
+ $path =~ s{_\.deb}{ "_$r{arch}.deb" }e;
+ logm("$cfgvar: installing $path");
+ $ontarget = basename($path);
+ $dpkgopts = '-iB';
+ target_putfile_root($ho,300, $path, $ontarget);
+ } else {
+ die "no / or . deb in $spec ?";
+ }
+ target_cmd_root($ho,
+ "dpkg --force-confold $dpkgopts $ontarget </dev/null",
+ 300);
+ }
+}
+
sub extradebs () {
+ my $suite = $ho->{Suite};
+
+ # $c{ DebianExtraPackages_<firmware>_<arch>_<suite> }
my $firmware = get_host_property($ho, "firmware", "bios");
- my $version = $c{ "ExtraDebs_${firmware}_$r{arch}_$ho->{Suite}" };
- return unless $version;
- target_install_packages($ho, 'rsync');
- my $extradebs = "$c{Images}/extradebs-$firmware-$r{arch}-$version";
- target_putfile_root($ho,300, "$extradebs/.", 'extradebs', '-r');
- target_cmd_root($ho,"dpkg --force-confold -iGROEB extradebs
</dev/null",300);
+ some_extradebs([ 'DebianExtraPackages', $firmware, $r{arch}, $suite ]);
}
sub extract () {
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |