mirror of
https://github.com/lxc/lxc-templates.git
synced 2025-01-24 21:20:10 +00:00
commit
8b5308b5d8
@ -148,18 +148,16 @@ 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
|
||||
|
||||
support_packages=(zypper patterns-openSUSE-base lxc ncurses-utils iputils udev netcfg hwinfo insserv-compat module-init-tools openSUSE-release openssh pwdutils sysconfig net-tools iproute2)
|
||||
|
||||
zypper --quiet --root $cache/partial-$arch-packages --non-interactive --gpg-auto-import-keys update || return 1
|
||||
zypper --root $cache/partial-$arch-packages --non-interactive in --auto-agree-with-licenses --download-only zypper lxc patterns-openSUSE-base bash iputils sed tar rsyslog || return 1
|
||||
zypper --root $cache/partial-$arch-packages --non-interactive in --no-recommends --auto-agree-with-licenses --download-only zypper lxc patterns-openSUSE-base bash iputils sed tar rsyslog ${support_packages[*]} || return 1
|
||||
|
||||
cat > $cache/partial-$arch-packages/opensuse.conf << EOF
|
||||
Preinstall: aaa_base bash coreutils diffutils
|
||||
@ -172,40 +170,19 @@ Preinstall: libpcre1
|
||||
|
||||
RunScripts: aaa_base
|
||||
|
||||
Support: zypper
|
||||
Support: patterns-openSUSE-base
|
||||
Support: lxc
|
||||
Support: ncurses-utils
|
||||
Support: iputils
|
||||
Support: udev
|
||||
Support: netcfg
|
||||
Support: hwinfo insserv-compat module-init-tools openSUSE-release openssh
|
||||
Support: pwdutils sysconfig
|
||||
Support: ${support_packages[*]}
|
||||
|
||||
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
|
||||
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_3 libncurses6 libreadline7" >> $cache/partial-$arch-packages/opensuse.conf
|
||||
elif [[ $DISTRO == "leap/1"* ]]; then
|
||||
echo "Preinstall: liblua5_3-5 libncurses6 libreadline7" >> $cache/partial-$arch-packages/opensuse.conf
|
||||
elif [[ $DISTRO == "leap/4"* ]]; then
|
||||
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
|
||||
@ -221,10 +198,14 @@ EOF
|
||||
|
||||
# openSUSE 13.2 has no noarch directory in update
|
||||
[ -d $cache/partial-$arch-packages/var/cache/zypp/packages/update/noarch ] || mkdir -p $cache/partial-$arch-packages/var/cache/zypp/packages/update/noarch
|
||||
|
||||
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 == "leap/4"* ]]; then
|
||||
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")
|
||||
else
|
||||
# Leap 15 has a different repo structure compared to 42.3
|
||||
repos=("--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/$arch" "--repository" "$cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/noarch")
|
||||
fi
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user