Skip to content

Commit

Permalink
Merge pull request #71 from OSInside/fix_ubuntu_box_description
Browse files Browse the repository at this point in the history
Fix Ubuntu box build
  • Loading branch information
schaefi authored Aug 5, 2024
2 parents f4c92d1 + 1ec1f39 commit 41d4a2e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
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

0 comments on commit 41d4a2e

Please sign in to comment.