aboutsummaryrefslogtreecommitdiff
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)
downloadalpine_aports-d9504f0a8ea97d3c9594eb9af36cf79ac2164fb7.tar.bz2
alpine_aports-d9504f0a8ea97d3c9594eb9af36cf79ac2164fb7.tar.xz
alpine_aports-d9504f0a8ea97d3c9594eb9af36cf79ac2164fb7.zip
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 @@
2# Maintainer: jv <jens@eisfair.org> 2# Maintainer: jv <jens@eisfair.org>
3pkgname=syslog-ng 3pkgname=syslog-ng
4pkgver=2.1.4 4pkgver=2.1.4
5pkgrel=0 5pkgrel=1
6pkgdesc="Next generation logging daemon" 6pkgdesc="Next generation logging daemon"
7url="http://www.balabit.com" 7url="http://www.balabit.com"
8arch="all" 8arch="all"
@@ -10,7 +10,7 @@ license="GPLv2"
10depends="" 10depends=""
11depends_dev="glib-dev libeventlog-dev" 11depends_dev="glib-dev libeventlog-dev"
12makedepends="$depends_dev" 12makedepends="$depends_dev"
13install="$pkgname.pre-install $pkgname.post-install $pkgname.pre-deinstall $pkgname.pre-upgrade $pkgname.post-upgrade" 13install="$pkgname.post-install"
14subpackages="" 14subpackages=""
15 15
16source="http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/${pkgver}/source/syslog-ng_${pkgver}.tar.gz 16source="http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/${pkgver}/source/syslog-ng_${pkgver}.tar.gz
@@ -56,25 +56,25 @@ package() {
56 56
57md5sums="17c4c7725d2eab62b588395f1ed93f32 syslog-ng_2.1.4.tar.gz 57md5sums="17c4c7725d2eab62b588395f1ed93f32 syslog-ng_2.1.4.tar.gz
588916d55f8213d2746e8c2a6a89c29d6c syslog-ng.logrotate 588916d55f8213d2746e8c2a6a89c29d6c syslog-ng.logrotate
59994b7dcf0d01fa70276d7d6f41e6fbf5 syslog-ng.initd 5991cb6aedf897eebcedd6b6250882d9bf syslog-ng.initd
60f0b4a0b530e269c51bc63f5b9d817c9b syslog-ng-destination.std 60f0b4a0b530e269c51bc63f5b9d817c9b syslog-ng-destination.std
6113654597e779e4ae072f93fe9a5647bc syslog-ng-filter.std 61405f4730412fec3a170460d724a6b50e syslog-ng-filter.std
6292df5768f9177d70e70e6299999c9555 syslog-ng-log.std 62bc676f733ea162ea4de7a8c2a16c06ed syslog-ng-log.std
637738a12f91d64ab78f9a5e92d9d937a8 syslog-ng-options.std 63f15a2b7c8496038c29d3ca7adc8d4054 syslog-ng-options.std
64b678eb6de7a3c42c8c956a6a4462f6c7 syslog-ng-source.std" 648c166661270cd8459897ca3df06066c9 syslog-ng-source.std"
65sha256sums="e2189c7dbf617f2fc883ab0a8a86100dbe7cb4853c6b39732d77e73f335b0502 syslog-ng_2.1.4.tar.gz 65sha256sums="e2189c7dbf617f2fc883ab0a8a86100dbe7cb4853c6b39732d77e73f335b0502 syslog-ng_2.1.4.tar.gz
66a886b65863d72476504165e6a6dfe3d2922945d8cb61adb6b8eec73ac35d825e syslog-ng.logrotate 66a886b65863d72476504165e6a6dfe3d2922945d8cb61adb6b8eec73ac35d825e syslog-ng.logrotate
671ea74e36e0c1da8d400e8b3c4d6c96598d42c57eb5f94bb5386b4317a77b293b syslog-ng.initd 67f24a042b7213873f9c3d09afc4a442dc61dee67e2d6ca72da387714f8daa0862 syslog-ng.initd
68bd3097c1d8ff6754df0d7e470659827ae4d6bf86976badf5aabe4d25504fd572 syslog-ng-destination.std 68bd3097c1d8ff6754df0d7e470659827ae4d6bf86976badf5aabe4d25504fd572 syslog-ng-destination.std
69a78f31adb065a689a52a13c459080784e358058026791594946a3b2c4064b36d syslog-ng-filter.std 694ee19a76624624a9742f3399887784a55f684d141e115996b82c593aa74dcb66 syslog-ng-filter.std
7055855cccc90cb16ab77b4ef52915561bca7e2dbd4f9c3a70c542e331f1864fa0 syslog-ng-log.std 70df30f0ce37bdf8cc0ac0fcc04800d7d14880bf3a19d01ab96220a325f1ab3943 syslog-ng-log.std
716500176bce2f14244c87e101d649553d2e32c7a5d1bdc0acfdd4b0d0e1caf835 syslog-ng-options.std 718d925e7272a8d7dbda42694fe0e9c6fdc1bee6ffd9d4adf78e0ebb183658d4d4 syslog-ng-options.std
72712a600b3c741004ccc9c1920acc02ce3695fa001ea83ea48cb5a77f939c62f4 syslog-ng-source.std" 7251399e8d5d3a2d7b2d30f4adefe92776c9ddcae98d5189af9ddae1d2e66db8f3 syslog-ng-source.std"
73sha512sums="5ff5e3a36dbcb99a3b1b36cda3336764290bd9251379244f10a48bd396785d16ed9200d746acb66f69f471d9ce1e8ec2e337afdadd109d7eba0c12d0de403ae0 syslog-ng_2.1.4.tar.gz 73sha512sums="5ff5e3a36dbcb99a3b1b36cda3336764290bd9251379244f10a48bd396785d16ed9200d746acb66f69f471d9ce1e8ec2e337afdadd109d7eba0c12d0de403ae0 syslog-ng_2.1.4.tar.gz
74a062d1601f5215f60e2fc40c6ca498d768aa97af3647a9468731123a28fdd67962421b4412bfbe08a1123141b730cb78f102230ab72befec05ba7f398b39e27a syslog-ng.logrotate 74a062d1601f5215f60e2fc40c6ca498d768aa97af3647a9468731123a28fdd67962421b4412bfbe08a1123141b730cb78f102230ab72befec05ba7f398b39e27a syslog-ng.logrotate
754fc6a1b4608828abfb644dfe6ba693e26f68cda5dc728346a1f74cd5eb03453e26cbf2640afd6d82e04316371f4d8291005c62394850fcb617db1299bf6878c7 syslog-ng.initd 757dc6af65b7c663b85aa4ad1ddb737a48e808631207330de8197afce7abb986d790a02ca65d86bd87d77fe1bbd3e3f9f4257be81ade047468a3ea9fe3f7e64c3a syslog-ng.initd
76b51d8b3da9584b6cb5b5c023b5ca1085d8e4c2cfa56f6ed12fe6feb0f33a390b43825aaaf4dd74eb6b7765485fe42f7f21c74380b72de9ed2c7775787ab1e720 syslog-ng-destination.std 76b51d8b3da9584b6cb5b5c023b5ca1085d8e4c2cfa56f6ed12fe6feb0f33a390b43825aaaf4dd74eb6b7765485fe42f7f21c74380b72de9ed2c7775787ab1e720 syslog-ng-destination.std
774cf810a126a2e39ae7866a36fb2261a7a054b7ba5551e4fe4b47ea356ff296ffcb010417287211a048103be903b36df52b16b40af1c3f575a7f0922517858cf7 syslog-ng-filter.std 77e04a70a0b8fc4f40951c9b608b0dede1fa561dd7f58ce8fd8bac70b578b749d15d202973fd9de9fe494656ee138ef5efd32ea6229e6ec0a2f19672dd621acc91 syslog-ng-filter.std
78d07c869cda87f9ea9be7d9e5679be443563380eab5909848f2dcf3fd13932d0fe9fd2b015460524251f011bce8d5207f129bc8131984358db1001e98ad76b3d6 syslog-ng-log.std 78d7864f6666101e0818dd0178a4d1ada2417280de153ff916fe4879348a37b7bfab5936e86629dc52e4edf82fbd601e04d08ed5a2117bcb0470a3d5884add9f55 syslog-ng-log.std
79639b5d5b24c6a9e78b490c90d750606284ea054112f1ef3cfa2507e85ced3f2afe26c8098058e2a388505c553b06de297fba2824d9ecf9d50456ffaa72c4943d syslog-ng-options.std 799f4224faf45c73daa54549aebf20e2c45d0bf533a20d2ad97d7258490ce793c8b08cc34cac2a89d185e936515096eb93c793018986c8d21861d88c4b0005d16a syslog-ng-options.std
80b94c9b0a7b149b70fd2a553387c1486e769b7b131b4df45cfb85b21a6a17a71cfd1ae6d3eb9b66b94fe2521e2cfb49a465dfaa486ef0e20efea40fc4ccd7f1ad syslog-ng-source.std" 80fe4e4921426ea58186d1fbc54d36a2ba7a88992e7b1ce9b1a41470e4f791b6c7850d34785ec458d2793399b8de1a25ef2b290a95437083fd350b3925d11b9aea 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 @@
30 filter f_messages { level(info,notice,warn) and not facility(auth,authpriv,kern,mail,ftp); }; 30 filter f_messages { level(info,notice,warn) and not facility(auth,authpriv,kern,mail,ftp); };
31# messages with priority emerg 31# messages with priority emerg
32 filter f_emerg { level(emerg); }; 32 filter f_emerg { level(emerg); };
33# mysql syslog write all messages to err level
34 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 {
26 filter(f_mail); 26 filter(f_mail);
27 destination(df_mail); 27 destination(df_mail);
28}; 28};
29# *.=debug; 29# *.=debug;
30# auth,authpriv.none;\ 30# auth,authpriv.none;\
31# news.none;mail.none -/var/log/debug 31# news.none;mail.none -/var/log/debug
32log { 32log {
@@ -45,7 +45,7 @@ log {
45# error ... emergency /var/log/error.log 45# error ... emergency /var/log/error.log
46log { 46log {
47 source(s_all); 47 source(s_all);
48 filter(f_at_least_err); 48 filter(f_err_no_mysqld);
49 destination(df_error); 49 destination(df_error);
50}; 50};
51# *.emerg * 51# *.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 @@
9 time_reopen(10); 9 time_reopen(10);
10# the time to wait before an idle destination file is closed (default is 60) 10# the time to wait before an idle destination file is closed (default is 60)
11 time_reap(360); 11 time_reap(360);
12# the number of lines buffered before written to file you might want to 12# the number of lines buffered before written to file you might want to
13# increase this if your disk isn't catching with all the log messages you get 13# increase this if your disk isn't catching with all the log messages you get
14# or if you want less disk activity (say on a laptop) (default is 0) 14# or if you want less disk activity (say on a laptop) (default is 0)
15#sync(0); 15#sync(0);
16# the number of lines fitting in the output queue 16# the number of lines fitting in the output queue
@@ -28,16 +28,10 @@
28# enable or disable DNS. Usage syslog-ng blocks on DNS queries, so enabling DNS 28# enable or disable DNS. Usage syslog-ng blocks on DNS queries, so enabling DNS
29# may lead to a Denial of Service attack (default is yes) 29# may lead to a Denial of Service attack (default is yes)
30 use_dns(no); 30 use_dns(no);
31# maximum length of message in bytes. This is only limited by the program 31# maximum length of message in bytes. This is only limited by the program
32# listening on the /dev/log Unix socket, glibc can handle arbitrary length 32# listening on the /dev/log Unix socket, glibc can handle arbitrary length
33# log messages, but -- for example -- syslogd accepts only 1024 bytes 33# log messages, but -- for example -- syslogd accepts only 1024 bytes
34# (default is 2048) 34# (default is 2048)
35#log_msg_size(2048); 35#log_msg_size(2048);
36# Disable statistic log messages. 36# Disable statistic log messages.
37 stats_freq(0); 37 stats_freq(0);
38# Some program send log messages through a private implementation.
39# and sometimes that implementation is bad. If this happen syslog-ng
40# may recognise the program name as hostname. Whit this option
41# we tell the syslog-ng that if a hostname match this regexp than that
42# is not a real hostname.
43 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 @@
5# message generated by Syslog-NG 5# message generated by Syslog-NG
6 internal(); 6 internal();
7# standard Linux log source (this is the default place for the syslog() function to send logs to) 7# standard Linux log source (this is the default place for the syslog() function to send logs to)
8 unix-stream("/dev/log"); 8 unix-dgram("/dev/log");
9# messages from the kernel 9# messages from the kernel
10 file("/proc/kmsg" log_prefix("kernel: ")); 10 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"
6extra_started_commands="reload" 6extra_started_commands="reload"
7 7
8depend() { 8depend() {
9 need hostname localmount 9 need hostname localmount
10 before net 10 before net
11 provide logger 11 provide logger
12} 12}
13 13
14start() { 14start() {
15 [ ! -f /etc/syslog-ng/syslog.conf ] && update 15 [ ! -f /etc/syslog-ng/syslog.conf ] && update
16 ebegin "Starting syslog-ng" 16 ebegin "Starting syslog-ng"
17 start-stop-daemon --start --quiet --exec /usr/sbin/syslog-ng --pidfile /var/run/syslog-ng.pid 17 start-stop-daemon --start --quiet --exec /usr/sbin/syslog-ng --pidfile /run/syslog-ng.pid
18 eend $? 18 eend $?
19} 19}
20 20
21stop() { 21stop() {
22 ebegin "Stopping syslog-ng" 22 ebegin "Stopping syslog-ng"
23 start-stop-daemon --stop --quiet --pidfile /var/run/syslog-ng.pid --exec /usr/sbin/syslog-ng 23 start-stop-daemon --stop --quiet --pidfile /run/syslog-ng.pid --exec /usr/sbin/syslog-ng
24 eend $? 24 eend $?
25} 25}
26 26
27reload() { 27reload() {
28 if [ ! -f /var/run/syslog-ng.pid ] 28 if [ ! -f /run/syslog-ng.pid ]
29 then 29 then
30 eerror "syslog-ng not running!" 30 eerror "syslog-ng not running!"
31 return 1 31 return 1
32 fi 32 fi
33 ebegin "Reloading syslog-ng" 33 ebegin "Reloading syslog-ng"
34 start-stop-daemon --signal HUP --pidfile /var/run/syslog-ng.pid --exec /usr/sbin/syslog-ng 34 start-stop-daemon --signal HUP --pidfile /run/syslog-ng.pid --exec /usr/sbin/syslog-ng
35 eend $? 35 eend $?
36} 36}
37 37
38grep_syslog_conf_entries() { 38grep_syslog_conf_entries() {
39 local section="$1" FN filelist 39 local section="$1" FN filelist
40 grep -v '^#' /etc/syslog-ng/syslog-ng-${section}.std 40 grep -v '^#' /etc/syslog-ng/syslog-ng-${section}.std
41 filelist=$(find /etc/syslog-ng/ -maxdepth 1 -type f -name "syslog-ng-${section}.*" | grep -Ev ".backup|.std|~") 41 filelist=$(find /etc/syslog-ng/ -maxdepth 1 -type f -name "syslog-ng-${section}.*" | grep -Ev ".backup|.std|~")
42 if [ $? -eq 0 ] 42 if [ $? -eq 0 ]
43 then 43 then
44 for FN in ${filelist} 44 for FN in ${filelist}
45 do 45 do
46 grep -v '^#' $FN 46 grep -v '^#' $FN
47 done 47 done
48 fi 48 fi
49} 49}
50 50
51update() { 51update() {
52 local fname='/etc/syslog-ng/syslog-ng.conf' 52 local fname='/etc/syslog-ng/syslog-ng.conf'
53 local f_tmp="/etc/syslog-ng/syslog-ng.conf.$$" 53 local f_tmp="/etc/syslog-ng/syslog-ng.conf.$$"
54 for ng_std in options source destination filter log 54 for ng_std in options source destination filter log
55 do 55 do
56 [ -f /etc/syslog-ng/syslog-ng-${ng_std}.std ] || exit 1 56 [ -f /etc/syslog-ng/syslog-ng-${ng_std}.std ] || exit 1
57 done 57 done
58 { 58 {
59 # create options entries 59 # create options entries
60 echo "options {" 60 echo "options {"
61 grep_syslog_conf_entries options 61 grep_syslog_conf_entries options
62 echo "};" 62 echo "};"
63 # create source entries 63 # create source entries
64 echo "source s_all {" 64 echo "source s_all {"
65 grep_syslog_conf_entries source 65 grep_syslog_conf_entries source
66 echo "};" 66 echo "};"
67 # create destination entries 67 # create destination entries
68 grep_syslog_conf_entries destination 68 grep_syslog_conf_entries destination
69 # create filter entries 69 # create filter entries
70 grep_syslog_conf_entries filter 70 grep_syslog_conf_entries filter
71 # create log entries 71 # create log entries
72 grep_syslog_conf_entries log 72 grep_syslog_conf_entries log
73 } > $f_tmp 73 } > $f_tmp
74 cp -p $f_tmp $fname 74 cp -p $f_tmp $fname
75 rm -f $f_tmp 75 rm -f $f_tmp
76} 76}
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 @@
1#!/bin/sh 1#!/bin/sh
2 2
3echo "please remove other syslog services and activate syslog-ng with:"
4echo "rc-service syslog-ng start"
5echo "rc-update add syslog-ng boot"
6[ ! -f /var/log/auth.log ] && touch /var/log/auth.log 3[ ! -f /var/log/auth.log ] && touch /var/log/auth.log
7[ ! -f /var/log/error.log ] && touch /var/log/error.log 4[ ! -f /var/log/error.log ] && touch /var/log/error.log
8[ ! -f /var/log/mail.log ] && touch /var/log/mail.log 5[ ! -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 @@
1#!/bin/sh
2
3rc-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 @@
1#!/bin/sh
2
3/etc/init.d/syslog-ng stop
4/sbin/rc-update del syslog-ng boot
5echo "please activate a syslog service, example:"
6echo "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 @@
1#!/bin/sh
2
3rm -f /etc/syslog-ng/syslog-ng-*.std
4rm -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 @@
1#!/bin/sh
2
3rm -f /etc/syslog-ng/syslog-ng-*.std
4rm -f /etc/syslog-ng/*.apk*
5rc-service syslog-ng stop