summaryrefslogtreecommitdiff
path: root/dev-libs/libcgroup
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libcgroup')
-rw-r--r--dev-libs/libcgroup/Manifest7
-rw-r--r--dev-libs/libcgroup/files/cgconfig.confd-r28
-rw-r--r--dev-libs/libcgroup/files/cgconfig.initd-r253
-rw-r--r--dev-libs/libcgroup/libcgroup-2.0.ebuild98
-rw-r--r--dev-libs/libcgroup/libcgroup-3.0.0-r1.ebuild115
-rw-r--r--dev-libs/libcgroup/libcgroup-3.1.0.ebuild116
6 files changed, 297 insertions, 100 deletions
diff --git a/dev-libs/libcgroup/Manifest b/dev-libs/libcgroup/Manifest
index 89abf2e7de22..8dfb5e882dce 100644
--- a/dev-libs/libcgroup/Manifest
+++ b/dev-libs/libcgroup/Manifest
@@ -1,5 +1,7 @@
AUX cgconfig.confd-r1 205 BLAKE2B e68daec204e2daa5103bcba2e2e40cd93c9e3d97d85927f21f84443efb8281bdb2464f75f0b9e33244557d4b119e32d774191c20a3e7d50752a2df2204cfda5d SHA512 f5f1d0d09266417276f93434ad47116452e1ab18d736ce08e7c63f797b2d2180a490cdef1f3dd9d960c88426f1dc5b12dcf72b09de765d52d281feceffe7550d
+AUX cgconfig.confd-r2 245 BLAKE2B 26f5c1a7ef510f72182ebdeb17c51efb2d3e475dd11dcc773434c1b9784ad97b1c40cabe91102145cc083fb9b736f58fccdcb385eb9229caaf04ea6fa6887f43 SHA512 e095b1a59290d04a5c11e2e574dc8839c0760210d19cc28071e78fc6ed1eaac16448a10a532729ae9a3acc5512a76ddfe586861333ddbaef6922d80c538cf3f5
AUX cgconfig.initd-r1 1052 BLAKE2B 6da1fed6741a9f21e31506f6306a5a10d8e82ed1e65ed0b53e6ee466d5496b25f5aaf521a037755d6ee87bb4c520a7915880f040ba99dd6a0f8f279d913bb810 SHA512 66303411c98355b1fe5e0eb58b797887f9971604902afb2f95738b64b1fd9dd42fc8cb22c65e10c264d68ef2d7cd85f58247fed08d650ccbe0a5756ec780ea3c
+AUX cgconfig.initd-r2 1156 BLAKE2B 079521d342fb63dedb342c08b89c7fee6840eb133942e1da571cac9028abb9c1109c7201ed5c4bbb0a4fd767ac31dcd4f9756e803733ecb8e86af5714f29cf7e SHA512 a8a3a1e915bf853b19d1f6f23383599834b333243d87b1077643622145ab268afceae64fb3b09b65f8b87c3d24257287841b6a541c3fdb2cef08f6bbf42b916b
AUX cgconfig.service 442 BLAKE2B bb7b06c4eafeffde3b712589f3f3840b38bf8b9236272782cbfedd4272d935c2e69b8297593057ba6d1c8a49844259a4975fe0a2512c89fd607446fb7a6f2fe6 SHA512 77b0b1c0305ae6d3bc301285c4c8f6f0e22ff81fea8bcd42f1c0f9b0c828cdc0f82eec9389fe4de6ebd5e3303609ae6d4ee854560bf2fe2dd5c2b52441f64177
AUX cgred.confd-r2 160 BLAKE2B 17bc7c1ce54d490071324a670ecb150027e322c938f305930330a8505af3b9f332e8a80b25ae65a363319c2e14b071a4544713179cbf6882d92063e744bf4bda SHA512 5b83b2413e36184671cfd7d654fa0b06940360790aed3c235cdb8eb168c17a703c1a72654fdbf57459ac493f79fd87e90deb33e89297929ca5f681dfa80a7078
AUX cgred.initd-r1 457 BLAKE2B 6d2a79af91daaf77be9530d69473aa8b67c24fc7be2366486b2c2e82ae8962160576d8d778c5ac817aeb17a9371b1db0127853a4c431844d268a9e371755a8f1 SHA512 2ef66c697b56e4c29c4a224480a6a7270205359d254c07847e57feb8d5e219cd0d0c2c4f6161f9e6c001f14a9419f9be18b3fd1750d7b4e5a0082985821062bc
@@ -12,9 +14,10 @@ AUX libcgroup-0.41-slibtool.patch 1953 BLAKE2B 7c98c05ffe6e728dedce6b321a352eeb6
AUX libcgroup-3.0.0-configure-bashism.patch 1127 BLAKE2B ab75e9acc12e85b9a7f8f9556a9f79e88f1814ce71cad0ec3ad2c26cbc986550190513c946f0ad285e53fd0476a07e4c60ef4cd8c6700c9c2f66436d5638c172 SHA512 65168d9e662552d0555ccb035ace22f3db226e51e30336595a1f91c39aba3da73de761ee974bf38784be586e26506195ef57c91ccbfd0e3f11ae164df6b73719
AUX libcgroup-3.0.0-musl-strerror_r.patch 1310 BLAKE2B a410898aedefb23d910f6bbd2458bd44b3b1ff09f49e81b650bcc78c28fe55f9d4a72db5afbdd110380da49dc64b7ded8bf9d7e3eadaf026f4b8c67215864920 SHA512 9b83e95fdd04b0158ef6788bbfdf0293b5f6ca28cad92ede4ae6a3165fb3db7a40567ceafe06d2b7cdd7cce31f37cb7932581a77c807bc05a6a1723e303b8f71
DIST libcgroup-0.41.tar.bz2 500120 BLAKE2B 3410b430aa58613b5b9abedba05bef99b1b8a1fd619d55fb446ab951e052a336efc918879217055bceee886a03d97c3ff46028a87e8231212653a886cfb80521 SHA512 1aedb02cd2ce3bc2e2a328a247a92976ad0978ca4d3aee4eb671fbcc6bb270348efc78dcf84f27fc500f8bfb9bb57c7d6e4d429ef2bc69e4e5118b7cd895a6bd
-DIST libcgroup-2.0.tar.bz2 953191 BLAKE2B d4fe008a51a4f90047210a3c8e4ce48b1c4a126111ccc7fe919404b1782ea764404894a43a651e0d6b2674d02fb031cb56cf7a689c57600d856c03536524bb63 SHA512 b2c5d1128536bf49782415df2d1530cf48bdb287e5d2abdee68f9fa780d995d9bae79f97da5f0c437130d66054c96301b319cd1631a3b0efbc5bfe1e3414dc4b
DIST libcgroup-3.0.0.tar.gz 1125800 BLAKE2B 5d4999ac513de756ffe741d2e959c01d8500a2000f521dff31832e1ef545869fb9c8ae1c78d05aaa051e7e6e68266bd57a751ba3aa897966a83ff50128090ba5 SHA512 1e8a7c9a71d928ab0e354254b007b30fc159a30e441bd52a03ded142420c94e130594bb512680c62fc22f5193934fb78afc31453342b032d1db3197fd4c3e606
+DIST libcgroup-3.1.0.tar.gz 1223547 BLAKE2B 3cd3ca779b4453df71aba584ad8fe654fb55478ad89b36ba5deccf46e3ef331b11dc32a9a72dfa525784558701a72fd0777e05275233e599015ae93269661534 SHA512 84272e811422f2105e275ccadbd333fe6da495da5504cd97acd3101718e27b52e0f56b62f847933b32d613e15c170d1b998d85a89c1591e8ce37c33043f3e00b
EBUILD libcgroup-0.41-r6.ebuild 2515 BLAKE2B 0c52238cd9035d17684fa2602b8509cef2b6f517a569146f20fa7708f22fd8c9bc8bdab99cb3c40bf5a7c82174d0d2f2f00cb3c4f02c7486ae01064d297e214d SHA512 0f861626c86231e0134fa33776a9d4d546269a4887ea18c52943b5e6ef53cf45779585bcc413d4f4ca5179545364241f81afc484000585c82e17c4e5ed2573b2
-EBUILD libcgroup-2.0.ebuild 2318 BLAKE2B 48821bd83b937359e5b7a8dafcd285cf7aaf87efbfc323f38afc679907d68fdcb5ac3d58fe245fa1965277458676191b900e3e1eabed5de5b961b55b148cf80f SHA512 24ab58cc48929a107ab1f5b3ccecad538a55385f39b1e9fa1b57a1751697f7e381dedabebff67976729cb0e347fdd705bef1eac5555508529ef19c30366ddf0b
+EBUILD libcgroup-3.0.0-r1.ebuild 2657 BLAKE2B dc681d23e0d2407eb75a20ee4bb9d9a3147ce2c3d8f73a5a5a6ced9e143aff3155509afb8467a523903843077ce060b968d9f21fd407e7504b3cfd7a91629268 SHA512 c2fbc37bc0d2fdb4dcb7c8e67bb696b0d8e418486f59c2cf6c1fc46979cd1e015154ba15c0d57a3986811fe34e972d483d7d0d86a1a61bfd47ec77a0ffb1dee0
EBUILD libcgroup-3.0.0.ebuild 2628 BLAKE2B 00ed2f46d37bd3f6e29add1a4faf7bae6b410ee6bdc2232555b4dcb823803daa1d914bd68b4f8a4d77e5fb439966053002b2ebf29d819554d00217e6ef325e19 SHA512 bc870e7aab410ddda6368344257c8dd1e7fdff9bac9f61116503bdaca07d5a66212d51dcf5c853a41762fe226a7c2161fc76a7c7184aa7f47c948b9b22efb816
+EBUILD libcgroup-3.1.0.ebuild 2654 BLAKE2B 828c0ca94e205b70ed023b5f7ad2e754fee9187eab476bb9ed33ebaa3b8e005940311267149ed999498d981bb8df9f891c1f0d0a700b04b3cd518464d1e240e7 SHA512 37c0bcfedf49dc6470febd917546fe5ce00ec0505b75ab791c37c9b66862dce0fedc8158447996ab1fd1334459a480b64110d9d35c31e2dfb2002b40a339732c
MISC metadata.xml 675 BLAKE2B 2904270c2fc59a91ad0f0820094cb4569ca84b1c97010519bfa19e86d312f5d310fe7e11d04d185125eb3d2c017c7d9e7bedc4950c487154941084ea11250b59 SHA512 fbc778a739e6b0fef0844a61b12cc18ee7fa377c978b389818d47eea2ecc0ff154e56c779e37730f7c8257daf07bb54cc8dbc7225e082fd7adb8eb6a5fc91bc8
diff --git a/dev-libs/libcgroup/files/cgconfig.confd-r2 b/dev-libs/libcgroup/files/cgconfig.confd-r2
new file mode 100644
index 000000000000..2770c85e2ee1
--- /dev/null
+++ b/dev-libs/libcgroup/files/cgconfig.confd-r2
@@ -0,0 +1,8 @@
+# /etc/conf.d/cgconfig: config file for /etc/init.d/cgconfig
+
+# Configuration file location
+CG_CONFIGFILE="/etc/cgroup/cgconfig.conf"
+CG_CONFIGDIR="/etc/cgroup/cgconfig.d"
+
+# Enable calssifying pid according to rules if necessary
+CG_CLASSIFY=No
diff --git a/dev-libs/libcgroup/files/cgconfig.initd-r2 b/dev-libs/libcgroup/files/cgconfig.initd-r2
new file mode 100644
index 000000000000..aaf3ea88031b
--- /dev/null
+++ b/dev-libs/libcgroup/files/cgconfig.initd-r2
@@ -0,0 +1,53 @@
+#!/sbin/openrc-run
+# Copyright 1999-2023 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CGCONFIGPARSER="/usr/sbin/cgconfigparser"
+CGCLASSIFY="/usr/bin/cgclassify"
+: "${CG_CONFIGFILE:=/etc/cgroup/cgconfig.conf}"
+: "${CG_CONFIGDIR:=/etc/cgroup/cgconfig.d}"
+description="Control Group Configuration Service"
+
+start()
+{
+ ebegin "Setting up CGroups"
+ "${CGCONFIGPARSER}" "--load=${CG_CONFIGFILE}" "--load-directory=${CG_CONFIGDIR}" >/dev/null 2>&1
+ eend "$?"
+}
+
+start_post()
+{
+ # Classify PID according to the rules if requested
+ yesno "${CG_CLASSIFY}" || return 0
+ ebegin "Classifying PID to CGroups"
+ local pid
+ for pid in $(pgrep ''); do
+ ${CGCLASSIFY} ${pid} || einfo "Classifying ${pid} failed"
+ done
+ eend "$?"
+}
+
+stop()
+{
+ cgconfig_umount
+}
+
+cgconfig_umount()
+{
+ local ctrl eq mnt_pnt mnt_pts
+
+ while read ctrl eq mnt_pnt; do
+ case "${ctrl}" in
+ (\#*) continue ;;
+ (mount*) mnt_pts=true;;
+ (\}*) mnt_pts= ;;
+ (*)
+ [ -n "${mnt_pts}" ] || continue
+ mnt_pnt="${mnt_pnt%;}"
+ ebegin "Unmounting ${mnt_pnt}"
+ umount "${mnt_pnt}"
+ eend "$?"
+ ;;
+ esac
+ done < "${CG_CONFIGFILE}"
+}
diff --git a/dev-libs/libcgroup/libcgroup-2.0.ebuild b/dev-libs/libcgroup/libcgroup-2.0.ebuild
deleted file mode 100644
index 989fc89b4af8..000000000000
--- a/dev-libs/libcgroup/libcgroup-2.0.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools flag-o-matic linux-info pam systemd
-
-DESCRIPTION="Tools and libraries to configure and manage kernel control groups"
-HOMEPAGE="https://github.com/libcgroup/libcgroup"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.bz2"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
-IUSE="+daemon pam static-libs test +tools"
-REQUIRED_USE="daemon? ( tools )"
-
-# Use mount cgroup to build directory
-# sandbox restricted to trivial build,
-RESTRICT="test"
-
-BDEPEND="
- sys-devel/bison
- sys-devel/flex
- elibc_musl? ( sys-libs/fts-standalone )
-"
-DEPEND="pam? ( sys-libs/pam )"
-RDEPEND="${DEPEND}"
-
-pkg_setup() {
- local CONFIG_CHECK="~CGROUPS"
- if use daemon; then
- CONFIG_CHECK="${CONFIG_CHECK} ~CONNECTOR ~PROC_EVENTS"
- fi
- linux-info_pkg_setup
-}
-
-src_prepare() {
- default
-
- # Change rules file location
- find src -name *.c -o -name *.h \
- | xargs sed -i '/^#define/s:/etc/cg:/etc/cgroup/cg:'
- sed -i 's:/etc/cg:/etc/cgroup/cg:' \
- doc/man/cg* samples/*.conf README* || die "sed failed"
-
- # Drop native libcgconfig init config
- sed -i '/^man_MANS/s:cgred.conf.5::' \
- doc/man/Makefile.am || die "sed failed"
-
- # If we're not running tests, don't bother building them.
- if ! use test; then
- sed -i '/^SUBDIRS/s:tests::' Makefile.am || die
- fi
-
- eautoreconf
-}
-
-src_configure() {
- local my_conf
-
- if use pam; then
- my_conf=" --enable-pam-module-dir=$(getpam_mod_dir) "
- fi
-
- use elibc_musl && append-ldflags "-lfts"
- econf \
- $(use_enable static-libs static) \
- $(use_enable daemon) \
- $(use_enable pam) \
- $(use_enable tools) \
- ${my_conf}
-}
-
-src_install() {
- default
- find "${D}" -name '*.la' -delete || die
-
- insinto /etc/cgroup
- doins samples/cgconfig.conf
- doins samples/cgrules.conf
- doins samples/cgsnapshot_blacklist.conf
-
- keepdir /etc/cgroup/cgconfig.d
- keepdir /etc/cgroup/cgrules.d
-
- if use tools; then
- newconfd "${FILESDIR}"/cgconfig.confd-r1 cgconfig
- newinitd "${FILESDIR}"/cgconfig.initd-r1 cgconfig
- systemd_dounit "${FILESDIR}"/cgconfig.service
- systemd_dounit "${FILESDIR}"/cgrules.service
- fi
-
- if use daemon; then
- newconfd "${FILESDIR}"/cgred.confd-r2 cgred
- newinitd "${FILESDIR}"/cgred.initd-r1 cgred
- fi
-}
diff --git a/dev-libs/libcgroup/libcgroup-3.0.0-r1.ebuild b/dev-libs/libcgroup/libcgroup-3.0.0-r1.ebuild
new file mode 100644
index 000000000000..ab8c02a5f29f
--- /dev/null
+++ b/dev-libs/libcgroup/libcgroup-3.0.0-r1.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic linux-info pam systemd
+
+DESCRIPTION="Tools and libraries to configure and manage kernel control groups"
+HOMEPAGE="https://github.com/libcgroup/libcgroup"
+SRC_URI="https://github.com/libcgroup/libcgroup/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="+daemon pam static-libs test +tools"
+REQUIRED_USE="daemon? ( tools )"
+
+# Test failure needs investigation
+RESTRICT="!test? ( test ) test"
+
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+"
+DEPEND="
+ elibc_musl? ( sys-libs/fts-standalone )
+ pam? ( sys-libs/pam )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.0-configure-bashism.patch"
+ "${FILESDIR}/${PN}-3.0.0-musl-strerror_r.patch"
+)
+
+pkg_setup() {
+ local CONFIG_CHECK="~CGROUPS"
+ if use daemon; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~CONNECTOR ~PROC_EVENTS"
+ fi
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # Change rules file location
+ find src -name '*.c' -o -name '*.h' -print0 \
+ | xargs -0 sed -i '/^#define/s:/etc/cg:/etc/cgroup/cg:'
+ sed -i 's:/etc/cg:/etc/cgroup/cg:' \
+ doc/man/cg* samples/config/*.conf README* || die "sed failed"
+
+ # Drop native libcgconfig init config
+ sed -i '/^man_MANS/s:cgred.conf.5::' \
+ doc/man/Makefile.am || die "sed failed"
+
+ # If we're not running tests, don't bother building them.
+ if ! use test; then
+ sed -i '/^SUBDIRS/s:tests::' Makefile.am || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ if use elibc_musl; then
+ append-ldflags -lfts
+ fi
+
+ local myconf=(
+ "$(use_enable static-libs static)"
+ "$(use_enable daemon)"
+ "$(use_enable pam)"
+ "$(use_enable tools)"
+ "$(use_enable test tests)"
+ )
+
+ if use pam; then
+ myconf+=( "--enable-pam-module-dir=$(getpam_mod_dir)" )
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ # Run just the unit tests rather than the full lot as they
+ # need fewer permissions, no containers, etc.
+ emake -C tests/gunit check
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+
+ insinto /etc/cgroup
+ doins samples/config/cgconfig.conf
+ doins samples/config/cgrules.conf
+ doins samples/config/cgsnapshot_blacklist.conf
+
+ keepdir /etc/cgroup/cgconfig.d
+ keepdir /etc/cgroup/cgrules.d
+
+ if use tools; then
+ newconfd "${FILESDIR}/cgconfig.confd-r2" cgconfig
+ newinitd "${FILESDIR}/cgconfig.initd-r2" cgconfig
+ systemd_dounit "${FILESDIR}/cgconfig.service"
+ systemd_dounit "${FILESDIR}/cgrules.service"
+ fi
+
+ if use daemon; then
+ newconfd "${FILESDIR}/cgred.confd-r2" cgred
+ newinitd "${FILESDIR}/cgred.initd-r1" cgred
+ fi
+}
diff --git a/dev-libs/libcgroup/libcgroup-3.1.0.ebuild b/dev-libs/libcgroup/libcgroup-3.1.0.ebuild
new file mode 100644
index 000000000000..2459a7f98d46
--- /dev/null
+++ b/dev-libs/libcgroup/libcgroup-3.1.0.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic linux-info pam systemd
+
+DESCRIPTION="Tools and libraries to configure and manage kernel control groups"
+HOMEPAGE="https://github.com/libcgroup/libcgroup"
+SRC_URI="https://github.com/libcgroup/libcgroup/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="+daemon pam static-libs systemd test +tools"
+REQUIRED_USE="daemon? ( tools )"
+
+# Test failure needs investigation
+RESTRICT="!test? ( test ) test"
+
+DEPEND="
+ elibc_musl? ( sys-libs/fts-standalone )
+ pam? ( sys-libs/pam )
+ systemd? ( sys-apps/systemd:= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+"
+
+pkg_setup() {
+ local CONFIG_CHECK="~CGROUPS"
+ if use daemon; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~CONNECTOR ~PROC_EVENTS"
+ fi
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # Change rules file location
+ find src -name '*.c' -o -name '*.h' -print0 \
+ | xargs -0 sed -i '/^#define/s:/etc/cg:/etc/cgroup/cg:'
+ sed -i 's:/etc/cg:/etc/cgroup/cg:' \
+ doc/man/cg* samples/config/*.conf README* || die "sed failed"
+
+ # Drop native libcgconfig init config
+ sed -i '/^man_MANS/s:cgred.conf.5::' \
+ doc/man/Makefile.am || die "sed failed"
+
+ # If we're not running tests, don't bother building them.
+ if ! use test; then
+ sed -i '/^SUBDIRS/s:tests::' Makefile.am || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ if use elibc_musl; then
+ append-ldflags -lfts
+ fi
+
+ # Needs flex+bison
+ unset LEX YACC
+
+ local myconf=(
+ --disable-python
+ $(use_enable static-libs static)
+ $(use_enable daemon)
+ $(use_enable pam)
+ $(use_enable systemd)
+ $(use_enable tools)
+ $(use_enable test tests)
+ )
+
+ if use pam; then
+ myconf+=( "--enable-pam-module-dir=$(getpam_mod_dir)" )
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ # Run just the unit tests rather than the full lot as they
+ # need fewer permissions, no containers, etc.
+ emake -C tests/gunit check
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+
+ insinto /etc/cgroup
+ doins samples/config/cgconfig.conf
+ doins samples/config/cgrules.conf
+ doins samples/config/cgsnapshot_denylist.conf
+
+ keepdir /etc/cgroup/cgconfig.d
+ keepdir /etc/cgroup/cgrules.d
+
+ if use tools; then
+ newconfd "${FILESDIR}/cgconfig.confd-r2" cgconfig
+ newinitd "${FILESDIR}/cgconfig.initd-r2" cgconfig
+ systemd_dounit "${FILESDIR}/cgconfig.service"
+ systemd_dounit "${FILESDIR}/cgrules.service"
+ fi
+
+ if use daemon; then
+ newconfd "${FILESDIR}/cgred.confd-r2" cgred
+ newinitd "${FILESDIR}/cgred.initd-r1" cgred
+ fi
+}