From a81cf9e231328da3d95f65bec392eec1c28dd684 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 20 May 2019 16:31:41 +0200 Subject: [PATCH] Update test coverage for openSUSE/-minimal to 15.1 Use openSUSE 15.1 as default, which is the latest released stable openSUSE release. Remove leftovers for unmaintained openSUSE 42.2 images. Depends-On: https://review.opendev.org/#/c/660126/ Change-Id: I0b204b7b3d7ae74b6749320b3bfe1ca89d154ebb --- .zuul.d/jobs.yaml | 4 ++-- .../dib-python/environment.d/50-dib-python-version | 4 +++- .../elements/opensuse-minimal/README.rst | 2 +- .../environment.d/10-opensuse-distro-name.bash | 2 +- .../opensuse150-build-succeeds/README.rst | 1 - .../environment.d/10-set-distro.bash | 1 - .../opensuse151-build-succeeds/README.rst | 1 + .../element-deps | 0 .../environment.d/10-set-distro.bash | 1 + diskimage_builder/elements/opensuse/README.rst | 2 +- .../environment.d/10-opensuse-distro-name.bash | 2 +- .../opensuse150-build-succeeds/README.rst | 1 - .../environment.d/10-set-distro.bash | 1 - .../opensuse151-build-succeeds/README.rst | 1 + .../environment.d/10-set-distro.bash | 1 + .../elements/zypper-minimal/root.d/08-zypper-chroot | 9 ++++++--- doc/source/user_guide/supported_distros.rst | 4 ++-- .../notes/opensuse-151-default-67ccfffbc134704d.yaml | 11 +++++++++++ tests/run_functests.sh | 4 ++-- 19 files changed, 34 insertions(+), 18 deletions(-) delete mode 100644 diskimage_builder/elements/opensuse-minimal/test-elements/opensuse150-build-succeeds/README.rst delete mode 100644 diskimage_builder/elements/opensuse-minimal/test-elements/opensuse150-build-succeeds/environment.d/10-set-distro.bash create mode 100644 diskimage_builder/elements/opensuse-minimal/test-elements/opensuse151-build-succeeds/README.rst rename diskimage_builder/elements/opensuse-minimal/test-elements/{opensuse150-build-succeeds => opensuse151-build-succeeds}/element-deps (100%) create mode 100644 diskimage_builder/elements/opensuse-minimal/test-elements/opensuse151-build-succeeds/environment.d/10-set-distro.bash delete mode 100644 diskimage_builder/elements/opensuse/test-elements/opensuse150-build-succeeds/README.rst delete mode 100644 diskimage_builder/elements/opensuse/test-elements/opensuse150-build-succeeds/environment.d/10-set-distro.bash create mode 100644 diskimage_builder/elements/opensuse/test-elements/opensuse151-build-succeeds/README.rst create mode 100644 diskimage_builder/elements/opensuse/test-elements/opensuse151-build-succeeds/environment.d/10-set-distro.bash create mode 100644 releasenotes/notes/opensuse-151-default-67ccfffbc134704d.yaml diff --git a/.zuul.d/jobs.yaml b/.zuul.d/jobs.yaml index 34391c41..195a9f10 100644 --- a/.zuul.d/jobs.yaml +++ b/.zuul.d/jobs.yaml @@ -69,7 +69,7 @@ dib_functests: - centos7/build-succeeds - opensuse/build-succeeds - - opensuse/opensuse150-build-succeeds + - opensuse/opensuse151-build-succeeds - fedora/build-succeeds - ubuntu/trusty-build-succeeds - ubuntu/xenial-build-succeeds @@ -187,7 +187,7 @@ # opensuse-minimal can only build on xenial ATM, as other # platforms don't have zypper dib_functests_extra: - - opensuse-minimal/opensuse150-build-succeeds + - opensuse-minimal/opensuse151-build-succeeds - job: name: dib-functests-xenial-python3-containers diff --git a/diskimage_builder/elements/dib-python/environment.d/50-dib-python-version b/diskimage_builder/elements/dib-python/environment.d/50-dib-python-version index b75c9691..182da0a1 100644 --- a/diskimage_builder/elements/dib-python/environment.d/50-dib-python-version +++ b/diskimage_builder/elements/dib-python/environment.d/50-dib-python-version @@ -17,7 +17,9 @@ if [ -z "${DIB_PYTHON_VERSION:-}" ]; then elif [ "$DISTRO_NAME" == "rhel7" ]; then DIB_PYTHON_VERSION=2 elif [ "$DISTRO_NAME" == "opensuse" ]; then - DIB_PYTHON_VERSION=2 + if [ "${DIB_RELEASE:0:2}" == "42" ]; then + DIB_PYTHON_VERSION=2 + fi fi fi diff --git a/diskimage_builder/elements/opensuse-minimal/README.rst b/diskimage_builder/elements/opensuse-minimal/README.rst index 3dff5041..f525fc7e 100644 --- a/diskimage_builder/elements/opensuse-minimal/README.rst +++ b/diskimage_builder/elements/opensuse-minimal/README.rst @@ -13,5 +13,5 @@ Environment Variables DIB_RELEASE :Required: No - :Default: 15.0 + :Default: 15.1 :Description: Set the desired openSUSE release. diff --git a/diskimage_builder/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash b/diskimage_builder/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash index 57d59b1d..3be5640b 100644 --- a/diskimage_builder/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash +++ b/diskimage_builder/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash @@ -1,4 +1,4 @@ export DISTRO_NAME=opensuse -DIB_RELEASE=${DIB_RELEASE:-15.0} +DIB_RELEASE=${DIB_RELEASE:-15.1} export DIB_RELEASE=${DIB_RELEASE,,} export DIB_OPENSUSE_PATTERNS=patterns-openSUSE-base diff --git a/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse150-build-succeeds/README.rst b/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse150-build-succeeds/README.rst deleted file mode 100644 index 97c55f1b..00000000 --- a/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse150-build-succeeds/README.rst +++ /dev/null @@ -1 +0,0 @@ -Verify we can build an openSUSE Leap 15.0 image. diff --git a/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse150-build-succeeds/environment.d/10-set-distro.bash b/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse150-build-succeeds/environment.d/10-set-distro.bash deleted file mode 100644 index 4f01f559..00000000 --- a/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse150-build-succeeds/environment.d/10-set-distro.bash +++ /dev/null @@ -1 +0,0 @@ -export DIB_RELEASE=15.0 diff --git a/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse151-build-succeeds/README.rst b/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse151-build-succeeds/README.rst new file mode 100644 index 00000000..a05d8497 --- /dev/null +++ b/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse151-build-succeeds/README.rst @@ -0,0 +1 @@ +Verify we can build an openSUSE Leap 15.1 image. diff --git a/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse150-build-succeeds/element-deps b/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse151-build-succeeds/element-deps similarity index 100% rename from diskimage_builder/elements/opensuse-minimal/test-elements/opensuse150-build-succeeds/element-deps rename to diskimage_builder/elements/opensuse-minimal/test-elements/opensuse151-build-succeeds/element-deps diff --git a/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse151-build-succeeds/environment.d/10-set-distro.bash b/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse151-build-succeeds/environment.d/10-set-distro.bash new file mode 100644 index 00000000..25355f0b --- /dev/null +++ b/diskimage_builder/elements/opensuse-minimal/test-elements/opensuse151-build-succeeds/environment.d/10-set-distro.bash @@ -0,0 +1 @@ +export DIB_RELEASE=15.1 diff --git a/diskimage_builder/elements/opensuse/README.rst b/diskimage_builder/elements/opensuse/README.rst index a3c7f5e6..656ac958 100644 --- a/diskimage_builder/elements/opensuse/README.rst +++ b/diskimage_builder/elements/opensuse/README.rst @@ -14,7 +14,7 @@ Environment Variables DIB_RELEASE :Required: No - :Default: 15.0 + :Default: 15.1 :Description: Set the desired openSUSE release. DIB_CLOUD_IMAGES diff --git a/diskimage_builder/elements/opensuse/environment.d/10-opensuse-distro-name.bash b/diskimage_builder/elements/opensuse/environment.d/10-opensuse-distro-name.bash index cb1688f2..9121dbc6 100644 --- a/diskimage_builder/elements/opensuse/environment.d/10-opensuse-distro-name.bash +++ b/diskimage_builder/elements/opensuse/environment.d/10-opensuse-distro-name.bash @@ -1,5 +1,5 @@ export DISTRO_NAME=opensuse -export DIB_RELEASE=${DIB_RELEASE:-15.0} +export DIB_RELEASE=${DIB_RELEASE:-15.1} export DIB_OPENSUSE_PATTERNS=patterns-openSUSE-base case ${DIB_RELEASE} in # Old Leap releases diff --git a/diskimage_builder/elements/opensuse/test-elements/opensuse150-build-succeeds/README.rst b/diskimage_builder/elements/opensuse/test-elements/opensuse150-build-succeeds/README.rst deleted file mode 100644 index 97c55f1b..00000000 --- a/diskimage_builder/elements/opensuse/test-elements/opensuse150-build-succeeds/README.rst +++ /dev/null @@ -1 +0,0 @@ -Verify we can build an openSUSE Leap 15.0 image. diff --git a/diskimage_builder/elements/opensuse/test-elements/opensuse150-build-succeeds/environment.d/10-set-distro.bash b/diskimage_builder/elements/opensuse/test-elements/opensuse150-build-succeeds/environment.d/10-set-distro.bash deleted file mode 100644 index 4f01f559..00000000 --- a/diskimage_builder/elements/opensuse/test-elements/opensuse150-build-succeeds/environment.d/10-set-distro.bash +++ /dev/null @@ -1 +0,0 @@ -export DIB_RELEASE=15.0 diff --git a/diskimage_builder/elements/opensuse/test-elements/opensuse151-build-succeeds/README.rst b/diskimage_builder/elements/opensuse/test-elements/opensuse151-build-succeeds/README.rst new file mode 100644 index 00000000..a05d8497 --- /dev/null +++ b/diskimage_builder/elements/opensuse/test-elements/opensuse151-build-succeeds/README.rst @@ -0,0 +1 @@ +Verify we can build an openSUSE Leap 15.1 image. diff --git a/diskimage_builder/elements/opensuse/test-elements/opensuse151-build-succeeds/environment.d/10-set-distro.bash b/diskimage_builder/elements/opensuse/test-elements/opensuse151-build-succeeds/environment.d/10-set-distro.bash new file mode 100644 index 00000000..25355f0b --- /dev/null +++ b/diskimage_builder/elements/opensuse/test-elements/opensuse151-build-succeeds/environment.d/10-set-distro.bash @@ -0,0 +1 @@ +export DIB_RELEASE=15.1 diff --git a/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot b/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot index 7fd59791..02c29f21 100755 --- a/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot +++ b/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot @@ -37,7 +37,7 @@ function cleanup() { trap cleanup EXIT ZYPPER_TARGET_OPTS="--non-interactive --gpg-auto-import-keys --root $TARGET_ROOT" -ZYPPER_INSTALL_OPTS="--no-recommends" +ZYPPER_INSTALL_SYSTEM_PYTHON="python3" DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-https://download.opensuse.org} @@ -46,6 +46,7 @@ case ${DIB_RELEASE} in 42*) ZYPPER_REPOS="update=>${DIB_DISTRIBUTION_MIRROR}/update/leap/${DIB_RELEASE}/oss/ " ZYPPER_REPOS+="oss=>${DIB_DISTRIBUTION_MIRROR}/distribution/leap/${DIB_RELEASE}/repo/oss/" + ZYPPER_INSTALL_SYSTEM_PYTHON="python" ;; # New Leap releases 15*) @@ -94,9 +95,11 @@ sudo mount -t devpts $(mount_dev_pts_options) devpts $TARGET_ROOT/dev/pts sudo mount -t sysfs none $TARGET_ROOT/sys # Install filesystem, base and useful tools -sudo zypper ${ZYPPER_TARGET_OPTS} install ${ZYPPER_INSTALL_OPTS} filesystem +sudo zypper ${ZYPPER_TARGET_OPTS} install --no-recommends filesystem # Install basic components in order -sudo zypper ${ZYPPER_TARGET_OPTS} install ${ZYPPER_INSTALL_OPTS} ${DIB_OPENSUSE_PATTERNS} python zypper sudo +sudo zypper ${ZYPPER_TARGET_OPTS} install \ + ${DIB_OPENSUSE_PATTERNS} ${ZYPPER_INSTALL_SYSTEM_PYTHON} \ + zypper sudo ca-certificates-mozilla # Put in a dummy /etc/resolv.conf over the temporary one we used # to bootstrap. systemd has a bug/feature [1] that it will assume diff --git a/doc/source/user_guide/supported_distros.rst b/doc/source/user_guide/supported_distros.rst index 18a25472..f9d314de 100644 --- a/doc/source/user_guide/supported_distros.rst +++ b/doc/source/user_guide/supported_distros.rst @@ -9,7 +9,7 @@ Distributions which are supported as a build host: - RHEL 6, 7 - Ubuntu 14.04 ("trusty") - Gentoo -- openSUSE Leap 42.2, 42.3, 15.0 and Tumbleweed +- openSUSE Leap 42.3, 15.0, 15.1 and Tumbleweed Distributions which are supported as a target for an image: @@ -20,4 +20,4 @@ Distributions which are supported as a target for an image: - RHEL 6, 7 - Ubuntu 12.04 ("precise"), 14.04 ("trusty") - Gentoo -- openSUSE Leap 42.2, 42.3, 15.0 and Tumbleweed (opensuse-minimal only) +- openSUSE Leap 42.3, 15.0, 15.1 and Tumbleweed (opensuse-minimal only) diff --git a/releasenotes/notes/opensuse-151-default-67ccfffbc134704d.yaml b/releasenotes/notes/opensuse-151-default-67ccfffbc134704d.yaml new file mode 100644 index 00000000..ec8ace3d --- /dev/null +++ b/releasenotes/notes/opensuse-151-default-67ccfffbc134704d.yaml @@ -0,0 +1,11 @@ +--- +deprecations: + - | + Support in opensuse and opensuse-minimal for openSUSE 42.2 has been removed + as these are end of life. + +upgrade: + - | + The opensuse and opensuse-minimal element are now defaulting to build 15.1. + Building for 42.3 and 15.0 is still supported, however requires setting + DIB_RELEASE to '42.3' resp. '15.0' explicitly. diff --git a/tests/run_functests.sh b/tests/run_functests.sh index 906b757f..19004316 100755 --- a/tests/run_functests.sh +++ b/tests/run_functests.sh @@ -26,7 +26,7 @@ DEFAULT_SKIP_TESTS=( # These require "zypper" on the host which is not available on # all platforms opensuse-minimal/build-succeeds - opensuse-minimal/opensuse150-build-succeeds + opensuse-minimal/opensuse151-build-succeeds # non-voting; not used by infra currently gentoo/build-succeeds # Needs infra mirroring to move to voting job @@ -38,7 +38,7 @@ DEFAULT_SKIP_TESTS=( # in the gate. Keep them in a -nv job until we can figure out # better caching for the images opensuse/build-succeeds - opensuse/opensuse423-build-succeeds + opensuse/opensuse151-build-succeeds centos7/build-succeeds debian/build-succeeds fedora/build-succeeds