aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Vehlhaber <jens@eisfair.org>2014-10-17 19:57:00 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2014-10-20 12:34:39 +0000
commitd9504f0a8ea97d3c9594eb9af36cf79ac2164fb7 (patch)
treea83f3564b333c1c13ef2f18a488e054f81ae7725
parent7944e5d3a403e68efffcef201d7e8abca5751fb5 (diff)
downloadaports-d9504f0a8ea97d3c9594eb9af36cf79ac2164fb7.tar.bz2
aports-d9504f0a8ea97d3c9594eb9af36cf79ac2164fb7.tar.xz
remove init.d handling with install scripts
-rw-r--r--testing/syslog-ng/APKBUILD34
-rw-r--r--testing/syslog-ng/syslog-ng-filter.std2
-rw-r--r--testing/syslog-ng/syslog-ng-log.std4
-rw-r--r--testing/syslog-ng/syslog-ng-options.std12
-rw-r--r--testing/syslog-ng/syslog-ng-source.std2
-rw-r--r--testing/syslog-ng/syslog-ng.initd104
-rw-r--r--testing/syslog-ng/syslog-ng.post-install3
-rw-r--r--testing/syslog-ng/syslog-ng.post-upgrade3
-rw-r--r--testing/syslog-ng/syslog-ng.pre-deinstall6
-rw-r--r--testing/syslog-ng/syslog-ng.pre-install4
-rw-r--r--testing/syslog-ng/syslog-ng.pre-upgrade5
11 files changed, 77 insertions, 102 deletions
diff --git a/testing/syslog-ng/APKBUILD b/testing/syslog-ng/APKBUILD
index e4f62f583b..63fce4800f 100644
--- a/testing/syslog-ng/APKBUILD
+++ b/testing/syslog-ng/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: jv <jens@eisfair.org>
pkgname=syslog-ng
pkgver=2.1.4
-pkgrel=0
+pkgrel=1
pkgdesc="Next generation logging daemon"
url="http://www.balabit.com"
arch="all"
@@ -10,7 +10,7 @@ license="GPLv2"
depends=""
depends_dev="glib-dev libeventlog-dev"
makedepends="$depends_dev"
-install="$pkgname.pre-install $pkgname.post-install $pkgname.pre-deinstall $pkgname.pre-upgrade $pkgname.post-upgrade"
+install="$pkgname.post-install"
subpackages=""
source="http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/${pkgver}/source/syslog-ng_${pkgver}.tar.gz
@@ -56,25 +56,25 @@ package() {
md5sums="17c4c7725d2eab62b588395f1ed93f32 syslog-ng_2.1.4.tar.gz
8916d55f8213d2746e8c2a6a89c29d6c syslog-ng.logrotate
-994b7dcf0d01fa70276d7d6f41e6fbf5 syslog-ng.initd
+91cb6aedf897eebcedd6b6250882d9bf syslog-ng.initd
f0b4a0b530e269c51bc63f5b9d817c9b syslog-ng-destination.std
-13654597e779e4ae072f93fe9a5647bc syslog-ng-filter.std
-92df5768f9177d70e70e6299999c9555 syslog-ng-log.std
-7738a12f91d64ab78f9a5e92d9d937a8 syslog-ng-options.std
-b678eb6de7a3c42c8c956a6a4462f6c7 syslog-ng-source.std"
+405f4730412fec3a170460d724a6b50e syslog-ng-filter.std
+bc676f733ea162ea4de7a8c2a16c06ed syslog-ng-log.std
+f15a2b7c8496038c29d3ca7adc8d4054 syslog-ng-options.std
+8c166661270cd8459897ca3df06066c9 syslog-ng-source.std"
sha256sums="e2189c7dbf617f2fc883ab0a8a86100dbe7cb4853c6b39732d77e73f335b0502 syslog-ng_2.1.4.tar.gz
a886b65863d72476504165e6a6dfe3d2922945d8cb61adb6b8eec73ac35d825e syslog-ng.logrotate
-1ea74e36e0c1da8d400e8b3c4d6c96598d42c57eb5f94bb5386b4317a77b293b syslog-ng.initd
+f24a042b7213873f9c3d09afc4a442dc61dee67e2d6ca72da387714f8daa0862 syslog-ng.initd
bd3097c1d8ff6754df0d7e470659827ae4d6bf86976badf5aabe4d25504fd572 syslog-ng-destination.std
-a78f31adb065a689a52a13c459080784e358058026791594946a3b2c4064b36d syslog-ng-filter.std
-55855cccc90cb16ab77b4ef52915561bca7e2dbd4f9c3a70c542e331f1864fa0 syslog-ng-log.std
-6500176bce2f14244c87e101d649553d2e32c7a5d1bdc0acfdd4b0d0e1caf835 syslog-ng-options.std
-712a600b3c741004ccc9c1920acc02ce3695fa001ea83ea48cb5a77f939c62f4 syslog-ng-source.std"
+4ee19a76624624a9742f3399887784a55f684d141e115996b82c593aa74dcb66 syslog-ng-filter.std
+df30f0ce37bdf8cc0ac0fcc04800d7d14880bf3a19d01ab96220a325f1ab3943 syslog-ng-log.std
+8d925e7272a8d7dbda42694fe0e9c6fdc1bee6ffd9d4adf78e0ebb183658d4d4 syslog-ng-options.std
+51399e8d5d3a2d7b2d30f4adefe92776c9ddcae98d5189af9ddae1d2e66db8f3 syslog-ng-source.std"
sha512sums="5ff5e3a36dbcb99a3b1b36cda3336764290bd9251379244f10a48bd396785d16ed9200d746acb66f69f471d9ce1e8ec2e337afdadd109d7eba0c12d0de403ae0 syslog-ng_2.1.4.tar.gz
a062d1601f5215f60e2fc40c6ca498d768aa97af3647a9468731123a28fdd67962421b4412bfbe08a1123141b730cb78f102230ab72befec05ba7f398b39e27a syslog-ng.logrotate
-4fc6a1b4608828abfb644dfe6ba693e26f68cda5dc728346a1f74cd5eb03453e26cbf2640afd6d82e04316371f4d8291005c62394850fcb617db1299bf6878c7 syslog-ng.initd
+7dc6af65b7c663b85aa4ad1ddb737a48e808631207330de8197afce7abb986d790a02ca65d86bd87d77fe1bbd3e3f9f4257be81ade047468a3ea9fe3f7e64c3a syslog-ng.initd
b51d8b3da9584b6cb5b5c023b5ca1085d8e4c2cfa56f6ed12fe6feb0f33a390b43825aaaf4dd74eb6b7765485fe42f7f21c74380b72de9ed2c7775787ab1e720 syslog-ng-destination.std
-4cf810a126a2e39ae7866a36fb2261a7a054b7ba5551e4fe4b47ea356ff296ffcb010417287211a048103be903b36df52b16b40af1c3f575a7f0922517858cf7 syslog-ng-filter.std
-d07c869cda87f9ea9be7d9e5679be443563380eab5909848f2dcf3fd13932d0fe9fd2b015460524251f011bce8d5207f129bc8131984358db1001e98ad76b3d6 syslog-ng-log.std
-639b5d5b24c6a9e78b490c90d750606284ea054112f1ef3cfa2507e85ced3f2afe26c8098058e2a388505c553b06de297fba2824d9ecf9d50456ffaa72c4943d syslog-ng-options.std
-b94c9b0a7b149b70fd2a553387c1486e769b7b131b4df45cfb85b21a6a17a71cfd1ae6d3eb9b66b94fe2521e2cfb49a465dfaa486ef0e20efea40fc4ccd7f1ad syslog-ng-source.std"
+e04a70a0b8fc4f40951c9b608b0dede1fa561dd7f58ce8fd8bac70b578b749d15d202973fd9de9fe494656ee138ef5efd32ea6229e6ec0a2f19672dd621acc91 syslog-ng-filter.std
+d7864f6666101e0818dd0178a4d1ada2417280de153ff916fe4879348a37b7bfab5936e86629dc52e4edf82fbd601e04d08ed5a2117bcb0470a3d5884add9f55 syslog-ng-log.std
+9f4224faf45c73daa54549aebf20e2c45d0bf533a20d2ad97d7258490ce793c8b08cc34cac2a89d185e936515096eb93c793018986c8d21861d88c4b0005d16a syslog-ng-options.std
+fe4e4921426ea58186d1fbc54d36a2ba7a88992e7b1ce9b1a41470e4f791b6c7850d34785ec458d2793399b8de1a25ef2b290a95437083fd350b3925d11b9aea syslog-ng-source.std"
diff --git a/testing/syslog-ng/syslog-ng-filter.std b/testing/syslog-ng/syslog-ng-filter.std
index f462e3f748..29251f7598 100644
--- a/testing/syslog-ng/syslog-ng-filter.std
+++ b/testing/syslog-ng/syslog-ng-filter.std
@@ -30,3 +30,5 @@
filter f_messages { level(info,notice,warn) and not facility(auth,authpriv,kern,mail,ftp); };
# messages with priority emerg
filter f_emerg { level(emerg); };
+# mysql syslog write all messages to err level
+ filter f_err_no_mysqld { level(err..emerg) and not program(mysqld); };
diff --git a/testing/syslog-ng/syslog-ng-log.std b/testing/syslog-ng/syslog-ng-log.std
index 6488fe7e3d..a8cc402b1a 100644
--- a/testing/syslog-ng/syslog-ng-log.std
+++ b/testing/syslog-ng/syslog-ng-log.std
@@ -26,7 +26,7 @@ log {
filter(f_mail);
destination(df_mail);
};
-# *.=debug;
+# *.=debug;
# auth,authpriv.none;\
# news.none;mail.none -/var/log/debug
log {
@@ -45,7 +45,7 @@ log {
# error ... emergency /var/log/error.log
log {
source(s_all);
- filter(f_at_least_err);
+ filter(f_err_no_mysqld);
destination(df_error);
};
# *.emerg *
diff --git a/testing/syslog-ng/syslog-ng-options.std b/testing/syslog-ng/syslog-ng-options.std
index 775fa15a56..6e9fe75e56 100644
--- a/testing/syslog-ng/syslog-ng-options.std
+++ b/testing/syslog-ng/syslog-ng-options.std
@@ -9,8 +9,8 @@
time_reopen(10);
# the time to wait before an idle destination file is closed (default is 60)
time_reap(360);
-# the number of lines buffered before written to file you might want to
-# increase this if your disk isn't catching with all the log messages you get
+# the number of lines buffered before written to file you might want to
+# increase this if your disk isn't catching with all the log messages you get
# or if you want less disk activity (say on a laptop) (default is 0)
#sync(0);
# the number of lines fitting in the output queue
@@ -28,16 +28,10 @@
# enable or disable DNS. Usage syslog-ng blocks on DNS queries, so enabling DNS
# may lead to a Denial of Service attack (default is yes)
use_dns(no);
-# maximum length of message in bytes. This is only limited by the program
+# maximum length of message in bytes. This is only limited by the program
# listening on the /dev/log Unix socket, glibc can handle arbitrary length
# log messages, but -- for example -- syslogd accepts only 1024 bytes
# (default is 2048)
#log_msg_size(2048);
# Disable statistic log messages.
stats_freq(0);
-# Some program send log messages through a private implementation.
-# and sometimes that implementation is bad. If this happen syslog-ng
-# may recognise the program name as hostname. Whit this option
-# we tell the syslog-ng that if a hostname match this regexp than that
-# is not a real hostname.
- bad_hostname("^gconfd$");
diff --git a/testing/syslog-ng/syslog-ng-source.std b/testing/syslog-ng/syslog-ng-source.std
index d1da1a0f24..80a25feb0b 100644
--- a/testing/syslog-ng/syslog-ng-source.std
+++ b/testing/syslog-ng/syslog-ng-source.std
@@ -5,6 +5,6 @@
# message generated by Syslog-NG
internal();
# standard Linux log source (this is the default place for the syslog() function to send logs to)
- unix-stream("/dev/log");
+ unix-dgram("/dev/log");
# messages from the kernel
file("/proc/kmsg" log_prefix("kernel: "));
diff --git a/testing/syslog-ng/syslog-ng.initd b/testing/syslog-ng/syslog-ng.initd
index b657b81c1e..647c1058c2 100644
--- a/testing/syslog-ng/syslog-ng.initd
+++ b/testing/syslog-ng/syslog-ng.initd
@@ -6,71 +6,71 @@ extra_commands="update"
extra_started_commands="reload"
depend() {
- need hostname localmount
- before net
- provide logger
+ need hostname localmount
+ before net
+ provide logger
}
start() {
- [ ! -f /etc/syslog-ng/syslog.conf ] && update
- ebegin "Starting syslog-ng"
- start-stop-daemon --start --quiet --exec /usr/sbin/syslog-ng --pidfile /var/run/syslog-ng.pid
- eend $?
+ [ ! -f /etc/syslog-ng/syslog.conf ] && update
+ ebegin "Starting syslog-ng"
+ start-stop-daemon --start --quiet --exec /usr/sbin/syslog-ng --pidfile /run/syslog-ng.pid
+ eend $?
}
stop() {
- ebegin "Stopping syslog-ng"
- start-stop-daemon --stop --quiet --pidfile /var/run/syslog-ng.pid --exec /usr/sbin/syslog-ng
- eend $?
+ ebegin "Stopping syslog-ng"
+ start-stop-daemon --stop --quiet --pidfile /run/syslog-ng.pid --exec /usr/sbin/syslog-ng
+ eend $?
}
reload() {
- if [ ! -f /var/run/syslog-ng.pid ]
- then
- eerror "syslog-ng not running!"
- return 1
- fi
- ebegin "Reloading syslog-ng"
- start-stop-daemon --signal HUP --pidfile /var/run/syslog-ng.pid --exec /usr/sbin/syslog-ng
- eend $?
+ if [ ! -f /run/syslog-ng.pid ]
+ then
+ eerror "syslog-ng not running!"
+ return 1
+ fi
+ ebegin "Reloading syslog-ng"
+ start-stop-daemon --signal HUP --pidfile /run/syslog-ng.pid --exec /usr/sbin/syslog-ng
+ eend $?
}
grep_syslog_conf_entries() {
- local section="$1" FN filelist
- grep -v '^#' /etc/syslog-ng/syslog-ng-${section}.std
- filelist=$(find /etc/syslog-ng/ -maxdepth 1 -type f -name "syslog-ng-${section}.*" | grep -Ev ".backup|.std|~")
- if [ $? -eq 0 ]
- then
- for FN in ${filelist}
- do
- grep -v '^#' $FN
- done
- fi
+ local section="$1" FN filelist
+ grep -v '^#' /etc/syslog-ng/syslog-ng-${section}.std
+ filelist=$(find /etc/syslog-ng/ -maxdepth 1 -type f -name "syslog-ng-${section}.*" | grep -Ev ".backup|.std|~")
+ if [ $? -eq 0 ]
+ then
+ for FN in ${filelist}
+ do
+ grep -v '^#' $FN
+ done
+ fi
}
update() {
- local fname='/etc/syslog-ng/syslog-ng.conf'
- local f_tmp="/etc/syslog-ng/syslog-ng.conf.$$"
- for ng_std in options source destination filter log
- do
- [ -f /etc/syslog-ng/syslog-ng-${ng_std}.std ] || exit 1
- done
- {
- # create options entries
- echo "options {"
- grep_syslog_conf_entries options
- echo "};"
- # create source entries
- echo "source s_all {"
- grep_syslog_conf_entries source
- echo "};"
- # create destination entries
- grep_syslog_conf_entries destination
- # create filter entries
- grep_syslog_conf_entries filter
- # create log entries
- grep_syslog_conf_entries log
- } > $f_tmp
- cp -p $f_tmp $fname
- rm -f $f_tmp
+ local fname='/etc/syslog-ng/syslog-ng.conf'
+ local f_tmp="/etc/syslog-ng/syslog-ng.conf.$$"
+ for ng_std in options source destination filter log
+ do
+ [ -f /etc/syslog-ng/syslog-ng-${ng_std}.std ] || exit 1
+ done
+ {
+ # create options entries
+ echo "options {"
+ grep_syslog_conf_entries options
+ echo "};"
+ # create source entries
+ echo "source s_all {"
+ grep_syslog_conf_entries source
+ echo "};"
+ # create destination entries
+ grep_syslog_conf_entries destination
+ # create filter entries
+ grep_syslog_conf_entries filter
+ # create log entries
+ grep_syslog_conf_entries log
+ } > $f_tmp
+ cp -p $f_tmp $fname
+ rm -f $f_tmp
}
diff --git a/testing/syslog-ng/syslog-ng.post-install b/testing/syslog-ng/syslog-ng.post-install
index 893924674d..ea2a5c2b2e 100644
--- a/testing/syslog-ng/syslog-ng.post-install
+++ b/testing/syslog-ng/syslog-ng.post-install
@@ -1,8 +1,5 @@
#!/bin/sh
-echo "please remove other syslog services and activate syslog-ng with:"
-echo "rc-service syslog-ng start"
-echo "rc-update add syslog-ng boot"
[ ! -f /var/log/auth.log ] && touch /var/log/auth.log
[ ! -f /var/log/error.log ] && touch /var/log/error.log
[ ! -f /var/log/mail.log ] && touch /var/log/mail.log
diff --git a/testing/syslog-ng/syslog-ng.post-upgrade b/testing/syslog-ng/syslog-ng.post-upgrade
deleted file mode 100644
index 8935de6859..0000000000
--- a/testing/syslog-ng/syslog-ng.post-upgrade
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-rc-service syslog-ng start
diff --git a/testing/syslog-ng/syslog-ng.pre-deinstall b/testing/syslog-ng/syslog-ng.pre-deinstall
deleted file mode 100644
index 3542d8d45a..0000000000
--- a/testing/syslog-ng/syslog-ng.pre-deinstall
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-/etc/init.d/syslog-ng stop
-/sbin/rc-update del syslog-ng boot
-echo "please activate a syslog service, example:"
-echo "rc-update add syslog boot"
diff --git a/testing/syslog-ng/syslog-ng.pre-install b/testing/syslog-ng/syslog-ng.pre-install
deleted file mode 100644
index e96a11a9c2..0000000000
--- a/testing/syslog-ng/syslog-ng.pre-install
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-rm -f /etc/syslog-ng/syslog-ng-*.std
-rm -f /etc/syslog-ng/*.apk*
diff --git a/testing/syslog-ng/syslog-ng.pre-upgrade b/testing/syslog-ng/syslog-ng.pre-upgrade
deleted file mode 100644
index 6c80916328..0000000000
--- a/testing/syslog-ng/syslog-ng.pre-upgrade
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-rm -f /etc/syslog-ng/syslog-ng-*.std
-rm -f /etc/syslog-ng/*.apk*
-rc-service syslog-ng stop