diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-25 08:21:32 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-25 08:21:32 +0000 |
commit | 85088abd96ce396e6daac5d268dfcc19ccfd2467 (patch) | |
tree | 6d6e52573a003affa87cc8a93abaa009f524190c /community/cgmanager | |
parent | 55963d969dcdb8951fe535dea8ae9e4fc0a95427 (diff) | |
download | aports-85088abd96ce396e6daac5d268dfcc19ccfd2467.tar.bz2 aports-85088abd96ce396e6daac5d268dfcc19ccfd2467.tar.xz |
community/cgmanager: moved from testing
Diffstat (limited to 'community/cgmanager')
-rw-r--r-- | community/cgmanager/APKBUILD | 54 | ||||
-rw-r--r-- | community/cgmanager/cgmanager.initd | 28 | ||||
-rw-r--r-- | community/cgmanager/cgproxy.initd | 37 |
3 files changed, 119 insertions, 0 deletions
diff --git a/community/cgmanager/APKBUILD b/community/cgmanager/APKBUILD new file mode 100644 index 0000000000..d2c42e3a9c --- /dev/null +++ b/community/cgmanager/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=cgmanager +pkgver=0.41 +pkgrel=1 +pkgdesc="nother daemon for managing control groups" +url="https://linuxcontainers.org/cgmanager/" +arch="all" +license="GPL" +depends="" +depends_dev="linux-pam-dev" +makedepends="$depends_dev linux-headers libnih-dev" +install="" +subpackages="$pkgname-dev" +source="https://linuxcontainers.org/downloads/cgmanager/cgmanager-$pkgver.tar.gz + cgmanager.initd + cgproxy.initd" + +builddir="$srcdir"/cgmanager-$pkgver + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --with-distro=gentoo \ + || return 1 + make || return 1 +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install || return 1 + rm -f "$pkgdir"/usr/lib/*.la + install -Dm755 "$srcdir"/cgmanager.initd \ + "$pkgdir"/etc/init.d/cgmanager || return 1 + install -Dm755 "$srcdir"/cgproxy.initd \ + "$pkgdir"/etc/init.d/cgproxy || return 1 +} + +md5sums="6ebed9ed3bf0751eb3cde47a94c45340 cgmanager-0.41.tar.gz +29ad96ec5a4ddfc6d9fb7b3df8e2375f cgmanager.initd +10ad15961c3921d92af342908730c2ee cgproxy.initd" +sha256sums="29b155befb3ac233d5d29dbca7c791c8138bab01bfa78ea4757ebb88ce23b458 cgmanager-0.41.tar.gz +ce10491d71b1163e6a6b737dc65e1fae6b7d05b4bfaaa8a42c85c6c0e38fac66 cgmanager.initd +adb05f21ca89439f47c8e17283d4accb82860c44f7703807bc5142686a47ebf0 cgproxy.initd" +sha512sums="e8ba64665a21d987cd835580c2b6bafbcb05e22ce7f6216762d04840957c2cd21fb571360e0206ae9143656beed88ff3396eb1f644052c05189093a665a705fd cgmanager-0.41.tar.gz +1a6de3d90140b0c8e0871ab097bb3260f35dd4ad5f131ead8913f6168e41eb43cac38ab4c09eb792bfffc982353c0976c9ee6568299dc803058c0dd4381aa675 cgmanager.initd +3e7ed48d3d5b4c178ec038b6db53d693f98ac9dd2b5ba405cc0241ddb2a0d60632bd1aeb7b7bea6ee3cf15a66eb069690197d067f9c7d8b5d8654f509db0f230 cgproxy.initd" diff --git a/community/cgmanager/cgmanager.initd b/community/cgmanager/cgmanager.initd new file mode 100644 index 0000000000..9088f9280e --- /dev/null +++ b/community/cgmanager/cgmanager.initd @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/cgmanager/files/cgmanager.initd,v 1.2 2015/02/16 11:02:06 hwoarang Exp $ + +DAEMON=/usr/sbin/cgmanager +PIDFILE=/run/cgmanager.pid +NESTED=yes +OPTIONS= + +depend() { + after cgproxy +} + +start() { + ebegin "Starting cgmanager server" + + start-stop-daemon --start --pidfile ${PIDFILE} --exec ${DAEMON} \ + -- --daemon -m name=systemd ${OPTIONS} + + eend $? +} + +stop() { + ebegin "Stopping cgproxy server" + start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE} + eend $? +} diff --git a/community/cgmanager/cgproxy.initd b/community/cgmanager/cgproxy.initd new file mode 100644 index 0000000000..18bdbcd9a6 --- /dev/null +++ b/community/cgmanager/cgproxy.initd @@ -0,0 +1,37 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/cgmanager/files/cgproxy.initd,v 1.2 2015/02/16 11:02:06 hwoarang Exp $ + +DAEMON=/usr/sbin/cgproxy +PIDFILE=/run/cgproxy.pid +NESTED=yes +OPTIONS= + +depend() { + before cgmanager +} + +start() { + ebegin "Starting cgproxy server" + if ! /usr/sbin/cgproxy --check-master; then + ewarn "cgmanager is not running" + return 1 + fi + # cgproxy should only run on container unless on older kernel + if [ -e /proc/self/ns/pid ] && [ "$NESTED" != "yes" ]; then + eerror "Too old kernel to support cgroup, please update to >3.8" + return 1 + fi + + start-stop-daemon --start --pidfile ${PIDFILE} --exec ${DAEMON} \ + -- --daemon ${OPTIONS} + + eend $? +} + +stop() { + ebegin "Stopping cgproxy server" + start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE} + eend $? +} |