summaryrefslogtreecommitdiff
path: root/sys-apps/ppc64-diag
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /sys-apps/ppc64-diag
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'sys-apps/ppc64-diag')
-rw-r--r--sys-apps/ppc64-diag/Manifest6
-rw-r--r--sys-apps/ppc64-diag/files/fix-systemd-unit-path.patch38
-rw-r--r--sys-apps/ppc64-diag/files/opal_errd.initd15
-rw-r--r--sys-apps/ppc64-diag/files/rtas_errd.initd15
-rw-r--r--sys-apps/ppc64-diag/metadata.xml17
-rw-r--r--sys-apps/ppc64-diag/ppc64-diag-2.7.7.ebuild73
6 files changed, 164 insertions, 0 deletions
diff --git a/sys-apps/ppc64-diag/Manifest b/sys-apps/ppc64-diag/Manifest
new file mode 100644
index 000000000000..b76692980cc9
--- /dev/null
+++ b/sys-apps/ppc64-diag/Manifest
@@ -0,0 +1,6 @@
+AUX fix-systemd-unit-path.patch 1539 BLAKE2B 78865aea8745102e34a0f29884d21efd768b59de7cca660af4d9866edd4755ab18b3563a37d2e184e3ec75c81378e06df9b06f764af6e2e851b693c017a0f4bf SHA512 2091c4d553c57b2a23dcf02d477c379c1ece870f572cfa12478fd339b8b5272320cd53f63ca4a22a911689ad3de73b011f0937dd8da5810e32ce6be2dfb0714a
+AUX opal_errd.initd 374 BLAKE2B b463e484e60ea63afd2c4f27a4e8330ae6733ecd3e6925b4c1e7333022ff1bd895da29343a7dbf1e92a88c9b204b691d64450c3847dacc8329678f2c9b55cb21 SHA512 1e6e363dbf59d3ef96e724d37d9dd6e764a145cbaf3cc18007d9da50dc5c2ef4effef50282daea93db62ae6722cb6857060896ab5ff76b7348d42d09926b2b04
+AUX rtas_errd.initd 371 BLAKE2B a5367e20d7732fc0b778349e740351fbd55049a08e456a859fc5d8a2e06418bc865b7ef5d27fb3ba420bb008ca7ee5b4781fc41393716d6e502cb691f602805b SHA512 a92128d9b5e31d1206999123734924e8e24833beba4e39b067fbb38bb16cbf174d1dbd51a1d27f294ba95da849020fd60e737ada35db98a7b6210cd06375c1de
+DIST ppc64-diag-2.7.7.tar.gz 423357 BLAKE2B b32def540811f383e401d352d17f2edce6a998a91a7b27bcab981e42469f44aaa505104ed2d2ced8a85485c0886525ff5128b36cdbad3a8eed90e8002877498c SHA512 42d94214345ab8deb7bd9ee8b145052fc2f733ba13d1567dbe6592fe9306670e3cd0ab6122e515464f7050753a992061c056e009673c7f8f6e554e9eaf75c550
+EBUILD ppc64-diag-2.7.7.ebuild 1557 BLAKE2B f2625c84268207eb112f92318383567e347b4b4286da37d2c5c5e5ce24078e54430617176cb9e22f0170663e5a36d13309fd18c4c2f2e0eac6243cdc690dc225 SHA512 d4d3b3ecf072c68a2122ebeab58e724a0b497c1911591f4a5ebc30c84fad819d0f6eb5e4c5c8ba5891f1600ad936e9a6e9af77a3049710723dabfec75376050f
+MISC metadata.xml 695 BLAKE2B 12340096c077aee8e8263122e2efd0faa820a59176e2de793a33bc5c8fffbcea0b35c64f4cfff1ee1d512d65c0f3ea3ab4db1f763026273e2301e944096e577d SHA512 e9d9a9c0ce46172df609a0e3a195060527da44141ecef0e2eeaa9555b20bf7aaa37a359af47dfa34ce77f297a8cda1348da699b14081c45469de98c635b7257a
diff --git a/sys-apps/ppc64-diag/files/fix-systemd-unit-path.patch b/sys-apps/ppc64-diag/files/fix-systemd-unit-path.patch
new file mode 100644
index 000000000000..e11feca7a49c
--- /dev/null
+++ b/sys-apps/ppc64-diag/files/fix-systemd-unit-path.patch
@@ -0,0 +1,38 @@
+From 60a26c23d2d385e62a006d68074ca25479e10639 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Wed, 15 Jan 2020 20:27:31 -0800
+Subject: [PATCH] fix systemd unit path
+
+---
+ scripts/Makefile.am | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/scripts/Makefile.am b/scripts/Makefile.am
+index 29dcb78..36efcfb 100644
+--- a/scripts/Makefile.am
++++ b/scripts/Makefile.am
+@@ -16,8 +16,8 @@ install-exec-hook-scripts:
+ install -D --mode=644 $(CONFIG_FILE) $(DESTDIR)/etc/ppc64-diag
+ install -d --mode=755 $(DESTDIR)/usr/libexec/ppc64-diag/
+ install -D --mode=755 $(INIT_FILES) $(DESTDIR)/usr/libexec/ppc64-diag/
+- install -d --mode=755 $(DESTDIR)/usr/lib/systemd/system/
+- install -D --mode=644 $(SERVICE_SCRIPT) $(DESTDIR)/usr/lib/systemd/system/
++ install -d --mode=755 $(DESTDIR)/lib/systemd/system/
++ install -D --mode=644 $(SERVICE_SCRIPT) $(DESTDIR)/lib/systemd/system/
+
+ uninstall-hook-scripts:
+ rm -f $(DESTDIR)/etc/ppc64-diag/ppc64_diag_setup
+@@ -28,8 +28,8 @@ uninstall-hook-scripts:
+ rm -f $(DESTDIR)/etc/ppc64-diag/ppc64-diag.config
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/rtas_errd
+ rm -f $(DESTDIR)/usr/libexec/ppc64-diag/opal_errd
+- rm -f $(DESTDIR)/usr/lib/systemd/system/rtas_errd.service
+- rm -f $(DESTDIR)/usr/lib/systemd/system/opal_errd.service
++ rm -f $(DESTDIR)/lib/systemd/system/rtas_errd.service
++ rm -f $(DESTDIR)/lib/systemd/system/opal_errd.service
+
+ INSTALL_EXEC_HOOKS += install-exec-hook-scripts
+ UNINSTALL_HOOKS += uninstall-hook-scripts
+--
+2.25.0
+
diff --git a/sys-apps/ppc64-diag/files/opal_errd.initd b/sys-apps/ppc64-diag/files/opal_errd.initd
new file mode 100644
index 000000000000..ee420f1f9aca
--- /dev/null
+++ b/sys-apps/ppc64-diag/files/opal_errd.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="opal_errd daemon"
+description="Daemon to read/parse OPAL platform error(s)/event(s)"
+command=/usr/sbin/opal_errd
+command_args="-w ${opal_errd_args}"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need localmount
+ use logger
+}
diff --git a/sys-apps/ppc64-diag/files/rtas_errd.initd b/sys-apps/ppc64-diag/files/rtas_errd.initd
new file mode 100644
index 000000000000..213f91cf0022
--- /dev/null
+++ b/sys-apps/ppc64-diag/files/rtas_errd.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="rtas_errd daemon"
+description="Daemon to read/parse RTAS platform error(s)/event(s)"
+command=/usr/sbin/rtas_errd
+command_args="${rtas_errd_args}"
+command_background=true
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need localmount
+ use logger
+}
diff --git a/sys-apps/ppc64-diag/metadata.xml b/sys-apps/ppc64-diag/metadata.xml
new file mode 100644
index 000000000000..2b33921f7f90
--- /dev/null
+++ b/sys-apps/ppc64-diag/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ppc@gentoo.org</email>
+ <name>Gentoo Linux PowerPC Development</name>
+ </maintainer>
+ <use>
+ <flag name="rtas">Add support for the Run Time Abstraction Services (RTAS)</flag>
+ </use>
+ <longdescription lang="en">
+ Various diagnostic tools for PowerLinux.
+ These tools capture the diagnostic events from Power Systems platform firmware, SES
+ enclosures and logs serviceable event. It also provides automated responses
+ to urgent events such as environmental conditions and predictive failures.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-apps/ppc64-diag/ppc64-diag-2.7.7.ebuild b/sys-apps/ppc64-diag/ppc64-diag-2.7.7.ebuild
new file mode 100644
index 000000000000..9c94baecc1f4
--- /dev/null
+++ b/sys-apps/ppc64-diag/ppc64-diag-2.7.7.ebuild
@@ -0,0 +1,73 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Diagnostic tools for PowerLinux"
+HOMEPAGE="https://github.com/power-ras/ppc64-diag"
+SRC_URI="https://github.com/power-ras/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~ppc64"
+IUSE="rtas"
+
+DEPEND="virtual/libudev:=
+ rtas? (
+ sys-libs/ncurses:0=
+ sys-libs/librtas
+ sys-libs/libservicelog
+ sys-libs/libvpd
+ )
+"
+
+RDEPEND="${DEPEND}"
+
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/fix-systemd-unit-path.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with rtas librtas)
+ # handle ncurses[tinfo]
+ sed -e "s:-lncurses:$($(tc-getPKG_CONFIG) --libs ncurses):g" \
+ -i Makefile || die
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}/opal_errd.initd" opal_errd
+
+ if use rtas; then
+ newinitd "${FILESDIR}/rtas_errd.initd" rtas_errd
+ keepdir /var/log/ppc64-diag/diag_disk
+ else
+ # makefile installs it unconditionally
+ rm -rf "${ED}/lib/systemd/system/rtas_errd.service" || die
+ rm -rf "${ED}/usr/lib/systemd/system/rtas_errd.service" || die
+ fi
+
+ keepdir /var/log/opal-elog
+ keepdir /var/log/dump
+}
+
+src_test() {
+ # it assumes MKTEMP created dir in /tmp, add /var to the string.
+ # /varplatform.0x01 becomes platform.0x01, just as test expects
+ # so we sed a sed expression, don't judge me
+ sed -i 's%\/tmp/%\/var\/tmp\/%' opal_errd/tests/test-extract_opal_dump-000 || die
+ emake check
+}