]> git.pld-linux.org Git - packages/lxc.git/commitdiff
Version: 1.1.1
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 2 Apr 2015 13:11:07 +0000 (15:11 +0200)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 2 Apr 2015 13:11:07 +0000 (15:11 +0200)
Use upstream init script – shares code with the systemd unit.

lxc-pld.patch
lxc.init [deleted file]
lxc.spec

index 372600ed2423bba2397904ed0c700b2c629b98b3..accf43733e640fd1aea84d86c1e35513ab822c13 100644 (file)
@@ -1,6 +1,26 @@
---- 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 @@
+diff -durN -x '*~' -x '*.orig' lxc-1.1.1.orig/configure.ac lxc-1.1.1/configure.ac
+--- lxc-1.1.1.orig/configure.ac        2015-03-16 20:57:47.000000000 +0100
++++ lxc-1.1.1/configure.ac     2015-04-02 14:40:25.000000000 +0200
+@@ -63,7 +63,7 @@
+               distroconf=default.conf.lxcbr
+               distrosysconf="$sysconfdir/default"
+               ;;
+-      redhat|centos|fedora|oracle|oracleserver|suse|opensuse*)
++      redhat|centos|fedora|oracle|oracleserver|suse|opensuse*|pld)
+               distroconf=default.conf.lxcbr
+               distrosysconf="$sysconfdir/sysconfig"
+               ;;
+@@ -99,6 +99,9 @@
+                       ubuntu)
+                               init_script=upstart,systemd
+                               ;;
++                      pld)
++                              init_script=upstart,systemd
++                              ;;
+                       *)
+                               echo -n "Linux distribution init system unknown."
+                               init_script=
+@@ -152,7 +154,7 @@
  
  if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
        db2xman=""
@@ -9,7 +29,7 @@
  
        AC_MSG_CHECKING(for docbook2x-man)
        for name in ${dbparsers}; do
-@@ -650,6 +650,7 @@
+@@ -756,6 +758,7 @@
        templates/lxc-opensuse
        templates/lxc-oracle
        templates/lxc-plamo
@@ -17,8 +37,9 @@
        templates/lxc-sshd
        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
+diff -durN -x '*~' -x '*.orig' lxc-1.1.1.orig/templates/Makefile.am lxc-1.1.1/templates/Makefile.am
+--- lxc-1.1.1.orig/templates/Makefile.am       2015-03-16 20:57:47.000000000 +0100
++++ lxc-1.1.1/templates/Makefile.am    2015-04-02 14:38:17.000000000 +0200
 @@ -15,6 +15,7 @@
        lxc-opensuse \
        lxc-oracle \
