Hello community,

here is the log from the commit of package lxc for openSUSE:Factory checked in 
at 2011-11-02 12:03:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lxc (Old)
 and      /work/SRC/openSUSE:Factory/.lxc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lxc", Maintainer is "jsl...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/lxc/lxc.changes  2011-09-23 02:12:16.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.lxc.new/lxc.changes     2011-11-02 
12:03:51.000000000 +0100
@@ -1,0 +2,13 @@
+Tue Oct 25 11:35:10 UTC 2011 - fcro...@suse.com
+
+- Add console to opensuse securetty, since we are in a container.
+
+-------------------------------------------------------------------
+Tue Oct 25 09:32:01 UTC 2011 - fcro...@suse.com
+
+- Add lxc-opensuse-12.1.patch: create openSUSE 12.1 containers now
+- Add Recommends on build package, which is used by opensuse
+  template.
+- Update README.SUSE to current status for cgroups mountpoint
+
+-------------------------------------------------------------------

New:
----
  lxc-opensuse-12.1.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lxc.spec ++++++
--- /var/tmp/diff_new_pack.dMFCUH/_old  2011-11-02 12:03:52.000000000 +0100
+++ /var/tmp/diff_new_pack.dMFCUH/_new  2011-11-02 12:03:52.000000000 +0100
@@ -27,6 +27,8 @@
 License:        LGPLv2+
 Source:         
http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz
 Source1:        README.SUSE
+# PATCH-FIX-UPSTREAM update openSUSE template to use 12.1
+Patch0:         lxc-opensuse-12.1.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  docbook-utils libcap-devel pkg-config
 %if 0%{?suse_version} >= 1130
@@ -35,6 +37,8 @@
 BuildRequires:  linux-kernel-headers
 %endif
 Requires:       /sbin/setcap
+# needed to create openSUSE containers using template
+Recommends:     build
 
 %description
 It provides commands to create and manage containers. It contains a
@@ -57,6 +61,7 @@
 
 %prep
 %setup
+%patch0 -p1
 
 %build
 %configure --disable-examples

++++++ README.SUSE ++++++
--- /var/tmp/diff_new_pack.dMFCUH/_old  2011-11-02 12:03:52.000000000 +0100
+++ /var/tmp/diff_new_pack.dMFCUH/_new  2011-11-02 12:03:52.000000000 +0100
@@ -1,4 +1,9 @@
-To mount the control group file system during boot run
+To mount the control group file system on openSUSE 11.3, SLE 11 SP1 and older,
+perform the following:
 mkdir /cgroup
 and add the following line to /etc/fstab:
 cgroup               /cgroup               cgroup    nofail                0 0
+
+On openSUSE 11.4, SLE 11 SP2 and newer, you can just run:
+/sbin/insserv boot.cgroup
+and /sys/fs/cgroup will be mounted for cgroup automatically.

++++++ lxc-opensuse-12.1.patch ++++++
>From 0619f3b2e1a2d37380c84347ebcf728d05e4915e Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcro...@suse.com>
Date: Tue, 25 Oct 2011 11:25:18 +0200
Subject: [PATCH] templates: update openSUSE template for openSUSE 12.1

rely on "build" package, to ensure chroot can be created with
distribution older than 12.1
---
 templates/lxc-opensuse.in |   75 ++++++++++++++++++++++++++++----------------
 1 files changed, 48 insertions(+), 27 deletions(-)

diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in
index 811876a..0f11740 100644
--- a/templates/lxc-opensuse.in
+++ b/templates/lxc-opensuse.in
@@ -25,7 +25,7 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
-DISTRO=11.4
+DISTRO=12.1
 
 configure_opensuse()
 {
@@ -106,28 +106,11 @@ cons:2345:respawn:/sbin/mingetty --noclear console screen
 c1:2345:respawn:/sbin/mingetty --noclear tty1 screen
 EOF
 
-    # patch boot script, no longer needed in openSUSE 12.1 / SLE11-SP2
-    patch --quiet -d $rootfs/etc/init.d/ << EOF
---- boot.orig  2011-05-26 16:03:07.000000000 +0200
-+++ boot       2011-05-26 16:03:19.000000000 +0200
-@@ -98,12 +98,12 @@
-     echo "***************************************************************"
-     /sbin/halt -f
-     fi
--    echo -n "Mounting devtmpfs at /dev"
--    mount -n -t devtmpfs -o mode=0755 devtmpfs /dev
--    rc_status -v -r
-+#    echo -n "Mounting devtmpfs at /dev"
-+#    mount -n -t devtmpfs -o mode=0755 devtmpfs /dev
-+#    rc_status -v -r
- fi
-
--cp -axT --remove-destination /lib/udev/devices /dev
-+#cp -axT --remove-destination /lib/udev/devices /dev
-
- if test -d /sys/kernel/debug -a "$HAVE_DEBUGFS" = "1" ; then
-     mount -n -t debugfs debugfs /sys/kernel/debug > /dev/null 2>&1
+    # set /dev/console as securetty
+    cat << EOF >> $rootfs/etc/securetty
+console
 EOF
+
     cat <<EOF >> $rootfs/etc/sysconfig/boot
 # disable root fsck
 ROOTFS_FSCK="0"
@@ -136,7 +119,7 @@ EOF
 
 
     # remove pointless services in a container
-    insserv -r -f -p $rootfs/etc/init.d boot.udev boot.udev_retry boot.md 
boot.lvm boot.loadmodules boot.device-mapper boot.clock boot.swap boot.klog
+    chroot $rootfs /sbin/insserv -r -f boot.udev boot.loadmodules 
boot.device-mapper boot.clock boot.swap boot.klog kbd
 
     echo "Please change root-password !"
     echo "root:root" | chroot $rootfs chpasswd
@@ -149,6 +132,12 @@ download_opensuse()
     cache=$1
     arch=$2
 
+    if [ ! -x /usr/bin/build ]; then
+       echo "Could not create openSUSE template :"
+       echo "you need to install \"build\" package"
+       return 1
+    fi
+
     # check the mini opensuse was not already downloaded
     mkdir -p "$cache/partial-$arch"
 
@@ -159,18 +148,50 @@ download_opensuse()
 
     # download a mini opensuse into a cache
     echo "Downloading opensuse minimal ..."
+    mkdir -p "$cache/partial-$arch-packages"
+    zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar 
http://download.opensuse.org/distribution/$DISTRO/repo/oss/ repo-oss
+    zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar 
http://download.opensuse.org/update/$DISTRO/ update
+    zypper --quiet --root $cache/partial-$arch-packages --non-interactive 
--gpg-auto-import-keys update
+    zypper --root $cache/partial-$arch-packages --non-interactive in 
--auto-agree-with-licenses --download-only zypper lxc patterns-openSUSE-base 
sysvinit-init
+    cat > $cache/partial-$arch-packages/opensuse.conf << EOF
+Preinstall: aaa_base bash coreutils diffutils
+Preinstall: filesystem fillup glibc grep insserv libacl1 libattr1
+Preinstall: libbz2-1 libgcc46 libxcrypt libncurses5 pam
+Preinstall: permissions libreadline6 rpm sed tar zlib libselinux1
+Preinstall: liblzma5 libcap2 libpcre0
+Preinstall: libpopt0 libelf1 liblua5_1
+
+RunScripts: aaa_base
+
+Support: zypper
+Support: patterns-openSUSE-base
+Support: lxc
+Prefer: sysvinit-init
+
+Ignore: patterns-openSUSE-base:patterns-openSUSE-yast2_install_wf
+EOF
+       
+    CLEAN_BUILD=1 BUILD_ROOT="$cache/partial-$arch" 
BUILD_DIST="$cache/partial-$arch-packages/opensuse.conf" 
/usr/lib/build/init_buildsystem  --clean --cachedir $cache/partial-$arch-cache 
--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 
+    chroot $cache/partial-$arch /usr/bin/zypper --quiet --non-interactive ar 
http://download.opensuse.org/distribution/$DISTRO/repo/oss repo-oss
+    chroot $cache/partial-$arch /usr/bin/zypper --quiet --non-interactive ar 
http://download.opensuse.org/update/$DISTRO/ update
+    chroot $cache/partial-$arch rpm -e patterns-openSUSE-base
+    umount $cache/partial-$arch/proc
+#   really clean the image
+    rm -fr $cache/partial-$arch/{.build,.guessed_dist,.srcfiles*,installed-pkg}
+    rm -fr $cache/partial-$arch/dev
+#    make sure we have a minimal /dev
     mkdir -p "$cache/partial-$arch/dev"
     mknod -m 666 $cache/partial-$arch/dev/null c 1 3
     mknod -m 666 $cache/partial-$arch/dev/zero c 1 5
-    zypper --quiet --root $cache/partial-$arch --non-interactive ar 
http://download.opensuse.org/distribution/$DISTRO/repo/oss/ repo-oss
-    zypper --quiet --root $cache/partial-$arch --non-interactive ar 
http://download.opensuse.org/update/$DISTRO/ update
-    zypper --quiet --root $cache/partial-$arch --non-interactive 
--gpg-auto-import-keys in --auto-agree-with-licenses -t pattern base
-    zypper --quiet --root $cache/partial-$arch --non-interactive 
--gpg-auto-import-keys in +lxc -kbd -patterns-openSUSE-base
+#   create mtab symlink
+    rm -f $cache/partial-$arch/etc/mtab
+    ln -sf /proc/self/mounts $cache/partial-$arch/etc/mtab
     if [ $? -ne 0 ]; then
        echo "Failed to download the rootfs, aborting."
        return 1
     fi
 
+    rm -fr "$cache/partial-$arch-packages"
     mv "$1/partial-$arch" "$1/rootfs-$arch"
     echo "Download complete."
 
-- 
1.7.7

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to