From f6e4841178516a67c94df152e33a40484beb6558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Bar=C4=87?= Date: Wed, 30 Dec 2020 12:14:56 +0100 Subject: [PATCH] app-admin/cg*: new pkgs cgtop and cgls; add 246 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Maciej Barć --- app-admin/cgls/Manifest | 1 + app-admin/cgls/cgls-246.ebuild | 169 ++++++++++++++++++ .../files/246-cgls-libshared-static.patch | 13 ++ app-admin/cgls/metadata.xml | 23 +++ app-admin/cgtop/Manifest | 1 + app-admin/cgtop/cgtop-246.ebuild | 169 ++++++++++++++++++ .../files/246-cgtop-libshared-static.patch | 13 ++ app-admin/cgtop/metadata.xml | 19 ++ 8 files changed, 408 insertions(+) create mode 100644 app-admin/cgls/Manifest create mode 100644 app-admin/cgls/cgls-246.ebuild create mode 100644 app-admin/cgls/files/246-cgls-libshared-static.patch create mode 100644 app-admin/cgls/metadata.xml create mode 100644 app-admin/cgtop/Manifest create mode 100644 app-admin/cgtop/cgtop-246.ebuild create mode 100644 app-admin/cgtop/files/246-cgtop-libshared-static.patch create mode 100644 app-admin/cgtop/metadata.xml diff --git a/app-admin/cgls/Manifest b/app-admin/cgls/Manifest new file mode 100644 index 0000000..0e7a4c8 --- /dev/null +++ b/app-admin/cgls/Manifest @@ -0,0 +1 @@ +DIST systemd-246.tar.gz 9534036 BLAKE2B 71b72abcd4d066d35d45d9835d41bec8faa9a7eddc80b48fe7073223f07d32f78a8442c52dc0800940f9750d9c5502123a633738981d797cf610d85df2035bf0 SHA512 7103f7da53f7ced3b5543c238f23bd11c82af8e37166c1720a90576b6b431b4329320c78726166c65a9f5e101dd465c0a86dd13c586c4e55e608a6273d8f324f diff --git a/app-admin/cgls/cgls-246.ebuild b/app-admin/cgls/cgls-246.ebuild new file mode 100644 index 0000000..ea8e479 --- /dev/null +++ b/app-admin/cgls/cgls-246.ebuild @@ -0,0 +1,169 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Based on: +# - https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild +# - https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-boot/systemd-boot/systemd-boot-245.ebuild +# Difference: Is is possible to install this on a system running systemd. + +EAPI=7 + +MINKV="3.11" + +inherit meson + +DESCRIPTION="cgls from systemd" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" + +if [[ "${PV}" == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/systemd/systemd.git" +else + SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz" + KEYWORDS="~amd64" +fi + +# No tests for this one (if I mised them let me know) +RESTRICT="mirror test" +LICENSE="BSD-2 GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0" +IUSE="selinux" + +BDEPEND=" + >=dev-util/intltool-0.50 + >=dev-util/meson-0.46 + >=sys-apps/coreutils-8.16 + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt:0 + sys-devel/m4 + virtual/pkgconfig +" +DEPEND=" + >=sys-apps/util-linux-2.30:0= + >=sys-kernel/linux-headers-${MINKV} + sys-apps/acl:0= + sys-libs/libcap:0= + selinux? ( sys-libs/libselinux:0= ) +" +RDEPEND=" + ${DEPEND} +" + +S="${WORKDIR}/systemd-${PV}" + +PATCHES=( + "${FILESDIR}/246-${PN}-libshared-static.patch" +) + +src_configure() { + local systemd_disable_options=( + adm-group + analyze + apparmor + audit + backlight + binfmt + blkid + bzip2 + coredump + dbus + efi + elfutils + environment-d + fdisk + firstboot + gcrypt + glib + gnutls + gshadow + hibernate + hostnamed + hwdb + idn + ima + initrd + kernel-install + kmod + ldconfig + libcryptsetup + libcurl + libfido2 + libidn + libidn2 + libiptc + link-networkd-shared + link-systemctl-shared + link-timesyncd-shared + link-udev-shared + localed + logind + lz4 + machined + microhttpd + networkd + nss-myhostname + nss-resolve + nss-systemd + openssl + p11kit + pam + pcre2 + polkit + portabled + pstore + pwquality + qrencode + quotacheck + randomseed + resolve + rfkill + seccomp + smack + sysusers + timedated + timesyncd + tmpfiles + tpm + userdb + utmp + vconsole + wheel-group + xdg-autostart + xkbcommon + xz + zlib + zstd + ) + # prepend -D and append =false, e.g. zstd becomes -Dzstd=false + systemd_disable_options=( ${systemd_disable_options[@]/#/-D} ) + systemd_disable_options=( ${systemd_disable_options[@]/%/=false} ) + + local emesonargs=( + -Dacl=true + -Dstandalone-binaries=true + -Dstatic-libsystemd=true + -Dsysvinit-path='' + ${systemd_disable_options[@]} + $(meson_use selinux) + ) + meson_src_configure +} + +src_compile() { + local mytargets=( + systemd-cgls + man/systemd-cgls.1 + ) + meson_src_compile "${mytargets[@]}" +} + +src_install() { + pushd "${BUILD_DIR}" >/dev/null || die + + newbin systemd-cgls cgls + newman man/systemd-cgls.1 cgls.1 + + popd >/dev/null || die +} diff --git a/app-admin/cgls/files/246-cgls-libshared-static.patch b/app-admin/cgls/files/246-cgls-libshared-static.patch new file mode 100644 index 0000000..8f6d697 --- /dev/null +++ b/app-admin/cgls/files/246-cgls-libshared-static.patch @@ -0,0 +1,13 @@ +index dbbddb6..3f9b144 100644 +--- a/meson.build ++++ b/meson.build +@@ -2886,8 +2886,7 @@ public_programs += executable( + 'systemd-cgls', + 'src/cgls/cgls.c', + include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, ++ link_with : [libshared_static, libsystemd_static], + install : true) + + public_programs += executable( diff --git a/app-admin/cgls/metadata.xml b/app-admin/cgls/metadata.xml new file mode 100644 index 0000000..1579f57 --- /dev/null +++ b/app-admin/cgls/metadata.xml @@ -0,0 +1,23 @@ + + + + + xgqt@protonmail.com + Maciej Barć + + + systemd/systemd + + + systemd-cgls recursively shows the contents of the selected Linux + control group hierarchy in a tree. If arguments are specified, + shows all member processes of the specified control groups plus + all their subgroups and their members. The control groups may either + be specified by their full file paths or are assumed in the systemd + control group hierarchy. If no argument is specified and the current + working directory is beneath the control group mount point + /sys/fs/cgroup/, shows the contents of the control group the working + directory refers to. Otherwise, the full systemd control group + hierarchy is shown. + + diff --git a/app-admin/cgtop/Manifest b/app-admin/cgtop/Manifest new file mode 100644 index 0000000..0e7a4c8 --- /dev/null +++ b/app-admin/cgtop/Manifest @@ -0,0 +1 @@ +DIST systemd-246.tar.gz 9534036 BLAKE2B 71b72abcd4d066d35d45d9835d41bec8faa9a7eddc80b48fe7073223f07d32f78a8442c52dc0800940f9750d9c5502123a633738981d797cf610d85df2035bf0 SHA512 7103f7da53f7ced3b5543c238f23bd11c82af8e37166c1720a90576b6b431b4329320c78726166c65a9f5e101dd465c0a86dd13c586c4e55e608a6273d8f324f diff --git a/app-admin/cgtop/cgtop-246.ebuild b/app-admin/cgtop/cgtop-246.ebuild new file mode 100644 index 0000000..43a58f4 --- /dev/null +++ b/app-admin/cgtop/cgtop-246.ebuild @@ -0,0 +1,169 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Based on: +# - https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild +# - https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-boot/systemd-boot/systemd-boot-245.ebuild +# Difference: Is is possible to install this on a system running systemd. + +EAPI=7 + +MINKV="3.11" + +inherit meson + +DESCRIPTION="cgtop from systemd" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" + +if [[ "${PV}" == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/systemd/systemd.git" +else + SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz" + KEYWORDS="~amd64" +fi + +# No tests for this one (if I mised them let me know) +RESTRICT="mirror test" +LICENSE="BSD-2 GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0" +IUSE="selinux" + +BDEPEND=" + >=dev-util/intltool-0.50 + >=dev-util/meson-0.46 + >=sys-apps/coreutils-8.16 + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt:0 + sys-devel/m4 + virtual/pkgconfig +" +DEPEND=" + >=sys-apps/util-linux-2.30:0= + >=sys-kernel/linux-headers-${MINKV} + sys-apps/acl:0= + sys-libs/libcap:0= + selinux? ( sys-libs/libselinux:0= ) +" +RDEPEND=" + ${DEPEND} +" + +S="${WORKDIR}/systemd-${PV}" + +PATCHES=( + "${FILESDIR}/246-${PN}-libshared-static.patch" +) + +src_configure() { + local systemd_disable_options=( + adm-group + analyze + apparmor + audit + backlight + binfmt + blkid + bzip2 + coredump + dbus + efi + elfutils + environment-d + fdisk + firstboot + gcrypt + glib + gnutls + gshadow + hibernate + hostnamed + hwdb + idn + ima + initrd + kernel-install + kmod + ldconfig + libcryptsetup + libcurl + libfido2 + libidn + libidn2 + libiptc + link-networkd-shared + link-systemctl-shared + link-timesyncd-shared + link-udev-shared + localed + logind + lz4 + machined + microhttpd + networkd + nss-myhostname + nss-resolve + nss-systemd + openssl + p11kit + pam + pcre2 + polkit + portabled + pstore + pwquality + qrencode + quotacheck + randomseed + resolve + rfkill + seccomp + smack + sysusers + timedated + timesyncd + tmpfiles + tpm + userdb + utmp + vconsole + wheel-group + xdg-autostart + xkbcommon + xz + zlib + zstd + ) + # prepend -D and append =false, e.g. zstd becomes -Dzstd=false + systemd_disable_options=( ${systemd_disable_options[@]/#/-D} ) + systemd_disable_options=( ${systemd_disable_options[@]/%/=false} ) + + local emesonargs=( + -Dacl=true + -Dstandalone-binaries=true + -Dstatic-libsystemd=true + -Dsysvinit-path='' + ${systemd_disable_options[@]} + $(meson_use selinux) + ) + meson_src_configure +} + +src_compile() { + local mytargets=( + systemd-cgtop + man/systemd-cgtop.1 + ) + meson_src_compile "${mytargets[@]}" +} + +src_install() { + pushd "${BUILD_DIR}" >/dev/null || die + + newbin systemd-cgtop cgtop + newman man/systemd-cgtop.1 cgtop.1 + + popd >/dev/null || die +} diff --git a/app-admin/cgtop/files/246-cgtop-libshared-static.patch b/app-admin/cgtop/files/246-cgtop-libshared-static.patch new file mode 100644 index 0000000..cc8fdec --- /dev/null +++ b/app-admin/cgtop/files/246-cgtop-libshared-static.patch @@ -0,0 +1,13 @@ +index dbbddb6..3976888 100644 +--- a/meson.build ++++ b/meson.build +@@ -2894,8 +2894,7 @@ public_programs += executable( + 'systemd-cgtop', + 'src/cgtop/cgtop.c', + include_directories : includes, +- link_with : [libshared], +- install_rpath : rootlibexecdir, ++ link_with : [libshared_static, libsystemd_static], + install : true) + + executable( diff --git a/app-admin/cgtop/metadata.xml b/app-admin/cgtop/metadata.xml new file mode 100644 index 0000000..f564c86 --- /dev/null +++ b/app-admin/cgtop/metadata.xml @@ -0,0 +1,19 @@ + + + + + xgqt@protonmail.com + Maciej Barć + + + systemd/systemd + + + systemd-cgtop shows the top control groups of the local Linux + control group hierarchy, ordered by their CPU, memory, + or disk I/O load. The display is refreshed in regular intervals + (by default every 1s), similar in style to top(1). If a control + group path is specified, shows only the services of the specified + control group. + +