diff options
Diffstat (limited to 'app-admin/cgmanager')
-rw-r--r-- | app-admin/cgmanager/Manifest | 2 | ||||
-rw-r--r-- | app-admin/cgmanager/cgmanager-0.36-r1.ebuild | 41 | ||||
-rw-r--r-- | app-admin/cgmanager/cgmanager-0.37.ebuild | 41 | ||||
-rw-r--r-- | app-admin/cgmanager/files/cgmanager.initd | 28 | ||||
-rw-r--r-- | app-admin/cgmanager/files/cgproxy.initd | 37 | ||||
-rw-r--r-- | app-admin/cgmanager/metadata.xml | 8 |
6 files changed, 157 insertions, 0 deletions
diff --git a/app-admin/cgmanager/Manifest b/app-admin/cgmanager/Manifest new file mode 100644 index 00000000000..6c026dbd5c8 --- /dev/null +++ b/app-admin/cgmanager/Manifest @@ -0,0 +1,2 @@ +DIST cgmanager-0.36.tar.gz 428374 SHA256 f4707f0130efb50ccd8a1900e7ae626c0631947528ce921a63b15ef848fb2a0d SHA512 3325c03e25b7bd7b8dcfb68bb3dedccf9367ce80c23ac8df3f1af6cdb9ee706eafc0f95fcea055cc1fe9b31acb5bb66c61b16b21dfa057e661fdace3ff207f43 WHIRLPOOL dcaad06e6281f89e672b843f9903473cb1ee5d1b938c72d1b806f7bc7a1014144dd9e6e304e9ce6e2b941a1b224177747dacc7affa122f9a17a14598969a4779 +DIST cgmanager-0.37.tar.gz 430522 SHA256 8309e7f2ae5f4a6b52cc2fca62c098b18ecfe90bca2c9c034ba80f68aa427b6e SHA512 fbe96af36d556c988351f1136f4382d907b8fb6d4098a90b17f4abfbdf182060d8ba059878455a8842597e7ad33ff12b91bddf68a6c42b02ad9549a2ad900a89 WHIRLPOOL 9a78226ec2a6a84c7fb84f3bb2622df159a4b857d990b2d4f22a1d8c7d02d071c0ed046e5d17ea9d2bd4b970a0a6ad9bf59ba68401248db318b89e16010c720a diff --git a/app-admin/cgmanager/cgmanager-0.36-r1.ebuild b/app-admin/cgmanager/cgmanager-0.36-r1.ebuild new file mode 100644 index 00000000000..fad5d258467 --- /dev/null +++ b/app-admin/cgmanager/cgmanager-0.36-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +DESCRIPTION="Control Group manager daemon" +HOMEPAGE="https://linuxcontainers.org/cgmanager/introduction/" +SRC_URI="https://linuxcontainers.org/downloads/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" + +RDEPEND=" + sys-libs/libnih[dbus] + sys-apps/dbus" +DEPEND="${RDEPEND}" + +src_prepare() { + # systemd expects files in /sbin but we will have them in /usr/sbin + pushd config/init/systemd > /dev/null || die + sed -i -e "s@sbin@usr/&@" {${PN},cgproxy}.service || \ + die "Failed to fix paths in systemd service files" + popd > /dev/null || die +} + +src_configure() { + econf \ + --with-distro=gentoo \ + --with-init-script=systemd +} + +src_install () { + default + # I see no reason to have the tests in the filesystem. Drop them + rm -r "${D}"/usr/share/${PN}/tests || die "Failed to remove ${PN} tests" + # FIXME: openRC init scripts are not well tested + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newinitd "${FILESDIR}"/cgproxy.initd cgproxy +} diff --git a/app-admin/cgmanager/cgmanager-0.37.ebuild b/app-admin/cgmanager/cgmanager-0.37.ebuild new file mode 100644 index 00000000000..fad5d258467 --- /dev/null +++ b/app-admin/cgmanager/cgmanager-0.37.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +DESCRIPTION="Control Group manager daemon" +HOMEPAGE="https://linuxcontainers.org/cgmanager/introduction/" +SRC_URI="https://linuxcontainers.org/downloads/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" + +RDEPEND=" + sys-libs/libnih[dbus] + sys-apps/dbus" +DEPEND="${RDEPEND}" + +src_prepare() { + # systemd expects files in /sbin but we will have them in /usr/sbin + pushd config/init/systemd > /dev/null || die + sed -i -e "s@sbin@usr/&@" {${PN},cgproxy}.service || \ + die "Failed to fix paths in systemd service files" + popd > /dev/null || die +} + +src_configure() { + econf \ + --with-distro=gentoo \ + --with-init-script=systemd +} + +src_install () { + default + # I see no reason to have the tests in the filesystem. Drop them + rm -r "${D}"/usr/share/${PN}/tests || die "Failed to remove ${PN} tests" + # FIXME: openRC init scripts are not well tested + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newinitd "${FILESDIR}"/cgproxy.initd cgproxy +} diff --git a/app-admin/cgmanager/files/cgmanager.initd b/app-admin/cgmanager/files/cgmanager.initd new file mode 100644 index 00000000000..26c915f4dac --- /dev/null +++ b/app-admin/cgmanager/files/cgmanager.initd @@ -0,0 +1,28 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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/app-admin/cgmanager/files/cgproxy.initd b/app-admin/cgmanager/files/cgproxy.initd new file mode 100644 index 00000000000..3624598adb3 --- /dev/null +++ b/app-admin/cgmanager/files/cgproxy.initd @@ -0,0 +1,37 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 $? +} diff --git a/app-admin/cgmanager/metadata.xml b/app-admin/cgmanager/metadata.xml new file mode 100644 index 00000000000..230776629fe --- /dev/null +++ b/app-admin/cgmanager/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email>hwoarang@gentoo.org</email> +<name>Markos Chandras</name> +</maintainer> +</pkgmetadata> |