From 2dc3dc54a537b38d9512f8abb0d64bd2ea946b5a Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 26 Jun 2018 12:44:43 +0100 Subject: [PATCH] templates: opensuse: Drop support for EOL distributions All releases prior to 42.X have reached EOL so we can drop these codepaths in order to simplify the code. This also fixes an indentation issue. Signed-off-by: Markos Chandras --- templates/lxc-opensuse.in | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in index 96891c0..6ce5827 100644 --- a/templates/lxc-opensuse.in +++ b/templates/lxc-opensuse.in @@ -148,13 +148,9 @@ download_opensuse() fi zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar "$oss_repo_url" repo-oss || return 1 - update_repo_url="http://download.opensuse.org/update/$DISTRO/repo/oss" # Leap update repos were rearranged - if [[ $DISTRO == "leap/4"* ]] || [[ $DISTRO == "leap/1"* ]]; then - update_repo_url="http://download.opensuse.org/update/$DISTRO/oss/" - fi - # tumbleweed has no update repo if [[ $DISTRO != "tumbleweed" ]]; then + update_repo_url="http://download.opensuse.org/update/$DISTRO/oss/" zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar "$update_repo_url" update || return 1 fi @@ -181,31 +177,17 @@ Support: udev Support: netcfg Support: hwinfo insserv-compat module-init-tools openSUSE-release openssh Support: pwdutils sysconfig +Support: net-tools iproute2 Ignore: rpm:suse-build-key,build-key Ignore: systemd:systemd-presets-branding EOF - if [ $DISTRO = "13.2" ] - then - echo "Support: python3-base" >> $cache/partial-$arch-packages/opensuse.conf - fi - if [[ $DISTRO == "tumbleweed" ]]; then - echo "Preinstall: liblua5_3 libncurses6 libreadline7" >> $cache/partial-$arch-packages/opensuse.conf + echo "Preinstall: liblua5_3 libncurses6 libreadline7" >> $cache/partial-$arch-packages/opensuse.conf else - echo "Preinstall: liblua5_1 libncurses5 libreadline6" >> $cache/partial-$arch-packages/opensuse.conf - echo "Support: rpcbind" >> $cache/partial-$arch-packages/opensuse.conf - fi - - # dhcpcd is not in the default repos since Leap 42.1, neither in tumbleweed - if [[ $DISTRO != "leap/4"* ]] && [[ $DISTRO != "leap/1"* ]] && [[ $DISTRO != "tumbleweed" ]]; then - echo "Support: dhcpcd" >> $cache/partial-$arch-packages/opensuse.conf - fi - - # Leap and tumbleweed doesn't seem to have iproute2 utils installed - if [[ $DISTRO == "leap/4"* ]] || [[ $DISTRO == "leap/1"* ]] || [[ $DISTRO == "tumbleweed" ]]; then - echo "Support: net-tools iproute2" >> $cache/partial-$arch-packages/opensuse.conf + echo "Preinstall: liblua5_1 libncurses5 libreadline6" >> $cache/partial-$arch-packages/opensuse.conf + echo "Support: rpcbind" >> $cache/partial-$arch-packages/opensuse.conf fi if [ "$arch" = "i686" ]; then @@ -224,7 +206,7 @@ EOF repos=("--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/$arch" "--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/noarch") if [[ $DISTRO != "tumbleweed" ]]; then # tumbleweed has no update repo - repos+=("--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/update/$arch" "--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/update/noarch") + repos+=("--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/update/$arch" "--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/update/noarch") fi CLEAN_BUILD=1 BUILD_ARCH="$arch" BUILD_ROOT="$cache/partial-$arch" BUILD_DIST="$cache/partial-$arch-packages/opensuse.conf" PATH="$PATH:$BUILD_DIR" $BUILD_DIR/init_buildsystem --clean --configdir $BUILD_DIR/configs --cachedir $cache/partial-$arch-cache ${repos[*]} || return 1