From 87af599dd04e2173f13516cab9e46cfbbc069bff Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Thu, 8 Aug 2019 20:12:03 +0000 Subject: [PATCH 1/2] rootfs-builder/clearlinux: reduce image size when AGENT_INIT=yes Don't install chrony, iptables-bin and util-linux-bin when AGENT_INIT=yes, these packages are only needed when the init process is systemd. Signed-off-by: Julio Montes --- rootfs-builder/clearlinux/config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs-builder/clearlinux/config.sh b/rootfs-builder/clearlinux/config.sh index 7b3b95426..7c8484efe 100644 --- a/rootfs-builder/clearlinux/config.sh +++ b/rootfs-builder/clearlinux/config.sh @@ -15,12 +15,12 @@ clr_url="https://download.clearlinux.org" BASE_URL="${clr_url}/releases/${OS_VERSION}/${REPO_NAME}/${ARCH}/os/" -PACKAGES="util-linux-bin iptables-bin libudev0-shim chrony" +PACKAGES="libudev0-shim" #Optional packages: # systemd: An init system that will start kata-agent if kata-agent # itself is not configured as init process. -[ "$AGENT_INIT" == "no" ] && PACKAGES+=" systemd" || true +[ "$AGENT_INIT" == "no" ] && PACKAGES+=" systemd chrony iptables-bin util-linux-bin" || true # Init process must be one of {systemd,kata-agent} INIT_PROCESS=systemd From 495a92d2c3bfb9a3edba1208b2a5198adcb0aa3c Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Thu, 8 Aug 2019 20:28:59 +0000 Subject: [PATCH 2/2] rootfs-builder: add kmod package Support for loading kernel modules got merged. kmod package is needed for loading kernel modules in the guest. fixes #341 Signed-off-by: Julio Montes --- rootfs-builder/clearlinux/config.sh | 2 +- rootfs-builder/debian/config.sh | 2 +- rootfs-builder/ubuntu/config.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rootfs-builder/clearlinux/config.sh b/rootfs-builder/clearlinux/config.sh index 7c8484efe..c26cc049a 100644 --- a/rootfs-builder/clearlinux/config.sh +++ b/rootfs-builder/clearlinux/config.sh @@ -15,7 +15,7 @@ clr_url="https://download.clearlinux.org" BASE_URL="${clr_url}/releases/${OS_VERSION}/${REPO_NAME}/${ARCH}/os/" -PACKAGES="libudev0-shim" +PACKAGES="libudev0-shim kmod-bin" #Optional packages: # systemd: An init system that will start kata-agent if kata-agent diff --git a/rootfs-builder/debian/config.sh b/rootfs-builder/debian/config.sh index 9eb022e66..38e2ee5b9 100644 --- a/rootfs-builder/debian/config.sh +++ b/rootfs-builder/debian/config.sh @@ -8,7 +8,7 @@ OS_VERSION=${OS_VERSION:-9.5} # Set OS_NAME to the desired debian "codename" OS_NAME=${OS_NAME:-"stretch"} -PACKAGES="systemd iptables init chrony" +PACKAGES="systemd iptables init chrony kmod" # NOTE: Re-using ubuntu rootfs configuration, see 'ubuntu' folder for full content. source $script_dir/ubuntu/$CONFIG_SH diff --git a/rootfs-builder/ubuntu/config.sh b/rootfs-builder/ubuntu/config.sh index f2247e4ae..20138d145 100644 --- a/rootfs-builder/ubuntu/config.sh +++ b/rootfs-builder/ubuntu/config.sh @@ -12,7 +12,7 @@ OS_VERSION=${OS_VERSION:-18.04} OS_NAME=${OS_NAME:-"bionic"} # packages to be installed by default -PACKAGES="systemd iptables init chrony" +PACKAGES="systemd iptables init chrony kmod" DEBOOTSTRAP=${PACKAGE_MANAGER:-"debootstrap"}