[Libosinfo] [PATCH v2 46/52] data: split rhel into one file per install script

Daniel P. Berrange berrange at redhat.com
Mon Oct 5 15:31:50 UTC 2015


Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 configure.ac                                       |   1 +
 data/install-scripts/Makefile.am                   |   2 +-
 data/install-scripts/redhat.com/Makefile.am        |   1 +
 .../rhel-kickstart-desktop.xml.in}                 | 107 ---------------------
 .../redhat.com/rhel-kickstart-jeos.xml.in          | 105 ++++++++++++++++++++
 5 files changed, 108 insertions(+), 108 deletions(-)
 create mode 100644 data/install-scripts/redhat.com/Makefile.am
 rename data/install-scripts/{rhel.xml => redhat.com/rhel-kickstart-desktop.xml.in} (58%)
 create mode 100644 data/install-scripts/redhat.com/rhel-kickstart-jeos.xml.in

diff --git a/configure.ac b/configure.ac
index 7aaa6ad..7b5e08f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,6 +179,7 @@ AC_CONFIG_FILES([
 	data/install-scripts/Makefile
 	data/install-scripts/debian.org/Makefile
 	data/install-scripts/fedoraproject.org/Makefile
+	data/install-scripts/redhat.com/Makefile
 	data/oses/Makefile
 	data/oses/altlinux.org/Makefile
 	data/oses/apple.com/Makefile
diff --git a/data/install-scripts/Makefile.am b/data/install-scripts/Makefile.am
index 69f4fbc..cb28204 100644
--- a/data/install-scripts/Makefile.am
+++ b/data/install-scripts/Makefile.am
@@ -2,11 +2,11 @@
 SUBDIRS = \
 	debian.org \
 	fedoraproject.org \
+	redhat.com \
 	$(NULL)
 
 databasedir = $(pkgdatadir)/db/install-scripts/
 database_DATA =     \
-  rhel.xml          \
   ubuntu.xml        \
   windows-sif.xml   \
   windows-cmd.xml   \
diff --git a/data/install-scripts/redhat.com/Makefile.am b/data/install-scripts/redhat.com/Makefile.am
new file mode 100644
index 0000000..ee4552b
--- /dev/null
+++ b/data/install-scripts/redhat.com/Makefile.am
@@ -0,0 +1 @@
+include ../../Makefile.inc
diff --git a/data/install-scripts/rhel.xml b/data/install-scripts/redhat.com/rhel-kickstart-desktop.xml.in
similarity index 58%
rename from data/install-scripts/rhel.xml
rename to data/install-scripts/redhat.com/rhel-kickstart-desktop.xml.in
index 33b0e68..a643113 100644
--- a/data/install-scripts/rhel.xml
+++ b/data/install-scripts/redhat.com/rhel-kickstart-desktop.xml.in
@@ -1,110 +1,4 @@
 <libosinfo version="0.0.1">
-  <!-- JEOS PROFILE -->
-  <install-script id='http://redhat.com/rhel/kickstart/jeos'>
-    <profile>jeos</profile>
-    <expected-filename>rhel.ks</expected-filename>
-    <config>
-      <param name="admin-password" policy="optional"/>
-      <param name="l10n-keyboard" policy="optional"/>
-      <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 > 4">
-              <!-- virtio -->
-              <xsl:text>/dev/vda</xsl:text>
-            </xsl:when>
-            <xsl:otherwise>
-              <!-- IDE -->
-              <xsl:text>/dev/sda</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 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"/>
-install
-cdrom
-text
-<!-- FIXME: RHEL requires keyboard layout to be a console layout so to do this right, we'll need
-            mapping from language to console layout. -->
-keyboard us
-lang <xsl:value-of select="config/l10n-language"/>
-skipx
-network --bootproto dhcp
-rootpw <xsl:value-of select="config/admin-password"/>
-firewall --disabled
-authconfig --enableshadow --enablemd5
-selinux --enforcing
-timezone --utc <xsl:value-of select="config/l10n-timezone"/>
-bootloader --location=mbr
-zerombr
-
-clearpart --all --drives=<xsl:call-template name="target-disk"/>
-
-
-<xsl:choose>
-  <xsl:when test="os/version < 7">
-part /boot --fstype ext4 --size=1024 --ondisk=<xsl:call-template name="target-disk"/>
-  </xsl:when>
-  <xsl:otherwise>
-part /boot --fstype ext4 --recommended --ondisk=<xsl:call-template name="target-disk"/>
-  </xsl:otherwise>
-</xsl:choose>
-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 ext4 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
-reboot
-
-%packages
-<xsl:choose>
-  <xsl:when test="os/version < 7">
- at base
-  </xsl:when>
-  <xsl:otherwise>
- at standard
-  </xsl:otherwise>
-</xsl:choose>
- at core
-
-%end
-	</xsl:template>
-      </xsl:stylesheet>
-    </template>
-  </install-script>
-
-  <!-- DESKTOP PROFILE -->
   <install-script id='http://redhat.com/rhel/kickstart/desktop'>
     <profile>desktop</profile>
     <expected-filename>rhel.ks</expected-filename>
@@ -259,5 +153,4 @@ AutomaticLogin=<xsl:value-of select="config/user-login"/>
       </xsl:stylesheet>
     </template>
   </install-script>
-
 </libosinfo>
diff --git a/data/install-scripts/redhat.com/rhel-kickstart-jeos.xml.in b/data/install-scripts/redhat.com/rhel-kickstart-jeos.xml.in
new file mode 100644
index 0000000..b7998c4
--- /dev/null
+++ b/data/install-scripts/redhat.com/rhel-kickstart-jeos.xml.in
@@ -0,0 +1,105 @@
+<libosinfo version="0.0.1">
+  <install-script id='http://redhat.com/rhel/kickstart/jeos'>
+    <profile>jeos</profile>
+    <expected-filename>rhel.ks</expected-filename>
+    <config>
+      <param name="admin-password" policy="optional"/>
+      <param name="l10n-keyboard" policy="optional"/>
+      <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 > 4">
+              <!-- virtio -->
+              <xsl:text>/dev/vda</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <!-- IDE -->
+              <xsl:text>/dev/sda</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 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"/>
+install
+cdrom
+text
+<!-- FIXME: RHEL requires keyboard layout to be a console layout so to do this right, we'll need
+            mapping from language to console layout. -->
+keyboard us
+lang <xsl:value-of select="config/l10n-language"/>
+skipx
+network --bootproto dhcp
+rootpw <xsl:value-of select="config/admin-password"/>
+firewall --disabled
+authconfig --enableshadow --enablemd5
+selinux --enforcing
+timezone --utc <xsl:value-of select="config/l10n-timezone"/>
+bootloader --location=mbr
+zerombr
+
+clearpart --all --drives=<xsl:call-template name="target-disk"/>
+
+
+<xsl:choose>
+  <xsl:when test="os/version < 7">
+part /boot --fstype ext4 --size=1024 --ondisk=<xsl:call-template name="target-disk"/>
+  </xsl:when>
+  <xsl:otherwise>
+part /boot --fstype ext4 --recommended --ondisk=<xsl:call-template name="target-disk"/>
+  </xsl:otherwise>
+</xsl:choose>
+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 ext4 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
+reboot
+
+%packages
+<xsl:choose>
+  <xsl:when test="os/version < 7">
+ at base
+  </xsl:when>
+  <xsl:otherwise>
+ at standard
+  </xsl:otherwise>
+</xsl:choose>
+ at core
+
+%end
+	</xsl:template>
+      </xsl:stylesheet>
+    </template>
+  </install-script>
+</libosinfo>
-- 
2.4.3




More information about the Libosinfo mailing list