--- /dev/null
+the variables get assigned as:
+KVER_MAJOR="3\n# Linux VServer"
+KVER_MINOR="10\n# Linux VServer"
+
+which causes parse errors:
+
+Cgroup memory controller:
++ '[' 3 '#' Linux VServer -ge 3 -a 10 '#' Linux VServer -ge 6 ']'
+/usr/bin/lxc-checkconfig[98]: [: #: unexpected operator/operand
++ is_enabled CONFIG_CGROUP_MEM_RES_CTLR
+
+in this code:
+if [ $KVER_MAJOR -ge 3 -a $KVER_MINOR -ge 6 ]; then
+ is_enabled CONFIG_MEMCG
+else
+ is_enabled CONFIG_CGROUP_MEM_RES_CTLR
+fi
+
+
+---
+$ zgrep '^# Linux' /proc/config.gz | sed -r 's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/'
+3
+# Linux VServer
+---
+
+$ zcat /proc/config.gz |grep '^# Linux'
+---
+# Linux/x86_64 3.10.10 Kernel Configuration
+# Linux VServer
+---
+
+
+--- lxc-0.9.0/src/lxc/lxc-checkconfig.in 2013-09-17 12:00:03.486888314 +0300
++++ lxc-0.9.0/lxc-checkconfig 2013-09-17 12:47:12.000000000 +0300
+@@ -78,13 +68,13 @@
+ }
+
+ CGROUP_MNT_PATH=`print_cgroups cgroup /proc/self/mounts | head -1`
+-KVER_MAJOR=$($GREP '^# Linux' $CONFIG | \
++KVER_MAJOR=$($GREP '^# Linux.*Kernel Configuration' $CONFIG | \
+ sed -r 's/.* ([0-9])\.[0-9]{1,2}\.[0-9]{1,3}.*/\1/')
+ if [ "$KVER_MAJOR" = "2" ]; then
+-KVER_MINOR=$($GREP '^# Linux' $CONFIG | \
++KVER_MINOR=$($GREP '^# Linux.*Kernel Configuration' $CONFIG | \
+ sed -r 's/.* 2.6.([0-9]{2}).*/\1/')
+ else
+-KVER_MINOR=$($GREP '^# Linux' $CONFIG | \
++KVER_MINOR=$($GREP '^# Linux.*Kernel Configuration' $CONFIG | \
+ sed -r 's/.* [0-9]\.([0-9]{1,3})\.[0-9]{1,3}.*/\1/')
+ fi
+
Summary(pl.UTF-8): Narzędzia do kontenerów linuksowych (LXC)
Name: lxc
Version: 0.9.0
-Release: 3
+Release: 4
License: LGPL v2.1+
Group: Applications/System
Source0: http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz
Patch1: %{name}-pld.patch
Patch2: am-1.14.patch
Patch3: checkconfig-module.patch
+Patch4: checkconfig-vserver-config.patch
URL: http://lxc.sourceforge.net/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
%{__aclocal} -I config