[PATCH 33/39] data: split fedora into one file per install script

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

 



Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 configure.ac                                       |   1 +
 data/install-scripts/Makefile.am                   |   2 +-
 data/install-scripts/fedora/Makefile.am            |   1 +
 .../{fedora.xml => fedora/fedora-desktop.xml.in}   | 158 ---------------------
 data/install-scripts/fedora/fedora-jeos.xml.in     | 156 ++++++++++++++++++++
 5 files changed, 159 insertions(+), 159 deletions(-)
 create mode 100644 data/install-scripts/fedora/Makefile.am
 rename data/install-scripts/{fedora.xml => fedora/fedora-desktop.xml.in} (56%)
 create mode 100644 data/install-scripts/fedora/fedora-jeos.xml.in

diff --git a/configure.ac b/configure.ac
index cd40122..7e6758f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -178,6 +178,7 @@ AC_CONFIG_FILES([
 	data/platforms/xen/Makefile
 	data/install-scripts/Makefile
 	data/install-scripts/debian/Makefile
+	data/install-scripts/fedora/Makefile
 	data/oses/Makefile
 	data/oses/altlinux/Makefile
 	data/oses/centos/Makefile
diff --git a/data/install-scripts/Makefile.am b/data/install-scripts/Makefile.am
index a58da97..69cbed1 100644
--- a/data/install-scripts/Makefile.am
+++ b/data/install-scripts/Makefile.am
@@ -1,11 +1,11 @@
 
 SUBDIRS = \
 	debian \
+	fedora \
 	$(NULL)
 
 databasedir = $(pkgdatadir)/db/install-scripts/
 database_DATA =     \
-  fedora.xml        \
   rhel.xml          \
   ubuntu.xml        \
   windows-sif.xml   \
diff --git a/data/install-scripts/fedora/Makefile.am b/data/install-scripts/fedora/Makefile.am
new file mode 100644
index 0000000..ee4552b
--- /dev/null
+++ b/data/install-scripts/fedora/Makefile.am
@@ -0,0 +1 @@
+include ../../Makefile.inc
diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora/fedora-desktop.xml.in
similarity index 56%
rename from data/install-scripts/fedora.xml
rename to data/install-scripts/fedora/fedora-desktop.xml.in
index 09233ed..6a02da0 100644
--- a/data/install-scripts/fedora.xml
+++ b/data/install-scripts/fedora/fedora-desktop.xml.in
@@ -1,161 +1,4 @@
 <libosinfo version="0.0.1">
-  <!-- JEOS PROFILE -->
-  <install-script id='http://fedoraproject.org/scripts/fedora/jeos'>
-    <profile>jeos</profile>
-    <expected-filename>fedora.ks</expected-filename>
-    <config>
-      <param name="admin-password" policy="optional"/>
-      <param name="l10n-keyboard" policy="optional" value-map="http://libosinfo.fedorahosted.org/x11-keyboard"/>
-      <param name="l10n-language" policy="optional"/>
-      <param name="l10n-timezone" policy="optional"/>
-      <param name="target-disk" policy="optional"/>
-      <param name="script-disk" policy="required"/>
-    </config>
-    <injection-method>cdrom</injection-method>
-    <injection-method>disk</injection-method>
-    <injection-method>floppy</injection-method>
-    <template>
-      <xsl:stylesheet
-        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
-        version="1.0">
-
-        <xsl:output method="text"/>
-
-        <xsl:template name="target-disk">
-          <xsl:choose>
-            <xsl:when test="config/target-disk != ''">
-              <xsl:value-of select="config/target-disk"/>
-            </xsl:when>
-            <xsl:when test="os/version &gt; 9">
-              <!-- virtio -->
-              <xsl:text>/dev/vda</xsl:text>
-            </xsl:when>
-            <xsl:when test="os/version &gt; 6">
-              <!-- libata IDE -->
-              <xsl:text>/dev/sda</xsl:text>
-            </xsl:when>
-            <xsl:otherwise>
-              <!-- IDE -->
-              <xsl:text>/dev/hda</xsl:text>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:template>
-
-        <xsl:template name="script-disk">
-          <xsl:variable name="script-disk">
-            <xsl:value-of select="config/script-disk"/>
-          </xsl:variable>
-          <xsl:value-of select="substring-after($script-disk, '/dev/')"/>
-        </xsl:template>
-
-	<xsl:template name="rootfs">
-	  <xsl:choose>
-	    <xsl:when test="os/version &gt; 10">
-	      <xsl:text>ext4</xsl:text>
-	    </xsl:when>
-	    <xsl:otherwise>
-	      <xsl:text>ext3</xsl:text>
-	    </xsl:otherwise>
-	  </xsl:choose>
-	</xsl:template>
-
-	<xsl:template name="bootfs">
-	  <xsl:choose>
-	    <xsl:when test="os/version &gt; 11">
-	      <xsl:text>ext4</xsl:text>
-	    </xsl:when>
-	    <xsl:otherwise>
-	      <xsl:text>ext3</xsl:text>
-	    </xsl:otherwise>
-	  </xsl:choose>
-	</xsl:template>
-
-	<xsl:template name="keyboard">
-	  <xsl:choose>
-	    <xsl:when test="os/version &gt; 17">
-              <xsl:value-of select="config/l10n-keyboard"/>
-	    </xsl:when>
-	    <xsl:otherwise>
-              <!-- FIXME: F17 and older required keyboard layout to be a console
-                   layout so we'll need a different datamap for those but
-                   currently we only support one datamap per config param per
-                   script. -->
-	      <xsl:text>us</xsl:text>
-	    </xsl:otherwise>
-	  </xsl:choose>
-	</xsl:template>
-
-        <xsl:template match="/command-line">
-            <xsl:text>ks=hd:</xsl:text>
-            <xsl:call-template name="script-disk"/>
-            <xsl:text>:/</xsl:text>
-            <xsl:value-of select="script/expected-filename"/>
-        </xsl:template>
-
-        <xsl:template match="/install-script-config">
-# Install script for <xsl:value-of select="os/short-id"/> profile <xsl:value-of select="script/profile"/>
-<xsl:if test="count(media/variant) = 0 or not(contains(media/variant, 'netinst'))">
-install
-cdrom
-</xsl:if>
-text
-keyboard '<xsl:call-template name="keyboard"/>'
-lang <xsl:value-of select="config/l10n-language"/>
-<xsl:if test="os/version &lt; 7">
-langsupport --default <xsl:value-of select="config/l10n-language"/> <xsl:value-of select="config/l10n-language"/>
-mouse generic3ps/2 --device psaux
-</xsl:if>
-skipx
-network --bootproto dhcp
-rootpw <xsl:value-of select="config/admin-password"/>
-firewall --disabled
-authconfig --enableshadow --enablemd5
-<xsl:if test="os/version &gt; 1">
-selinux --enforcing
-</xsl:if>
-timezone --utc <xsl:value-of select="config/l10n-timezone"/>
-bootloader --location=mbr
-zerombr <xsl:if test="os/version &lt; 14">yes</xsl:if>
-
-clearpart --all --drives=<xsl:call-template name="target-disk"/>
-
-<xsl:if test="os/version &gt; 15">
-part biosboot --fstype=biosboot --size=1
-</xsl:if>
-part /boot --fstype <xsl:call-template name="bootfs"/> --recommended --ondisk=<xsl:call-template name="target-disk"/>
-part pv.2 --size=1 --grow --ondisk=<xsl:call-template name="target-disk"/>
-volgroup VolGroup00 --pesize=32768 pv.2
-logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow --maxsize=1536
-logvol / --fstype <xsl:call-template name="rootfs"/> --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
-reboot
-
-<xsl:if test="contains(media/variant, 'netinst')">
-repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&amp;arch=$basearch
-repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&amp;arch=$basearch
-url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-$releasever&amp;arch=$basearch
-</xsl:if>
-
-%packages
-<xsl:choose>
-  <xsl:when test="os/version &lt; 18">
-@base
-  </xsl:when>
-  <xsl:otherwise>
-@standard
-  </xsl:otherwise>
-</xsl:choose>
-@core
-<xsl:if test="os/version &gt; 6">
-@hardware-support
-</xsl:if>
-
-%end
-	</xsl:template>
-      </xsl:stylesheet>
-    </template>
-  </install-script>
-
-  <!-- DESKTOP PROFILE -->
   <install-script id='http://fedoraproject.org/scripts/fedora/desktop'>
     <profile>desktop</profile>
     <expected-filename>fedora.ks</expected-filename>
@@ -366,5 +209,4 @@ AutomaticLogin=<xsl:value-of select="config/user-login"/>
       </xsl:stylesheet>
     </template>
   </install-script>
-
 </libosinfo>
diff --git a/data/install-scripts/fedora/fedora-jeos.xml.in b/data/install-scripts/fedora/fedora-jeos.xml.in
new file mode 100644
index 0000000..2320a54
--- /dev/null
+++ b/data/install-scripts/fedora/fedora-jeos.xml.in
@@ -0,0 +1,156 @@
+<libosinfo version="0.0.1">
+  <install-script id='http://fedoraproject.org/scripts/fedora/jeos'>
+    <profile>jeos</profile>
+    <expected-filename>fedora.ks</expected-filename>
+    <config>
+      <param name="admin-password" policy="optional"/>
+      <param name="l10n-keyboard" policy="optional" value-map="http://libosinfo.fedorahosted.org/x11-keyboard"/>
+      <param name="l10n-language" policy="optional"/>
+      <param name="l10n-timezone" policy="optional"/>
+      <param name="target-disk" policy="optional"/>
+      <param name="script-disk" policy="required"/>
+    </config>
+    <injection-method>cdrom</injection-method>
+    <injection-method>disk</injection-method>
+    <injection-method>floppy</injection-method>
+    <template>
+      <xsl:stylesheet
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+        version="1.0">
+
+        <xsl:output method="text"/>
+
+        <xsl:template name="target-disk">
+          <xsl:choose>
+            <xsl:when test="config/target-disk != ''">
+              <xsl:value-of select="config/target-disk"/>
+            </xsl:when>
+            <xsl:when test="os/version &gt; 9">
+              <!-- virtio -->
+              <xsl:text>/dev/vda</xsl:text>
+            </xsl:when>
+            <xsl:when test="os/version &gt; 6">
+              <!-- libata IDE -->
+              <xsl:text>/dev/sda</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <!-- IDE -->
+              <xsl:text>/dev/hda</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:template>
+
+        <xsl:template name="script-disk">
+          <xsl:variable name="script-disk">
+            <xsl:value-of select="config/script-disk"/>
+          </xsl:variable>
+          <xsl:value-of select="substring-after($script-disk, '/dev/')"/>
+        </xsl:template>
+
+	<xsl:template name="rootfs">
+	  <xsl:choose>
+	    <xsl:when test="os/version &gt; 10">
+	      <xsl:text>ext4</xsl:text>
+	    </xsl:when>
+	    <xsl:otherwise>
+	      <xsl:text>ext3</xsl:text>
+	    </xsl:otherwise>
+	  </xsl:choose>
+	</xsl:template>
+
+	<xsl:template name="bootfs">
+	  <xsl:choose>
+	    <xsl:when test="os/version &gt; 11">
+	      <xsl:text>ext4</xsl:text>
+	    </xsl:when>
+	    <xsl:otherwise>
+	      <xsl:text>ext3</xsl:text>
+	    </xsl:otherwise>
+	  </xsl:choose>
+	</xsl:template>
+
+	<xsl:template name="keyboard">
+	  <xsl:choose>
+	    <xsl:when test="os/version &gt; 17">
+              <xsl:value-of select="config/l10n-keyboard"/>
+	    </xsl:when>
+	    <xsl:otherwise>
+              <!-- FIXME: F17 and older required keyboard layout to be a console
+                   layout so we'll need a different datamap for those but
+                   currently we only support one datamap per config param per
+                   script. -->
+	      <xsl:text>us</xsl:text>
+	    </xsl:otherwise>
+	  </xsl:choose>
+	</xsl:template>
+
+        <xsl:template match="/command-line">
+            <xsl:text>ks=hd:</xsl:text>
+            <xsl:call-template name="script-disk"/>
+            <xsl:text>:/</xsl:text>
+            <xsl:value-of select="script/expected-filename"/>
+        </xsl:template>
+
+        <xsl:template match="/install-script-config">
+# Install script for <xsl:value-of select="os/short-id"/> profile <xsl:value-of select="script/profile"/>
+<xsl:if test="count(media/variant) = 0 or not(contains(media/variant, 'netinst'))">
+install
+cdrom
+</xsl:if>
+text
+keyboard '<xsl:call-template name="keyboard"/>'
+lang <xsl:value-of select="config/l10n-language"/>
+<xsl:if test="os/version &lt; 7">
+langsupport --default <xsl:value-of select="config/l10n-language"/> <xsl:value-of select="config/l10n-language"/>
+mouse generic3ps/2 --device psaux
+</xsl:if>
+skipx
+network --bootproto dhcp
+rootpw <xsl:value-of select="config/admin-password"/>
+firewall --disabled
+authconfig --enableshadow --enablemd5
+<xsl:if test="os/version &gt; 1">
+selinux --enforcing
+</xsl:if>
+timezone --utc <xsl:value-of select="config/l10n-timezone"/>
+bootloader --location=mbr
+zerombr <xsl:if test="os/version &lt; 14">yes</xsl:if>
+
+clearpart --all --drives=<xsl:call-template name="target-disk"/>
+
+<xsl:if test="os/version &gt; 15">
+part biosboot --fstype=biosboot --size=1
+</xsl:if>
+part /boot --fstype <xsl:call-template name="bootfs"/> --recommended --ondisk=<xsl:call-template name="target-disk"/>
+part pv.2 --size=1 --grow --ondisk=<xsl:call-template name="target-disk"/>
+volgroup VolGroup00 --pesize=32768 pv.2
+logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow --maxsize=1536
+logvol / --fstype <xsl:call-template name="rootfs"/> --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
+reboot
+
+<xsl:if test="contains(media/variant, 'netinst')">
+repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&amp;arch=$basearch
+repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&amp;arch=$basearch
+url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-$releasever&amp;arch=$basearch
+</xsl:if>
+
+%packages
+<xsl:choose>
+  <xsl:when test="os/version &lt; 18">
+@base
+  </xsl:when>
+  <xsl:otherwise>
+@standard
+  </xsl:otherwise>
+</xsl:choose>
+@core
+<xsl:if test="os/version &gt; 6">
+@hardware-support
+</xsl:if>
+
+%end
+	</xsl:template>
+      </xsl:stylesheet>
+    </template>
+  </install-script>
+</libosinfo>
-- 
2.4.3

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux