summaryrefslogtreecommitdiff
path: root/sys-apps/watchdog
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/watchdog
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/watchdog')
-rw-r--r--sys-apps/watchdog/Manifest13
-rw-r--r--sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch27
-rw-r--r--sys-apps/watchdog/files/watchdog-5.15-musl.patch23
-rw-r--r--sys-apps/watchdog/files/watchdog-conf.d5
-rw-r--r--sys-apps/watchdog/files/watchdog-init.d47
-rw-r--r--sys-apps/watchdog/files/watchdog-init.d-r143
-rw-r--r--sys-apps/watchdog/files/watchdog.service10
-rw-r--r--sys-apps/watchdog/metadata.xml14
-rw-r--r--sys-apps/watchdog/watchdog-5.14.ebuild37
-rw-r--r--sys-apps/watchdog/watchdog-5.15.ebuild42
10 files changed, 261 insertions, 0 deletions
diff --git a/sys-apps/watchdog/Manifest b/sys-apps/watchdog/Manifest
new file mode 100644
index 000000000000..bde7b1642005
--- /dev/null
+++ b/sys-apps/watchdog/Manifest
@@ -0,0 +1,13 @@
+AUX watchdog-5.15-musl-nfs.patch 736 SHA256 6320c916cdfc8431076b7ca79731b673c6e64dffff3d419389c2696916b560a0 SHA512 86c686f35c3934e652653620c84355ed35284bc1bd32fe493c766f4d7fdd4a3eeb77095b66c9cf229de642d1a1c168e6d27f527ebe58a926fe4c8f1d84421343 WHIRLPOOL cbdea1bbf7226495f8339f6d3307c37436e817832f67d6ef2c8c02758d3a77bc1072959260e8206d78d28bf24eb8ce1c64800c876d1802c6cd032790a438e38d
+AUX watchdog-5.15-musl.patch 669 SHA256 101294b15471ca290cd6ae6d02f94f9c628203fc3b6004c0f069aaca7528ebae SHA512 9286e22b34116fa832fec682f72b3989a1022e3d5618b80390d869ce4ce75ed2ccaeb4d61a17bc421968c8edb13acc6e032b139996838fd8593eceb0aa469220 WHIRLPOOL b3f06692f05a67853d9c9ab64a71f6b9d1f3778d3b68e09dfcb7d930a92068608b5544b7070f1cd72c48b9bbf57853e907f28826380b701ea3b39db0ada2180c
+AUX watchdog-conf.d 158 SHA256 8d7a149a0e92cc4b68f7db486464ebabda0ea983c0ac78869f2f942a4b16e92a SHA512 73178a2159a8f9420db1e5a6f2b3fea01315074f3e109acd5d02140e610db81aa771a2ab96b5ca1cf1cc1639679d26c0b42e511b1ab08a89957a8f4dd66f1c62 WHIRLPOOL 9f388a6ed9452899b2f5d5b1190edf1a46ceea9ad2e1b41c2251d6511649f7169920e931c7af3f830ca8427e9513ee2bbf1207381f6660a178ca2c0f64bf1cad
+AUX watchdog-init.d 861 SHA256 23d052547a3a3761b923a5cb135baf616cf59dd081f473cd31573c410f98191e SHA512 f1a84e90dd6f169a6e28f38b9f362e43256bba0b4266fead707578705a8f404d9f256022d94d24f1555847765a27e5a7017b5e1fa20a613fdb0a41d305638231 WHIRLPOOL b98776012f9bff06357598c5e6c547f2dedcc41e97f162b63c8877296fcd24df9f7ccceaae3a205198126500d9e463de97207f0f9b8429639d17637c8b25f0f0
+AUX watchdog-init.d-r1 773 SHA256 a82e9cfec062ab595c83e97ab8c7ccec0576aeb062786733889c079e0427acab SHA512 c07f0e3f026a86ecbcaa839c5711420fe00433a9ce84c3a7e3f4de4a1d90bc5ad6646561acaa1d1df2d1adb638dd6817497c4c538574ac894deb6c7451b2964a WHIRLPOOL 3e0e885754dfb179a6807d9d17c7db0e3296fd216351d81043b1ef702a62b5d0f269fe391237fdbc41375b593fc9ce3a97090ec059db1c2701e59e09113d2e0b
+AUX watchdog.service 146 SHA256 91b021d969dcdf9d87f24c01f88da4dccae5a6697306231e04fe474b8fbe4500 SHA512 5eb489e72351db8a881d84fc15730a91ca2a108641031196ad5374aec5e01fa5b859872fa27c3382b4637482a5c8dab7efa61057f4663ae6c49c4ed01e9d8abd WHIRLPOOL ffd1c299b12059407f376f646998708a78aa480cac83f384bd81017d6eada423e7cf4a0689ef2c626eec7bd950e2f4dbd4bcbea4c24e9357a3cf5d050808e000
+DIST watchdog-5.14.tar.gz 216384 SHA256 620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1 SHA512 ccfaca7a68a47cff42dbeae047dfa691e1cfc23851f9ca0634ea6315ff55a13cdbb0020bde7df38b702c82c0535ad41f520617dd639037e171701a6b0f8991aa WHIRLPOOL 5520e0a4970a20c25780d507260380acf2056828bad8702de98039876526c39a40f884eb1b684cf39386479e6d40c08f3134b138cc6caf51b4150289a364239c
+DIST watchdog-5.15.tar.gz 228132 SHA256 ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c18947c SHA512 a675cfadf3296d583b9163193297038fb19459daf7c6681289392d613e775e75b7afd42a3e01b136a955f25b2f45818033b56e10de9050075d7dc015535a6e75 WHIRLPOOL ebd7ee604ddbad856760949b16615693b1665289d57312f7dee10cea1d358dbd20f2beb2656e549a80c81ad08e5e6de8621cda3ad4eb696e9af7b63b8b4045b9
+EBUILD watchdog-5.14.ebuild 869 SHA256 430adbaaca9917d8ffe45bd554b217ca5ec075ef496f3b51f1240efe9449db3c SHA512 7223acbd16f44a78cab8af57d283453f1e72fe49bab38100a2f3dfdfcdc9cc02caf3c07f75b77b06bdae6d14cd7c31069709d1f4374dcb852fa059cd4e57089a WHIRLPOOL c3afdedd4a2e202d0b5e686f8d6a70e2cec9ae449d3d2cc259fe85fe4d32cb41708665f9c25e8a80c02e9d46a163bf9e729847d76ec32d5623f3795b9777ff70
+EBUILD watchdog-5.15.ebuild 989 SHA256 7e0c4a7adb845a41c529f8b500c5d6c19ebd1ce02b93321476412847fc89d680 SHA512 6172c8dcbb3f7b5b60d2ad8eb3bd781b266aeb4f0326ece639b4b802096519287ca49dd64192ed3727ee6b9714533ad006634e93644fe10cd3619cba5146eead WHIRLPOOL d51cfbebfbbfa484f9d2294b8af0a498c22db604005914ae5c92f19929eef441c6b010d33cb2f2004cd34ba1a8ba9ddb9cb02fc18135679c57dc358652ffc936
+MISC ChangeLog 3880 SHA256 915c9c460b0bfc5c1670fdb65f4717d8dbc32b8b7a8972adaa470f193d6cd440 SHA512 2cb2cd163bf174932fc1dfe46a7be022aab6181ff86d652f1004b1dd0bc71e8d71d8bac33ff59b7bc8d11fdd141277a87b3eeb8c82fce54265d8a7383f56f352 WHIRLPOOL f6e9d1616d1aefc4749696b5925721d4c81dba5f3fce323124e0734a296ba9aab9e279382b9ac1cb2f9048419cabb281f798fd14e7871c5f1dc193a4564cf601
+MISC ChangeLog-2015 9452 SHA256 501a797fde1443b1d6f6ce7c4d06b90d06fb62885eb5227936a5e1dbf390d60b SHA512 e7ca9fe3f0fe4260a0d8ce9de02c4623302a96d784413a6267acd7e35b0c243690818769fdfe0715a1c3f2b310db04afed4a3fcc615ad1d703fb6b73cb4cc0d5 WHIRLPOOL 47467f72fe4634602da7ea87eb3b7cd2ca852ea20b1c205e9e8b08262aed934ae9ad1ab8325f47e147283195171441c96660470e5d330dd16bbb180326c1c3aa
+MISC metadata.xml 405 SHA256 df8b3f543f03f2448f223bdc8555d159448a5f111f21ee74db2ae213e3ad275e SHA512 36da0e0199b41608190b0e39de2b82bea5516890208c57744b93e527904501de01b1bfd4e20fc74450bd7b9ac4d152e0d57e31a35deca0b1edddc9ce60846d0b WHIRLPOOL 88b9d34283d0ebe4d570cc6062e375998f5687b1f33ac1e93476b7c9e27763670a671a1a7488b2a9b04f2ba23722ddae446064436bcdeb9d1c2f5501d992e0b6
diff --git a/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch b/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch
new file mode 100644
index 000000000000..bee4ddc8d7bc
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-5.15-musl-nfs.patch
@@ -0,0 +1,27 @@
+commit f52c40680f0aad44b9ae16648803453ec00cbb2c
+Author: Paul Crawford <psc@sat.dundee.ac.uk>
+Date: Fri Dec 30 15:55:45 2016 +0000
+
+ Compile with musl when nfs is disabled
+
+ musl does by default not ship with rpc headers. The watchdog should
+ not require rpc headers when nfs support is disabled.
+
+ Patch by Felix Janda <fjanda@users.sf.net>
+
+diff --git a/include/sundries.h b/include/sundries.h
+index 4379982..98c489a 100644
+--- a/include/sundries.h
++++ b/include/sundries.h
+@@ -9,9 +9,11 @@
+ #include <signal.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
++#if HAVE_NFS
+ #if !defined(bool_t) && !defined(__GLIBC__)
+ #include <rpc/types.h>
+ #endif
++#endif
+
+ extern int mount_mount_quiet;
+ extern int mount_verbose;
diff --git a/sys-apps/watchdog/files/watchdog-5.15-musl.patch b/sys-apps/watchdog/files/watchdog-5.15-musl.patch
new file mode 100644
index 000000000000..ae62c8014e5b
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-5.15-musl.patch
@@ -0,0 +1,23 @@
+commit c5cb4e1a0339844ae3f55ff1dc4a716c28012f05
+Author: Paul Crawford <psc@sat.dundee.ac.uk>
+Date: Tue Jun 28 18:08:48 2016 +0100
+
+ Include linux/param.h for EXEC_PAGESIZE definition
+
+ Musl does not include linux/param.h whereas glibc does, so it fails
+ to build on musl. Patch supplied by Khem Raj <raj.khem@gmail.com>
+
+diff --git a/src/watchdog.c b/src/watchdog.c
+index acf6450..486384a 100644
+--- a/src/watchdog.c
++++ b/src/watchdog.c
+@@ -26,6 +26,9 @@
+ #include <sys/param.h> /* For EXEC_PAGESIZE */
+ #include <linux/oom.h>
+ #include <linux/watchdog.h>
++#ifdef __linux__
++#include <linux/param.h>
++#endif
+ #include <string.h>
+
+ #include <libgen.h>
diff --git a/sys-apps/watchdog/files/watchdog-conf.d b/sys-apps/watchdog/files/watchdog-conf.d
new file mode 100644
index 000000000000..39c0f808eff0
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-conf.d
@@ -0,0 +1,5 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# for more info, see watchdog(8)
+WATCHDOG_OPTS=""
diff --git a/sys-apps/watchdog/files/watchdog-init.d b/sys-apps/watchdog/files/watchdog-init.d
new file mode 100644
index 000000000000..734a02cdbcbe
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-init.d
@@ -0,0 +1,47 @@
+#!/sbin/openrc-run
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+ use logger
+}
+
+get_config() {
+ set -- ${WATCHDOG_OPTS}
+ while [ -n "$1" ] ; do
+ if [ "$1" = "-c" -o "$1" = "--config-file" ] ; then
+ echo $2
+ return
+ fi
+ shift
+ done
+ echo /etc/watchdog.conf
+}
+
+get_delay() {
+ # man this is fugly
+ sed -n \
+ -e '1{x;s:.*:10:;x}' \
+ -e 's:#.*::' \
+ -e 's:^[[:space:]]*::' \
+ -e '/^interval/{s:.*=::;h}' \
+ -e '${g;p}' \
+ $(get_config)
+}
+
+start() {
+ ebegin "Starting watchdog"
+ start-stop-daemon --start \
+ --exec /usr/sbin/watchdog --pidfile /var/run/watchdog.pid \
+ -- ${WATCHDOG_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping watchdog"
+ start-stop-daemon --stop \
+ --exec /usr/sbin/watchdog --pidfile /var/run/watchdog.pid \
+ --retry $(get_delay)
+ eend $?
+}
diff --git a/sys-apps/watchdog/files/watchdog-init.d-r1 b/sys-apps/watchdog/files/watchdog-init.d-r1
new file mode 100644
index 000000000000..363c8be9bd24
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog-init.d-r1
@@ -0,0 +1,43 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/var/run/watchdog.pid"
+command="/usr/sbin/watchdog"
+command_args="${WATCHDOG_OPTS}"
+
+depend() {
+ need localmount
+ use logger
+}
+
+get_config() {
+ set -- ${WATCHDOG_OPTS}
+ while [ -n "$1" ] ; do
+ if [ "$1" = "-c" -o "$1" = "--config-file" ] ; then
+ echo $2
+ return
+ fi
+ shift
+ done
+ echo /etc/watchdog.conf
+}
+
+get_delay() {
+ # man this is fugly
+ sed -n \
+ -e '1{x;s:.*:10:;x}' \
+ -e 's:#.*::' \
+ -e 's:^[[:space:]]*::' \
+ -e '/^interval/{s:.*=::;h}' \
+ -e '${g;p}' \
+ $(get_config)
+}
+
+stop() {
+ ebegin "Stopping watchdog"
+ start-stop-daemon --stop \
+ --exec ${command} --pidfile ${pidfile} \
+ --retry $(get_delay)
+ eend $?
+}
diff --git a/sys-apps/watchdog/files/watchdog.service b/sys-apps/watchdog/files/watchdog.service
new file mode 100644
index 000000000000..9ec1076e6689
--- /dev/null
+++ b/sys-apps/watchdog/files/watchdog.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=watchdog daemon
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/watchdog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/watchdog/metadata.xml b/sys-apps/watchdog/metadata.xml
new file mode 100644
index 000000000000..36ad6a68bd69
--- /dev/null
+++ b/sys-apps/watchdog/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="nfs">enable support for checking nfs mounts</flag>
+</use>
+<upstream>
+ <remote-id type="sourceforge">watchdog</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-apps/watchdog/watchdog-5.14.ebuild b/sys-apps/watchdog/watchdog-5.14.ebuild
new file mode 100644
index 000000000000..f22eacd43f2a
--- /dev/null
+++ b/sys-apps/watchdog/watchdog-5.14.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit toolchain-funcs flag-o-matic systemd
+
+DESCRIPTION="A software watchdog and /dev/watchdog daemon"
+HOMEPAGE="https://sourceforge.net/projects/watchdog/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm m68k ~mips ppc s390 sh ~sparc x86"
+IUSE="nfs"
+
+DEPEND="nfs? ( net-libs/libtirpc )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ if use nfs ; then
+ tc-export PKG_CONFIG
+ append-cppflags $(${PKG_CONFIG} libtirpc --cflags)
+ export LIBS+=" $(${PKG_CONFIG} libtirpc --libs)"
+ fi
+ econf $(use_enable nfs)
+}
+
+src_install() {
+ default
+ docinto examples
+ dodoc examples/*
+
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN}
+ systemd_dounit "${FILESDIR}"/watchdog.service
+}
diff --git a/sys-apps/watchdog/watchdog-5.15.ebuild b/sys-apps/watchdog/watchdog-5.15.ebuild
new file mode 100644
index 000000000000..887cff300800
--- /dev/null
+++ b/sys-apps/watchdog/watchdog-5.15.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs flag-o-matic systemd
+
+DESCRIPTION="A software watchdog and /dev/watchdog daemon"
+HOMEPAGE="https://sourceforge.net/projects/watchdog/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="nfs"
+
+DEPEND="nfs? ( net-libs/libtirpc )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-musl.patch
+ "${FILESDIR}"/${P}-musl-nfs.patch
+)
+
+src_configure() {
+ if use nfs ; then
+ tc-export PKG_CONFIG
+ append-cppflags $(${PKG_CONFIG} libtirpc --cflags)
+ export LIBS+=" $(${PKG_CONFIG} libtirpc --libs)"
+ fi
+ econf $(use_enable nfs)
+}
+
+src_install() {
+ default
+ docinto examples
+ dodoc examples/*
+
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+ newinitd "${FILESDIR}"/${PN}-init.d-r1 ${PN}
+ systemd_dounit "${FILESDIR}"/watchdog.service
+}