aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-02-24 00:45:04 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-02-24 00:45:04 -0300
commit0722e3638a35d631861abd424a4b65e0f9f1a127 (patch)
tree098909fdf31e4b5d087d78bd4f5bd779d96af7f1
parentbd4799774beb48d5c1f13acd508103f341f79193 (diff)
downloadaports-0722e3638a35d631861abd424a4b65e0f9f1a127.tar.gz
aports-0722e3638a35d631861abd424a4b65e0f9f1a127.tar.bz2
aports-0722e3638a35d631861abd424a4b65e0f9f1a127.tar.xz
community/cgmanager: fix license=, transition to supervise-daemon
-rw-r--r--community/cgmanager/APKBUILD23
-rw-r--r--community/cgmanager/cgmanager.initd29
-rw-r--r--community/cgmanager/cgproxy.initd40
3 files changed, 23 insertions, 69 deletions
diff --git a/community/cgmanager/APKBUILD b/community/cgmanager/APKBUILD
index dd03535c48..b3289f2ab5 100644
--- a/community/cgmanager/APKBUILD
+++ b/community/cgmanager/APKBUILD
@@ -2,12 +2,11 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=cgmanager
pkgver=0.42
-pkgrel=0
+pkgrel=1
pkgdesc="nother daemon for managing control groups"
url="https://linuxcontainers.org/cgmanager/"
arch="all"
-license="GPL"
-depends=""
+license="LGPL-2.0-or-later"
depends_dev="linux-pam-dev"
makedepends="$depends_dev linux-headers libnih-dev popt-dev"
subpackages="$pkgname-dev $pkgname-openrc"
@@ -15,10 +14,8 @@ 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 \
@@ -27,25 +24,21 @@ build() {
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
- --with-distro=gentoo
+ --with-distro=gentoo \
+ --disable-static
make
}
check() {
- cd "$builddir"
make check
}
package() {
- cd "$builddir"
make DESTDIR="$pkgdir" install
- rm -f "$pkgdir"/usr/lib/*.la
- install -Dm755 "$srcdir"/cgmanager.initd \
- "$pkgdir"/etc/init.d/cgmanager
- install -Dm755 "$srcdir"/cgproxy.initd \
- "$pkgdir"/etc/init.d/cgproxy
+ install -Dm755 "$srcdir"/cgmanager.initd "$pkgdir"/etc/init.d/cgmanager
+ install -Dm755 "$srcdir"/cgproxy.initd "$pkgdir"/etc/init.d/cgproxy
}
sha512sums="d92113a6748084f1c0708f75c8bdf5de484d534bf00f664a5288902be887c2a1c7cf3d91afaab3331f0d573a86fbc6edb2fa1d37c070250cf53e0621213d7d74 cgmanager-0.42.tar.gz
-0bdfbed2fb5d79939ccb9b8554060c16c05e8e44503ecf1b6f4a38c7a39f765df34cdaa5cc0aa6d9ba5d17d3ecb7ee9f0623c363d99041bcbccd2ba410282a66 cgmanager.initd
-b43439d9086fe50a8de93a61167272474e9e9b7a71b5a93bf3c6d2da127f95be3294c713295ca51c68e6de1f95c4d969502d8c3d503bc510873ccec794bef5ba cgproxy.initd"
+56aa4a19fb1f9c616fb753509b005b54593dff4033c19f0538478db8a504574d94bc93d3d8bdaf764f53a47214bc75ef66c954345339a28b3166201eb9321ae4 cgmanager.initd
+11566556f4a464bb07bec71e27b0ad21cbbfec9fc2fae183c6b1eda76014e67c3065b8c0d4e54d098c781994960c72e9f8cfc1d6bbd66943a235c75560cd75f7 cgproxy.initd"
diff --git a/community/cgmanager/cgmanager.initd b/community/cgmanager/cgmanager.initd
index 65b2165ef4..4d3a490d07 100644
--- a/community/cgmanager/cgmanager.initd
+++ b/community/cgmanager/cgmanager.initd
@@ -1,29 +1,14 @@
#!/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 $
+supervisor=supervise-daemon
-DAEMON=/usr/sbin/cgmanager
-PIDFILE=/run/cgmanager.pid
-NESTED=yes
-OPTIONS=
+name="cgroups manager"
+description="Daemon to manage cgroups"
+
+command=/usr/sbin/cgmanager
+command_args="$OPTIONS -m name=system"
+retry=TERM/45
depend() {
need cgroups
before 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
index 9a834debba..e8e5cc351f 100644
--- a/community/cgmanager/cgproxy.initd
+++ b/community/cgmanager/cgproxy.initd
@@ -1,37 +1,13 @@
#!/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 $
+supervisor=supervise-daemon
-DAEMON=/usr/sbin/cgproxy
-PIDFILE=/run/cgproxy.pid
-NESTED=yes
-OPTIONS=
+name="cmanager system-bus proxy"
+description="D-Bus proxy for cgmanager"
-depend() {
- need 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}
+command=/usr/sbin/cgproxy
+command_args="$OPTIONS"
+retry=TERM/45
- eend $?
-}
-
-stop() {
- ebegin "Stopping cgproxy server"
- start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
- eend $?
+depend() {
+ need cgmanager dbus
}