diff --git a/lxc.init b/lxc.init
deleted file mode 100755 (executable)
index 2a134e2..0000000
--- a/lxc.init
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/bin/sh
-#
-# lxc Start/Stop LXC autoboot containers
-#
-# chkconfig: 345 99 01
-# description: Starts/Stops all LXC containers configured for autostart.
-#
-### BEGIN INIT INFO
-# Provides: lxc
-# Default-Start: 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Bring up/down LXC autostart containers
-# Description: Bring up/down LXC autostart containers
-### END INIT INFO
-
-# set -x
-
-sysconfdir="/etc"
-bindir="/usr/bin"
-localstatedir="/var"
-
-# These can be overridden in /etc/sysconfig/lxc
-
-# BOOTGROUPS - What groups should start on bootup?
-#      Comma separated list of groups.
-#      Leading comma, trailing comma or embedded double
-#      comma indicates when the NULL group should be run.
-# Example (default): boot the onboot group first then the NULL group
-BOOTGROUPS="onboot,"
-
-# SHUTDOWNDELAY - Wait time for a container to shut down.
-#      ner shutdown can result in lengthy system
-#      shutdown times.  Even 5 seconds per container can be
-#      too long.
-SHUTDOWNDELAY=5
-
-# OPTIONS can be used for anything else.
-#      If you want to boot everything then
-#      options can be "-a" or "-a -A".
-OPTIONS=
-
-# STOPOPTS are stop options.  The can be used for anything else to stop.
-#      If you want to kill containers fast, use -k
-# --all         list all auto-started containers (ignore groups)
-# --shutdown    shutdown the containers instead of starting them
-STOPOPTS="--all --shutdown"
-
-# Source function library.
-test ! -r "$sysconfdir"/rc.d/init.d/functions ||
-        . "$sysconfdir"/rc.d/init.d/functions
-
-# Source any configurable options
-test ! -r "$sysconfdir"/sysconfig/lxc ||
-        . "$sysconfdir"/sysconfig/lxc
-
-# Check for needed utility program
-[ -x "$bindir"/lxc-autostart ] || exit 1
-
-# If libvirtd is providing the bridge, it might not be
-# immediately available, so wait a bit for it before starting
-# up the containers or else any that use the bridge will fail
-# to start
-wait_for_bridge()
-{
-    [ -f "$sysconfdir"/lxc/default.conf ] || { return 0; }
-
-    which ifconfig >/dev/null 2>&1
-    if [ $? = 0 ]; then
-        cmd="ifconfig -a"
-    else
-        which ip >/dev/null 2>&1
-        if [ $? = 0 ]; then
-            cmd="ip link list"
-        fi
-    fi
-    [ -n cmd ] || { return 0; }
-
-    BRNAME=`grep '^[   ]*lxc.network.link' "$sysconfdir"/lxc/default.conf | sed 's/^.*=[       ]*//'`
-    if [ -z "$BRNAME" ]; then
-       return 0
-    fi
-
-    for try in `seq 1 30`; do
-       eval $cmd |grep "^$BRNAME" >/dev/null 2>&1
-       if [ $? = 0 ]; then
-           return
-       fi
-       sleep 1
-    done
-}
-
-# See how we were called.
-case "$1" in
-  start)
-       [ ! -f "$localstatedir"/lock/subsys/lxc ] || { exit 0; }
-
-       if [ -n "$BOOTGROUPS" ]
-       then
-               BOOTGROUPS="-g $BOOTGROUPS"
-       fi
-
-       # Start containers
-       CONTAINERS_LIST=`/usr/bin/lxc-autostart $OPTIONS $BOOTGROUPS --list | tr '\n' ' '`
-       # echo "DEBUG: CONTAINERS_LIST=${CONTAINERS_LIST}"
-        run_cmd "$(nls "Starting LXC containers (%s) from groups: %s " "$CONTAINERS_LIST" "$BOOTGROUPS")" /usr/bin/lxc-autostart $OPTIONS $BOOTGROUPS
-       touch "$localstatedir"/lock/subsys/lxc
-       ;;
-  stop)
-       if [ -n "$SHUTDOWNDELAY" ]
-       then
-               SHUTDOWNDELAY="-t $SHUTDOWNDELAY"
-       fi
-
-       # The stop is serialized and can take excessive time.  We need to avoid
-       # delaying the system shutdown / reboot as much as we can since it's not
-       # parallelized...  Even 5 second timout may be too long.
-       CONTAINERS_LIST=`/usr/bin/lxc-autostart $STOPOPTS --list | tr '\n' ' '`
-       run_cmd "$(nls "Stopping running LXC containers (%s) " "$CONTAINERS_LIST")" /usr/bin/lxc-autostart $STOPOPTS $SHUTDOWNDELAY
-       rm -f "$localstatedir"/lock/subsys/lxc
-       ;;
-  restart|reload|force-reload)
-       $0 stop
-       $0 start
-       ;;
-  status)
-       lxc-ls --fancy  --fancy-format name,state,pid,ipv4,ipv6,memory,ram,swap    # NOTE: python3-lxc is needed for lxc-ls
-       ;;
-  *)
-       echo $"Usage: $0 {start|stop|restart|reload|force-reload}"
-       exit 2
-esac
-exit $?
index dfaf3facc3a59c3f34c1bf8c801c9491d035f155..49c8d2800322f5e8545375a19a13e8a44020f438 100644 (file)
--- a/lxc.spec
+++ b/lxc.spec
@@ -1,4 +1,5 @@
 # TODO
+# - what to do lxc_macvlan.init, when upstream provided lxc-net.init?
 # - package apparmor stuff
 
 # Conditional build:
 Summary:       Linux Containers userspace tools
 Summary(pl.UTF-8):     Narzędzia do kontenerów linuksowych (LXC)
 Name:          lxc
