]> git.pld-linux.org Git - packages/lxc.git/commitdiff
Merge branch 'dev-1.0.0'
authorElan Ruusamäe <glen@delfi.ee>
Fri, 21 Feb 2014 23:44:13 +0000 (01:44 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 21 Feb 2014 23:44:13 +0000 (01:44 +0200)
am-1.14.patch [deleted file]
checkconfig-module.patch [deleted file]
checkconfig-vserver-config.patch [deleted file]
fedora-template.patch [deleted file]
lxc-devpts.patch [deleted file]
lxc-pld.in.sh
lxc-pld.patch
lxc.spec

diff --git a/am-1.14.patch b/am-1.14.patch
deleted file mode 100644 (file)
index caa962a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/configure.ac     2013-06-23 17:30:24.307931021 -0400
-+++ b/configure.ac     2013-06-23 17:30:43.414554866 -0400
-@@ -6,7 +6,7 @@
- AC_CONFIG_SRCDIR([configure.ac])
- AC_CONFIG_AUX_DIR([config])
- AC_CONFIG_HEADERS([src/config.h])
--AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability])
-+AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects])
- AC_CANONICAL_HOST
- AM_PROG_CC_C_O
- AC_GNU_SOURCE
diff --git a/checkconfig-module.patch b/checkconfig-module.patch
deleted file mode 100644 (file)
index 2dc5a58..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream:
-http://sourceforge.net/p/lxc/bugs/74/
-
---- lxc-0.9.0/src/lxc/lxc-checkconfig.in~      2013-02-18 09:47:43.000000000 +0200
-+++ lxc-0.9.0/src/lxc/lxc-checkconfig.in       2013-09-17 11:58:24.442289798 +0300
-@@ -3,6 +3,7 @@
- # Allow environment variables to override grep and config
- : ${CONFIG:=/proc/config.gz}
- : ${GREP:=zgrep}
-+: ${MODNAME:=configs}
- SETCOLOR_SUCCESS="printf \\033[1;32m"
- SETCOLOR_FAILURE="printf \\033[1;31m"
-@@ -38,10 +39,19 @@
-     BOOT_CONFIG="/boot/config-$KVER"
-     [ -f "${HEADERS_CONFIG}" ] && CONFIG=${HEADERS_CONFIG}
-     [ -f "${BOOT_CONFIG}" ] && CONFIG=${BOOT_CONFIG}
-+    if [ ! -f "$CONFIG" ]; then
-+        MODULEFILE=$(modinfo -k $KVER -n $MODNAME 2> /dev/null)
-+        # don't want to modprobe, so give user a hint
-+        # altho scripts/extract-ikconfig could be used to extract contents without loading kernel module
-+        # http://svn.pld-linux.org/trac/svn/browser/geninitrd/trunk/geninitrd?rev=12696#L327
-+    fi
-     GREP=grep
-     if [ ! -f $CONFIG ]; then
-         echo "$(basename $0): unable to retrieve kernel configuration" >&2
-         echo >&2
-+        if [ -f "$MODULEFILE" ]; then
-+            echo "Try modprobe $MODNAME module, or" >&2
-+        fi
-         echo "Try recompiling with IKCONFIG_PROC, installing the kernel headers," >&2
-         echo "or specifying the kernel configuration path with:" >&2
-         echo "  CONFIG=<path> $(basename $0)" >&2
diff --git a/checkconfig-vserver-config.patch b/checkconfig-vserver-config.patch
deleted file mode 100644 (file)
index bb18ce3..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream tracker: https://sourceforge.net/p/lxc/bugs/75/
-
-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
diff --git a/fedora-template.patch b/fedora-template.patch
deleted file mode 100644 (file)
index aa23da2..0000000
+++ /dev/null
@@ -1,385 +0,0 @@
-diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in
-index 684bb9c..922563d 100644
---- a/templates/lxc-fedora.in
-+++ b/templates/lxc-fedora.in
-@@ -26,18 +26,69 @@
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- #Configurations
--arch=$(arch)
-+arch=$(uname -m)
- cache_base=@LOCALSTATEDIR@/cache/lxc/fedora/$arch
- default_path=@LXCPATH@
- root_password=root
- # is this fedora?
--[ -f /etc/fedora-release ] && is_fedora=true
-+# Alow for weird remixes like the Raspberry Pi
-+#
-+# Use the Mitre standard CPE identifier for the release ID if possible...
-+# This may be in /etc/os-release or /etc/system-release-cpe.  We
-+# should be able to use EITHER.  Give preference to /etc/os-release for now.
-+
-+if [ -e /etc/os-release ]
-+then
-+# This is a shell friendly configuration file.  We can just source it.
-+# What we're looking for in here is the ID, VERSION_ID and the CPE_NAME
-+    . /etc/os-release
-+    echo "Host CPE ID from /etc/os-release: ${CPE_NAME}"
-+fi
-+
-+if [ "${CPE_NAME}" = "" -a -e /etc/system-release-cpe ]
-+then
-+    CPE_NAME=$(head -n1 /etc/system-release-cpe)
-+    CPE_URI=$(expr ${CPE_NAME} : '\([^:]*:[^:*]\)')
-+    if [ "${CPE_URI}" != "cpe:/o" ]
-+    then
-+        CPE_NAME=
-+    else
-+        echo "Host CPE ID from /etc/system-release-cpe: ${CPE_NAME}"
-+        # Probably a better way to do this but sill remain posix
-+        # compatible but this works, shrug...
-+        # Must be nice and not introduce convenient bashisms here.
-+        ID=$(expr ${CPE_NAME} : '[^:]*:[^:]*:[^:]*:\([^:]*\)')
-+        VERSION_ID=$(expr ${CPE_NAME} : '[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\)')
-+    fi
-+fi
--if [ "$arch" = "i686" ]; then
--    arch=i386
-+if [ "${CPE_NAME}" != "" -a "${ID}" = "fedora" -a "${VERSION_ID}" != "" ]
-+then
-+    fedora_host_ver=${VERSION_ID}
-+    is_fedora=true
-+elif [ -e /etc/redhat-release ]
-+then
-+    # Only if all other methods fail, try to parse the redhat-release file.
-+    fedora_host_ver=$( sed -e '/^Fedora /!d' -e 's/Fedora.*\srelease\s*\([0-9][0-9]*\)\s.*/\1/' < /etc/redhat-release )
-+    if [ "$fedora_host_ver" != "" ]
-+    then
-+        is_fedora=true
-+    fi
- fi
-+# Map a few architectures to their generic Fedora repository archs.
-+# The two ARM archs are a bit of a guesstimate for the v5 and v6
-+# archs.  V6 should have hardware floating point (Rasberry Pi).
-+# The "arm" arch is safer (no hardware floating point).  So
-+# there may be cases where we "get it wrong" for some v6 other
-+# than RPi.
-+case "$arch" in
-+i686) arch=i386 ;;
-+armv3l|armv4l|armv5l) arch=arm ;;
-+armv6l|armv7l|armv8l) arch=armhfp ;;
-+esac
-+
- configure_fedora()
- {
-@@ -50,7 +101,7 @@ configure_fedora()
- DEVICE=eth0
- BOOTPROTO=dhcp
- ONBOOT=yes
--HOSTNAME=${name}
-+HOSTNAME=${utsname}
- NM_CONTROLLED=no
- TYPE=Ethernet
- MTU=${MTU}
-@@ -59,12 +110,18 @@ EOF
-     # set the hostname
-     cat <<EOF > ${rootfs_path}/etc/sysconfig/network
- NETWORKING=yes
--HOSTNAME=${name}
-+HOSTNAME=${utsname}
- EOF
-+    # set hostname on systemd Fedora systems
-+    if [ $release -gt 14 ]; then
-+        echo "${utsname}" > ${rootfs_path}/etc/hostname
-+    fi
-+
-     # set minimal hosts
-     cat <<EOF > $rootfs_path/etc/hosts
--127.0.0.1 localhost $name
-+127.0.0.1 localhost.localdomain localhost $utsname
-+::1                 localhost6.localdomain6 localhost6
- EOF
-     dev_path="${rootfs_path}/dev"
-@@ -118,10 +175,27 @@ configure_fedora_systemd()
- {
-     unlink ${rootfs_path}/etc/systemd/system/default.target
-     touch ${rootfs_path}/etc/fstab
--    chroot ${rootfs_path} ln -s /dev/null //etc/systemd/system/udev.service
-+    chroot ${rootfs_path} ln -s /dev/null /etc/systemd/system/udev.service
-     chroot ${rootfs_path} ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
-     #dependency on a device unit fails it specially that we disabled udev
--    sed -i 's/After=dev-%i.device/After=/' ${rootfs_path}/lib/systemd/system/getty\@.service
-+    # sed -i 's/After=dev-%i.device/After=/' ${rootfs_path}/lib/systemd/system/getty\@.service
-+    #
-+    # Actually, the After=dev-%i.device line does not appear in the
-+    # Fedora 17 or Fedora 18 systemd getty\@.service file.  It may be left
-+    # over from an earlier version and it's not doing any harm.  We do need
-+    # to disable the "ConditionalPathExists=/dev/tty0" line or no gettys are
-+    # started on the ttys in the container.  Lets do it in an override copy of
-+    # the service so it can still pass rpm verifies and not be automatically
-+    # updated by a new systemd version.  --  mhw  /\/\|=mhw=|\/\/
-+
-+    sed -e 's/^ConditionPathExists=/# ConditionPathExists=/' \
-+        -e 's/After=dev-%i.device/After=/' \
-+      < ${rootfs_path}/lib/systemd/system/getty\@.service \
-+      > ${rootfs_path}/etc/systemd/system/getty\@.service
-+    # Setup getty service on the 4 ttys we are going to allow in the
-+    # default config.  Number should match lxc.tty
-+    ( cd ${rootfs_path}/etc/systemd/system/getty.target.wants
-+        for i in 1 2 3 4 ; do ln -sf ../getty\@.service getty@tty${i}.service; done )
- }
- download_fedora()
-@@ -142,27 +216,53 @@ download_fedora()
-     MIRRORLIST_URL="http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$release&arch=$arch"
-     DOWNLOAD_OK=no
--    for trynumber in 1 2 3; do
-+
-+    # We're splitting the old loop into two loops plus a directory retrival.
-+    # First loop...  Try and retrive a mirror list with retries and a slight
-+    # delay between attempts...
-+    for trynumber in 1 2 3 4; do
-         [ $trynumber != 1 ] && echo "Trying again..."
--        MIRROR_URL=$(curl -s -S -f "$MIRRORLIST_URL" | head -n2 | tail -n1)
--        if [ $? -ne 0 ] || [ -z "$MIRROR_URL" ]; then
--            echo "Failed to get a mirror"
--            continue
--        fi
-+      # This code is mildly "brittle" in that it assumes a certain
-+        # page format and parsing HTML.  I've done worse.  :-P
-+        MIRROR_URLS=$(curl -s -S -f "$MIRRORLIST_URL" | sed -e '/^http:/!d' -e '2,6!d')
-+        if [ $? -eq 0 ] && [ -n "$MIRROR_URLS" ]
-+        then
-+              break
-+      fi
-+
-+        echo "Failed to get a mirror on try $trynumber"
-+        sleep 3
-+     done
-+
-+     # This will fall through if we didn't get any URLS above
-+     for MIRROR_URL in ${MIRROR_URLS}
-+     do
-         if [ "$release" -gt "16" ]; then
--            RELEASE_URL="$MIRROR_URL/Packages/f/fedora-release-$release-1.noarch.rpm"
-+            RELEASE_URL="$MIRROR_URL/Packages/f"
-         else
--            RELEASE_URL="$MIRROR_URL/Packages/fedora-release-$release-1.noarch.rpm"
-+            RELEASE_URL="$MIRROR_URL/Packages/"
-         fi
--        echo "Fetching from $RELEASE_URL"
--        curl -f "$RELEASE_URL" > $INSTALL_ROOT/fedora-release-$release.noarch.rpm
-+
-+        echo "Fetching rpm name from $RELEASE_URL..."
-+      # This code is mildly "brittle" in that it assumes a certain directory
-+        # page format and parsing HTML.  I've done worse.  :-P
-+      RELEASE_RPM=$(curl -L -f "$RELEASE_URL" | sed -e "/fedora-release-${release}-/!d" -e 's/.*<a href=\"//' -e 's/\">.*//' )
-+        if [ $? -ne 0  -o "${RELEASE_RPM}" = "" ]; then
-+            echo "Failed to identify fedora release rpm."
-+            continue
-+        fi
-+
-+        echo "Fetching fedora release rpm from ${RELEASE_URL}/${RELEASE_RPM}......"
-+        curl -L -f "${RELEASE_URL}/${RELEASE_RPM}" > ${INSTALL_ROOT}/${RELEASE_RPM}
-         if [ $? -ne 0 ]; then
--            echo "Failed to download fedora release rpm"
-+            echo "Failed to download fedora release rpm ${RELEASE_RPM}."
-             continue
-         fi
-+
-         DOWNLOAD_OK=yes
-         break
-     done
-+
-     if [ $DOWNLOAD_OK != yes ]; then
-         echo "Aborting"
-         return 1
-@@ -170,7 +270,7 @@ download_fedora()
-     mkdir -p $INSTALL_ROOT/var/lib/rpm
-     rpm --root $INSTALL_ROOT  --initdb
--    rpm --root $INSTALL_ROOT -ivh $INSTALL_ROOT/fedora-release-$release.noarch.rpm
-+    rpm --root $INSTALL_ROOT -ivh ${INSTALL_ROOT}/${RELEASE_RPM}
-     $YUM install $PKG_LIST
-     if [ $? -ne 0 ]; then
-@@ -248,10 +348,13 @@ copy_configuration()
-     mkdir -p $config_path
-     grep -q "^lxc.rootfs" $config_path/config 2>/dev/null || echo "lxc.rootfs = $rootfs_path" >> $config_path/config
-     cat <<EOF >> $config_path/config
--lxc.utsname = $name
-+lxc.utsname = $utsname
- lxc.tty = 4
- lxc.pts = 1024
- lxc.mount = $config_path/fstab
-+lxc.cap.drop = sys_module mac_admin mac_override sys_time
-+
-+lxc.autodev = $auto_dev
- # When using LXC with apparmor, uncomment the next line to run unconfined:
- #lxc.aa_profile = unconfined
-@@ -272,7 +375,7 @@ lxc.cgroup.devices.allow = c 1:8 rwm
- lxc.cgroup.devices.allow = c 136:* rwm
- lxc.cgroup.devices.allow = c 5:2 rwm
- # rtc
--lxc.cgroup.devices.allow = c 254:0 rwm
-+lxc.cgroup.devices.allow = c 254:0 rm
- EOF
-     cat <<EOF > $config_path/fstab
-@@ -313,21 +416,23 @@ usage()
-     cat <<EOF
- usage:
-     $1 -n|--name=<container_name>
--        [-p|--path=<path>] [-c|--clean] [-R|--release=<Fedora_release>] [-A|--arch=<arch of the container>]
-+        [-p|--path=<path>] [-c|--clean] [-R|--release=<Fedora_release>] [--fqdn=<network name of container>] [-A|--arch=<arch of the container>]
-         [-h|--help]
- Mandatory args:
-   -n,--name         container name, used to as an identifier for that container from now on
- Optional args:
--  -p,--path         path to where the container rootfs will be created, defaults to @LXCPATH@. The container config will go under @LXCPATH@ in that case
-+  -p,--path         path to where the container will be created, defaults to @LXCPATH@. The container config will go under @LXCPATH@ in that case
-+  --rootfs          path for actual rootfs.
-   -c,--clean        clean the cache
--  -R,--release      Fedora release for the new container. if the host is Fedora, then it will defaultto the host's release.
-+  -R,--release      Fedora release for the new container. if the host is Fedora, then it will default to the host's release.
-+     --fqdn         fully qualified domain name (FQDN) for DNS and system naming
-   -A,--arch         NOT USED YET. Define what arch the container will be [i686,x86_64]
-   -h,--help         print this help
- EOF
-     return 0
- }
--options=$(getopt -o hp:n:cR: -l help,path:,name:,clean,release: -- "$@")
-+options=$(getopt -o hp:n:cR: -l help,path:,rootfs:,name:,clean,release:,fqdn: -- "$@")
- if [ $? -ne 0 ]; then
-     usage $(basename $0)
-     exit 1
-@@ -339,9 +444,11 @@ do
-     case "$1" in
-         -h|--help)      usage $0 && exit 0;;
-         -p|--path)      path=$2; shift 2;;
-+        --rootfs)       rootfs=$2; shift 2;;
-         -n|--name)      name=$2; shift 2;;
-         -c|--clean)     clean=$2; shift 2;;
-         -R|--release)   release=$2; shift 2;;
-+        --fqdn)         utsname=$2; shift 2;;
-         --)             shift 1; break ;;
-         *)              break ;;
-     esac
-@@ -352,6 +459,29 @@ if [ ! -z "$clean" -a -z "$path" ]; then
-     exit 0
- fi
-+if [ -z "${utsname}" ]; then
-+    utsname=${name}
-+fi
-+
-+# This follows a standard "resolver" convention that an FQDN must have
-+# at least two dots or it is considered a local relative host name.
-+# If it doesn't, append the dns domain name of the host system.
-+#
-+# This changes one significant behavior when running
-+# "lxc_create -n Container_Name" without using the
-+# --fqdn option.
-+#
-+# Old behavior:
-+#    utsname and hostname = Container_Name
-+# New behavior:
-+#    utsname and hostname = Container_Name.Domain_Name
-+
-+if [ $(expr "$utsname" : '.*\..*\.') = 0 ]; then
-+    if [ -n "$(dnsdomainname)" ]; then
-+        utsname=${utsname}.$(dnsdomainname)
-+    fi
-+fi
-+
- needed_pkgs=""
- type yum >/dev/null 2>&1
- if [ $? -ne 0 ]; then
-@@ -365,33 +495,43 @@ fi
- if [ -n "$needed_pkgs" ]; then
-     echo "Missing commands: $needed_pkgs"
--    echo "Please install these using \"sudo apt-get install $needed_pkgs\""
-+    echo "Please install these using \"sudo yum install $needed_pkgs\""
-     exit 1
- fi
- if [ -z "$path" ]; then
--    path=$default_path
-+    path=$default_path/$name
- fi
- if [ -z "$release" ]; then
--    if [ "$is_fedora" ]; then
--        release=$(cat /etc/fedora-release |awk '/^Fedora/ {print $3}')
-+    if [ "$is_fedora" -a "$fedora_host_ver" ]; then
-+        release=$fedora_host_ver
-     else
--        echo "This is not a fedora host and release missing, defaulting to 14. use -R|--release to specify release"
--        release=14
-+        echo "This is not a fedora host and release missing, defaulting to 18. use -R|--release to specify release"
-+        release=18
-     fi
- fi
-+# Fedora 15 and above run systemd.  We need autodev enabled to keep
-+# systemd from causing problems.
-+if [ $release -gt 14 ]; then
-+    auto_dev="1"
-+else
-+    auto_dev="0"
-+fi
-+
- if [ "$(id -u)" != "0" ]; then
-     echo "This script should be run as 'root'"
-     exit 1
- fi
--rootfs_path=$path/$name/rootfs
--# check for 'lxc.rootfs' passed in through default config by lxc-create
--if grep -q '^lxc.rootfs' $path/config 2>/dev/null ; then
--    rootfs_path=`grep 'lxc.rootfs =' $path/config | awk -F= '{ print $2 }'`
-+if [ -z "$rootfs_path" ]; then
-+    rootfs_path=$path/rootfs
-+    # check for 'lxc.rootfs' passed in through default config by lxc-create
-+    if grep -q '^lxc.rootfs' $path/config 2>/dev/null ; then
-+        rootfs_path=`grep 'lxc.rootfs =' $path/config | awk -F= '{ print $2 }'`
-+    fi
- fi
- config_path=$default_path/$name
- cache=$cache_base/$release
-@@ -427,13 +567,20 @@ if [ $? -ne 0 ]; then
-     exit 1
- fi
--type /bin/systemd >/dev/null 2>&1
--if [ $? -ne 0 ]; then
--    configure_fedora_init
--else
-+# If the systemd configuration directory exists - set it up for what we need.
-+if [ -d ${rootfs_path}/etc/systemd/system ]
-+then
-     configure_fedora_systemd
- fi
-+# This configuration (rc.sysinit) is not inconsistent with the systemd stuff
-+# above and may actually coexist on some upgraded systems.  Let's just make
-+# sure that, if it exists, we update this file, even if it's not used...
-+if [ -f ${rootfs_path}/etc/rc.sysinit ]
-+then
-+    configure_fedora_init
-+fi
-+
- if [ ! -z $clean ]; then
-     clean || exit 1
-     exit 0
diff --git a/lxc-devpts.patch b/lxc-devpts.patch
deleted file mode 100644 (file)
index 724cfa6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- lxc-0.7.5/src/lxc/conf.c.orig      2011-07-25 00:27:10.000000000 +0200
-+++ lxc-0.7.5/src/lxc/conf.c   2011-10-30 18:30:27.718356070 +0100
-@@ -763,7 +763,7 @@
-       }
-       if (mount("devpts", "/dev/pts", "devpts", MS_MGC_VAL,
--                "newinstance,ptmxmode=0666")) {
-+                "newinstance,ptmxmode=0666,mode=620,gid=5")) {
-               SYSERROR("failed to mount a new instance of '/dev/pts'");
-               return -1;
-       }
index c4d0680727ae85e648abeda9b6f6ff743560c555..ca1677a8dbff63103a9aab985883f5d242769f95 100755 (executable)
@@ -173,7 +173,7 @@ copy_pld()
 
        # make a local copy of the minipld
        echo -n "Copying rootfs to $rootfs_path ..."
