All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel@lists.xen.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: [OSSTest PATCH [RFC] 1/4] Introducing Osstest/Fedora.pm
Date: Thu, 12 Dec 2013 23:53:25 +0100	[thread overview]
Message-ID: <20131212225324.11164.40939.stgit@Solace> (raw)
In-Reply-To: <20131212221933.11164.46804.stgit@Solace>

which, for now, only handles the kickstart files (the
equivalent of d-i preseeds).

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
---
 Osstest.pm                |    4 ++
 Osstest/Fedora.pm         |   83 +++++++++++++++++++++++++++++++++++++++++++++
 README                    |    9 +++++
 standalone-config-example |    2 +
 4 files changed, 98 insertions(+)
 create mode 100644 Osstest/Fedora.pm

diff --git a/Osstest.pm b/Osstest.pm
index 9ba2882..1cc5acb 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -62,6 +62,8 @@ our %c = qw(
     DebianSuite squeeze
     DebianMirrorSubpath debian
 
+    FedoraMirrorSubpath fedora/linux
+
     TestHostKeypairPath id_rsa_osstest
     HostProp_GenEtherPrefixBase 5e:36:0e:f5
 
@@ -179,6 +181,8 @@ sub readglobalconfig () {
     $c{OverlayLocal} ||= "overlay-local";
     $c{GuestDebianSuite} ||= $c{DebianSuite};
 
+    $c{GuestFedoraRelease} ||= 19;
+
     $c{DefaultBranch} ||= 'xen-unstable';
 }
 
diff --git a/Osstest/Fedora.pm b/Osstest/Fedora.pm
new file mode 100644
index 0000000..a5c7cec
--- /dev/null
+++ b/Osstest/Fedora.pm
@@ -0,0 +1,83 @@
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2013 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/>.
+
+
+package Osstest::Fedora;
+
+use strict;
+use warnings;
+
+use IO::File;
+use File::Copy;
+
+use Osstest;
+use Osstest::TestSupport;
+
+BEGIN {
+    use Exporter ();
+    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+    $VERSION     = 1.00;
+    @ISA         = qw(Exporter);
+    @EXPORT      = qw(kickstart_create);
+    %EXPORT_TAGS = ( );
+
+    @EXPORT_OK   = qw();
+}
+
+#---------- installation of Fedora via kickstart file ----------
+
+sub kickstart_create($$$) {
+    my ($ho, $repourl, $sfx) = @_;
+
+    my $ks_file.= (<<END);
+install
+firewall --disabled
+keyboard 'us'
+reboot
+rootpw --plaintext xenroot
+timezone Europe/London --isUtc
+lang en_US
+auth --useshadow --passalgo=sha512
+text # text mode install
+selinux --permissive
+skipx
+
+url --url="$repourl"
+network  --bootproto=dhcp --device=eth0
+
+bootloader --location=mbr
+zerombr
+clearpart --all
+part swap --asprimary --fstype="swap" --size=1000
+part / --asprimary --fstype="ext4" --grow --size=1
+
+\%packages
+\@admin-tools
+\@standard
+\%end
+
+\%post
+exec < /dev/console > /dev/console
+echo "# Adding osstest user"
+useradd -p \`openssl passwd -1 osstest\` osstest
+echo "# Upgrading the system"
+yum -y upgrade
+\%end
+END
+    return create_webfile($ho, "ks$sfx", $ks_file);
+}
+
+1;
diff --git a/README b/README
index 29c9d45..c2ce2c1 100644
--- a/README
+++ b/README
@@ -89,6 +89,13 @@ DebianMirrorHost
    Set DebianMirrorSubpath to the path inside the mirror if
    your mirror isn't at http://<DebianMirrorHost>/debian/
 
+FedoraMirrorHost
+   Domain name or address of the Fedora mirror to use.
+   Set FedoraMirrorSubpath to the path inside the mirror.
+   http://<FedoraMirrorHost>/<FedoraMirrorSubpath>/ should
+   point to where 'releases' and/or 'development' directory
+   are.
+
 TestHost <hostname>
 TestHost_<ident> <hostname>
    Specifies the test box to use.  Should be a bare hostname,
@@ -191,6 +198,8 @@ GuestDebianSuite   defaults to DebianSuite
 
 DebianPreseed      added to existing preseed file
 
+GuestFedoraRelease defaults to 19
+
 TftpPxeTemplates
     List (space-separated) of template filenames for writing
     The templates contain variable substitutions %var%
diff --git a/standalone-config-example b/standalone-config-example
index 9b2b79b..2bc18f7 100644
--- a/standalone-config-example
+++ b/standalone-config-example
@@ -26,6 +26,8 @@ HostProp_DhcpWatchMethod leases dhcp3 dhcp.uk.xensource.com:5556
 TftpPath /usr/groups/netboot/
 
 DebianMirrorHost debian.uk.xensource.com
+FedoraMirrorHost dl.fedoraproject.org
+FedoraMirrorSubpath pub/fedora/linux
 
 DebianPreseed= <<'END'
 d-i clock-setup/ntp-server string ntp.uk.xensource.com

  reply	other threads:[~2013-12-12 22:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 22:53 [OSSTest PATCH [RFC] 0/4] New test case: Fedora PV guests Dario Faggioli
2013-12-12 22:53 ` Dario Faggioli [this message]
2013-12-13 16:33   ` [OSSTest PATCH [RFC] 1/4] Introducing Osstest/Fedora.pm Ian Jackson
2013-12-13 17:47     ` Dario Faggioli
2013-12-12 22:53 ` [OSSTest PATCH [RFC] 2/4] ts-fedora-install: added for installing fedora guests Dario Faggioli
2013-12-13 16:44   ` Ian Jackson
2013-12-13 18:12     ` Dario Faggioli
2013-12-13 18:24       ` Ian Jackson
2013-12-13 16:45   ` Ian Jackson
2013-12-13 17:36     ` Dario Faggioli
2013-12-12 22:53 ` [OSSTest PATCH [RFC] 3/4] sg-run-job: Fedora guest job Dario Faggioli
2013-12-12 22:53 ` [OSSTest PATCH [RFC] 4/4] make-flight: Fedora guest tests Dario Faggioli
2013-12-13 16:49   ` Ian Jackson
2013-12-13 17:32     ` Dario Faggioli
2013-12-13 17:34       ` Ian Jackson
2013-12-13 18:03         ` Dario Faggioli
2013-12-13 18:20           ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131212225324.11164.40939.stgit@Solace \
    --to=dario.faggioli@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.