From adfa4ffd633fc955159807c80fce63c3413b5031 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Sat, 9 May 2020 11:54:06 +0800 Subject: [PATCH] poky_stx_aio_ks.cfg: fix for creating rpm repo - Update kickstart to generate DNF repo config files backport and ajust from: https://opendev.org/starlingx/metal/commit/09b95bf651c065e9fffae3255ecf0d0e52a61249 - Add a pre script to adjust the directoris since the anaconda image in poky has a different directory structure. Issue-ID: INF-95 Issue-ID: INF-101 Signed-off-by: Jackie Huang Change-Id: I5bd1664078882c6a2ac9c7310bd6bc44ed141b8e --- meta-stx/conf/distro/files/ks/poky_stx_aio_ks.cfg | 44 ++++++++++++++--------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/meta-stx/conf/distro/files/ks/poky_stx_aio_ks.cfg b/meta-stx/conf/distro/files/ks/poky_stx_aio_ks.cfg index e08d8fe..3fadb48 100644 --- a/meta-stx/conf/distro/files/ks/poky_stx_aio_ks.cfg +++ b/meta-stx/conf/distro/files/ks/poky_stx_aio_ks.cfg @@ -207,6 +207,16 @@ echo "bootloader --location=mbr $boot_device_arg --timeout=5 --append=\"$append\ echo "timezone --nontp --utc UTC" >/tmp/timezone-include %end +############################################################## +# pre script for poky-stx +############################################################## +%pre +mkdir -p /run/install/repo +cp installer-config/* /run/install/repo/ +rm -f /run/install/repo/Packages +ln -sf /Packages /run/install/repo/Packages +%end + ############################################################## # Main kickstart ############################################################## @@ -676,25 +686,26 @@ else fi . /etc/platform/platform.conf -# Configure smart package manager channels -rm -rf /var/lib/smart -mkdir /var/lib/smart -/usr/bin/smart channel -y \ - --add rpmdb type=rpm-sys name="RPM Database" -/usr/bin/smart channel -y \ - --add base type=rpm-md name="Base" baseurl=http://controller:${http_port:-8080}/feed/rel-19.12 -/usr/bin/smart channel -y \ - --add updates type=rpm-md name="Patches" baseurl=http://controller:${http_port:-8080}/updates/rel-19.12 - -# Configure smart to use rpm --nolinktos option -/usr/bin/smart config --set rpm-nolinktos=true - -# Configure smart to use rpm --nosignature option -/usr/bin/smart config --set rpm-check-signatures=false # Delete the CentOS yum repo files rm -f /etc/yum.repos.d/CentOS-* +# Create platform yum repo file +mkdir -p /etc/yum.repos.d +cat >/etc/yum.repos.d/platform.repo <