public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/atop/
Date: Sun, 16 Feb 2025 12:11:26 +0000 (UTC)	[thread overview]
Message-ID: <1739707457.6589db140a41f67f8f1fefe3ef0e96090afbd5dd.sam@gentoo> (raw)

commit:     6589db140a41f67f8f1fefe3ef0e96090afbd5dd
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Sun Feb 16 11:30:20 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 16 12:04:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6589db14

sys-process/atop: Restrict C version to gnu17

Heavily uses C polymorphism that GCC-15 disallows. Best if fixed upstream

Bug: https://bugs.gentoo.org/945250
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-process/atop/atop-2.11.0-r1.ebuild | 118 +++++++++++++++++++++++++++++++++
 1 file changed, 118 insertions(+)

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..c6445c5dd8c0
--- /dev/null
+++ b/sys-process/atop/atop-2.11.0-r1.ebuild
@@ -0,0 +1,118 @@
+# 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
+
+		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}
+}


             reply	other threads:[~2025-02-16 12:11 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-16 12:11 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-20  8:35 [gentoo-commits] repo/gentoo:master commit in: sys-process/atop/ Arthur Zamarin
2024-10-10 11:04 Arthur Zamarin
2024-10-08 21:50 Jakov Smolić
2024-10-05 14:30 Arthur Zamarin
2024-10-05 12:02 Arthur Zamarin
2024-08-11 21:14 Sam James
2024-08-11 20:56 Sam James
2024-03-02 16:31 Arthur Zamarin
2024-02-18 20:02 Arthur Zamarin
2024-02-18 20:02 Arthur Zamarin
2024-02-18 19:57 Arthur Zamarin
2024-01-14  3:46 Sam James
2024-01-14  3:40 Sam James
2023-11-27 11:23 Sam James
2023-08-02  8:17 Sam James
2023-07-24 21:02 Sam James
2023-07-24 13:39 Arthur Zamarin
2023-07-15  8:45 Arthur Zamarin
2023-05-20  7:02 Sam James
2023-05-03 18:58 Sam James
2023-03-04 11:03 Arthur Zamarin
2023-03-04  7:04 Arthur Zamarin
2023-01-08  5:20 Sam James
2023-01-08  5:20 Sam James
2022-12-31 23:28 Sam James
2022-10-29 21:39 Sam James
2022-04-17 17:12 Sam James
2022-02-20  5:27 Sam James
2022-02-19  6:29 Arthur Zamarin
2022-02-19  6:29 Arthur Zamarin
2022-02-19  6:29 Arthur Zamarin
2022-02-19  3:02 Sam James
2022-01-13  5:33 Sam James
2022-01-09  8:05 Sam James
2022-01-09  1:06 Sam James
2022-01-07  5:14 Sam James
2021-12-20  7:36 Sam James
2021-10-11 13:47 Yixun Lan
2021-05-16 12:45 Sam James
2021-05-13 21:17 Sam James
2021-05-13 18:56 Sam James
2021-05-13 17:12 Sam James
2019-11-07  8:21 Lars Wendler
2018-06-04 19:25 Mart Raudsepp
2017-12-12 15:10 Lars Wendler
2017-11-15 22:42 Sergei Trofimovich
2017-10-23 12:29 Manuel Rüger
2017-10-05 11:07 Sergei Trofimovich
2017-09-23 16:08 Thomas Deutschmann
2017-09-22 21:33 Thomas Deutschmann
2017-08-22 21:41 Michał Górny
2017-08-04  7:15 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1739707457.6589db140a41f67f8f1fefe3ef0e96090afbd5dd.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox