summaryrefslogtreecommitdiff
path: root/app-admin/cgmanager
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-admin/cgmanager
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-admin/cgmanager')
-rw-r--r--app-admin/cgmanager/Manifest2
-rw-r--r--app-admin/cgmanager/cgmanager-0.36-r1.ebuild41
-rw-r--r--app-admin/cgmanager/cgmanager-0.37.ebuild41
-rw-r--r--app-admin/cgmanager/files/cgmanager.initd28
-rw-r--r--app-admin/cgmanager/files/cgproxy.initd37
-rw-r--r--app-admin/cgmanager/metadata.xml8
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>