xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: xen-devel@lists.xen.org
Cc: Wei Liu <wei.liu2@citrix.com>,
	ian.jackson@eu.citrix.com, ian.campbell@citrix.com
Subject: [PATCH RFC V3 4/7] Debian.pm: factor out preseed_base
Date: Thu, 12 Dec 2013 21:03:01 +0000	[thread overview]
Message-ID: <1386882184-15324-5-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1386882184-15324-1-git-send-email-wei.liu2@citrix.com>

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 Osstest/Debian.pm |  143 ++++++++++++++++++++++++++++++-----------------------
 1 file changed, 80 insertions(+), 63 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 6759263..485e165 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -33,6 +33,7 @@ BEGIN {
     @ISA         = qw(Exporter);
     @EXPORT      = qw(debian_boot_setup
                       %preseed_cmds
+                      preseed_base
                       preseed_create
                       preseed_hook_command preseed_hook_installscript
                       di_installcmdline_core
@@ -423,7 +424,83 @@ sub di_installcmdline_core ($$;@) {
         if defined $debconf_priority;
 
     return @cl;
-}             
+}
+
+sub preseed_base ($$;@) {
+    my ($suite,$extra_packages,%xopts) = @_;
+
+    return (<<END);
+d-i mirror/suite string $suite
+
+d-i debian-installer/locale string en_GB
+d-i console-keymaps-at/keymap select gb
+d-i keyboard-configuration/xkb-keymap string en_GB
+
+#d-i debconf/frontend string readline
+
+d-i mirror/country string manual
+d-i mirror/http/proxy string
+
+d-i clock-setup/utc boolean true
+d-i time/zone string Europe/London
+d-i clock-setup/ntp boolean true
+
+d-i partman-md/device_remove_md boolean true
+d-i partman-lvm/device_remove_lvm boolean true
+d-i partman-partitioning/confirm_write_new_label boolean true
+d-i partman/choose_partition select finish
+d-i partman/confirm boolean true
+d-i partman-lvm/confirm boolean true
+
+d-i partman/confirm_nooverwrite true
+d-i partman-lvm/confirm_nooverwrite true
+d-i partman-md/confirm_nooverwrite true
+d-i partman-crypto/confirm_nooverwrite true
+
+#d-i netcfg/disable_dhcp boolean true
+d-i netcfg/get_nameservers string $c{NetNameservers}
+#d-i netcfg/get_netmask string \$c{NetNetmask}
+#d-i netcfg/get_gateway string \$c{NetGateway}
+d-i netcfg/confirm_static boolean true
+d-i netcfg/get_domain string $c{TestHostDomain}
+d-i netcfg/wireless_wep string
+
+d-i passwd/root-password password xenroot
+d-i passwd/root-password-again password xenroot
+d-i passwd/user-fullname string FLOSS Xen Test
+d-i passwd/username string osstest
+d-i passwd/user-password password osstest
+d-i passwd/user-password-again password osstest
+
+console-common  console-data/keymap/policy      select  Don't touch keymap
+console-data    console-data/keymap/policy      select  Don't touch keymap
+console-data    console-data/keymap/family      select  qwerty
+console-data console-data/keymap/template/layout select British
+
+popularity-contest popularity-contest/participate boolean false
+tasksel tasksel/first multiselect standard, web-server
+
+d-i grub-installer/only_debian boolean true
+
+d-i finish-install/keep-consoles boolean true
+d-i finish-install/reboot_in_progress note
+d-i cdrom-detect/eject boolean false
+
+d-i mirror/http/hostname string $c{DebianMirrorHost}
+d-i mirror/http/directory string /$c{DebianMirrorSubpath}
+d-i apt-setup/use_mirror boolean yes
+d-i apt-setup/another boolean false
+d-i apt-setup/non-free boolean false
+d-i apt-setup/contrib boolean false
+
+d-i pkgsel/include string openssh-server, ntp, ntpdate, $extra_packages
+
+$xopts{ExtraPreseed}
+
+### END OF DEBIAN PRESEED BASE
+
+END
+}          
 
 sub preseed_create ($$;@) {
     my ($ho, $sfx, %xopts) = @_;
@@ -610,45 +687,12 @@ END
 
     my $extra_packages = join(",",@extra_packages);
 
-    my $preseed_file= (<<END);
-d-i mirror/suite string $suite
-
-d-i debian-installer/locale string en_GB
-d-i console-keymaps-at/keymap select gb
-d-i keyboard-configuration/xkb-keymap string en_GB
-
-#d-i debconf/frontend string readline
-
-d-i mirror/country string manual
-d-i mirror/http/proxy string
-
-d-i clock-setup/utc boolean true
-d-i time/zone string Europe/London
-d-i clock-setup/ntp boolean true
+    my $preseed_file= preseed_base($suite,$extra_packages,%xopts);
 
+    $preseed_file .= (<<END);
 d-i partman-auto/method string lvm
 #d-i partman-auto/method string regular
 
-d-i partman-md/device_remove_md boolean true
-d-i partman-lvm/device_remove_lvm boolean true
-d-i partman-partitioning/confirm_write_new_label boolean true
-d-i partman/choose_partition select finish
-d-i partman/confirm boolean true
-d-i partman-lvm/confirm boolean true
-
-d-i partman/confirm_nooverwrite true
-d-i partman-lvm/confirm_nooverwrite true
-d-i partman-md/confirm_nooverwrite true
-d-i partman-crypto/confirm_nooverwrite true
-
-#d-i netcfg/disable_dhcp boolean true
-d-i netcfg/get_nameservers string $c{NetNameservers}
-#d-i netcfg/get_netmask string \$c{NetNetmask}
-#d-i netcfg/get_gateway string \$c{NetGateway}
-d-i netcfg/confirm_static boolean true
-d-i netcfg/get_domain string $c{TestHostDomain}
-d-i netcfg/wireless_wep string
-
 #d-i partman-auto/init_automatically_partition select regular
 d-i partman-auto/disk string $disk
 
@@ -676,33 +720,6 @@ d-i partman-auto/expert_recipe string					\\
 			lv_name{ dummy }				\\
 		.
 
-d-i passwd/root-password password xenroot
-d-i passwd/root-password-again password xenroot
-d-i passwd/user-fullname string FLOSS Xen Test
-d-i passwd/username string osstest
-d-i passwd/user-password password osstest
-d-i passwd/user-password-again password osstest
-
-console-common  console-data/keymap/policy      select  Don't touch keymap
-console-data    console-data/keymap/policy      select  Don't touch keymap
-console-data    console-data/keymap/family      select  qwerty
-console-data console-data/keymap/template/layout select British
-
-popularity-contest popularity-contest/participate boolean false
-tasksel tasksel/first multiselect standard, web-server
-
-d-i pkgsel/include string openssh-server, ntp, ntpdate, $extra_packages
-
-d-i grub-installer/only_debian boolean true
-
-d-i finish-install/keep-consoles boolean true
-d-i finish-install/reboot_in_progress note
-d-i cdrom-detect/eject boolean false
-
-d-i mirror/http/hostname string $c{DebianMirrorHost}
-d-i mirror/http/directory string /$c{DebianMirrorSubpath}
-
-$xopts{ExtraPreseed}
 END
 
     foreach my $di_key (keys %preseed_cmds) {
-- 
1.7.10.4

  parent reply	other threads:[~2013-12-12 21:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 21:02 [PATCH RFC V3 0/7] OSSTest: OVMF test job Wei Liu
2013-12-12 21:02 ` [PATCH RFC V3 1/7] make-flight: disable OVMF build for 4.3 Wei Liu
2013-12-12 21:06   ` Wei Liu
2013-12-12 21:02 ` [PATCH RFC V3 2/7] TestSupport.pm: add bios option to guest config file Wei Liu
2013-12-12 21:03 ` [PATCH RFC V3 3/7] TestSupport.pm: functions for creating isos Wei Liu
2014-03-20 16:10   ` Ian Jackson
2014-03-20 16:56     ` Wei Liu
2014-03-20 17:04       ` Ian Jackson
2013-12-12 21:03 ` Wei Liu [this message]
2014-03-20 16:10   ` [PATCH RFC V3 4/7] Debian.pm: factor out preseed_base Ian Jackson
2013-12-12 21:03 ` [PATCH RFC V3 5/7] Introduce ts-debian-hvm-install Wei Liu
2014-03-20 16:13   ` Ian Jackson
2014-03-20 16:14     ` Ian Jackson
2014-03-20 17:01       ` Wei Liu
2014-03-20 17:11         ` Ian Jackson
2013-12-12 21:03 ` [PATCH RFC V3 6/7] make-flight: OVMF test filght Wei Liu
2013-12-12 21:03 ` [PATCH RFC V3 7/7] sg-run-job: OVMF job Wei Liu
2014-03-20 16:16   ` Ian Jackson
2014-01-22 15:52 ` [PATCH RFC V3 0/7] OSSTest: OVMF test job Wei Liu
2014-03-20 16:03   ` Ian Campbell
2014-03-20 16:17     ` Ian Jackson
2014-03-20 17:02     ` Wei Liu
2014-03-20 17:14       ` Ian Campbell

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=1386882184-15324-5-git-send-email-wei.liu2@citrix.com \
    --to=wei.liu2@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).