[elbe-devel] [PATCH 3/3] Add XInclude examples

Benedikt Spranger b.spranger at linutronix.de
Thu Mar 23 14:14:21 CET 2017


Add two sample E.L.B.E. receipes using XInclude:
- x86_32-pc-hdimg-with-include-development.xml
- x86_32-pc-hdimg-with-include-production.xml

Signed-off-by: Benedikt Spranger <b.spranger at linutronix.de>
---
 examples/includes/devel/finetuning.xml             |  5 +++
 examples/includes/devel/hostname.xml               |  2 ++
 examples/includes/devel/part.xml                   | 10 ++++++
 examples/includes/devel/pkglist.xml                | 12 +++++++
 examples/includes/prod/finetuning.xml              |  6 ++++
 examples/includes/prod/hostname.xml                |  2 ++
 examples/includes/prod/part.xml                    | 10 ++++++
 examples/includes/prod/pkglist.xml                 | 11 ++++++
 .../x86_32-pc-hdimg-with-include-development.xml   | 39 ++++++++++++++++++++++
 .../x86_32-pc-hdimg-with-include-production.xml    | 39 ++++++++++++++++++++++
 10 files changed, 136 insertions(+)
 create mode 100644 examples/includes/devel/finetuning.xml
 create mode 100644 examples/includes/devel/hostname.xml
 create mode 100644 examples/includes/devel/part.xml
 create mode 100644 examples/includes/devel/pkglist.xml
 create mode 100644 examples/includes/prod/finetuning.xml
 create mode 100644 examples/includes/prod/hostname.xml
 create mode 100644 examples/includes/prod/part.xml
 create mode 100644 examples/includes/prod/pkglist.xml
 create mode 100644 examples/x86_32-pc-hdimg-with-include-development.xml
 create mode 100644 examples/x86_32-pc-hdimg-with-include-production.xml

