summaryrefslogtreecommitdiffstats
path: root/source/ap/cgmanager
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/cgmanager')
-rwxr-xr-xsource/ap/cgmanager/cgmanager.SlackBuild171
-rw-r--r--source/ap/cgmanager/cgmanager.url1
-rw-r--r--source/ap/cgmanager/config/rc.cgmanager56
-rw-r--r--source/ap/cgmanager/config/rc.cgproxy58
-rw-r--r--source/ap/cgmanager/doinst.sh27
-rw-r--r--source/ap/cgmanager/slack-desc19
6 files changed, 0 insertions, 332 deletions
diff --git a/source/ap/cgmanager/cgmanager.SlackBuild b/source/ap/cgmanager/cgmanager.SlackBuild
deleted file mode 100755
index 632166164..000000000
--- a/source/ap/cgmanager/cgmanager.SlackBuild
+++ /dev/null
@@ -1,171 +0,0 @@
-#!/bin/bash
-
-# Copyright 2014, 2015, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# Modified by Matteo Bernardini <ponce@slackbuilds.org> (2014)
-
-cd $(dirname $0) ; CWD=$(pwd)
-
-PKGNAM=cgmanager
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | rev | cut -f 2- -d -)}
-BUILD=${BUILD:-1}
-
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i586 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
- esac
-fi
-
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
-if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
- echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
- exit 0
-fi
-
-NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
-
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-$PKGNAM
-
-rm -rf $PKG
-mkdir -p $TMP $PKG
-
-cd $TMP
-rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
-cd $PKGNAM-$VERSION || exit 1
-
-chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \+ -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \+
-
-./bootstrap.sh
-
-# Configure:
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
- --infodir=/usr/info \
- --enable-static=no \
- --with-distro=slackware \
- --with-pamdir=none \
- --build=$ARCH-slackware-linux || exit 1
-
-# Build and install:
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
-
-# Install compat symlink
-mkdir -p $PKG/usr/sbin
-ln -s /usr/libexec/cgmanager/cgm-release-agent $PKG/usr/sbin/cgm-release-agent
-
-# Remove .la files:
-rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
-
-# Strip binaries:
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
-
-# Remove broken init scripts:
-rm -f $PKG/etc/rc.d/rc.*
-
-# Add good init scripts:
-mkdir -p $PKG/etc/rc.d
-cat $CWD/config/rc.cgmanager > $PKG/etc/rc.d/rc.cgmanager.new
-cat $CWD/config/rc.cgproxy > $PKG/etc/rc.d/rc.cgproxy.new
-
-# Run cgmanager by default:
-chmod 755 $PKG/etc/rc.d/rc.cgmanager.new
-
-# Make this executable by default as well, so that "rc.cgmanager start" will
-# start cgproxy in a container:
-chmod 755 $PKG/etc/rc.d/rc.cgproxy.new
-
-# No need for these in the package:
-rm -rf $PKG/usr/share/cgmanager/tests
-rmdir --parents $PKG/usr/share/cgmanager 2>/dev/null
-
-# Add a documentation directory:
-mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
-cp -a \
- AUTHORS CONTRIBUTING COPYING* MAINTAINERS NEWS README* TODO \
- $PKG/usr/doc/${PKGNAM}-$VERSION
-
-# Compress and if needed symlink the man pages:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
- for manpagedir in $(find . -type d -name "man*") ; do
- ( cd $manpagedir
- for eachpage in $( find . -type l -maxdepth 1) ; do
- ln -s $( readlink $eachpage ).gz $eachpage.gz
- rm $eachpage
- done
- gzip -9 *.?
- )
- done
- )
-fi
-
-# If there's a ChangeLog, installing at least part of the recent history
-# is useful, but don't let it get totally out of control:
-if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
- cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
- touch -r ChangeLog $DOCSDIR/ChangeLog
-fi
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
-
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/ap/cgmanager/cgmanager.url b/source/ap/cgmanager/cgmanager.url
deleted file mode 100644
index 3bfd1a37d..000000000
--- a/source/ap/cgmanager/cgmanager.url
+++ /dev/null
@@ -1 +0,0 @@
-https://linuxcontainers.org/cgmanager/downloads/
diff --git a/source/ap/cgmanager/config/rc.cgmanager b/source/ap/cgmanager/config/rc.cgmanager
deleted file mode 100644
index 56f355d61..000000000
--- a/source/ap/cgmanager/config/rc.cgmanager
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-
-# /etc/rc.d/rc.cgmanager - start/stop the cgroup manager
-
-if [ -f /etc/default/cgmanager ]; then
- # get cgmanager options if specified
- . /etc/default/cgmanager
-fi
-
-start_cgmanager() {
- # Kill any existing cgproxy
- /bin/sh /etc/rc.d/rc.cgproxy stop >/dev/null 2>&1 || true
- # check whether to start cgproxy or cgmanager
- if /usr/sbin/cgproxy --check-master; then
- if [ -x /etc/rc.d/rc.cgproxy -a ! -r /run/cgmanager.pid ]; then
- NESTED=yes /etc/rc.d/rc.cgproxy start || true && { exit 0; }
- else
- # If we are here, either cgmanager is already running (in which case
- # we don't want to run it again), or rc.cgproxy is not executable
- # (in which case we don't want to run it).
- echo "Error: rc.cgproxy is not executable, or attempting to start multiple instances of cgmanager"
- exit 1
- fi
- fi
- echo "Starting cgmanager: /usr/sbin/cgmanager --daemon"
- /usr/sbin/cgmanager --daemon
-}
-
-stop_cgmanager() {
- # If the cgmanager stops, the proxy must also stop
- /bin/sh /etc/rc.d/rc.cgproxy stop >/dev/null 2>&1 || true
- echo "Stopping cgmanager."
- /bin/kill $(cat /run/cgmanager.pid 2>/dev/null) 2>/dev/null
- /usr/bin/pkill --exact /usr/sbin/cgmanager 2>/dev/null
- rm -f /run/cgmanager.pid
-}
-
-restart_cgmanager() {
- stop_cgmanager
- sleep 1
- start_cgmanager
-}
-
-case "$1" in
-'start')
- start_cgmanager
- ;;
-'stop')
- stop_cgmanager
- ;;
-'restart')
- restart_cgmanager
- ;;
-*)
- echo "usage $0 start|stop|restart"
-esac
diff --git a/source/ap/cgmanager/config/rc.cgproxy b/source/ap/cgmanager/config/rc.cgproxy
deleted file mode 100644
index 59a61b78d..000000000
--- a/source/ap/cgmanager/config/rc.cgproxy
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-# /etc/rc.d/rc.cgproxy - start/stop the cgroup proxy manager
-
-if [ -f /etc/default/cgproxy ]; then
- # get cgproxy options if specified
- . /etc/default/cgproxy
-fi
-
-start_cgproxy() {
- # cgproxy should only run on container unless on older kernel
- if [ -e /proc/self/ns/pid ] && [ "$NESTED" != "yes" ]; then
- echo "Error: cgproxy should only run inside containers"
- exit 0
- fi
- echo "Starting cgproxy: /usr/sbin/cgproxy --daemon"
- /usr/sbin/cgproxy --daemon
-}
-
-stop_cgproxy() {
- if ps -C cgproxy | grep -q cgproxy 2>/dev/null ; then
- echo "Stopping cgproxy."
- if ! /bin/kill $(cat /run/cgproxy.pid 2>/dev/null) 2>/dev/null ; then
- sleep 1
- echo "Sending cgproxy the TERM signal."
- if ! /usr/bin/pkill --exact -TERM /usr/sbin/cgproxy ; then
- sleep 5
- echo "Sending cgproxy the KILL signal."
- /usr/bin/pkill --exact -KILL /usr/sbin/cgproxy
- sleep 5
- if ps -C cgproxy | grep -q cgproxy 2>/dev/null ; then
- echo "Error: couldn't stop cgproxy."
- fi
- fi
- fi
- rm -f /run/cgproxy.pid
- fi
-}
-
-restart_cgproxy() {
- stop_cgproxy
- sleep 1
- start_cgproxy
-}
-
-case "$1" in
-'start')
- start_cgproxy
- ;;
-'stop')
- stop_cgproxy
- ;;
-'restart')
- restart_cgproxy
- ;;
-*)
- echo "usage $0 start|stop|restart"
-esac
diff --git a/source/ap/cgmanager/doinst.sh b/source/ap/cgmanager/doinst.sh
deleted file mode 100644
index e12ae79e7..000000000
--- a/source/ap/cgmanager/doinst.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-config() {
- NEW="$1"
- OLD="$(dirname $NEW)/$(basename $NEW .new)"
- # If there's no config file by that name, mv it over:
- if [ ! -r $OLD ]; then
- mv $NEW $OLD
- elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
- # toss the redundant copy
- rm $NEW
- fi
- # Otherwise, we leave the .new copy for the admin to consider...
-}
-
-preserve_perms() {
- NEW="$1"
- OLD="$(dirname $NEW)/$(basename $NEW .new)"
- if [ -e $OLD ]; then
- cp -a $OLD ${NEW}.incoming
- cat $NEW > ${NEW}.incoming
- mv ${NEW}.incoming $NEW
- fi
- config $NEW
-}
-
-preserve_perms etc/rc.d/rc.cgmanager.new
-preserve_perms etc/rc.d/rc.cgproxy.new
-
diff --git a/source/ap/cgmanager/slack-desc b/source/ap/cgmanager/slack-desc
deleted file mode 100644
index f60cd2fcf..000000000
--- a/source/ap/cgmanager/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-cgmanager: cgmanager (Control Group manager daemons)
-cgmanager:
-cgmanager: CGManager manages all your cgroups for you through a simple DBus API.
-cgmanager: It's designed to work with nested LXC containers as well as accepting
-cgmanager: unprivileged requests including resolving user namespaces UIDs/GIDs.
-cgmanager:
-cgmanager: The package contains two daemons: cgmanager (which runs on the host),
-cgmanager: and cgproxy (which runs in containers).
-cgmanager:
-cgmanager: Homepage: https://linuxcontainers.org/cgmanager/
-cgmanager: