[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST RFC 10/16] ts-centos-xen-pkg-install: Install of Xen package on CentOS



Install candidate packages that have been built by CBS, the CentOS
Community Build Service.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 ts-centos-xen-pkg-install | 79 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100755 ts-centos-xen-pkg-install

diff --git a/ts-centos-xen-pkg-install b/ts-centos-xen-pkg-install
new file mode 100755
index 0000000..e10456d
--- /dev/null
+++ b/ts-centos-xen-pkg-install
@@ -0,0 +1,79 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2017 Citrix Inc.
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+# 
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use strict qw(vars);
+use DBI;
+BEGIN { unshift @INC, qw(.); }
+use Osstest;
+use File::Path;
+use POSIX;
+use Osstest::TestSupport;
+
+
+tsreadconfig();
+
+our @hos;
+
+if (!@ARGV) {
+    push @ARGV, 'host';
+}
+foreach my $k (@ARGV) {
+    push @hos, selecthost($k);
+}
+
+our $ho;
+
+sub packages_setup () {
+    my $subtag = $r{centos_cbs_repo} // 'candidate';
+    die unless $subtag =~ m/^(candidate|testing|release)$/;
+    my $repos = <<END;
+[virt-xen-48-$subtag]
+name=VirtSIG-\$releasever - Xen 4.8 CBS $subtag
+baseurl=http://cbs.centos.org/repos/virt\$releasever-xen-48-$subtag/\$basearch/os/
+gpgcheck=0
+[virt-xen-common-$subtag]
+name=VirtSIG-\$releasever - Xen common CBS
+baseurl=http://cbs.centos.org/repos/virt\$releasever-xen-common-$subtag/\$basearch/os/
+gpgcheck=0
+END
+    target_putfilecontents_root_stash($ho, 10, $repos,
+        "/etc/yum.repos.d/Osstest.repo");
+
+    # This packages in necessary, in order to get the right kernel
+    # It pull /usr/bin/grub-bootxen.sh (helper to boot Xen by default) and
+    # the CentOS Virt7 repos.
+    target_install_packages($ho, qw(centos-release-xen));
+
+    target_cmd_root($ho, 'yum -y update', 10*60);
+
+    my @xen_packages = qw(xen);
+    # For vncpasswd
+    push @xen_packages, 'tigervnc-server-minimal';
+    push @xen_packages, qw(libvirt-daemon-xen libvirt-client)
+       if toolstack($ho)->{Name} eq "libvirt";
+    target_install_packages($ho, @xen_packages);
+}
+
+
+sub setupboot () {
+    logm("ready to boot Xen");
+}
+
+die if @hos > 1;
+$ho= $hos[0];
+packages_setup();
+setupboot();
-- 
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.