testing/freeipmi: new aport

This commit is contained in:
Sodface 2021-10-01 22:09:20 -04:00 committed by Leo
parent 92b6178a6a
commit 09d321c701
7 changed files with 191 additions and 0 deletions

61
testing/freeipmi/APKBUILD Normal file
View File

@ -0,0 +1,61 @@
# Contributor: Sodface <sod@sodface.com>
# Maintainer: Sodface <sod@sodface.com>
pkgname=freeipmi
pkgver=1.6.8
pkgrel=0
pkgdesc="IPMI library and utilities"
url="https://www.gnu.org/software/freeipmi/"
arch="all !ppc64le"
license="GPL-3.0-or-later"
options="!check" # no test suite
makedepends="argp-standalone libgcrypt-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-openrc"
source="https://ftp.gnu.org/gnu/freeipmi/freeipmi-$pkgver.tar.gz
bmc-watchdog.confd
bmc-watchdog.initd
ipmidetectd.confd
ipmidetectd.initd
ipmiseld.confd
ipmiseld.initd"
build() {
# musl stropts.h does not define getmsg or putmsg
# checked for by ipmi-sunbmc-driver.c. Disable it.
./configure ac_cv_header_sys_stropts_h=no \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--disable-static \
--disable-init-scripts
make
}
package() {
make -j1 DESTDIR="$pkgdir" install
install -Dm 644 "$srcdir"/bmc-watchdog.confd \
"$pkgdir"/etc/conf.d/bmc-watchdog
install -Dm755 "$srcdir"/bmc-watchdog.initd \
"$pkgdir"/etc/init.d/bmc-watchdog
install -Dm 644 "$srcdir"/ipmidetectd.confd \
"$pkgdir"/etc/conf.d/ipmidetectd
install -Dm755 "$srcdir"/ipmidetectd.initd \
"$pkgdir"/etc/init.d/ipmidetectd
install -Dm 644 "$srcdir"/ipmiseld.confd \
"$pkgdir"/etc/conf.d/ipmiseld
install -Dm755 "$srcdir"/ipmiseld.initd \
"$pkgdir"/etc/init.d/ipmiseld
}
sha512sums="
66cae2aed95ddb3fd9301146d5a1065b61267232d6ced726b106402bf3840a17364a29d7bf6bbe4db7955b77dcd23510f1258aac85ead5c295c876c6fa4333c3 freeipmi-1.6.8.tar.gz
11bbd920eb67a64a9d3742e860ae146c1a00398f44d4cead49f8f6070f46a09249c05bb647a1b7bf2c4c6c78e1ae393b2e52395f640bc7e5139aade7c99b45b2 bmc-watchdog.confd
1e064b0b295fbf76e5deddeaa4edf1b0e5d9b642c2e4be9f3c5cce0700c02ec18778eac4a0cd8196fc5d71ffad9921de8df08a8569812252dd3d604c6f67ad5a bmc-watchdog.initd
f10e908a451c646b2c61338d79e69663c05216a54093745bd2b659041e0b91adb9be4077c92d63f6f3d62cb5510168b6a57e5e86375533e235fd3abb2b72a49c ipmidetectd.confd
52e90bb45eb32b447250db3df44d7ba37f821a2d699bc586bdb50706b13e638008cd46ad97cb421fa2d2248f2bb3543d99ed95d27bfdd3b82b560a6fe5da153e ipmidetectd.initd
0a031f29a4692085054d5fc2dfe6d0ad7fb762f7ee96849ce2d562a90d6e3b0f3ae8328ab852dc22bee6221bc5cd8b588bd02075222038fa0f0e2f64ac185799 ipmiseld.confd
f95ed699a467689dc1c7c047bd2da8fde04eabc890d02a6517e044a3a5cd05e9ebdeb2b8504fdc053920a8ef281bcf4e2be5a38d3bb4746952bba0e96a47c153 ipmiseld.initd
"

View File

@ -0,0 +1,44 @@
#
# This configuration file controls the behaviour of the bmc-watchdog daemon
# from FreeIPMI.
#
# -u INT, --timer-use=INT
# Set timer use. The timer use value can be set to one of the
# following: 1 = BIOS FRB2, 2 = BIOS POST, 3 = OS_LOAD, 4 = SMS
# OS, 5 = OEM.
#
# -p INT, --pre-timeout-interrupt=INT
# Set pre-timeout interrupt. The pre timeout interrupt can be set
# to one of the following: 0 = None, 1 = SMI, 2 = NMI, 3 = Messag-
# ing Interrupt.
#
# -a INT, --timeout-action=INT
# Set timeout action. The timeout action can be set to one of the
# following: 0 = No action, 1 = Hard Reset, 2 = Power Down, 3 =
# Power Cycle.
#
# -F, --clear-bios-frb2
# Clear BIOS FRB2 Timer Use Flag.
#
# -P, --clear-bios-post
# Clear BIOS POST Timer Use Flag.
#
# -L, --clear-os-load
# Clear OS Load Timer Use Flag.
#
# -S, --clear-sms-os
# Clear SMS/OS Timer Use Flag.
#
# -O, --clear-oem
# Clear OEM Timer Use Flag.
#
# -i SECS, --initial-countdown=SECS
# Set initial countdown in seconds.
#
# -e, --reset-period
# Time interval to wait before resetting timer. The default is 60
# seconds.
#
# For the remaining options, consult man bmc-watchdog
#
OPTIONS="-d -u 4 -p 0 -a 1 -F -P -L -S -O -i 900 -e 60"

View File

@ -0,0 +1,26 @@
#!/sbin/openrc-run
description="BMC Watchdog daemon"
pidfile="/var/run/$RC_SVCNAME.pid"
command="/usr/sbin/$RC_SVCNAME"
start() {
ebegin "Starting $RC_SVCNAME"
start-stop-daemon --start \
--exec $command \
--pidfile $pidfile \
--make-pidfile \
--quiet \
--background \
-- \
--daemon
$OPTIONS
eend $?
}
stop() {
ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop \
--pidfile $pidfile
eend $?
}

View File

@ -0,0 +1,5 @@
# This configuration file controls the behaviour of the ipmid daemon
# from FreeIPMI.
# See `man 8 ipmitdetectd` for further information.
# OPTIONS="-c /etc/freeipmi/ipmidetectd.conf"

View File

@ -0,0 +1,25 @@
#!/sbin/openrc-run
description="IPMI node detection daemon"
pidfile="/var/run/$RC_SVCNAME.pid"
command="/usr/sbin/$RC_SVCNAME"
start() {
ebegin "Starting $RC_SVCNAME"
start-stop-daemon --start \
--exec $command \
--pidfile $pidfile \
--make-pidfile \
--quiet \
--background \
-- \
$OPTIONS
eend $?
}
stop() {
ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop \
--pidfile $pidfile
eend $?
}

View File

@ -0,0 +1,5 @@
# This configuration file controls the behaviour of the ipmiseld daemon
# from FreeIPMI.
# See `man 8 ipmiseld` for further information.
# OPTIONS="--config-file /etc/freeipmi/ipmiseld.conf"

View File

@ -0,0 +1,25 @@
#!/sbin/openrc-run
description="IPMI system event log daemon"
pidfile="/var/run/$RC_SVCNAME.pid"
command="/usr/sbin/$RC_SVCNAME"
start() {
ebegin "Starting $RC_SVCNAME"
start-stop-daemon --start \
--exec $command \
--pidfile $pidfile \
--make-pidfile \
--quiet \
--background \
-- \
$OPTIONS
eend $?
}
stop() {
ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop \
--pidfile $pidfile
eend $?
}