osbuilder: Add CentOS Stream rootfs

to cover a Red Hat (adjacent) rootfs with great cross-platform compatibility
and a workable release cadence. The previous CentOS & Fedora workflows are
simplified.

Also remove unnecessary `/usr/share` files as on Ubuntu and mark Alpine
as unuspported on ppc64le (due to musl, for a while already).

Fixes: #3340
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
This commit is contained in:
Jakob Naucke
2021-12-22 19:06:26 +01:00
parent f10642c82b
commit 573a37b33b
6 changed files with 51 additions and 50 deletions

View File

@@ -57,36 +57,18 @@ check_root()
generate_dnf_config()
{
REPO_NAME=${REPO_NAME:-"base"}
CACHE_DIR=${CACHE_DIR:-"/var/cache/dnf"}
cat > "${DNF_CONF}" << EOF
[main]
cachedir=${CACHE_DIR}
logfile=${LOG_FILE}
keepcache=0
debuglevel=2
exactarch=1
obsoletes=1
plugins=0
installonly_limit=3
reposdir=/root/mash
retries=5
[base]
name=${OS_NAME}-${OS_VERSION} base
releasever=${OS_VERSION}
EOF
if [ "$BASE_URL" != "" ]; then
cat >> "${DNF_CONF}" << EOF
[base]
name=${OS_NAME}-${OS_VERSION} ${REPO_NAME}
failovermethod=priority
baseurl=${BASE_URL}
enabled=1
EOF
elif [ "$MIRROR_LIST" != "" ]; then
cat >> "${DNF_CONF}" << EOF
[base]
name=${OS_NAME}-${OS_VERSION} ${REPO_NAME}
mirrorlist=${MIRROR_LIST}
enabled=1
EOF
echo "baseurl=$BASE_URL" >> "$DNF_CONF"
elif [ "$METALINK" != "" ]; then
echo "metalink=$METALINK" >> "$DNF_CONF"
fi
if [ -n "$GPG_KEY_URL" ]; then
@@ -99,15 +81,6 @@ gpgkey=file://${CONFIG_DIR}/${GPG_KEY_FILE}
EOF
fi
if [ -n "$GPG_KEY_ARCH_URL" ]; then
if [ ! -f "${CONFIG_DIR}/${GPG_KEY_ARCH_FILE}" ]; then
curl -L "${GPG_KEY_ARCH_URL}" -o "${CONFIG_DIR}/${GPG_KEY_ARCH_FILE}"
fi
cat >> "${DNF_CONF}" << EOF
file://${CONFIG_DIR}/${GPG_KEY_ARCH_FILE}
EOF
fi
}
build_rootfs()
@@ -151,6 +124,8 @@ build_rootfs()
info "install packages for rootfs"
$DNF install ${EXTRA_PKGS} ${PACKAGES}
rm -rf ${ROOTFS_DIR}/usr/share/{bash-completion,cracklib,doc,info,locale,man,misc,pixmaps,terminfo,zoneinfo,zsh}
}
# Create a YAML metadata file inside the rootfs.