app-admin/cg*: new pkgs cgtop and cgls; add 246

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Maciej Barć <xgqt@protonmail.com>
This commit is contained in:
Maciej Barć 2020-12-30 12:14:56 +01:00
parent e6fec4d991
commit f6e4841178
No known key found for this signature in database
GPG Key ID: 031C9FE65BED714A
8 changed files with 408 additions and 0 deletions

1
app-admin/cgls/Manifest Normal file
View File

@ -0,0 +1 @@
DIST systemd-246.tar.gz 9534036 BLAKE2B 71b72abcd4d066d35d45d9835d41bec8faa9a7eddc80b48fe7073223f07d32f78a8442c52dc0800940f9750d9c5502123a633738981d797cf610d85df2035bf0 SHA512 7103f7da53f7ced3b5543c238f23bd11c82af8e37166c1720a90576b6b431b4329320c78726166c65a9f5e101dd465c0a86dd13c586c4e55e608a6273d8f324f

View File

@ -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
}

View File

@ -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(

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>xgqt@protonmail.com</email>
<name>Maciej Barć</name>
</maintainer>
<upstream>
<remote-id type="github">systemd/systemd</remote-id>
</upstream>
<longdescription>
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.
</longdescription>
</pkgmetadata>

1
app-admin/cgtop/Manifest Normal file
View File

@ -0,0 +1 @@
DIST systemd-246.tar.gz 9534036 BLAKE2B 71b72abcd4d066d35d45d9835d41bec8faa9a7eddc80b48fe7073223f07d32f78a8442c52dc0800940f9750d9c5502123a633738981d797cf610d85df2035bf0 SHA512 7103f7da53f7ced3b5543c238f23bd11c82af8e37166c1720a90576b6b431b4329320c78726166c65a9f5e101dd465c0a86dd13c586c4e55e608a6273d8f324f

View File

@ -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
}

View File

@ -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(

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>xgqt@protonmail.com</email>
<name>Maciej Barć</name>
</maintainer>
<upstream>
<remote-id type="github">systemd/systemd</remote-id>
</upstream>
<longdescription>
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.
</longdescription>
</pkgmetadata>