-Version:       1.0.7
-Release:       4
+Version:       1.1.1
+Release:       0.1
 License:       LGPL v2.1+
 Group:         Applications/System
 Source0:       https://www.linuxcontainers.org/downloads/%{name}-%{version}.tar.gz
-# Source0-md5: b48f468a9bef0e4e140dd723f0a65ad0
+# Source0-md5: d80cb08f0edf36f0887e32c96aec8c13
 Source1:       %{name}-pld.in.sh
-Source2:       %{name}.init
-Source3:       %{name}_macvlan.init
-Source4:       %{name}_macvlan.sysconfig
+Source2:       %{name}_macvlan.init
+Source3:       %{name}_macvlan.sysconfig
 Patch0:                %{name}-pld.patch
 Patch1:                x32.patch
 URL:           https://www.linuxcontainers.org/
@@ -180,9 +180,8 @@ install -d $RPM_BUILD_ROOT{%{configpath},%{configpath}snap,/var/{cache,log}/lxc}
 # yum plugin, no idea where to package this
 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/lxc-patch.py
 
-install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc
-install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc_macvlan
-install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/lxc_macvlan
+install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc_macvlan
+install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/lxc_macvlan
 
 %if %{with python}
 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
@@ -218,6 +217,7 @@ fi
 %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
@@ -238,32 +238,47 @@ fi
 %attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/liblxc.so.1
 %attr(754,root,root) /etc/rc.d/init.d/lxc
+%attr(754,root,root) /etc/rc.d/init.d/lxc-net
 %attr(754,root,root) /etc/rc.d/init.d/lxc_macvlan
 
 %{systemdunitdir}/lxc.service
+%{systemdunitdir}/lxc-net.service
 %dir %{_libdir}/%{name}
 %dir %{_libdir}/%{name}/rootfs
 %{_libdir}/%{name}/rootfs/README
+%attr(755,root,root) %{_libdir}/%{name}/lxc-apparmor-load
+%attr(755,root,root) %{_libdir}/%{name}/lxc-containers
 %attr(755,root,root) %{_libdir}/%{name}/lxc-devsetup
 %attr(755,root,root) %{_libdir}/%{name}/lxc-monitord
+%attr(755,root,root) %{_libdir}/%{name}/lxc-net
 %attr(755,root,root) %{_libdir}/%{name}/lxc-user-nic
-%attr(755,root,root) %{_libdir}/%{name}/lxc-autostart-helper
 %dir %{_sysconfdir}/lxc
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lxc_macvlan
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lxc
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
 %dir %{_datadir}/%{name}
 %{_datadir}/%{name}/lxc.functions
+%attr(755,root,root) %{_datadir}/%{name}/lxc-restore-net
 %dir %{_datadir}/%{name}/config
+%{_datadir}/%{name}/config/archlinux.*.conf
 %{_datadir}/%{name}/config/centos.*.conf
+%{_datadir}/%{name}/config/common.conf
+%dir %{_datadir}/%{name}/config/common.conf.d
+%{_datadir}/%{name}/config/common.conf.d/README
 %{_datadir}/%{name}/config/common.seccomp
 %{_datadir}/%{name}/config/debian.*.conf
 %{_datadir}/%{name}/config/fedora.*.conf
 %{_datadir}/%{name}/config/gentoo.*.conf
+%{_datadir}/%{name}/config/opensuse.*.conf
+%{_datadir}/%{name}/config/openwrt.*.conf
 %{_datadir}/%{name}/config/oracle.*.conf
 %{_datadir}/%{name}/config/plamo.*.conf
 %{_datadir}/%{name}/config/ubuntu-cloud.*.conf
 %{_datadir}/%{name}/config/ubuntu.*.conf
+%{_datadir}/%{name}/config/userns.conf
 %dir %{_datadir}/%{name}/hooks
+%dir %{_datadir}/%{name}/selinux
+%{_datadir}/%{name}/selinux/*
 %dir %{_datadir}/%{name}/templates
 %attr(755,root,root) %{_datadir}/%{name}/hooks/clonehostname
 %attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
@@ -274,6 +289,7 @@ fi
 %{_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*
This page took 0.103452 seconds and 4 git commands to generate.