diff options
author | Markos Chandras <hwoarang@gentoo.org> | 2015-02-07 10:29:29 +0000 |
---|---|---|
committer | Markos Chandras <hwoarang@gentoo.org> | 2015-02-07 10:29:29 +0000 |
commit | 29c6ae05d66873d3d9a5ee67f5811897209bbb32 (patch) | |
tree | 56e6b1a4fdc1f86dd0c404ef786f2e8547bd4e98 | |
parent | Initial commit of cgmanager. Thanks to Fabian Henze and Yixun Lan on bug #524846 (diff) | |
download | historical-29c6ae05d66873d3d9a5ee67f5811897209bbb32.tar.gz historical-29c6ae05d66873d3d9a5ee67f5811897209bbb32.tar.bz2 historical-29c6ae05d66873d3d9a5ee67f5811897209bbb32.zip |
Initial commit of cgmanager. Thanks to Fabian Henze and Yixun Lan on bug #524846
Package-Manager: portage-2.2.15/cvs/Linux x86_64
Manifest-Sign-Key: 0x09BF4F54C2BA7F3C!
-rw-r--r-- | app-admin/cgmanager/Manifest | 29 | ||||
-rw-r--r-- | app-admin/cgmanager/cgmanager-0.35.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 |
5 files changed, 140 insertions, 3 deletions
diff --git a/app-admin/cgmanager/Manifest b/app-admin/cgmanager/Manifest index 336439440088..fa34f849fdd5 100644 --- a/app-admin/cgmanager/Manifest +++ b/app-admin/cgmanager/Manifest @@ -1,5 +1,28 @@ -AUX cgmanager.initd 524 SHA256 3f96999e2fe28c8457fb1edad4314d65fec679c6fe48800dd9cf0d27564e8e9c SHA512 2b1b662b8e4e52487f0691d94506eb6d3318f26a04d672e599f29d98b76ecf62d8a7f5f06fd44dd24b198494d3691854a387b91e8e7986f3d5ff516b30a31a77 WHIRLPOOL a9207dcef322659dc819c9de3f1414a952c62cb6cb1b95f3283a4c0c1492a5354db96365c8a77b370e59af3706701dff1d4e8e449a4090367bf2249da6f159af -AUX cgproxy.initd 807 SHA256 395be4b351dcf6573807b66542147ef6ff27e0fccfcc8afeed2126bf2335db08 SHA512 7309617af9f8e2d8e94767660d88a67fb0a2947b9fcdd294e15127fb95d9868f23098bbe12985afbc93d30c31242694c839d20e05069a19534da37f2c7ac32e9 WHIRLPOOL a051396e39279aa2b5bfdbb4b67699a27043425290d710ee686c27a2f484e603f5b0839ebfddb7ea40323758212ab159767480dd6a404b2c2d656ceef60dc818 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX cgmanager.initd 629 SHA256 fcba9984e97a08110d8604fd5013bfb434ff5bc1b94d7579fa5969b928b07d4e SHA512 2633dab4c55aae26d6e7fa3b827f823f21b0553a1f5a087f01b558dc20e26b2c6f5ed9eaf8b130f34e6f10b6aff5474e8b31c157db06c66e08cdd325c6710e73 WHIRLPOOL 3d14a80fd3939b1f7b71fe9dff0951110f91c8e63f005addd85a67a3fb1e07c34ab8eeab6c787a0114b57736d638f5d824b1222b4c69706c558e16db7aab62c6 +AUX cgproxy.initd 910 SHA256 7af61d781952dabac372782e2832e045a95ac65e11836c39c545dd590cf0f662 SHA512 98a81fee85e024a72b32fcd7e10dacc2f89afb82d2ad871fc34760b9b352ada8554818e138305ae150ecf9173e6b26c7628cd46974a802ca41df52b8aed26462 WHIRLPOOL 670c6a4c5c8afd436698af8fee40a7b325c4cf8513a06752e2325b042270e8b77ffd668ecc6dcbe192f1433ec376592e9a29ae9483d0237579d16c3f9cb86d27 DIST cgmanager-0.35.tar.gz 426200 SHA256 a2939edf1ff687573c6d0e95900abf83078af25bb91060d9d5daac5769afaa9b SHA512 a63ed3358b33dad57fd7c70aa0059c7400b78ad1b7642db536863a3ca4254ec252351986eefa2b7bbe5b0e7f78bedb51f32544803430f4fafa76222791e391a8 WHIRLPOOL 7ef39fe762c222fa912682f2231df14b57b54c285b683cb4f1f9ee4a65d651e450a5cf079862ab21ad2d3c97a6baa26fd05983304697c5fdfa2e16bf716d88d9 -EBUILD cgmanager-0.35.ebuild 1069 SHA256 70274d2c34d51eb5c9d43c785db2b12ba1d1c27b376d30f97df2170866a0ae4b SHA512 dc52bcd9eb2925842bdac83e75cce1d180dfccb669ffc3df674fdebfd5e397f0091bc3333287c11764d54ef30e7cf9ca592befce973d0cbc6d566f39dcc06626 WHIRLPOOL c805fc331a244e7f89be6ccdc9726c6bd3f15261c6c6d357a4060b4e0a87bfd327ec50958814139996b5311b9e70a5be922def1326fae7bba73f2a3138f71c08 +EBUILD cgmanager-0.35.ebuild 1174 SHA256 57944947330366a3124b5f1600f33ca0819426fa56d39be26abb6bd5cc613ea9 SHA512 a510a9d713f9f7d4bc2439e4647ee8b25db235ef09c303d1cef2099133a7c3d4db916da6924fc48669c132ff6b79940c374b029e55775008f5b360fe6496c93f WHIRLPOOL e0e6a58169101b74b2e94db0cfb2f4370dca41810f9e9b4488d9442401a4653b9ea9170ad119a342da0ef4afe78cac33895eb0a6d7590b6b6de9672f654e5592 +MISC ChangeLog 469 SHA256 460c5eeb9004997cc5108bdaba39b88288619b23418c15d1150e20c77a55bcdf SHA512 8627201ffb660dc9e85f3826b4f5a1cc85c1c30a562cbad389162a77de4347b2b24304e7e081533282d63522c3fcf2ebe1d2960aecf78c2753faa37a422ae938 WHIRLPOOL a6a3224fede93d5e4fe41f238fc2ab0140af5c762de6dd8f96c50fcc3d0e083167906d41ed2150ba25398fa4002dc8b7128e1ace16c24e5f61c4dda88571b34b MISC metadata.xml 230 SHA256 9a2917aa97989e26a15d548bdf64890dcc69ae9d3df8142b2aae27530aee063b SHA512 8d6c4ff1bc83838672a976af75f113734849b5ce1b85357b41172f430b7a8ac04e0637d0aa9613fe8ac1464f5dd34d119c77a7c916de5a97a37c36c3d117cc91 WHIRLPOOL be59a0362b554a50082406aae917f612b8b13262a355dbd39c6c2f55867f535804e9dc1d4a2341e820b49434c45ff08a8dccde13ec9a18f4fbcc8b1c387b2558 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQJ8BAEBCABmBQJU1ekGXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzNTVDNDczOUYzRjJEMTRGNDRGMzU2RkMw +OUJGNEY1NEMyQkE3RjNDAAoJEAm/T1TCun88iW4P/3FTl4eLgqI1E+KUOmp4AFH6 +m12omeF2ecOH7aYCwkKY65916r+F7GWgWt8Tsi9P3XTTFhjvrzD+pInaTbtMo1Fw +JbYShYflG8Dn51UdRItyswWdak+aZTE1tH7clGQwmbTOSKvw7iy7oZjLDJxfUWiJ +wYtzVytnswMZyIV6cEbfrXuaakfH/mQG7QGcGMvqbbPuKeSevb5fFCOvGNRrXTlx +p9S2/8ztHY+hVT1AhAUvQ9I9GqT7DirjDnncb+GTc9kFXROVkUPbDtOPEafiJWvI +Qap7rZY8R67SK5IxATffIRS1NhTogWoAOxFP7ncO4ddCB4qDNmeVGsQcLsVHrFfV +3/aOeTUQu2b9PQoialNfmdLS8Y82e2xsWe/SkOh4wKZEx3AOc94NvJ5BWv3+Q993 +E7HqU+JPLUkVHb1xkoWlXB5QStIhSmmbFg4u1dZuQRZmpwnhTVtiNoBeran6Gv7u +jXpA/B/U9KcnoQ+GUcMzqGrt9sy9FaqIgpwFjcb53lbOCnMXY4wAlliZrlDyfONt +xtwNV+t3L3rlt2BDjwASh7AlgXRwUC+UHB9SQyAJqREc+hf+PgKO7lIgfuXTUeWx +/6x8cEpGaE/Goi63adMS7sEegRWYsiJNQ5CHUPivTGrLAJJvq8YSzqwv699rA/Yl +M/di4Tmue2kBXzYlrY7R +=FWxA +-----END PGP SIGNATURE----- diff --git a/app-admin/cgmanager/cgmanager-0.35.ebuild b/app-admin/cgmanager/cgmanager-0.35.ebuild new file mode 100644 index 000000000000..551003db7ff7 --- /dev/null +++ b/app-admin/cgmanager/cgmanager-0.35.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/cgmanager/cgmanager-0.35.ebuild,v 1.1 2015/02/07 10:29:22 hwoarang Exp $ + +EAPI="5" + +DESCRIPTION="Control Group manager daemon" +HOMEPAGE="https://linuxcontainers.org/cgmanager" +SRC_URI="https://linuxcontainers.org/downloads/${PN}/${P}.tar.gz" + +LICENSE="GPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~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 000000000000..031c7deb6568 --- /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 +# $Header: /var/cvsroot/gentoo-x86/app-admin/cgmanager/files/cgmanager.initd,v 1.1 2015/02/07 10:29:22 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 --exec --pidfile ${PIDFILE} ${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 000000000000..5ebb4178b964 --- /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 +# $Header: /var/cvsroot/gentoo-x86/app-admin/cgmanager/files/cgproxy.initd,v 1.1 2015/02/07 10:29:22 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 --exec --pidfile ${PIDFILE} ${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 000000000000..230776629fec --- /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> |