Hi,

After applying the obs-build patch in
https://github.com/lxc/lxc/pull/1260, the attached patch allows openSUSE
42.1 to be bootstrapped on Debian.

Yours,
Benda

1. openSUSE forbids root login. chpasswd may not work from missing PAM modules.
2. during bootstrap zypper need to import archive keys without checking.
3. dependency of iproute2 could not be resolved during bootstrap.

Index: templates/lxc-opensuse
===================================================================
--- templates.orig/lxc-opensuse
+++ templates/lxc-opensuse
@@ -116,7 +116,6 @@ EOF
     touch $rootfs/etc/sysconfig/kernel
 
     echo "Please change root-password !"
-    echo "root:root" | chpasswd -R $rootfs
 
     return 0
 }
@@ -150,7 +149,7 @@ download_opensuse()
     else
         zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/ update || return 1
     fi
-	zypper --quiet --root $cache/partial-$arch-packages --non-interactive --gpg-auto-import-keys update || return 1
+    zypper --quiet --root $cache/partial-$arch-packages --non-interactive --gpg-auto-import-keys --no-gpg-checks 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
     cat > $cache/partial-$arch-packages/opensuse.conf << EOF
 Preinstall: aaa_base bash coreutils diffutils
@@ -188,12 +187,6 @@ EOF
     echo "Support: dhcpcd" >> $cache/partial-$arch-packages/opensuse.conf
     fi
 
-    # Leap doesn't seem to have iproute2 utils installed
-    if [ $DISTRO == "leap/42.1" ]
-    then
-    echo "Support: net-tools iproute2" >> $cache/partial-$arch-packages/opensuse.conf
-    fi
-
     if [ "$arch" = "i686" ]; then
         mkdir -p $cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/i686/
         for i in "$cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/i586/*" ; do

Reply via email to