aboutsummaryrefslogtreecommitdiffstats
path: root/testing/daemontools
diff options
context:
space:
mode:
authorJohannes Findeisen <you@hanez.org>2016-11-18 20:25:16 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2016-12-05 16:12:21 +0000
commit8e66643b26e958ab57aa9507d5ebd0ad9fa719a2 (patch)
treefe82af300ba8e655425521f78d7d5d48ca93cdde /testing/daemontools
parent1b30f2804b6f5c59ab10eec4d850332a762a15e3 (diff)
downloadaports-8e66643b26e958ab57aa9507d5ebd0ad9fa719a2.tar.bz2
aports-8e66643b26e958ab57aa9507d5ebd0ad9fa719a2.tar.xz
testing/daemontools: made APKBUILD more consistent
* fixed small errors in APKBUILD * switched to openrc-run in init script
Diffstat (limited to 'testing/daemontools')
-rw-r--r--testing/daemontools/0.76-errno.patch11
-rw-r--r--testing/daemontools/0.76-warnings.patch74
-rw-r--r--testing/daemontools/APKBUILD50
-rw-r--r--testing/daemontools/svscan.initd33
4 files changed, 168 insertions, 0 deletions
diff --git a/testing/daemontools/0.76-errno.patch b/testing/daemontools/0.76-errno.patch
new file mode 100644
index 0000000000..3af157c462
--- /dev/null
+++ b/testing/daemontools/0.76-errno.patch
@@ -0,0 +1,11 @@
+--- src/error.h 2001-07-12 11:49:49.000000000 -0500
++++ src/error.h 2003-02-26 02:14:06.000000000 -0600
+@@ -3,7 +3,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
diff --git a/testing/daemontools/0.76-warnings.patch b/testing/daemontools/0.76-warnings.patch
new file mode 100644
index 0000000000..f558bb18b1
--- /dev/null
+++ b/testing/daemontools/0.76-warnings.patch
@@ -0,0 +1,74 @@
+Fixup misc warnings
+
+Patch by RiverRat
+
+http://bugs.gentoo.org/124487
+
+--- src/chkshsgr.c
++++ src/chkshsgr.c
+@@ -1,10 +1,13 @@
+ /* Public domain. */
+
++#include <sys/types.h>
++#include <stdlib.h>
++#include <grp.h>
+ #include <unistd.h>
+
+ int main()
+ {
+- short x[4];
++ gid_t x[4];
+
+ x[0] = x[1] = 0;
+ if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
+--- src/matchtest.c
++++ src/matchtest.c
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ #include "match.h"
+ #include "buffer.h"
+ #include "str.h"
+--- src/multilog.c
++++ src/multilog.c
+@@ -1,3 +1,4 @@
++#include <stdio.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+--- src/prot.c
++++ src/prot.c
+@@ -1,5 +1,8 @@
+ /* Public domain. */
+
++#include <sys/types.h>
++#include <unistd.h>
++#include <grp.h>
+ #include "hasshsgr.h"
+ #include "prot.h"
+
+--- src/seek_set.c
++++ src/seek_set.c
+@@ -1,6 +1,7 @@
+ /* Public domain. */
+
+ #include <sys/types.h>
++#include <unistd.h>
+ #include "seek.h"
+
+ #define SET 0 /* sigh */
+--- src/supervise.c
++++ src/supervise.c
+@@ -1,3 +1,4 @@
++#include <stdio.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+--- src/pathexec_run.c
++++ src/pathexec_run.c
+@@ -1,5 +1,6 @@
+ /* Public domain. */
+
++#include <unistd.h>
+ #include "error.h"
+ #include "stralloc.h"
+ #include "str.h"
diff --git a/testing/daemontools/APKBUILD b/testing/daemontools/APKBUILD
new file mode 100644
index 0000000000..d21ce8be1f
--- /dev/null
+++ b/testing/daemontools/APKBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Johannes Findeisen <you@hanez.org>
+pkgname=daemontools
+pkgver=0.76
+pkgrel=0
+pkgdesc="Collection of tools for managing UNIX services"
+url="http://cr.yp.to/daemontools.html"
+arch="all"
+license="public-domain"
+depends=
+# The makefile need GNU cat for 'cat -v'
+makedepends="coreutils"
+
+source="http://cr.yp.to/daemontools/$pkgname-$pkgver.tar.gz
+ 0.76-errno.patch
+ 0.76-warnings.patch
+ svscan.initd
+ "
+
+builddir="$srcdir"/admin/$pkgname-$pkgver/src
+
+build() {
+ cd "$builddir"
+ echo "${CC:-"gcc"} ${CFLAGS}" > conf-cc
+ echo "${CC:-"gcc"} ${LDFLAGS}" > conf-ld
+ touch home
+ make PATH="/usr/bin:/bin" || return 1
+}
+
+package() {
+ local f
+ cd "$builddir"
+ mkdir -p "$pkgdir"/usr/bin "$pkgdir"/service
+ for f in $(cat ../package/commands); do
+ cp $f "$pkgdir"/usr/bin/$f
+ done
+ install -Dm755 "$srcdir"/svscan.initd "$pkgdir"/etc/init.d/svscan
+}
+
+md5sums="1871af2453d6e464034968a0fbcb2bfc daemontools-0.76.tar.gz
+c75438b1c3b9d9f67691bd10cf3c8e52 0.76-errno.patch
+ad68177f50bfffb6a1cbf8c668de6a55 0.76-warnings.patch
+39641f3d432b6f8d3259c867b5ad3a0a svscan.initd"
+sha256sums="a55535012b2be7a52dcd9eccabb9a198b13be50d0384143bd3b32b8710df4c1f daemontools-0.76.tar.gz
+1afaa3b5a26e7382cfe1c9880ddf3910fde4ded6fa815440ef087506543a3947 0.76-errno.patch
+42bfcc27660ef6459d39fbaaa9f1852313baadf7b96201872e4deb12804f4833 0.76-warnings.patch
+1b1c739f4adff56f902df5b1eb324a057cf3ef6353555a509351f2a8abb29056 svscan.initd"
+sha512sums="e4a7938352b745a03ccc41acdddba1e6782f0ca245e5cae060de62ab6c5a23c841a994c30140298d274405a7f26d53ba7e84e5810a3d185b2c01e4c0feffe6c7 daemontools-0.76.tar.gz
+76664b71e16ba4dbb081604a1a8c9ddc58a603777dccc0a53b0af9442ff8f0cdfce9ef8b05926dac62b81b2c805262df6a7e4df65920c00583132dbf136ba85e 0.76-errno.patch
+13288c5d1fc5f775cff9286b5cb4c711c5e6e52ef9c714b377cec0328c887b065385c464ca27b2dbe921e66956c20b5f3205cc36d7d2e81c383b5765cbd554aa 0.76-warnings.patch
+a2c3b35c7d253b9f2ffc5051663fdfacc5bd57385ce95d5d623f1f773d7bfe445b6837c7c1fe5565587387bdee0437761272f06902e166e95e2d00c19f8c6995 svscan.initd"
diff --git a/testing/daemontools/svscan.initd b/testing/daemontools/svscan.initd
new file mode 100644
index 0000000000..0b855ee730
--- /dev/null
+++ b/testing/daemontools/svscan.initd
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/daemontools/files/svscan.init-0.76-r7,v 1.1 2008/12/07 06:59:37 robbat2 Exp $
+
+depend() {
+ use net
+ before ntpd ntp-client spamd apache apache2
+ after firewall
+}
+
+start() {
+ ebegin "Starting service scan"
+ setsid start-stop-daemon --start --exec /usr/bin/svscan \
+ --background --make-pidfile \
+ --pidfile /var/run/svscan.pid -- /service
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping service scan"
+ start-stop-daemon --stop --exec /usr/bin/svscan \
+ --pidfile /var/run/svscan.pid
+ eend $?
+
+ ebegin "Stopping service scan services"
+ svc -dx /service/* 2>/dev/null
+ eend $?
+
+ ebegin "Stopping service scan logging"
+ svc -dx /service/*/log 2>/dev/null
+ eend $?
+}