diff --git a/examples/includes/devel/finetuning.xml b/examples/includes/devel/finetuning.xml
new file mode 100644
index 0000000..457a8af
--- /dev/null
+++ b/examples/includes/devel/finetuning.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<finetuning>
+  <adduser shell="/bin/bash" passwd="notsosecure">user</adduser>
+  <rm>var/cache/apt/archives/*.deb</rm>
+</finetuning>
diff --git a/examples/includes/devel/hostname.xml b/examples/includes/devel/hostname.xml
new file mode 100644
index 0000000..b3f0f98
--- /dev/null
+++ b/examples/includes/devel/hostname.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<hostname>i386-stretch-devel</hostname>
diff --git a/examples/includes/devel/part.xml b/examples/includes/devel/part.xml
new file mode 100644
index 0000000..cba2ae0
--- /dev/null
+++ b/examples/includes/devel/part.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<msdoshd>
+  <name>sda.img</name>
+  <size>4000MiB</size>
+  <grub-install/>
+  <partition>
+    <size>remain</size>
+    <label>rfs</label>
+  </partition>
+</msdoshd>
diff --git a/examples/includes/devel/pkglist.xml b/examples/includes/devel/pkglist.xml
new file mode 100644
index 0000000..c0332f7
--- /dev/null
+++ b/examples/includes/devel/pkglist.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+
+<pkg-list>
+  <pkg>linux-image-686-pae</pkg>
+  <pkg>grub-pc</pkg>
+  <pkg>xserver-xorg-video-radeon</pkg>
+  <pkg>xserver-xorg-core</pkg>
+  <pkg>mono-runtime</pkg>
+  <pkg>slim</pkg>
+  <pkg>awesome</pkg>
+  <pkg>libxml2-dev</pkg>
+</pkg-list>
diff --git a/examples/includes/prod/finetuning.xml b/examples/includes/prod/finetuning.xml
new file mode 100644
index 0000000..00f7254
--- /dev/null
+++ b/examples/includes/prod/finetuning.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<finetuning>
+  <adduser shell="/bin/bash" passwd="supersecure">user</adduser>
+  <raw_cmd>passwd -d -l root</raw_cmd>
+  <rm>var/cache/apt/archives/*.deb</rm>
+</finetuning>
diff --git a/examples/includes/prod/hostname.xml b/examples/includes/prod/hostname.xml
new file mode 100644
index 0000000..b271560
--- /dev/null
+++ b/examples/includes/prod/hostname.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<hostname>i386-stretch-prod</hostname>
diff --git a/examples/includes/prod/part.xml b/examples/includes/prod/part.xml
new file mode 100644
index 0000000..0b94fe1
--- /dev/null
+++ b/examples/includes/prod/part.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<msdoshd>
+  <name>sda.img</name>
+  <size>1900MiB</size>
+  <grub-install/>
+  <partition>
+    <size>remain</size>
+    <label>rfs</label>
+  </partition>
+</msdoshd>
diff --git a/examples/includes/prod/pkglist.xml b/examples/includes/prod/pkglist.xml
new file mode 100644
index 0000000..ddde9c5
--- /dev/null
+++ b/examples/includes/prod/pkglist.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+
+<pkg-list>
+  <pkg>linux-image-686-pae</pkg>
+  <pkg>grub-pc</pkg>
+  <pkg>xserver-xorg-video-radeon</pkg>
+  <pkg>xserver-xorg-core</pkg>
+  <pkg>mono-runtime</pkg>
+  <pkg>slim</pkg>
+  <pkg>awesome</pkg>
+</pkg-list>
diff --git a/examples/x86_32-pc-hdimg-with-include-development.xml b/examples/x86_32-pc-hdimg-with-include-development.xml
new file mode 100644
index 0000000..ac9aa59
--- /dev/null
+++ b/examples/x86_32-pc-hdimg-with-include-development.xml
@@ -0,0 +1,39 @@
+<ns0:RootFileSystem xmlns:ns0="https://www.linutronix.de/projects/Elbe"
+		    xmlns:xi="http://www.w3.org/2003/XInclude"
+		    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		    created="2009-05-20T08:50:56" revision="6"
+		    xsi:schemaLocation="https://www.linutronix.de/projects/Elbe dbsfed.xsd">
+	<project>
+		<name>i386-stretch-grub</name>
+		<version>1.0</version>
+		<description>for testing 32bit with grub2</description>
+		<buildtype>i386</buildtype>
+		<mirror>
+			<primary_host>ftp.de.debian.org</primary_host>
+			<primary_path>/debian</primary_path>
+			<primary_proto>http</primary_proto>
+		</mirror>
+		<suite>stretch</suite>
+	</project>
+	<target>
+		<xi:include href="includes/devel/hostname.xml"/>
+		<domain>elbe-rfs.org</domain>
+		<passwd>foo</passwd>
+		<console>ttyS0,115200</console>
+		<images>
+			<xi:include href="includes/devel/part.xml"/>
+		</images>
+		<fstab>
+			<bylabel>
+				<label>rfs</label>
+				<mountpoint>/</mountpoint>
+				<fs>
+					<type>ext4</type>
+					<tune2fs>-i 0</tune2fs>
+				</fs>
+			</bylabel>
+		</fstab>
+		<xi:include href="includes/devel/finetuning.xml"/>
+		<xi:include href="includes/devel/pkglist.xml"/>
+	</target>
+</ns0:RootFileSystem>
diff --git a/examples/x86_32-pc-hdimg-with-include-production.xml b/examples/x86_32-pc-hdimg-with-include-production.xml
new file mode 100644
index 0000000..5e41b15
--- /dev/null
+++ b/examples/x86_32-pc-hdimg-with-include-production.xml
@@ -0,0 +1,39 @@
+<ns0:RootFileSystem xmlns:ns0="https://www.linutronix.de/projects/Elbe"
+		    xmlns:xi="http://www.w3.org/2003/XInclude"
+		    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		    created="2009-05-20T08:50:56" revision="6"
+		    xsi:schemaLocation="https://www.linutronix.de/projects/Elbe dbsfed.xsd">
+	<project>
+		<name>i386-stretch-grub</name>
+		<version>1.0</version>
+		<description>for testing 32bit with grub2</description>
+		<buildtype>i386</buildtype>
+		<mirror>
+			<primary_host>ftp.de.debian.org</primary_host>
+			<primary_path>/debian</primary_path>
+			<primary_proto>http</primary_proto>
+		</mirror>
+		<suite>stretch</suite>
+	</project>
+	<target>
+		<xi:include href="includes/prod/hostname.xml"/>
+		<domain>elbe-rfs.org</domain>
+		<passwd>foo</passwd>
+		<console>ttyS0,115200</console>
+		<images>
+			<xi:include href="includes/prod/part.xml"/>
+		</images>
+		<fstab>
+			<bylabel>
+				<label>rfs</label>
+				<mountpoint>/</mountpoint>
+				<fs>
+					<type>ext4</type>
+					<tune2fs>-i 0</tune2fs>
+				</fs>
+			</bylabel>
+		</fstab>
+		<xi:include href="includes/prod/finetuning.xml"/>
+		<xi:include href="includes/prod/pkglist.xml"/>
+	</target>
+</ns0:RootFileSystem>
-- 
2.11.0





More information about the elbe-devel mailing list