-       cp -a $cache/rootfs/ $rootfs_path || return 1
+       cp -a $cache/rootfs/* $rootfs_path || return 1
        return 0
 }
 
@@ -187,7 +187,7 @@ install_pld()
 {
        mkdir -p @LOCALSTATEDIR@/lock/subsys/
        (
-               flock -x 200
+               flock -x 9
                if [ $? -ne 0 ]; then
                        echo "Cache repository is busy."
                        return 1
@@ -218,7 +218,7 @@ install_pld()
                fi
 
                return 0
-       ) 200>@LOCALSTATEDIR@/lock/subsys/lxc-pld
+       ) 9>@LOCALSTATEDIR@/lock/subsys/lxc-pld
 
        return $?
 }
@@ -287,7 +287,7 @@ clean()
 
        # lock, so we won't purge while someone is creating a repository
        (
-               flock -x 200
+               flock -x 9
                if [ $? != 0 ]; then
                        echo "Cache repository is busy."
                        exit 1
@@ -296,7 +296,7 @@ clean()
                echo -n "Purging the download cache for PLD Linux $release..."
                rm --preserve-root --one-file-system -rf $cache && echo "Done." || exit 1
                exit 0
-       ) 200>@LOCALSTATEDIR@/lock/subsys/lxc-pld
+       ) 9>@LOCALSTATEDIR@/lock/subsys/lxc-pld
 }
 
 usage()
index 1d233d2fb5ffaf44bcf53647a6006a670674c141..372600ed2423bba2397904ed0c700b2c629b98b3 100644 (file)
@@ -1,38 +1,29 @@
---- lxc-0.9.0/configure.ac     2013-11-17 11:42:38.205255771 +0200
-+++ lxc-0.9.0/configure.ac     2013-04-17 20:04:27.905564169 +0200
-@@ -67,7 +67,7 @@
+--- lxc-lxc-1.0.0.beta2/configure.ac~  2014-01-16 02:07:33.000000000 +0200
++++ lxc-lxc-1.0.0.beta2/configure.ac   2014-02-13 10:09:36.273870378 +0200
+@@ -136,7 +136,7 @@
+ if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
        db2xman=""
+-      dbparsers="docbook2x-man db2x_docbook2man docbook2man docbook-to-man"
++      dbparsers="docbook2X2man docbook2x-man db2x_docbook2man docbook2man docbook-to-man"
  
        AC_MSG_CHECKING(for docbook2x-man)
--      for name in docbook2x-man db2x_docbook2man; do
-+      for name in docbook2X2man docbook2x-man db2x_docbook2man; do
-               if "$name" --help >/dev/null 2>&1; then
-                       db2xman="$name"
-                       break;
-@@ -140,6 +140,8 @@
- # Lua module and scripts
- if test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu" ; then
-     LUAPKGCONFIG=lua5.1
-+elif test x"$with_distro" = "xpld"; then
-+    LUAPKGCONFIG=lua51
- else
-     LUAPKGCONFIG=lua
- fi
-@@ -363,6 +365,7 @@
+       for name in ${dbparsers}; do
+@@ -650,6 +650,7 @@
        templates/lxc-opensuse
-       templates/lxc-busybox
-       templates/lxc-fedora
-+      templates/lxc-pld
        templates/lxc-oracle
-       templates/lxc-altlinux
+       templates/lxc-plamo
++      templates/lxc-pld
        templates/lxc-sshd
---- lxc-0.9.0/templates/Makefile.am~   2013-03-19 00:17:01.000000000 +0200
-+++ lxc-0.9.0/templates/Makefile.am    2013-11-17 03:44:48.326889371 +0200
-@@ -6,6 +6,7 @@
-       lxc-ubuntu-cloud \
+       templates/lxc-ubuntu
+       templates/lxc-ubuntu-cloud
+--- lxc-lxc-1.0.0.beta2/templates/Makefile.am~ 2014-01-16 02:07:33.000000000 +0200
++++ lxc-lxc-1.0.0.beta2/templates/Makefile.am  2014-02-13 10:10:14.378961481 +0200
+@@ -15,6 +15,7 @@
        lxc-opensuse \
-       lxc-fedora \
-+      lxc-pld \
        lxc-oracle \
-       lxc-altlinux \
-       lxc-busybox \
+       lxc-plamo \
++      lxc-pld \
+       lxc-sshd \
+       lxc-ubuntu \
+       lxc-ubuntu-cloud
index b9c3fa4087b6fa51d89838eb7b0456af3bf7703f..baf547967509974d8193dfefbdf32596ef13ee21 100644 (file)
--- a/lxc.spec
+++ b/lxc.spec
@@ -1,32 +1,33 @@
-#
+# TODO
+# - bash-completion: /etc/bash_completion.d/lxc
+# - package apparmor stuff
+
 # Conditional build:
 %bcond_without seccomp # SecComp syscall filter
 %bcond_without apparmor        # apparmor
 %bcond_without lua     # Lua binding
 %bcond_without python  # Python binding
+%bcond_with    selinux # SELinux
+%bcond_with    cgmanager       # Enable cgmanager (BR: libcgmanager, libnih >= 1.0.2, libnih-dbus >= 1.0.0, dbus-1 >= 1.2.16)
 
-Summary:       Linux Container Tools
+Summary:       Linux Containers userspace tools
 Summary(pl.UTF-8):     Narzędzia do kontenerów linuksowych (LXC)
 Name:          lxc
-Version:       0.9.0
-Release:       6
+Version:       1.0.0
+Release:       0.2
 License:       LGPL v2.1+
 Group:         Applications/System
-Source0:       http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz
-# Source0-md5: 8552a4479090616f4bc04d8473765fc9
+Source0:       http://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz
+# Source0-md5: 87a9d168a6e55326303cce3b2cb7f82e
 Source1:       %{name}-pld.in.sh
-Patch0:                %{name}-devpts.patch
 Patch1:                %{name}-pld.patch
-Patch2:                am-1.14.patch
-Patch3:                checkconfig-module.patch
-Patch4:                checkconfig-vserver-config.patch
-Patch5:                fedora-template.patch
-URL:           http://lxc.sourceforge.net/
+URL:           http://linuxcontainers.org/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
 BuildRequires: docbook-dtd30-sgml
 BuildRequires: docbook-utils
 BuildRequires: docbook2X
+BuildRequires: gnutls-devel
 %{?with_apparmor:BuildRequires:        libapparmor-devel}
 BuildRequires: libcap-devel
 %{?with_seccomp:BuildRequires: libseccomp-devel}
@@ -94,6 +95,7 @@ Summary(pl.UTF-8):    Wiązanie Pythona (3.x) do LXC
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      python3-libs >= 3.2
+Requires:      python3-modules
 
 %description -n python3-lxc
 Python (3.x) binding for LXC.
@@ -103,12 +105,7 @@ Wiązanie Pythona (3.x) do LXC.
 
 %prep
 %setup -q
-%patch0 -p1
 %patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
 
 cp -p %{SOURCE1} templates/lxc-pld.in
 
@@ -120,12 +117,17 @@ cp -p %{SOURCE1} templates/lxc-pld.in
 %configure \
        db2xman=docbook2X2man \
        --disable-rpath \
+       --enable-bash \
        --enable-doc \
+       --enable-examples \
        %{__enable_disable apparmor} \
-       %{__enable_disable lua} \
+       %{__enable_disable lua} %{?with_lua:--with-lua-pc=lua51} \
        %{__enable_disable python} \
        %{__enable_disable seccomp} \
+       %{__enable_disable selinux} \
        --with-config-path=%{configpath} \
+       --with-init-script=sysvinit,systemd \
+       --with-runtime-path=/var/run \
        --with-distro=pld
 
 %{__make}
@@ -135,8 +137,9 @@ cp -p %{SOURCE1} templates/lxc-pld.in
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{configpath},/var/{cache,log}/lxc}
 %{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT \
-       pcdatadir=%{_pkgconfigdir}
+       SYSTEMD_UNIT_DIR=%{systemdunitdir} \
+       pcdatadir=%{_pkgconfigdir} \
+       DESTDIR=$RPM_BUILD_ROOT
 
 %{__make} -C doc install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -159,69 +162,95 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf
+%doc AUTHORS CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf
 %attr(755,root,root) %{_bindir}/lxc-attach
+%attr(755,root,root) %{_bindir}/lxc-autostart
 %attr(755,root,root) %{_bindir}/lxc-cgroup
 %attr(755,root,root) %{_bindir}/lxc-checkconfig
-%attr(755,root,root) %{_bindir}/lxc-checkpoint
 %attr(755,root,root) %{_bindir}/lxc-clone
+%attr(755,root,root) %{_bindir}/lxc-config
 %attr(755,root,root) %{_bindir}/lxc-console
 %attr(755,root,root) %{_bindir}/lxc-create
 %attr(755,root,root) %{_bindir}/lxc-destroy
 %attr(755,root,root) %{_bindir}/lxc-execute
 %attr(755,root,root) %{_bindir}/lxc-freeze
 %attr(755,root,root) %{_bindir}/lxc-info
-%attr(755,root,root) %{_bindir}/lxc-kill
 %attr(755,root,root) %{_bindir}/lxc-monitor
-%attr(755,root,root) %{_bindir}/lxc-netstat
-%attr(755,root,root) %{_bindir}/lxc-ps
-%attr(755,root,root) %{_bindir}/lxc-restart
-%attr(755,root,root) %{_bindir}/lxc-shutdown
+%attr(755,root,root) %{_bindir}/lxc-snapshot
 %attr(755,root,root) %{_bindir}/lxc-start
 %attr(755,root,root) %{_bindir}/lxc-stop
 %attr(755,root,root) %{_bindir}/lxc-unfreeze
 %attr(755,root,root) %{_bindir}/lxc-unshare
-%attr(755,root,root) %{_bindir}/lxc-version
+%attr(755,root,root) %{_bindir}/lxc-usernsexec
 %attr(755,root,root) %{_bindir}/lxc-wait
 %attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/liblxc.so.0
-%dir %{_libdir}/lxc
-%dir %{_libdir}/lxc/rootfs
-%{_libdir}/lxc/rootfs/README
-%attr(755,root,root) %{_libdir}/lxc/lxc-init
+%attr(755,root,root) %ghost %{_libdir}/liblxc.so.1
+%attr(754,root,root) /etc/rc.d/init.d/lxc
+%{systemdunitdir}/lxc.service
+%dir %{_libdir}/%{name}
+%dir %{_libdir}/%{name}/rootfs
+%{_libdir}/%{name}/rootfs/README
+%attr(755,root,root) %{_libdir}/%{name}/lxc-devsetup
+%attr(755,root,root) %{_libdir}/%{name}/lxc-init
+%attr(755,root,root) %{_libdir}/%{name}/lxc-monitord
+%attr(755,root,root) %{_libdir}/%{name}/lxc-user-nic
 %dir %{_sysconfdir}/lxc
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
-%dir %{_datadir}/lxc
+%dir %{_datadir}/%{name}
 %{_datadir}/%{name}/lxc.functions
+%dir %{_datadir}/%{name}/config
+%{_datadir}/%{name}/config/centos.*.conf
+%{_datadir}/%{name}/config/debian.*.conf
+%{_datadir}/%{name}/config/fedora.*.conf
+%{_datadir}/%{name}/config/gentoo.*.conf
+%{_datadir}/%{name}/config/oracle.*.conf
+%{_datadir}/%{name}/config/plamo.*.conf
+%{_datadir}/%{name}/config/ubuntu-cloud.*.conf
+%{_datadir}/%{name}/config/ubuntu.*.conf
 %dir %{_datadir}/%{name}/hooks
 %dir %{_datadir}/%{name}/templates
+%attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname
 %attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
+%attr(755,root,root) %{_datadir}/%{name}/hooks/squid-deb-proxy-client
+%attr(755,root,root) %{_datadir}/%{name}/hooks/ubuntu-cloud-prep
 %attr(755,root,root) %{_datadir}/%{name}/templates/lxc-*
 %{_mandir}/man1/lxc-attach.1*
+%{_mandir}/man1/lxc-autostart.1*
 %{_mandir}/man1/lxc-cgroup.1*
 %{_mandir}/man1/lxc-checkconfig.1*
-%{_mandir}/man1/lxc-checkpoint.1*
 %{_mandir}/man1/lxc-clone.1*
+%{_mandir}/man1/lxc-config.1*
 %{_mandir}/man1/lxc-console.1*
 %{_mandir}/man1/lxc-create.1*
 %{_mandir}/man1/lxc-destroy.1*
 %{_mandir}/man1/lxc-execute.1*
 %{_mandir}/man1/lxc-freeze.1*
 %{_mandir}/man1/lxc-info.1*
-%{_mandir}/man1/lxc-kill.1*
 %{_mandir}/man1/lxc-monitor.1*
-%{_mandir}/man1/lxc-netstat.1*
-%{_mandir}/man1/lxc-ps.1*
-%{_mandir}/man1/lxc-restart.1*
-%{_mandir}/man1/lxc-shutdown.1*
+%{_mandir}/man1/lxc-snapshot.1*
 %{_mandir}/man1/lxc-start.1*
 %{_mandir}/man1/lxc-stop.1*
 %{_mandir}/man1/lxc-unfreeze.1*
 %{_mandir}/man1/lxc-unshare.1*
-%{_mandir}/man1/lxc-version.1*
+%{_mandir}/man1/lxc-user-nic.1*
+%{_mandir}/man1/lxc-usernsexec.1*
 %{_mandir}/man1/lxc-wait.1*
+%{_mandir}/man5/lxc-usernet.5*
 %{_mandir}/man5/lxc.conf.5*
+%{_mandir}/man5/lxc.container.conf.5*
+%{_mandir}/man5/lxc.system.conf.5*
 %{_mandir}/man7/lxc.7*
+%lang(ja) %{_mandir}/ja/man1/lxc*.1*
+%lang(ja) %{_mandir}/ja/man5/lxc-usernet.5*
+%lang(ja) %{_mandir}/ja/man5/lxc.conf.5*
+%lang(ja) %{_mandir}/ja/man5/lxc.container.conf.5*
+%lang(ja) %{_mandir}/ja/man5/lxc.system.conf.5*
+%lang(ja) %{_mandir}/ja/man7/lxc.7*
+%exclude %{_mandir}/ja/man1/lxc-device.1*
+%exclude %{_mandir}/ja/man1/lxc-ls.1*
+%exclude %{_mandir}/ja/man1/lxc-start-ephemeral.1*
+%exclude %{_mandir}/ja/man1/lxc-top.1*
+
 %if %{without python}
 # legacy version
 %attr(755,root,root) %{_bindir}/lxc-ls
@@ -242,10 +271,11 @@ rm -rf $RPM_BUILD_ROOT
 %files -n lua-lxc
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/lxc-top
-%dir %{_libdir}/lua/5.1/lxc
-%attr(755,root,root) %{_libdir}/lua/5.1/lxc/core.so
-%{_datadir}/lua/5.1/lxc.lua
+%dir %{_libdir}/lua/lxc
+%attr(755,root,root) %{_libdir}/lua/lxc/core.so
+%{_datadir}/lua/lxc.lua
 %{_mandir}/man1/lxc-top.1*
+%lang(ja) %{_mandir}/ja/man1/lxc-top.1*
 %endif
 
 %if %{with python}
@@ -260,4 +290,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/lxc-device.1*
 %{_mandir}/man1/lxc-ls.1*
 %{_mandir}/man1/lxc-start-ephemeral.1*
+%lang(ja) %{_mandir}/ja/man1/lxc-device.1*
+%lang(ja) %{_mandir}/ja/man1/lxc-ls.1*
+%lang(ja) %{_mandir}/ja/man1/lxc-start-ephemeral.1*
 %endif
This page took 0.201939 seconds and 4 git commands to generate.