diff options
author | Stuart Cardall <developer@it-offshore.co.uk> | 2016-08-18 20:46:53 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-21 22:24:04 +0200 |
commit | 5c9f3ca3e307be53b45beeed2ce1626f38008625 (patch) | |
tree | 919836fe454e953f46685adf8228b0401280d4b6 /community/inetutils-syslogd | |
parent | 6a00a953ba02bab6440a2c784e7db37c6eaeace1 (diff) | |
download | aports-5c9f3ca3e307be53b45beeed2ce1626f38008625.tar.bz2 aports-5c9f3ca3e307be53b45beeed2ce1626f38008625.tar.xz |
testing/[various]: move to community
albatross-themes
apk-post-messages
autossh
bitcoin
btrbk
entr
ffmpegthumbnailer
firejail
firetools
fwsnort
gnome-colors
imapsync
inetutils-syslogd
inotify-tools-inc
isync
junit
ktsuss
letsencrypt-nosudo
libmbim
libndp
libqmi
libteam
mini-sendmail
modemmanager
namecoin
networkmanager
nginx-naxsi
numix-themes
nxapi
opencl-headers
opencl-icd-loader
opus-tools
perl-authen-ntlm
perl-bit-vector
perl-data-uniqid
perl-file-copy-recursive
perl-getopt-argvfile
perl-io-tee
perl-iptables-chainmgr
perl-iptables-parse
perl-module-scandeps
perl-par-dist
perl-par-packer
perl-par
perl-uri-escape
psad
py-crcmod
py-graphviz
py-lz4
py-opencl
py-opengl-accelerate
runit
secpwgen
secure-delete
socklog
spacefm
tinyssh
udevil
virt-viewer
virtualbricks
whois
wrk
xpra
zram-init
Diffstat (limited to 'community/inetutils-syslogd')
8 files changed, 257 insertions, 0 deletions
diff --git a/community/inetutils-syslogd/APKBUILD b/community/inetutils-syslogd/APKBUILD new file mode 100644 index 0000000000..24ac837ad1 --- /dev/null +++ b/community/inetutils-syslogd/APKBUILD @@ -0,0 +1,98 @@ +# Contributor: Stuart Cardall <developer@it-offshore.co.uk> +# Maintainer: Stuart Cardall <developer@it-offshore.co.uk> +pkgname=inetutils-syslogd +_pkgname=inetutils +pkgver=1.9.4 +pkgrel=1 +pkgdesc="A small syslogd for logging to multiple files" +url="http://www.gnu.org/software/inetutils/" +arch="all" +license="GPL3" +depends_dev="readline-dev ncurses-dev" +makedepends="$depends_dev" +install="$pkgname.post-install $pkgname.post-deinstall" +subpackages="$pkgname-doc" +source="http://ftp.gnu.org/gnu/inetutils/${_pkgname}-${pkgver}.tar.gz + $pkgname.initd + $pkgname.confd + syslog.conf + $pkgname.logrotate + $pkgname.setup + " + +_builddir="$srcdir"/$_pkgname-$pkgver + +build() { + cd "$_builddir" + + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --libexec=/usr/sbin \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --without-wrap --without-pam \ + --disable-ftp --disable-ftpd \ + --disable-telnet --disable-telnetd \ + --disable-talk --disable-talkd \ + --disable-rlogin --disable-rlogind \ + --disable-rsh --disable-rshd \ + --disable-rexec --disable-rexecd \ + --disable-rcp --disable-hostname \ + --disable-tftp --disable-tftpd \ + --disable-ping --disable-ping6 \ + --disable-logger --enable-syslogd \ + --disable-inetd --disable-whois --disable-dnsdomainname \ + --disable-uucpd --disable-ifconfig --disable-traceroute \ + || return 1 + make || return 1 +} + +check() { + cd "$srcdir/${_pkgname}-${pkgver}" + make check +} + +package() { + cd "$_builddir" + make DESTDIR="${pkgdir}" install || return 1 + #binary installed to /usr/sbin not bin + rm -rf "$pkgdir"/usr/bin \ + "$pkgdir"/usr/lib/charset.alias \ + || return 1 + + #install init script & config defaults + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 + install -m644 -D "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/$pkgname || return 1 + install -m644 -D "$srcdir"/syslog.conf \ + "$pkgdir"/etc/syslog.conf || return 1 + install -m644 -D "$srcdir"/inetutils-syslogd.logrotate \ + "$pkgdir"/etc/logrotate.d/inetutils-syslogd || return 1 + install -m755 -D "$srcdir"/inetutils-syslogd.setup \ + "$pkgdir"/sbin/setup-inetutils-syslogd || return 1 + mkdir -p "$pkgdir/usr/share/apk-tools/$pkgname" +} + +md5sums="04852c26c47cc8c6b825f2b74f191f52 inetutils-1.9.4.tar.gz +4a5ed84baf026fe2e686b9e915d140e3 inetutils-syslogd.initd +edf3f502d9f2bf49c5da8cb37a927d06 inetutils-syslogd.confd +9c9998ff341c48322ffdc8f48fa018cf syslog.conf +842e971153c19cb328db2cc6e22a7baf inetutils-syslogd.logrotate +82d3bf51747654410b2dbd4075e940b4 inetutils-syslogd.setup" +sha256sums="be8f75eff936b8e41b112462db51adf689715658a1b09e0d6b05d11ec92cc616 inetutils-1.9.4.tar.gz +a0bc678a83103ee412c6c57a5f5e0bc4c66f579f7e839f71aac99d329719c80f inetutils-syslogd.initd +86105f0a0105f50275f7381b5d7fe603b8d854a0e6753c2f06f6d0c234562948 inetutils-syslogd.confd +0b3f080466437a068d1627a00a5abdf494fdefa2e17821b993462d0310e60cc3 syslog.conf +f2afe7dad8cd933fbd213b20f09127096f8798698874b2ead2d47a6509f95f6c inetutils-syslogd.logrotate +f293c6221c89f6d3eb4a557fe68ca66cc92696c95b48182821aa5aa61f9a2c8f inetutils-syslogd.setup" +sha512sums="8074eb230c64d8fb0f3a20825b9329e5648b81941bb3441c5ffe2661c428f93fe2bac222d5334e75ef182083124c4bc5d7ebf8090ed667e4ae33b9aaacbc6dcb inetutils-1.9.4.tar.gz +75d5681d08a391956e0f0510eadb20c3ba74de4026f76ea0a54c3e34bb53655ff6cbe3087c0953343fdef3b05864a4dc7d9d12ed26836f8986859868f0076c79 inetutils-syslogd.initd +82968692b4fe79706aacaeb1021b343288dc4f1d86925481796dac1f743a8269976ce86bf446cd0c16d246b918e5822e312660b201407eb7031a17cb398c9513 inetutils-syslogd.confd +d9c61aee1a3f2c7cf7b06dfda08599c08f1f618ba092e60adff11e9cbe5be847544780eaa9e4bb54a70c5e5bc243fed3d6ff8111878f073b41629db4245b135c syslog.conf +ffe2b1fd6b9d4dc9e378f0c857be318ec86e48aee17ede865656bdf9a5da3d2f3a8ffe788cd62794132839577ab6ce1ce7fe3a964bc21e0f8b698827a9ee5817 inetutils-syslogd.logrotate +a3c54be2c2154adec3b5d8cf68e43f274eb42ac2e02f3ea39235a11f333d1cc88ea2d0af93daf5095c8de7dfbbc147c53d97bbfce3944f50858ee97907270bf7 inetutils-syslogd.setup" diff --git a/community/inetutils-syslogd/inetutils-syslogd.confd b/community/inetutils-syslogd/inetutils-syslogd.confd new file mode 100644 index 0000000000..dfcc1cb855 --- /dev/null +++ b/community/inetutils-syslogd/inetutils-syslogd.confd @@ -0,0 +1,9 @@ +# +# inetutils syslogd defaults +# + +# Internet connections are enabled if forwarding (which is the default). +# Example option to add a socket for chroot jailed openvpn server +#SYSLOGD_OPTS="--no-forward -a /etc/openvpn/jail/dev/log" + +SYSLOGD_OPTS="--no-forward" diff --git a/community/inetutils-syslogd/inetutils-syslogd.initd b/community/inetutils-syslogd/inetutils-syslogd.initd new file mode 100644 index 0000000000..a10caa738d --- /dev/null +++ b/community/inetutils-syslogd/inetutils-syslogd.initd @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +# This file is part of inetutils-syslogd +# Created for Alpine Linux by Stuart Cardall <developer@it-offshore.co.uk> +# Distributed under the terms of the GNU General Public License v2 + +name=syslogd +config_file="/etc/syslog.conf" +pid_file=/var/run/syslog.pid +command=/usr/sbin/$name +command_args=${SYSLOGD_OPTS} +extra_started_commands="reload" + +depend() { + need clock hostname localmount + provide logger +} + +check_config() { + [ -f "$config_file" ] || error "$config_file is missing" +} + +start_pre() { + check_config || return 1 +} + +reload() { + if [ ! -f "${pid_file}" ]; then + eerror "inetutils-$name is not running" + return 1 + fi + + ebegin "Re-opening intetutils-$name log files" + pkill -HUP -f "$command $command_args" + eend $? +} + diff --git a/community/inetutils-syslogd/inetutils-syslogd.logrotate b/community/inetutils-syslogd/inetutils-syslogd.logrotate new file mode 100644 index 0000000000..853c21341c --- /dev/null +++ b/community/inetutils-syslogd/inetutils-syslogd.logrotate @@ -0,0 +1,38 @@ +/var/log/syslog +{ + rotate 7 + daily + missingok + notifempty + copytruncate + compress + postrotate + /etc/init.d/inetutils-syslogd reload &>/dev/null || true + endscript +} + +/var/log/mail.info +/var/log/mail.warn +/var/log/mail.err +/var/log/mail.log +/var/log/daemon.log +/var/log/kern.log +/var/log/auth.log +/var/log/user.log +/var/log/lpr.log +/var/log/cron.log +/var/log/debug +/var/log/messages +{ + rotate 4 + weekly + missingok + notifempty + copytruncate + compress + sharedscripts + postrotate + /etc/init.d/inetutils-syslogd reload &>/dev/null || true + endscript +} + diff --git a/community/inetutils-syslogd/inetutils-syslogd.post-deinstall b/community/inetutils-syslogd/inetutils-syslogd.post-deinstall new file mode 100644 index 0000000000..23ebea52af --- /dev/null +++ b/community/inetutils-syslogd/inetutils-syslogd.post-deinstall @@ -0,0 +1,7 @@ +#!/bin/sh +echo; rc-update del inetutils-syslogd boot; rc-update add syslog boot +syslog_state=$(rc-service syslog status) +inetutils_state=" * status: running: inetutils-syslogd [pid: $(pidof syslogd)]" +echo "$inetutils_state" +echo -e "$syslog_state: syslog\n" + diff --git a/community/inetutils-syslogd/inetutils-syslogd.post-install b/community/inetutils-syslogd/inetutils-syslogd.post-install new file mode 100644 index 0000000000..18099c7d9c --- /dev/null +++ b/community/inetutils-syslogd/inetutils-syslogd.post-install @@ -0,0 +1,3 @@ +#!/bin/sh +echo -e "\nTo configure inetutils-syslogd / deconfigure BusyBox syslog execute:\n\n/sbin/setup-inetutils-syslogd\n" + diff --git a/community/inetutils-syslogd/inetutils-syslogd.setup b/community/inetutils-syslogd/inetutils-syslogd.setup new file mode 100644 index 0000000000..7c82513915 --- /dev/null +++ b/community/inetutils-syslogd/inetutils-syslogd.setup @@ -0,0 +1,28 @@ +#!/bin/sh + +NORMAL="\033[1;0m" +STRONG="\033[1;1m" +RED="\033[1;31m" +GREEN="\033[1;32m" + +print_stop() { + local prompt="${STRONG}$1 ${RED}$2${NORMAL}" + printf "${prompt} %s" +} + +print_start() { + local prompt="${STRONG}$1 ${GREEN}$2${NORMAL}" + printf "${prompt} %s" +} + +print_stop "\nWould you like to STOP BusyBox Syslog & remove it from the Boot Runlevel ?" "[ Enter or Y to remove ]:"; read ans +if [ -z "$ans" ] || [ "$ans" = "y" ] || [ "$ans" = "Y" ]; then + echo; rc-update del syslog boot; rc-service syslog stop; rc-service klogd stop +fi + +print_start "\nWould you like to START inetutils-syslogd & add it to the Boot Runlevel ?" "[ Enter or Y to add ]:"; read ans +if [ -z "$ans" ] || [ "$ans" = "y" ] || [ "$ans" = "Y" ]; then + echo; rc-update add inetutils-syslogd boot; rc-service inetutils-syslogd start; rc-service cron restart; echo +fi + +exit 0 diff --git a/community/inetutils-syslogd/syslog.conf b/community/inetutils-syslogd/syslog.conf new file mode 100644 index 0000000000..fb6b25ef09 --- /dev/null +++ b/community/inetutils-syslogd/syslog.conf @@ -0,0 +1,38 @@ +# +# First some standard log files. Log by facility. +# +auth,authpriv.* /var/log/auth.log +*.*;auth,authpriv.none -/var/log/syslog +cron.* /var/log/cron.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +lpr.* -/var/log/lpr.log +mail.* -/var/log/mail.log +user.* -/var/log/user.log + +# +# Logging for the mail system. Split it up so that +# it is easy to write scripts to parse these files. +# +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err + +# +# Logging for INN news system. +# +#news.crit /var/log/news/news.crit +#news.err /var/log/news/news.err +#news.notice -/var/log/news/news.notice + +# +# Some "catch-all" log files. +# +*.=debug;\ + auth,authpriv.none;\ + news.none;mail.none -/var/log/debug +*.=info;*.=notice;*.=warn;\ + auth,authpriv.none;\ + cron,daemon.none;\ + mail,news.none -/var/log/messages + |