fixup UBI logic
This commit is contained in:
parent
414d2cf615
commit
94c0d094f7
@ -1,2 +1,3 @@
|
||||
export YUM="dnf"
|
||||
export DNF_VAR_contentdir=stg/rocky
|
||||
export DIB_YUM_ROCKY_CONTAINER_TYPE="Base"
|
||||
|
@ -1,2 +1,2 @@
|
||||
export YUM="microdnf"
|
||||
export DIB_YUM_ROCKY_CONTAINER_MINIMAL=1
|
||||
export DIB_YUM_ROCKY_CONTAINER_TYPE="Minimal"
|
||||
|
@ -0,0 +1 @@
|
||||
export DIB_YUM_ROCKY_CONTAINER_TYPE="UBI"
|
@ -1 +1 @@
|
||||
export DIB_YUM_ROCKY_CONTAINER_MINIMAL="${DIB_YUM_ROCKY_CONTAINER_MINIMAL:-0}"
|
||||
export DIB_YUM_ROCKY_CONTAINER_TYPE="${DIB_YUM_ROCKY_CONTAINER:-'Base'}"
|
||||
|
@ -1,39 +1,39 @@
|
||||
bash:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
binutils:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
coreutils-single:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
crypto-policies-scripts:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
curl-minimal:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
findutils:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
glibc-minimal-langpack:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
gzip:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
hostname:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
less:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
libcurl-minimal:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
libusbx:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
lsb_release:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
rootfiles:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
tar:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
usermode:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
systemd-libs:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
vim-minimal:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
yum:
|
||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||
|
||||
|
@ -8,4 +8,9 @@ set -o pipefail
|
||||
|
||||
rm /etc/dnf/protected.d/sudo.conf
|
||||
${YUM} clean all
|
||||
${YUM} -y remove sudo python3 python-unversioned-command python3-pyyaml expat python3-libs python3-setuptools-wheel python3-pip-wheel
|
||||
${YUM} -y remove sudo
|
||||
|
||||
|
||||
if [[ $DIB_YUM_ROCKY_CONTAINER_TYPE =~ (Base|Minimal) ]]; then
|
||||
${YUM} -y remove python3 python-unversioned-command python3-pyyaml expat python3-libs python3-setuptools-wheel python3-pip-wheel
|
||||
fi
|
||||
|
@ -7,7 +7,7 @@ set -eu
|
||||
set -o pipefail
|
||||
|
||||
# Stay compatible
|
||||
echo 'container' > /etc/dnf/vars/infra
|
||||
echo "container-${DIB_YUM_ROCKY_CONTAINER_TYPE}" > /etc/dnf/vars/infra
|
||||
|
||||
#Generate installtime file record
|
||||
/bin/date +%Y%m%d_%H%M > /etc/BUILDTIME
|
||||
@ -24,7 +24,7 @@ for dir in $(ls -d /usr/share/locale/* | grep -v 'en_US\|all_languages\|locale\.
|
||||
rm -fr /usr/share/man
|
||||
|
||||
# Cleanup caches left by chroot
|
||||
find /usr/lib* -type d -name __pycache__ -print0 | xargs --null -I {} rm -frv {}
|
||||
find /usr/lib* -type d -name __pycache__ -print0 | xargs --null -I {} rm -fr {}
|
||||
rm -fr /var/cache/dnf/*
|
||||
rm -fr /var/lib/dnf/repos/*
|
||||
rm -fr /run
|
||||
|
Loading…
Reference in New Issue
Block a user