diff --git a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in index 50673b230c..cc0fed0190 100644 --- a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in +++ b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in @@ -11,6 +11,9 @@ FROM ${IMAGE_REGISTRY}/ubuntu:@OS_VERSION@ # This dockerfile needs to provide all the componets need to build a rootfs # Install any package need to create a rootfs (package manager, extra tools) +# Avoid tzdata setup +ENV DEBIAN_FRONTEND noninteractive + # RUN commands RUN apt-get update && apt-get install -y \ autoconf \ diff --git a/tools/osbuilder/rootfs-builder/ubuntu/config.sh b/tools/osbuilder/rootfs-builder/ubuntu/config.sh index 20138d145c..d1e0b699d0 100644 --- a/tools/osbuilder/rootfs-builder/ubuntu/config.sh +++ b/tools/osbuilder/rootfs-builder/ubuntu/config.sh @@ -7,12 +7,13 @@ # loaded just before call the function. For more information see the # rootfs-builder/README.md file. -OS_VERSION=${OS_VERSION:-18.04} -# this should be ubuntu's codename eg bionic for 18.04 -OS_NAME=${OS_NAME:-"bionic"} +OS_VERSION=${OS_VERSION:-20.04} +# This should be Ubuntu's code name, e.g. "focal" (Focal Fossa) for 20.04 +OS_NAME=${OS_NAME:-"focal"} # packages to be installed by default -PACKAGES="systemd iptables init chrony kmod" +PACKAGES="systemd iptables init kmod" +EXTRA_PKGS+=" chrony" DEBOOTSTRAP=${PACKAGE_MANAGER:-"debootstrap"} diff --git a/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh b/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh index e773c62a8f..e94df355db 100644 --- a/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh +++ b/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh @@ -59,19 +59,10 @@ build_rootfs() { fi # trim whitespace PACKAGES=$(echo $PACKAGES |xargs ) - EXTRA_PKGS=$(echo $EXTRA_PKGS |xargs) # add comma as debootstrap needs , separated package names. # Don't change $PACKAGES in config.sh to include ',' # This is done to maintain consistency PACKAGES=$(echo $PACKAGES | sed -e 's/ /,/g' ) - EXTRA_PKGS=$(echo $EXTRA_PKGS | sed -e 's/ /,/g' ) - - # extra packages are added to packages and finally passed to debootstrap - if [ "${EXTRA_PKGS}" = "" ]; then - echo "no extra packages" - else - PACKAGES="${PACKAGES},${EXTRA_PKGS}" - fi ${PKG_MANAGER} --variant=minbase \ --arch=${ARCHITECTURE}\ @@ -79,7 +70,7 @@ build_rootfs() { ${OS_NAME} \ ${ROOTFS_DIR} - chroot $ROOTFS_DIR ln -s /lib/systemd/systemd /usr/lib/systemd/systemd + [ -n "${EXTRA_PKGS}" ] && chroot $ROOTFS_DIR apt-get install -y ${EXTRA_PKGS} # Reduce image size and memory footprint # removing not needed files and directories.