stx-anaconda-image: add comps.xml and stx_base_list for kickstart files

After copy the kickstart files from target build, get the
package list from stx_base_list file and add them into
the %packages section in all the kickstart files, so these
packages will be installed for all roles.

Story: 2009305
Task: 43677

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I5d9f85a40eea559ba9f35bd7868c4c11dd4543e3
This commit is contained in:
Jackie Huang 2021-10-20 14:01:34 +08:00
parent 40c06d1576
commit 936cff6992
2 changed files with 284 additions and 4 deletions

View File

@ -16,10 +16,15 @@ KICKSTART_FILE ??= ""
KICKSTART_FILE_EXTRA ??= ""
WRL_INSTALLER_CONF ?= ""
REPODATA_COMPS = "${LAYER_PATH_meta-stx-distro}/conf/distro/files/comps.xml"
# Extra packages that will be added in the rpm repo in anaconda installer ISO image
REPO_EXTRA_PKG = "\
xfsprogs-* \
glibc-binary-localedata-* \
packagegroup-stx-*-standalone-* \
platform-util-noncontroller-* \
workerconfig-standalone-* \
xfsprogs-* \
"
build_iso_prepend() {
@ -99,8 +104,8 @@ wrl_installer_copy_local_repos() {
fi
done
cd ${deploy_dir_rpm}
set -x
cd ${deploy_dir_rpm}
# Add the packages in target image pkglist
cat ${target_image_input_pkglist} > ${target_image_output_pkglist}.tmp
@ -108,7 +113,7 @@ wrl_installer_copy_local_repos() {
for pkgs in ${REPO_EXTRA_PKG}; do
pkg_files=$(find . -type f -name ${pkgs})
if [ -z "${pkg_files}" ]; then
bbwarn "Package ${pkgs} not found, please check if there is anything wrong or just remove it from the list."
bbwarn "Package ${pkgs} not found, please check if there is anything wrong or just remove it from the list REPO_EXTRA_PKG."
else
for pkg_file in ${pkg_files}; do
basename ${pkg_file} >> ${target_image_output_pkglist}.tmp
@ -130,7 +135,7 @@ wrl_installer_copy_local_repos() {
done
cd -
createrepo_c --update -q ${IMAGE_ROOTFS}/Packages.$prj_name/
createrepo_c --update -q -g ${REPODATA_COMPS} ${IMAGE_ROOTFS}/Packages.$prj_name/
fi
}
@ -293,17 +298,24 @@ _EOF
exit 1
fi
target_image_input_stx_base_list=$(sed -n 's/^STX_BASE_LIST="\(.*\)"/\1/p' ${target_build}/installersupport_${target_image})
if [ ! -f ${target_image_input_stx_base_list} ]; then
bberror "The target stx_base_list file '${target_image_input_stx_base_list}' doesn't exist!"
fi
ks_cfg="${INSTALLER_CONFDIR}/ks.cfg.$prj_name"
if [ -n "${KICKSTART_FILE}" ]; then
ks_file="`echo ${KICKSTART_FILE} | awk '{print $'"$counter"'}'`"
bbnote "Copying kickstart file $ks_file to $ks_cfg ..."
mkdir -p ${INSTALLER_CONFDIR}
cp $ks_file $ks_cfg
sed -i -e "/@STX_BASE@/ r ${target_image_input_stx_base_list}" -e '/@STX_BASE@/d' $ks_cfg
fi
if [ -n "${KICKSTART_FILE_EXTRA}" ]; then
for ks_file in ${KICKSTART_FILE_EXTRA}; do
if [ -f $ks_file ]; then
cp $ks_file ${INSTALLER_CONFDIR}
sed -i -e "/@STX_BASE@/ r ${target_image_input_stx_base_list}" -e '/@STX_BASE@/d' ${INSTALLER_CONFDIR}/*.cfg
else
bbwarn "The kickstart file $ks_file in KICKSTART_FILE_EXTRA doesn't exist!"
fi

View File

@ -0,0 +1,268 @@
<?xml version='1.0' encoding='UTF-8'?>
<comps>
<group><id>platform-controller</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>platform-controller</name>
<description>Platform packages for controller</description>
<packagelist><packagereq type="mandatory">kernel-dev</packagereq>
<packagereq type="mandatory">packagegroup-basic</packagereq>
<packagereq type="mandatory">packagegroup-core-base-utils</packagereq>
<packagereq type="mandatory">packagegroup-core-full-cmdline</packagereq>
<packagereq type="mandatory">packagegroup-core-lsb</packagereq>
<packagereq type="mandatory">packagegroup-stx-armada-app</packagereq>
<packagereq type="mandatory">packagegroup-stx-armada-app-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-config</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-files</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-files-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-distributedcloud</packagereq>
<packagereq type="mandatory">packagegroup-stx-distributedcloud-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-fault</packagereq>
<packagereq type="mandatory">packagegroup-stx-fault-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-ha</packagereq>
<packagereq type="mandatory">packagegroup-stx-ha-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-integ</packagereq>
<packagereq type="mandatory">packagegroup-stx-integ-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-metal</packagereq>
<packagereq type="mandatory">packagegroup-stx-metal-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-monitoring</packagereq>
<packagereq type="mandatory">packagegroup-stx-monitoring-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-nfv-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-puppet</packagereq>
<packagereq type="mandatory">packagegroup-stx-update</packagereq>
<packagereq type="mandatory">packagegroup-stx-update-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-upstream</packagereq>
<packagereq type="mandatory">packagegroup-stx-upstream-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-utilities</packagereq>
<packagereq type="mandatory">packagegroup-stx-utilities-controller</packagereq>
<packagereq type="mandatory">rt-tests</packagereq>
<packagereq type="mandatory">starlingx-dashboard</packagereq>
</packagelist>
</group>
<group><id>platform-controller-worker</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>platform-controller-worker</name>
<description>Platform packages for controller-worker</description>
<packagelist><packagereq type="mandatory">kernel-dev</packagereq>
<packagereq type="mandatory">packagegroup-basic</packagereq>
<packagereq type="mandatory">packagegroup-core-base-utils</packagereq>
<packagereq type="mandatory">packagegroup-core-full-cmdline</packagereq>
<packagereq type="mandatory">packagegroup-core-lsb</packagereq>
<packagereq type="mandatory">packagegroup-stx-armada-app</packagereq>
<packagereq type="mandatory">packagegroup-stx-armada-app-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-config</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-files</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-files-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-distributedcloud</packagereq>
<packagereq type="mandatory">packagegroup-stx-distributedcloud-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-fault</packagereq>
<packagereq type="mandatory">packagegroup-stx-fault-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-ha</packagereq>
<packagereq type="mandatory">packagegroup-stx-ha-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-integ</packagereq>
<packagereq type="mandatory">packagegroup-stx-integ-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-metal</packagereq>
<packagereq type="mandatory">packagegroup-stx-metal-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-monitoring</packagereq>
<packagereq type="mandatory">packagegroup-stx-monitoring-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-nfv-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-puppet</packagereq>
<packagereq type="mandatory">packagegroup-stx-storage</packagereq>
<packagereq type="mandatory">packagegroup-stx-update</packagereq>
<packagereq type="mandatory">packagegroup-stx-update-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-upstream</packagereq>
<packagereq type="mandatory">packagegroup-stx-upstream-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-utilities</packagereq>
<packagereq type="mandatory">packagegroup-stx-utilities-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-worker</packagereq>
<packagereq type="mandatory">rt-tests</packagereq>
<packagereq type="mandatory">starlingx-dashboard</packagereq>
</packagelist>
</group>
<group><id>platform-controller-worker-lowlatency</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>platform-controller-worker-lowlatency</name>
<description>Platform packages for controller-worker-lowlatency</description>
<packagelist><packagereq type="mandatory">kernel-dev</packagereq>
<packagereq type="mandatory">packagegroup-basic</packagereq>
<packagereq type="mandatory">packagegroup-core-base-utils</packagereq>
<packagereq type="mandatory">packagegroup-core-full-cmdline</packagereq>
<packagereq type="mandatory">packagegroup-core-lsb</packagereq>
<packagereq type="mandatory">packagegroup-stx-armada-app</packagereq>
<packagereq type="mandatory">packagegroup-stx-armada-app-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-config</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-files</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-files-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-distributedcloud</packagereq>
<packagereq type="mandatory">packagegroup-stx-distributedcloud-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-fault</packagereq>
<packagereq type="mandatory">packagegroup-stx-fault-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-ha</packagereq>
<packagereq type="mandatory">packagegroup-stx-ha-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-integ</packagereq>
<packagereq type="mandatory">packagegroup-stx-integ-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-metal</packagereq>
<packagereq type="mandatory">packagegroup-stx-metal-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-monitoring</packagereq>
<packagereq type="mandatory">packagegroup-stx-monitoring-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-nfv-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-puppet</packagereq>
<packagereq type="mandatory">packagegroup-stx-storage</packagereq>
<packagereq type="mandatory">packagegroup-stx-update</packagereq>
<packagereq type="mandatory">packagegroup-stx-update-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-upstream</packagereq>
<packagereq type="mandatory">packagegroup-stx-upstream-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-utilities</packagereq>
<packagereq type="mandatory">packagegroup-stx-utilities-controller</packagereq>
<packagereq type="mandatory">packagegroup-stx-worker</packagereq>
<packagereq type="mandatory">rt-tests</packagereq>
<packagereq type="mandatory">starlingx-dashboard</packagereq>
</packagelist>
</group>
<group><id>platform-worker</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>platform-worker</name>
<description>Platform packages for worker</description>
<packagelist><packagereq type="mandatory">kernel-dev</packagereq>
<packagereq type="mandatory">packagegroup-basic</packagereq>
<packagereq type="mandatory">packagegroup-core-base-utils</packagereq>
<packagereq type="mandatory">packagegroup-core-full-cmdline</packagereq>
<packagereq type="mandatory">packagegroup-core-lsb</packagereq>
<packagereq type="mandatory">packagegroup-stx-armada-app</packagereq>
<packagereq type="mandatory">packagegroup-stx-config</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-files</packagereq>
<packagereq type="mandatory">packagegroup-stx-distributedcloud</packagereq>
<packagereq type="mandatory">packagegroup-stx-fault</packagereq>
<packagereq type="mandatory">packagegroup-stx-ha</packagereq>
<packagereq type="mandatory">packagegroup-stx-integ</packagereq>
<packagereq type="mandatory">packagegroup-stx-metal</packagereq>
<packagereq type="mandatory">packagegroup-stx-monitoring</packagereq>
<packagereq type="mandatory">packagegroup-stx-puppet</packagereq>
<packagereq type="mandatory">packagegroup-stx-update</packagereq>
<packagereq type="mandatory">packagegroup-stx-upstream</packagereq>
<packagereq type="mandatory">packagegroup-stx-utilities</packagereq>
<packagereq type="mandatory">packagegroup-stx-worker</packagereq>
<packagereq type="mandatory">packagegroup-stx-worker-standalone</packagereq>
<packagereq type="mandatory">rt-tests</packagereq>
</packagelist>
</group>
<group><id>platform-worker-lowlatency</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>platform-worker-lowlatency</name>
<description>Platform packages for worker-lowlatency</description>
<packagelist><packagereq type="mandatory">kernel-dev</packagereq>
<packagereq type="mandatory">packagegroup-basic</packagereq>
<packagereq type="mandatory">packagegroup-core-base-utils</packagereq>
<packagereq type="mandatory">packagegroup-core-full-cmdline</packagereq>
<packagereq type="mandatory">packagegroup-core-lsb</packagereq>
<packagereq type="mandatory">packagegroup-stx-armada-app</packagereq>
<packagereq type="mandatory">packagegroup-stx-config</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-files</packagereq>
<packagereq type="mandatory">packagegroup-stx-distributedcloud</packagereq>
<packagereq type="mandatory">packagegroup-stx-fault</packagereq>
<packagereq type="mandatory">packagegroup-stx-ha</packagereq>
<packagereq type="mandatory">packagegroup-stx-integ</packagereq>
<packagereq type="mandatory">packagegroup-stx-metal</packagereq>
<packagereq type="mandatory">packagegroup-stx-monitoring</packagereq>
<packagereq type="mandatory">packagegroup-stx-puppet</packagereq>
<packagereq type="mandatory">packagegroup-stx-update</packagereq>
<packagereq type="mandatory">packagegroup-stx-upstream</packagereq>
<packagereq type="mandatory">packagegroup-stx-utilities</packagereq>
<packagereq type="mandatory">packagegroup-stx-worker</packagereq>
<packagereq type="mandatory">packagegroup-stx-worker-standalone</packagereq>
<packagereq type="mandatory">rt-tests</packagereq>
</packagelist>
</group>
<group><id>platform-storage</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>platform-storage</name>
<description>Platform packages for storage</description>
<packagelist><packagereq type="mandatory">kernel-dev</packagereq>
<packagereq type="mandatory">packagegroup-basic</packagereq>
<packagereq type="mandatory">packagegroup-core-base-utils</packagereq>
<packagereq type="mandatory">packagegroup-core-full-cmdline</packagereq>
<packagereq type="mandatory">packagegroup-core-lsb</packagereq>
<packagereq type="mandatory">packagegroup-stx-armada-app</packagereq>
<packagereq type="mandatory">packagegroup-stx-config</packagereq>
<packagereq type="mandatory">packagegroup-stx-config-files</packagereq>
<packagereq type="mandatory">packagegroup-stx-distributedcloud</packagereq>
<packagereq type="mandatory">packagegroup-stx-fault</packagereq>
<packagereq type="mandatory">packagegroup-stx-ha</packagereq>
<packagereq type="mandatory">packagegroup-stx-integ</packagereq>
<packagereq type="mandatory">packagegroup-stx-metal</packagereq>
<packagereq type="mandatory">packagegroup-stx-monitoring</packagereq>
<packagereq type="mandatory">packagegroup-stx-puppet</packagereq>
<packagereq type="mandatory">packagegroup-stx-storage</packagereq>
<packagereq type="mandatory">packagegroup-stx-storage-standalone</packagereq>
<packagereq type="mandatory">packagegroup-stx-update</packagereq>
<packagereq type="mandatory">packagegroup-stx-upstream</packagereq>
<packagereq type="mandatory">packagegroup-stx-utilities</packagereq>
<packagereq type="mandatory">rt-tests</packagereq>
</packagelist>
</group>
<group><id>updates-controller</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>updates-controller</name>
<description>Patches for controller</description>
<packagelist />
</group>
<group><id>updates-controller-worker</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>updates-controller-worker</name>
<description>Patches for controller-worker</description>
<packagelist />
</group>
<group><id>updates-controller-worker-lowlatency</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>updates-controller-worker-lowlatency</name>
<description>Patches for controller-worker-lowlatency</description>
<packagelist />
</group>
<group><id>updates-worker</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>updates-worker</name>
<description>Patches for worker</description>
<packagelist />
</group>
<group><id>updates-worker-lowlatency</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>updates-worker-lowlatency</name>
<description>Patches for worker-lowlatency</description>
<packagelist />
</group>
<group><id>updates-storage</id>
<default>false</default>
<uservisible>true</uservisible>
<display_order>1024</display_order>
<name>updates-storage</name>
<description>Patches for storage</description>
<packagelist />
</group>
</comps>