summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-15 14:57:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-15 14:57:23 +0000
commit865eae9a669d35b7bec7197e2d98065fef67a272 (patch)
tree878072a32c97fb2680b7caf2077da7210c76eb5d
parentReleasing debian version 20221223-3. (diff)
downloadopen-infrastructure-compute-tools-865eae9a669d35b7bec7197e2d98065fef67a272.tar.xz
open-infrastructure-compute-tools-865eae9a669d35b7bec7197e2d98065fef67a272.zip
Cherry-picking patch to add host variable in preseed files.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/upstream/0001-host-variable.patch42
2 files changed, 43 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..efde17d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+upstream/0001-host-variable.patch
diff --git a/debian/patches/upstream/0001-host-variable.patch b/debian/patches/upstream/0001-host-variable.patch
new file mode 100644
index 0000000..53e9e6d
--- /dev/null
+++ b/debian/patches/upstream/0001-host-variable.patch
@@ -0,0 +1,42 @@
+Author: Daniel Baumann <daniel.baumann@progress-linux.org>
+Description: Adding host variable for preseed files.
+
+diff -Naurp open-infrastructure-compute-tools.orig/share/build-scripts/debconf open-infrastructure-compute-tools/share/build-scripts/debconf
+--- open-infrastructure-compute-tools.orig/share/build-scripts/debconf
++++ open-infrastructure-compute-tools/share/build-scripts/debconf
+@@ -123,6 +123,8 @@ then
+ exit 1
+ fi
+
++HOST="$(echo ${NAME} | cut -d. -f1)"
++
+ Mount ()
+ {
+ # Mounting rw bind mounts
+@@ -686,6 +688,7 @@ EOF
+
+ sed -e "s|@FILE@|${FILE}|g" \
+ -e "s|@NAME@|${NAME}|g" \
++ -e "s|@HOST@|${HOST}|g" \
+ -e "s|@IPV4_ADDRESS1@|${IPV4_ADDRESS1}|g" \
+ -e "s|@IPV4_ADDRESS1_PART1@|${IPV4_ADDRESS1_PART1}|g" \
+ -e "s|@IPV4_ADDRESS1_PART2@|${IPV4_ADDRESS1_PART2}|g" \
+@@ -1185,6 +1188,7 @@ trap 'Umount' EXIT HUP INT QUIT TERM
+ umask 0022
+
+ export NAME
++export HOST
+
+ Debconf
+
+diff -Naurp open-infrastructure-compute-tools.orig/share/build-scripts/debconf.d/0002-preseed-debconf open-infrastructure-compute-tools/share/build-scripts/debconf.d/0002-preseed-debconf
+--- open-infrastructure-compute-tools.orig/share/build-scripts/debconf.d/0002-preseed-debconf
++++ open-infrastructure-compute-tools/share/build-scripts/debconf.d/0002-preseed-debconf
+@@ -93,6 +93,7 @@ do
+ fi
+
+ sed -e "s|@NAME@|${NAME}|g" \
++ -e "s|@HOST@|${HOST}|g" \
+ -e "s|@IPV4_ADDRESS1@|${IPV4_ADDRESS1}|g" \
+ -e "s|@IPV4_ADDRESS1_PART1@|${IPV4_ADDRESS1_PART1}|g" \
+ -e "s|@IPV4_ADDRESS1_PART2@|${IPV4_ADDRESS1_PART2}|g" \