fixup UBI logic
This commit is contained in:
parent
414d2cf615
commit
94c0d094f7
@ -1,2 +1,3 @@
|
|||||||
export YUM="dnf"
|
export YUM="dnf"
|
||||||
export DNF_VAR_contentdir=stg/rocky
|
export DNF_VAR_contentdir=stg/rocky
|
||||||
|
export DIB_YUM_ROCKY_CONTAINER_TYPE="Base"
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
export YUM="microdnf"
|
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:
|
bash:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
binutils:
|
binutils:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
coreutils-single:
|
coreutils-single:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
crypto-policies-scripts:
|
crypto-policies-scripts:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
curl-minimal:
|
curl-minimal:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
findutils:
|
findutils:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
glibc-minimal-langpack:
|
glibc-minimal-langpack:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
gzip:
|
gzip:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
hostname:
|
hostname:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
less:
|
less:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
libcurl-minimal:
|
libcurl-minimal:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
libusbx:
|
libusbx:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
lsb_release:
|
lsb_release:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
rootfiles:
|
rootfiles:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
tar:
|
tar:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
usermode:
|
usermode:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
systemd-libs:
|
systemd-libs:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
vim-minimal:
|
vim-minimal:
|
||||||
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
when: DIB_YUM_ROCKY_CONTAINER_TYPE!='Minimal'
|
||||||
yum:
|
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
|
rm /etc/dnf/protected.d/sudo.conf
|
||||||
${YUM} clean all
|
${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
|
set -o pipefail
|
||||||
|
|
||||||
# Stay compatible
|
# Stay compatible
|
||||||
echo 'container' > /etc/dnf/vars/infra
|
echo "container-${DIB_YUM_ROCKY_CONTAINER_TYPE}" > /etc/dnf/vars/infra
|
||||||
|
|
||||||
#Generate installtime file record
|
#Generate installtime file record
|
||||||
/bin/date +%Y%m%d_%H%M > /etc/BUILDTIME
|
/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
|
rm -fr /usr/share/man
|
||||||
|
|
||||||
# Cleanup caches left by chroot
|
# 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/cache/dnf/*
|
||||||
rm -fr /var/lib/dnf/repos/*
|
rm -fr /var/lib/dnf/repos/*
|
||||||
rm -fr /run
|
rm -fr /run
|
||||||
|
Loading…
Reference in New Issue
Block a user