Hello community, here is the log from the commit of package lxc for openSUSE:Factory checked in at 2012-04-23 09:15:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2012-04-17 07:46:30.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.lxc.new/lxc.changes 2012-04-23 09:15:32.000000000 +0200 @@ -1,0 +2,14 @@ +Fri Apr 20 13:53:41 UTC 2012 - fcro...@suse.com + +- Add various fixes to opensuse template : + + create /etc/hostname as symlink to /etc/HOSTNAME + (lxc-clone fix) + + fix inadequate space in lxc.mount config (lxc-clone fix) + + disable network in container if not configured + + configure network scripts properly +- Add lxc-snapshot-btrfs-lvm.patch: backport snapshot support, + using btrfs or lvm2. +- Add lxc-opensuse-tmpfs.patch: ensure container shutting down is + correctly detected by LXC. + +------------------------------------------------------------------- New: ---- lxc-opensuse-tmpfs.patch lxc-snapshot-btrfs-lvm.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lxc.spec ++++++ --- /var/tmp/diff_new_pack.ay8tMH/_old 2012-04-23 09:15:33.000000000 +0200 +++ /var/tmp/diff_new_pack.ay8tMH/_new 2012-04-23 09:15:33.000000000 +0200 @@ -26,11 +26,15 @@ Source: http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz Source1: README.SUSE Source2: lxc-createconfig.in -# PATCH-FIX-UPSTREAM update openSUSE template to use 12.1 +# PATCH-FIX-UPSTREAM update openSUSE template to use 12.1 and various fixes Patch0: lxc-opensuse-12.1.patch # PATCH-FIX-UPSTREAM lxc-checkconfig-kernel-3.patch bnc#720845 fcro...@suse.com -- correctly detect kernel 3.x Patch1: lxc-checkconfig-kernel-3.patch Patch2: Accurately-detect-whether-a-system-supports-clone_children.patch +# PATCH-FIX-UPSTREAM lxc-snapshot-btrfs-lvm.patch fcro...@suse.com -- backport support for btrfs and lvm based snapshots (git) +Patch3: lxc-snapshot-btrfs-lvm.patch +# PATCH-FIX-UPSTREAM lxc-opensuse-tmpfs.patch fcro...@suse.com -- fix shutdown in openSUSE container +Patch4: lxc-opensuse-tmpfs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: docbook-utils BuildRequires: libcap-devel @@ -41,6 +45,7 @@ BuildRequires: linux-kernel-headers %endif Requires: /sbin/setcap +Requires: rsync # needed to create openSUSE containers using template Recommends: build @@ -69,6 +74,8 @@ %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %configure --disable-examples ++++++ lxc-opensuse-12.1.patch ++++++ --- /var/tmp/diff_new_pack.ay8tMH/_old 2012-04-23 09:15:33.000000000 +0200 +++ /var/tmp/diff_new_pack.ay8tMH/_new 2012-04-23 09:15:33.000000000 +0200 @@ -138,21 +138,45 @@ 1.7.7 -From 5649fb6c0e372f03621d1fd0f50ecd72fd021563 Mon Sep 17 00:00:00 2001 +From 594d9ba1043bdbc3bb0bded71e19a6ed3e724e4d Mon Sep 17 00:00:00 2001 From: Frederic Crozat <fcro...@suse.com> -Date: Wed, 4 Jan 2012 15:11:55 +0100 -Subject: [PATCH 2/2] templates: fix openSUSE 12.1 template creation on x86 - platform +Date: Wed, 18 Apr 2012 17:17:18 +0200 +Subject: [PATCH] various fixes for openSUSE template: - create /etc/hostname + as symlink to /etc/HOSTNAME (lxc-clone fix) - fix + inadequate space in lxc.mount config (lxc-clone fix) - fix + openSUSE 12.1 template creation on x86 platform - disable + network in container if not configured - configure network + scripts properly --- - templates/lxc-opensuse.in | 17 +++++++++++++++-- - 1 files changed, 15 insertions(+), 2 deletions(-) + templates/lxc-opensuse.in | 34 +++++++++++++++++++++++++++++----- + 1 files changed, 29 insertions(+), 5 deletions(-) diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in -index d30147d..d62e5f3 100644 +index 120b2c7..4342150 100644 --- a/templates/lxc-opensuse.in +++ b/templates/lxc-opensuse.in -@@ -156,10 +156,11 @@ download_opensuse() +@@ -34,8 +34,8 @@ configure_opensuse() + + # set network as static, but everything is done by LXC outside the container + cat <<EOF > $rootfs/etc/sysconfig/network/ifcfg-eth0 +-STARTMODE='auto' +-BOOTPROTO='static' ++STARTMODE='manual' ++BOOTPROTO='none' + EOF + + # set default route +@@ -71,6 +71,8 @@ EOF + cat <<EOF > $rootfs/etc/HOSTNAME + $hostname + EOF ++ # ensure /etc/hostname is available too ++ ln -s -f HOSTNAME $rootfs/etc/hostname + + # do not use hostname from HOSTNAME variable + cat <<EOF >> $rootfs/etc/sysconfig/cron +@@ -156,10 +158,11 @@ download_opensuse() cat > $cache/partial-$arch-packages/opensuse.conf << EOF Preinstall: aaa_base bash coreutils diffutils Preinstall: filesystem fillup glibc grep insserv libacl1 libattr1 @@ -165,7 +189,7 @@ RunScripts: aaa_base -@@ -169,9 +170,21 @@ Support: lxc +@@ -169,9 +172,21 @@ Support: lxc Prefer: sysvinit-init Ignore: patterns-openSUSE-base:patterns-openSUSE-yast2_install_wf @@ -188,6 +212,30 @@ 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 +@@ -254,13 +269,22 @@ copy_configuration() + rootfs=$2 + name=$3 + ++# only disable network if no network configuration was passed ++grep -q lxc.network.type $path/config ++network_not_configured=$? ++if [ $network_not_configured -eq 1 ]; then ++ cat <<EOF >> $path/config ++lxc.network.type = empty ++EOF ++fi ++ + cat <<EOF >> $path/config + lxc.utsname = $name + + lxc.tty = 4 + lxc.pts = 1024 + lxc.rootfs = $rootfs +-lxc.mount = $path/fstab ++lxc.mount = $path/fstab + + lxc.cgroup.devices.deny = a + # /dev/null and zero -- 1.7.7 ++++++ lxc-opensuse-tmpfs.patch ++++++ >From d088de50c551f4941ae24b536057fc57915ee7d7 Mon Sep 17 00:00:00 2001 From: Frederic Crozat <fcro...@suse.com> Date: Fri, 20 Apr 2012 14:36:53 +0200 Subject: [PATCH] shutdown fixes for openSUSE container - mount /run on tmpfs outside container - replace /var/run bind mount on /run by a symlink --- templates/lxc-opensuse.in | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in index 0946f95..076fe4f 100644 --- a/templates/lxc-opensuse.in +++ b/templates/lxc-opensuse.in @@ -201,6 +201,10 @@ EOF # create mtab symlink rm -f $cache/partial-$arch/etc/mtab ln -sf /proc/self/mounts $cache/partial-$arch/etc/mtab + +# ensure /var/run and /run are symlinked + rm -fr $cache/partial-$arch/var/run + ln -s -f ../run $cache/partial-$arch/var/run if [ $? -ne 0 ]; then echo "Failed to download the rootfs, aborting." return 1 @@ -307,6 +311,7 @@ EOF cat <<EOF > $path/fstab proc $rootfs/proc proc nodev,noexec,nosuid 0 0 sysfs $rootfs/sys sysfs defaults 0 0 +tmpfs $rootfs/run tmpfs mode=0755,nodev,nosuid 0 0 EOF if [ $? -ne 0 ]; then -- 1.7.7 ++++++ lxc-snapshot-btrfs-lvm.patch ++++++ ++++ 1289 lines (skipped) -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org