From 03ce297ae817e8c39764c849c42a2575b005991d Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Tue, 18 Apr 2023 09:58:39 +0200 Subject: [PATCH] create-install-iso: use config files for yumdownloader Shares repo definition with create-installimg, as allowed by the switch away from Mock. --- README-iso.md | 4 ++-- configs/8.2.testing/yumdl.conf.tmpl | 3 +++ configs/8.2.testing/yumdl.flags | 3 +++ configs/8.2.updates/yumdl.conf.tmpl | 3 +++ configs/8.2.updates/yumdl.flags | 3 +++ configs/8.3.0/yumdl.conf.tmpl | 3 +++ configs/8.3.0/yumdl.flags | 3 +++ configs/8.3.testing/yumdl.conf.tmpl | 3 +++ configs/8.3.testing/yumdl.flags | 3 +++ configs/8.3.updates/yumdl.conf.tmpl | 3 +++ configs/8.3.updates/yumdl.flags | 3 +++ iso/8.3.updates | 1 + scripts/lib/misc.sh | 29 +++++++++-------------------- 13 files changed, 42 insertions(+), 22 deletions(-) create mode 100644 configs/8.2.testing/yumdl.conf.tmpl create mode 100644 configs/8.2.testing/yumdl.flags create mode 100644 configs/8.2.updates/yumdl.conf.tmpl create mode 100644 configs/8.2.updates/yumdl.flags create mode 100644 configs/8.3.0/yumdl.conf.tmpl create mode 100644 configs/8.3.0/yumdl.flags create mode 100644 configs/8.3.testing/yumdl.conf.tmpl create mode 100644 configs/8.3.testing/yumdl.flags create mode 100644 configs/8.3.updates/yumdl.conf.tmpl create mode 100644 configs/8.3.updates/yumdl.flags create mode 120000 iso/8.3.updates diff --git a/README-iso.md b/README-iso.md index dfa202b..11e567d 100644 --- a/README-iso.md +++ b/README-iso.md @@ -58,8 +58,8 @@ sudo ./scripts/create-installimg.sh \ ./scripts/create-install-iso.sh \ --srcurl file://$HOME/mirrors/xcpng/8.2 \ - -V "XCP-NG_821_TEST" \ - 8.2.1 install-8.2.updates-x86_64.img xcp-ng-8.2.1-install.iso + -V "XCP-NG_82U_TEST" \ + 8.2.updates install-8.2.updates-x86_64.img xcp-ng-8.2.updates-install.iso ``` ### testing boot modes in qemu diff --git a/configs/8.2.testing/yumdl.conf.tmpl b/configs/8.2.testing/yumdl.conf.tmpl new file mode 100644 index 0000000..55e42a2 --- /dev/null +++ b/configs/8.2.testing/yumdl.conf.tmpl @@ -0,0 +1,3 @@ +[main] +plugins=@@ENABLE_PLUGINS@@ +basearch=@@RPMARCH@@ diff --git a/configs/8.2.testing/yumdl.flags b/configs/8.2.testing/yumdl.flags new file mode 100644 index 0000000..8b2495d --- /dev/null +++ b/configs/8.2.testing/yumdl.flags @@ -0,0 +1,3 @@ +YUMFLAGS+=( + --enablerepo='xcpng-base,xcpng-updates,xcpng-testing' +) diff --git a/configs/8.2.updates/yumdl.conf.tmpl b/configs/8.2.updates/yumdl.conf.tmpl new file mode 100644 index 0000000..55e42a2 --- /dev/null +++ b/configs/8.2.updates/yumdl.conf.tmpl @@ -0,0 +1,3 @@ +[main] +plugins=@@ENABLE_PLUGINS@@ +basearch=@@RPMARCH@@ diff --git a/configs/8.2.updates/yumdl.flags b/configs/8.2.updates/yumdl.flags new file mode 100644 index 0000000..552a3b8 --- /dev/null +++ b/configs/8.2.updates/yumdl.flags @@ -0,0 +1,3 @@ +YUMFLAGS+=( + --enablerepo='xcpng-base,xcpng-updates' +) diff --git a/configs/8.3.0/yumdl.conf.tmpl b/configs/8.3.0/yumdl.conf.tmpl new file mode 100644 index 0000000..55e42a2 --- /dev/null +++ b/configs/8.3.0/yumdl.conf.tmpl @@ -0,0 +1,3 @@ +[main] +plugins=@@ENABLE_PLUGINS@@ +basearch=@@RPMARCH@@ diff --git a/configs/8.3.0/yumdl.flags b/configs/8.3.0/yumdl.flags new file mode 100644 index 0000000..e80f7f1 --- /dev/null +++ b/configs/8.3.0/yumdl.flags @@ -0,0 +1,3 @@ +YUMFLAGS+=( + --enablerepo='xcpng-base' +) diff --git a/configs/8.3.testing/yumdl.conf.tmpl b/configs/8.3.testing/yumdl.conf.tmpl new file mode 100644 index 0000000..55e42a2 --- /dev/null +++ b/configs/8.3.testing/yumdl.conf.tmpl @@ -0,0 +1,3 @@ +[main] +plugins=@@ENABLE_PLUGINS@@ +basearch=@@RPMARCH@@ diff --git a/configs/8.3.testing/yumdl.flags b/configs/8.3.testing/yumdl.flags new file mode 100644 index 0000000..8b2495d --- /dev/null +++ b/configs/8.3.testing/yumdl.flags @@ -0,0 +1,3 @@ +YUMFLAGS+=( + --enablerepo='xcpng-base,xcpng-updates,xcpng-testing' +) diff --git a/configs/8.3.updates/yumdl.conf.tmpl b/configs/8.3.updates/yumdl.conf.tmpl new file mode 100644 index 0000000..55e42a2 --- /dev/null +++ b/configs/8.3.updates/yumdl.conf.tmpl @@ -0,0 +1,3 @@ +[main] +plugins=@@ENABLE_PLUGINS@@ +basearch=@@RPMARCH@@ diff --git a/configs/8.3.updates/yumdl.flags b/configs/8.3.updates/yumdl.flags new file mode 100644 index 0000000..552a3b8 --- /dev/null +++ b/configs/8.3.updates/yumdl.flags @@ -0,0 +1,3 @@ +YUMFLAGS+=( + --enablerepo='xcpng-base,xcpng-updates' +) diff --git a/iso/8.3.updates b/iso/8.3.updates new file mode 120000 index 0000000..9f4a0fb --- /dev/null +++ b/iso/8.3.updates @@ -0,0 +1 @@ +8.3.0 \ No newline at end of file diff --git a/scripts/lib/misc.sh b/scripts/lib/misc.sh index 6ea0c0c..91c2ace 100644 --- a/scripts/lib/misc.sh +++ b/scripts/lib/misc.sh @@ -98,23 +98,13 @@ setup_yum_download() { enable_plugins=0 fi - # FIXME gpgcheck - cat > "$YUMCONF" < "$YUMCONF" mkdir ${VERBOSE} "$DUMMYROOT/etc" YUMFLAGS=( ${VERBOSE} @@ -122,9 +112,8 @@ EOF --releasever="$DIST" --disablerepo="*" --installroot="$DUMMYROOT" - #--enablerepo='xcpng-base' - --enablerepo='xcpng-base,xcpng-updates,xcpng-testing' - ) + ) + . "$confdir/yumdl.flags" } get_rpms() {