diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-02-17 00:13:57 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-02-17 00:13:57 +0000 |
commit | 27b3683509c5229cce540418778a8b64afbc0009 (patch) | |
tree | b7164898142b8b093b91c8254c4387b6eec679ee /sys-process/atop | |
parent | f2bdc27fe0f79f8f9a3945eb2b1163ce75c56439 (diff) |
gentoo auto-resync : 17:02:2025 - 00:13:57
Diffstat (limited to 'sys-process/atop')
-rw-r--r-- | sys-process/atop/Manifest | 2 | ||||
-rw-r--r-- | sys-process/atop/atop-2.11.0-r1.ebuild | 119 | ||||
-rw-r--r-- | sys-process/atop/files/netatop-3.2.2-strict-prototype.patch | 77 |
3 files changed, 198 insertions, 0 deletions
diff --git a/sys-process/atop/Manifest b/sys-process/atop/Manifest index 4a0083ac0824..87d2eed96f2c 100644 --- a/sys-process/atop/Manifest +++ b/sys-process/atop/Manifest @@ -1,7 +1,9 @@ AUX atop-2.11.0-build.patch 1314 BLAKE2B 0fa62bb7907893f3d56bc039bc726640be8b2ddf730760c9b50544318714386f9d6f36679242e7c7d86f0122ee96163a16514135731cd461d6c37682870e5fee SHA512 1b2a3356069da4cf7e6642e49be8a9da1fe95515c92d514c2208c902c38600274b6ed3479a43e9512be24fb8d7464491151798b2d8ccb200aaf46860e89636a7 AUX atop-2.11.0-respect-opt.patch 664 BLAKE2B d1c72caab93f7cc32245706911a4c910d1a78afea8ee8661c3d917e0025d9716446ceb73f2efa183030f90e04826ffa20211722b894b571924db5459bb77e506 SHA512 d1fa231d99d228229c1c15fa85570839ca04cd5937c286434ddb65ef9b350245e7893567fe5b96e512ce929d2aa04884d953073b444cd2d834bad29d01a259a4 +AUX netatop-3.2.2-strict-prototype.patch 1466 BLAKE2B a3cc13f8beffecff7ae60193dacefe1fe794d3510480d68b77f2e1f4929f903f1ed814070f17f76361629756db6a2477a785f1c359ac3add8bec2105aea04f0e SHA512 d47ef07498a6977823295b7871f7f0a22842d1cec241603b9b6ee83e791c067b4f349a448c6c172288af8787f845377b1e85fdf2bf8f56a4eddddd2881d16fd6 AUX netatop.rc 330 BLAKE2B 8da0bdd3ea55cdc0ff9b54d7fd499f6582eb6571a859da8e2e0eefd7b5c47b9c6aac9be5565bd61e8fb03168482cab65e5ecbaf702d56c8e940bfb4c4e38f12f SHA512 e61c8133041da7961088faa90b244ab44cebc07583b3feffa5854b2751fc6bdd1cd8964c30ab9acde653d70f4280738fe9f77f7eaf29d939757dc0b51151f289 DIST atop-2.11.0.tar.gz 322301 BLAKE2B 0084f1c02e835abd69c4810c0ef020d40bd8738064f8b9ae3cb1f24c460507571b87ddf47f12a0b2eefa86f9d0dcce02be8829e157dcc289deaac6d9cd3c7cda SHA512 5cf176e83232a54b69628b165172ed43f7bdfb62c7744ee781da8a262f3e4d70a829dc175320b5042a794a8d31318672477ba870feaaf3e9aa85fd4d6f485356 DIST netatop-3.2.2.tar.gz 23977 BLAKE2B cf360071e56593251df4249d2c7ec8a1c823c71a4d96e5b7f5d02ab0dc8388eb22d34c4120924c5a5ecc9b4d610a14785e5002bc3b888aa4c66d8c73454a0900 SHA512 59ff6daf56f73578cfc7b48085747d3f2917589203196396dde6036c33da0dbce4b67b58c141545a785beb31ebeb35936d96bb6ff3b6071e95315a32e20d6093 +EBUILD atop-2.11.0-r1.ebuild 2583 BLAKE2B f1f64dbcb0ceab6615cf74145d2681ed3c09e9d25ae75af3508d472132a09ef8e35e8249c24fcbdf4447a37ec7fff393b86562f72ba0c6b4ea77a17dc59be069 SHA512 f27b81832d477db03e8166bc32f7a63eb062200f9b8175c5f3ca642624cf845a16f7767204df86b0096bf6df18f768a418c99ac7d20f4589668fa40fef2f440a EBUILD atop-2.11.0.ebuild 2467 BLAKE2B d20e370f75461d6dcdb70bf1c2001b2ef077089baf3de62006ce95f6b3970de5cf53270e433251eadc52cf47ae08be9f5e98d7f7729743538aeaee201e3ab03b SHA512 37e4b45bcab1cc821ba7c25a146111087c1793d3e692d6ba1598a60dae186ae09c458a371e166605846b4d1e214ca53d51e361f6ebfb50b2e096973ff2d0ea28 MISC metadata.xml 438 BLAKE2B 39c4d236c004f4b9856dd64ee810c64f41ec5097c259d2ee51d2e3c01b75d04aeb49d19f25bbb6aba131d4fc31fae9b2f4d3706cb1358ccdc95a4caca9967ca8 SHA512 7dfb13251330c915a8e8373f4f4a58113a5dac2a036e79d9ec9bc72c76ed7756f6706cb01c65b0f77458818485383199747fde1cd935b855e1c08c6f02e3c274 diff --git a/sys-process/atop/atop-2.11.0-r1.ebuild b/sys-process/atop/atop-2.11.0-r1.ebuild new file mode 100644 index 000000000000..14723c254228 --- /dev/null +++ b/sys-process/atop/atop-2.11.0-r1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Check on bumps of atop +# https://www.atoptool.nl/downloadnetatop.php +NETATOP_VER=3.2.2 + +# Controls 'netatop' kernel module +MODULES_OPTIONAL_IUSE="modules" +NETATOP_P=netatop-${NETATOP_VER} +NETATOP_S="${WORKDIR}"/${NETATOP_P} + +inherit linux-mod-r1 systemd toolchain-funcs flag-o-matic + +DESCRIPTION="Resource-specific view of processes" +HOMEPAGE="https://www.atoptool.nl/ https://github.com/Atoptool/atop" +SRC_URI="https://github.com/Atoptool/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" modules? ( https://www.atoptool.nl/download/${NETATOP_P}.tar.gz )" + +# Module is GPL-2 as well +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" + +RDEPEND=" + dev-libs/glib + sys-libs/ncurses:= + sys-libs/zlib + >=sys-process/acct-6.6.4-r1 +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-2.11.0-build.patch + "${FILESDIR}"/${PN}-2.11.0-respect-opt.patch +) + +pkg_pretend() { + if use kernel_linux ; then + CONFIG_CHECK="~BSD_PROCESS_ACCT" + check_extra_config + fi +} + +src_prepare() { + append-cflags -std=gnu17 # bug 945250 + default + + if use modules ; then + cd "${WORKDIR}"/${NETATOP_P} || die + eapply "${FILESDIR}/netatop-3.2.2-strict-prototype.patch" + + sed \ + -e "s#\`uname -r\`#${KV_FULL}#g" \ + -e "s#\$(shell uname -r)#${KV_FULL}#g" \ + -i Makefile || die + + grep -rq "uname -r" && die "found uname calls" + + cd "${S}" || die + fi + + tc-export CC PKG_CONFIG + + # bug #191926 + sed -i 's: root : :' atop.cronsysv || die + + # Prefixify + sed -i "s:/\(usr\|etc\|var\):${EPREFIX}/\1:g" Makefile || die +} + +src_compile() { + default + + local modlist=( "netatop=:../${NETATOP_P}::netatop.ko" ) + linux-mod-r1_src_compile + + if use modules ; then + # Don't let the Makefile try to build the module for us + emake -C "${NETATOP_S}" netatopd + fi +} + +src_install() { + linux-mod-r1_src_install + + if use modules ; then + dosbin "${NETATOP_S}"/netatopd + doman "${NETATOP_S}"/man/* + + systemd_dounit "${NETATOP_S}"/netatop.service + + newinitd "${NETATOP_S}"/netatop.rc netatop + fi + + emake DESTDIR="${D}" genericinstall + + # useless -${PV} copies ? + rm "${ED}"/usr/bin/atop*-${PV} || die + + newinitd atop.rc.openrc ${PN} + newinitd atopacct.rc.openrc atopacct + + systemd_dounit "${S}"/${PN}.service + systemd_dounit "${S}"/atopacct.service + + dodoc atop.cronsysv AUTHORS README + + exeinto /usr/share/${PN} + doexe ${PN}.daily + + insinto /etc/default + newins ${PN}{.default,} + + keepdir /var/log/${PN} +} diff --git a/sys-process/atop/files/netatop-3.2.2-strict-prototype.patch b/sys-process/atop/files/netatop-3.2.2-strict-prototype.patch new file mode 100644 index 000000000000..3cb1d6fc5040 --- /dev/null +++ b/sys-process/atop/files/netatop-3.2.2-strict-prototype.patch @@ -0,0 +1,77 @@ +Fix for strict prototypes error: declarations are fine, +definitions are missing void +https://bugs.gentoo.org/949835 +--- a/netatop.c 2024-06-01 15:19:08.000000000 +0400 ++++ b/netatop.c 2025-02-16 15:48:07.094848633 +0400 +@@ -1053,7 +1053,7 @@ + ** can be found at the head + */ + static void +-gctaskexit() ++gctaskexit(void) + { + unsigned long flags; + struct taskinfo *tip; +@@ -1087,7 +1087,7 @@ + ** cleanup sockinfo structures that are connected to finished processes + */ + static void +-gcsockinfo() ++gcsockinfo(void) + { + int i; + struct sockinfo *sip, *sipsave; +@@ -1300,7 +1300,7 @@ + ** remove taskinfo structures of finished tasks from hash list + */ + static void +-gctaskinfo() ++gctaskinfo(void) + { + int i; + struct taskinfo *tip, *tipsave; +@@ -1376,7 +1376,7 @@ + ** remove all sockinfo structs + */ + static void +-wipesockinfo() ++wipesockinfo(void) + { + struct sockinfo *sip, *sipsave; + int i; +@@ -1404,7 +1404,7 @@ + ** remove all taskinfo structs from hash list + */ + static void +-wipetaskinfo() ++wipetaskinfo(void) + { + struct taskinfo *tip, *tipsave; + int i; +@@ -1432,7 +1432,7 @@ + ** remove all taskinfo structs from exit list + */ + static void +-wipetaskexit() ++wipetaskexit(void) + { + gctaskexit(); + } +@@ -1768,7 +1768,7 @@ + ** called when module loaded + */ + int +-init_module() ++init_module(void) + { + int i; + +@@ -1869,7 +1869,7 @@ + ** called when module unloaded + */ + void +-cleanup_module() ++cleanup_module(void) + { + /* + ** tell kernel daemon to stop |