diff --git a/tools/osbuilder/README.md b/tools/osbuilder/README.md index 6bdfa28f81..b97839361e 100644 --- a/tools/osbuilder/README.md +++ b/tools/osbuilder/README.md @@ -209,9 +209,9 @@ of the the osbuilder distributions. > Note: this table is not relevant for the dracut build method, since it supports any Linux distribution and architecture where dracut is available. -| |Alpine |Clear Linux |Debian/Ubuntu |openSUSE | -|-- |-- |-- |-- |-- | -|**ARM64** |:heavy_check_mark:| | |:heavy_check_mark:| -|**PPC64le**|:heavy_check_mark:| |:heavy_check_mark:|:heavy_check_mark:| -|**s390x** | | |:heavy_check_mark:| | -|**x86_64** |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| +| |Alpine |Clear Linux |Debian/Ubuntu | +|-- |-- |-- |-- | +|**ARM64** |:heavy_check_mark:| | | +|**PPC64le**|:heavy_check_mark:| |:heavy_check_mark:| +|**s390x** | | |:heavy_check_mark:| +|**x86_64** |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| diff --git a/tools/osbuilder/dockerfiles/QAT/README.md b/tools/osbuilder/dockerfiles/QAT/README.md index 0507f019f0..e4b902314d 100644 --- a/tools/osbuilder/dockerfiles/QAT/README.md +++ b/tools/osbuilder/dockerfiles/QAT/README.md @@ -9,7 +9,6 @@ to use the agent as the init. Because of this, alpine is not a valid base OS ima to use. The following rootfs OS's have been tested with this Dockerfile. * Clear Linux -* SUSE * Ubuntu The generated files will need to be copied and configured into your Kata Containers diff --git a/tools/osbuilder/rootfs-builder/suse/Dockerfile.in b/tools/osbuilder/rootfs-builder/suse/Dockerfile.in deleted file mode 100644 index b86086a7df..0000000000 --- a/tools/osbuilder/rootfs-builder/suse/Dockerfile.in +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (c) 2018 SUSE LLC -# -# SPDX-License-Identifier: Apache-2.0 - -ARG IMAGE_REGISTRY=docker.io -#suse: docker image to be used to create a rootfs -#@OS_VERSION@: Docker image version to build this dockerfile -FROM ${IMAGE_REGISTRY}/opensuse/leap:15.0 - -# 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) - -COPY install-packages.sh config.sh / -# RUN commands -RUN chmod +x /install-packages.sh; /install-packages.sh - -# This will install the proper packages to build Kata components -@INSTALL_MUSL@ -@INSTALL_RUST@ diff --git a/tools/osbuilder/rootfs-builder/suse/config.sh b/tools/osbuilder/rootfs-builder/suse/config.sh deleted file mode 100644 index 1ab7402bfc..0000000000 --- a/tools/osbuilder/rootfs-builder/suse/config.sh +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (c) 2018 SUSE LLC -# -# SPDX-License-Identifier: Apache-2.0 - -# May also be "Tumbleweed" -OS_DISTRO="Leap" - -# Leave this empty for distro "Tumbleweed" -OS_VERSION=${OS_VERSION:-15.0} - -OS_IDENTIFIER="$OS_DISTRO${OS_VERSION:+:$OS_VERSION}" - -# Extra packages to install in the rootfs -PACKAGES="systemd coreutils libudev1" - -# http or https -REPO_TRANSPORT="https" - -# Can specify an alternative domain -REPO_DOMAIN="download.opensuse.org" - -# Init process must be one of {systemd,kata-agent} -INIT_PROCESS=systemd -# List of zero or more architectures to exclude from build, -# as reported by `uname -m` -ARCH_EXCLUDE_LIST=() - -############################################################################### -# -# NOTE: you probably dont need to edit things below this -# - -SUSE_URL_BASE="${REPO_TRANSPORT}://${REPO_DOMAIN}" -SUSE_PATH_OSS="/distribution/${OS_DISTRO,,}/$OS_VERSION/repo/oss" -SUSE_PATH_UPDATE="/update/${OS_DISTRO,,}/$OS_VERSION/oss" - -arch="$(uname -m)" -case "$arch" in - x86_64) - REPO_URL_PORT="" - ;; - ppc|ppc64le) - REPO_URL_PORT="/ports/ppc" - ;; - aarch64) - REPO_URL_PORT="/ports/aarch64" - ;; - *) - die "Unsupported architecture: $arch" - ;; -esac -SUSE_FULLURL_OSS="${SUSE_URL_BASE}${REPO_URL_PORT}${SUSE_PATH_OSS}" -SUSE_FULLURL_UPDATE="${SUSE_URL_BASE}${SUSE_PATH_UPDATE}" - -if [ -z "${REPO_URL:-}" ]; then - REPO_URL="$SUSE_FULLURL_OSS" -fi diff --git a/tools/osbuilder/rootfs-builder/suse/config.xml b/tools/osbuilder/rootfs-builder/suse/config.xml deleted file mode 100644 index a921475296..0000000000 --- a/tools/osbuilder/rootfs-builder/suse/config.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - SUSE - mvedovati@suse.com - openSUSE rootfs for Kata Containers guest vm - - - 1.0.0 - zypper - en_US - us - true - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/osbuilder/rootfs-builder/suse/install-packages.sh b/tools/osbuilder/rootfs-builder/suse/install-packages.sh deleted file mode 100644 index 2652df1c98..0000000000 --- a/tools/osbuilder/rootfs-builder/suse/install-packages.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2018 SUSE LLC -# -# SPDX-License-Identifier: Apache-2.0 - -set -euo pipefail - -source config.sh - -removeRepos=(repo-non-oss repo-update-non-oss repo-oss repo-update) - -for r in ${removeRepos[@]}; do - zypper --non-interactive removerepo $r -done - -zypper --non-interactive addrepo ${SUSE_FULLURL_OSS} osbuilder-oss -zypper --non-interactive addrepo ${SUSE_FULLURL_UPDATE} osbuilder-update - - -# Workaround for zypper slowdowns observed when running inside -# a container: see https://github.com/openSUSE/zypper/pull/209 -# The fix is upstream but it will take a while before landing -# in Leap -ulimit -n 1024 -zypper --non-interactive refresh -zypper --non-interactive install --no-recommends --force-resolution \ - autoconf \ - automake \ - binutils \ - coreutils \ - curl \ - gcc \ - gcc-c++ \ - git \ - glibc-devel \ - glibc-devel-static \ - glibc-utils \ - libstdc++-devel \ - linux-glibc-devel \ - m4 \ - make \ - python3-kiwi \ - sed \ - tar \ - vim \ - which -zypper --non-interactive clean --all - diff --git a/tools/osbuilder/rootfs-builder/suse/rootfs_lib.sh b/tools/osbuilder/rootfs-builder/suse/rootfs_lib.sh deleted file mode 100644 index 216f90a2f4..0000000000 --- a/tools/osbuilder/rootfs-builder/suse/rootfs_lib.sh +++ /dev/null @@ -1,76 +0,0 @@ -# -# Copyright (c) 2018 SUSE LLC -# -# SPDX-License-Identifier: Apache-2.0 - -# - Arguments -# rootfs_dir=$1 -# -# - Optional environment variables -# -# EXTRA_PKGS: Variable to add extra PKGS provided by the user -# -# BIN_AGENT: Name of the Kata-Agent binary -# -# REPO_URL: URL to distribution repository ( should be configured in -# config.sh file) -# -# Any other configuration variable for a specific distro must be added -# and documented on its own config.sh -# -# - Expected result -# -# rootfs_dir populated with rootfs pkgs -# It must provide a binary in /sbin/init -# -# Note: For some distros, the build_rootfs() function provided in scripts/lib.sh -# will suffice. If a new distro is introduced with a special requirement, -# then, a rootfs_builder//rootfs_lib.sh file should be created -# using this template. - -build_rootfs() { - # Mandatory - local ROOTFS_DIR=$1 - - #Name of the Kata-Agent binary - local BIN_AGENT=${BIN_AGENT} - - # In case of support EXTRA packages, use it to allow - # users add more packages to the base rootfs - local EXTRA_PKGS=${EXTRA_PKGS:-} - - #PATH where files this script is placed - #Use it to refer to files in the same directory - #Exmaple: ${CONFIG_DIR}/foo - local CONFIG_DIR=${CONFIG_DIR} - - # Populate ROOTFS_DIR - # Must provide /sbin/init and /bin/${BIN_AGENT} - if [ -e "$ROOTFS_DIR" ] && ! [ -z "$(ls -A $ROOTFS_DIR)" ]; then - echo "ERROR: $ROOTFS_DIR is not empty" - exit 1 - fi - - local addPackages="" - for p in $PACKAGES $EXTRA_PKGS; do - addPackages+=" --add-package=$p" - done - - # set-repo format: - # man kiwi::system::build for details - local setRepo=" --set-repo $REPO_URL,rpm-md,$OS_IDENTIFIER,99,false,false" - - # Workaround for zypper slowdowns observed when running inside - # a container: see https://github.com/openSUSE/zypper/pull/209 - # The fix is upstream but it will take a while before landing - # in Leap - ulimit -n 1024 - kiwi system prepare \ - --description $CONFIG_DIR \ - --allow-existing-root \ - --root $ROOTFS_DIR \ - $addPackages \ - $setRepo - install -d $ROOTFS_DIR/lib/systemd - ln -s /usr/lib/systemd/systemd $ROOTFS_DIR/lib/systemd/systemd -}