aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorAaditya Bagga <aaditya_gnulinux@zoho.com>2019-10-19 10:56:48 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-10-19 10:56:48 +0700
commit119392d16f620777a000dbf34e46947c59efeb09 (patch)
treeb94b9a7b969faa8c8ecfb7ba1a61f8554eaf51ac /system
parent7b8c0065d150e1305d1f2f0d97f55812abf87573 (diff)
system/daemontools-bin: Added (manage UNIX services).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/daemontools-bin/README23
-rw-r--r--system/daemontools-bin/README.Slackware32
-rw-r--r--system/daemontools-bin/daemontools-0.76.errno.patch12
-rw-r--r--system/daemontools-bin/daemontools-bin.SlackBuild105
-rw-r--r--system/daemontools-bin/daemontools-bin.info12
-rw-r--r--system/daemontools-bin/slack-desc19
6 files changed, 203 insertions, 0 deletions
diff --git a/system/daemontools-bin/README b/system/daemontools-bin/README
new file mode 100644
index 000000000000..246c48895732
--- /dev/null
+++ b/system/daemontools-bin/README
@@ -0,0 +1,23 @@
+daemontools is a collection of tools for managing UNIX services.
+
+supervise monitors a service. It starts the service and restarts the
+service if it dies. Setting up a new service is easy: all supervise
+needs is a directory with a run script that runs the service.
+
+multilog saves error messages to one or more logs. It optionally
+timestamps each line and, for each log, includes or excludes lines
+matching specified patterns. It automatically rotates logs to limit the
+amount of disk space used. If the disk fills up, it pauses and tries
+again, without losing any data.
+
+Also included are svscan (starts one supervise process for each
+service), svscanboot (run by init to start svscan in the /service
+directory), readproctitle (show error messages in ps o/p) and many
+others. See the home page for a list and for documentation.
+
+This package differs from the daemontools package in that
+it installs the binaries to /usr/bin instead of /command.
+
+daemontools is written by D. J. Bernstein.
+
+See README.Slackware on how to use it after installation.
diff --git a/system/daemontools-bin/README.Slackware b/system/daemontools-bin/README.Slackware
new file mode 100644
index 000000000000..918b78e99f56
--- /dev/null
+++ b/system/daemontools-bin/README.Slackware
@@ -0,0 +1,32 @@
+Service directory
+-----------------
+
+Create /service directory where services to be run are linked.
+
+mkdir /service
+
+Running daemontools
+-------------------
+
+svscanboot starts svscan in the /service directory.
+There are several different ways to run it:
+
+1. Add the following to /etc/rc.d/rc.local
+
+if [ -x /usr/sbin/svscanboot ]; then
+ echo "Starting svscanboot"
+ /usr/sbin/svscanboot &
+fi
+
+OR
+
+2. Add the following to the end of /etc/inittab
+
+SV:12345:respawn:/usr/sbin/svscanboot
+
+After doing either of the above, restart your system and check
+that the svscan command is running.
+
+The difference between the rc.local and inittab versions is that
+the inittab version is supervised by init, ie, in case svscan
+dies due to some reason, init can restart it.
diff --git a/system/daemontools-bin/daemontools-0.76.errno.patch b/system/daemontools-bin/daemontools-0.76.errno.patch
new file mode 100644
index 000000000000..d1884f579760
--- /dev/null
+++ b/system/daemontools-bin/daemontools-0.76.errno.patch
@@ -0,0 +1,12 @@
+diff -ur daemontools-0.76.old/src/error.h daemontools-0.76/src/error.h
+--- daemontools-0.76.old/src/error.h 2001-07-12 11:49:49.000000000 -0500
++++ daemontools-0.76/src/error.h 2003-01-09 21:52:01.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/system/daemontools-bin/daemontools-bin.SlackBuild b/system/daemontools-bin/daemontools-bin.SlackBuild
new file mode 100644
index 000000000000..96ec1969e5ce
--- /dev/null
+++ b/system/daemontools-bin/daemontools-bin.SlackBuild
@@ -0,0 +1,105 @@
+#!/bin/sh
+
+# Slackware build script for daemontools
+
+# Copyright 2017 Duncan Roe Melbourne, Australia
+# Copyright 2019 Aaditya Bagga, India
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=daemontools-bin
+SRCNAM=daemontools
+VERSION=${VERSION:-0.76}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz --strip-components=1
+tar xvf $CWD/$SRCNAM-$VERSION-man.tar.gz
+mv $SRCNAM-man $SRCNAM-$VERSION/man
+mv $SRCNAM-$VERSION $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+echo "${CC:-gcc} $SLKCFLAGS -Wall" > src/conf-cc
+echo "${LD:-gcc -s}" > src/conf-ld
+
+for i in $CWD/*.patch; do
+ patch -p1 < $i
+done
+
+package/compile
+
+install -d $PKG/usr/{bin,sbin}
+install -m 755 command/* $PKG/usr/bin/
+mv $PKG/usr/bin/svscanboot $PKG/usr/sbin/
+
+install -d $PKG/usr/man/man8
+install -m 644 man/*.8 $PKG/usr/man/man8/
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ src/{CHANGES,TODO} \
+ package/README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l n -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/daemontools-bin/daemontools-bin.info b/system/daemontools-bin/daemontools-bin.info
new file mode 100644
index 000000000000..7f0cc81fd77a
--- /dev/null
+++ b/system/daemontools-bin/daemontools-bin.info
@@ -0,0 +1,12 @@
+PRGNAM="daemontools-bin"
+VERSION="0.76"
+HOMEPAGE="http://cr.yp.to/daemontools.html"
+DOWNLOAD="http://cr.yp.to/daemontools/daemontools-0.76.tar.gz \
+ http://smarden.org/pape/djb/manpages/daemontools-0.76-man.tar.gz"
+MD5SUM="1871af2453d6e464034968a0fbcb2bfc \
+ 2d3858a48f293c87202f76cd883438ee"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Aaditya Bagga"
+EMAIL="aaditya_gnulinux@zoho.com"
diff --git a/system/daemontools-bin/slack-desc b/system/daemontools-bin/slack-desc
new file mode 100644
index 000000000000..b8b9a10d0a06
--- /dev/null
+++ b/system/daemontools-bin/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+daemontools-bin: daemontools (djb's tools for managing UNIX services)
+daemontools-bin:
+daemontools-bin: daemontools includes several programs. supervise monitors a service.
+daemontools-bin: It starts the service and restarts the service if it dies. Setting up
+daemontools-bin: a new service is easy: all supervise needs is a directory with a run
+daemontools-bin: script that runs the service.
+daemontools-bin:
+daemontools-bin: Also included are multilog (for service logging), svcscan,
+daemontools-bin: svscanboot, readproctitle and many others.
+daemontools-bin:
+daemontools-bin: Homepage: https://cr.yp.to/daemontools.html