commit: 9825db42834f0ecd71fca1a4df7f30471977400e Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat Oct 11 10:17:25 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Oct 11 10:18:25 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9825db42
sys-apps/ibm-powerpc-utils: fix build w/ c23, fix DEPEND Closes: https://bugs.gentoo.org/955092 Signed-off-by: Sam James <sam <AT> gentoo.org> .../files/ibm-powerpc-utils-1.3.10-c23.patch | 104 +++++++++++++++++++++ .../ibm-powerpc-utils-1.3.10-r2.ebuild | 40 ++++++++ 2 files changed, 144 insertions(+) diff --git a/sys-apps/ibm-powerpc-utils/files/ibm-powerpc-utils-1.3.10-c23.patch b/sys-apps/ibm-powerpc-utils/files/ibm-powerpc-utils-1.3.10-c23.patch new file mode 100644 index 000000000000..cd8f48aceed1 --- /dev/null +++ b/sys-apps/ibm-powerpc-utils/files/ibm-powerpc-utils-1.3.10-c23.patch @@ -0,0 +1,104 @@ +https://bugs.gentoo.org/955092 +https://github.com/ibm-power-utilities/powerpc-utils/issues/109 +https://github.com/ibm-power-utilities/powerpc-utils/pull/114 + +From 7834f565beca5fb765479c4639e34fa46759eb15 Mon Sep 17 00:00:00 2001 +From: Michal Suchanek <[email protected]> +Date: Mon, 4 Aug 2025 13:11:00 +0200 +Subject: [PATCH 1/3] pseries_platform.h: Fix ifdef guard typo + +Signed-off-by: Michal Suchanek <[email protected]> +--- + src/common/pseries_platform.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/common/pseries_platform.h b/src/common/pseries_platform.h +index 440c3e60..5fa12ff9 100644 +--- a/src/common/pseries_platform.h ++++ b/src/common/pseries_platform.h +@@ -19,7 +19,7 @@ + */ + + #ifndef PLATFORM_H +-#define PLARFORM_H ++#define PLATFORM_H + + #define PLATFORM_FILE "/proc/cpuinfo" + + +From df4a683676a9826b048cd52509437fd128341a70 Mon Sep 17 00:00:00 2001 +From: Michal Suchanek <[email protected]> +Date: Mon, 4 Aug 2025 13:25:38 +0200 +Subject: [PATCH 2/3] nvram.c: Correct librtas function prototypes + +Signed-off-by: Michal Suchanek <[email protected]> +--- + src/nvram.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/nvram.c b/src/nvram.c +index 1987c3d9..45a61ebf 100644 +--- a/src/nvram.c ++++ b/src/nvram.c +@@ -886,6 +886,8 @@ dump_errlog(struct nvram *nvram) + return 0; + } + ++struct rtas_event; ++ + /** + * dump_rtas_event_entry + * @brief Dump event-scan data. +@@ -901,11 +903,11 @@ dump_errlog(struct nvram *nvram) + int + dump_rtas_event_entry(char *data, int len) + { +- void *rtas_event; ++ struct rtas_event *rtas_event; + void *handle; +- void *(*parse_rtas_event)(); +- void (*rtas_print_event)(); +- void (*cleanup_rtas_event)(); ++ struct rtas_event *(*parse_rtas_event)(char *, int); ++ int (*rtas_print_event)(FILE *, struct rtas_event *, int); ++ int (*cleanup_rtas_event)(struct rtas_event *); + + handle = dlopen("/usr/lib/librtasevent.so", RTLD_LAZY); + if (handle == NULL) + +From 3c147886126ac6c72776b99c043538c251a8703e Mon Sep 17 00:00:00 2001 +From: Michal Suchanek <[email protected]> +Date: Mon, 4 Nov 2024 11:39:06 +0100 +Subject: [PATCH 3/3] sys_ident: Quiet strncpy warning + +The string is terminated by explicit NUL assignement below, use memcpy +instead of strncpy. + +Signed-off-by: Michal Suchanek <[email protected]> +--- + src/sys_ident.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/sys_ident.c b/src/sys_ident.c +index 2c5c06b4..0d88a2db 100644 +--- a/src/sys_ident.c ++++ b/src/sys_ident.c +@@ -364,7 +364,7 @@ print_sys_part_id(void) + temp[2] = '\0'; + prefix = atoi(temp); + +- strncpy(cc, sys_id+6, 2); ++ memcpy(cc, sys_id+6, 2); + cc[2] = '\0'; + + strncpy(sssss, sys_id+8, 5); +@@ -386,7 +386,7 @@ print_sys_part_id(void) + + close(fd); + +- strncpy(tttt, model+4, 4); ++ memcpy(tttt, model+4, 4); + tttt[4] = '\0'; + + fd = open("/proc/device-tree/ibm,partition-no", O_RDONLY); + diff --git a/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.3.10-r2.ebuild b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.3.10-r2.ebuild new file mode 100644 index 000000000000..abdbfdb2068c --- /dev/null +++ b/sys-apps/ibm-powerpc-utils/ibm-powerpc-utils-1.3.10-r2.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools systemd + +DESCRIPTION="Utilities for the maintenance of the IBM and Apple PowerPC platforms" +HOMEPAGE="https://github.com/ibm-power-utilities/powerpc-utils" +SRC_URI="https://github.com/ibm-power-utilities/${PN//ibm-}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${P//ibm-}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~ppc ~ppc64" +IUSE="+rtas" + +RDEPEND=" + !<sys-apps/powerpc-utils-1.1.3.18-r4 + sys-process/numactl + rtas? ( >=sys-libs/librtas-2.0.2 ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.3.5-docdir.patch + "${FILESDIR}"/${PN}-1.3.10-c23.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --disable-werror \ + --with-systemd="$(systemd_get_systemunitdir)" \ + $(use_with rtas librtas) +}
