Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ubuntu box build #71

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions boxes/ubuntu/appliance.kiwi
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,15 @@
<archive name="box-key-unsafe.tgz"/>
</packages>
<packages type="bootstrap">
<package name="locales"/>
<package name="coreutils"/>
<package name="language-pack-en"/>
<package name="passwd"/>
<package name="base-passwd"/>
<package name="adduser"/>
<package name="debconf"/>
<package name="ca-certificates"/>
<package name="bash-completion"/>
<package name="apt-utils"/>
<package name="debconf-i18n"/>
<package name="libnss-nis"/>
<package name="libnss-nisplus"/>
<package name="libgpg-error-l10n"/>
<package name="uuid-runtime"/>
<package name="sensible-utils"/>
</packages>
</image>
31 changes: 31 additions & 0 deletions boxes/ubuntu/post_bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

set -ex

# Intermediate C locale setup
export LANG=C.UTF-8
export LANGUAGE=

# Intermediate Noninteractive debconf
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

# Download packages for which we need the script code
apt-get -q -c /kiwi_apt.conf -y --no-install-recommends install \
"-oDebug::pkgDPkgPm=1" "-oDPkg::Pre-Install-Pkgs::=cat >/tmp/postpacks" \
base-passwd

# Run package scripts for core OS packages which provides
# mandatory setup code in their pre/post scripts
export DPKG_ROOT=/
while read -r package;do
pushd "$(dirname "${package}")" || exit 1
if [ "$(basename "${package}")" = "base-passwd.deb" ];then
# Required to create passwd, groups, the root user...
dpkg -e "${package}"
test -e DEBIAN/preinst && bash DEBIAN/preinst install
test -e DEBIAN/postinst && bash DEBIAN/postinst
rm -rf DEBIAN
fi
popd || exit 1
done < /tmp/postpacks
rm -f /tmp/postpacks
Loading