diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
commit | 1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch) | |
tree | a21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-extended/rsyslog | |
download | meta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-extended/rsyslog')
8 files changed, 585 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/initscript b/meta-oe/recipes-extended/rsyslog/rsyslog/initscript new file mode 100644 index 000000000..7a8f8f991 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/initscript | |||
@@ -0,0 +1,118 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # This is an init script for openembedded | ||
4 | # Copy it to /etc/init.d/rsyslog and type | ||
5 | # > update-rc.d rsyslog defaults 5 | ||
6 | # | ||
7 | |||
8 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
9 | NAME=rsyslog | ||
10 | RSYSLOGD=rsyslogd | ||
11 | RSYSLOGD_BIN=/usr/sbin/rsyslogd | ||
12 | RSYSLOGD_OPTIONS="" | ||
13 | RSYSLOGD_PIDFILE=/var/run/rsyslogd.pid | ||
14 | SCRIPTNAME=/etc/init.d/$NAME | ||
15 | # Exit if the package is not installed | ||
16 | [ -x "$RSYSLOGD_BIN" ] || exit 0 | ||
17 | # Read configuration variable file if it is present | ||
18 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME | ||
19 | # | ||
20 | # Function that starts the daemon/service | ||
21 | # | ||
22 | do_start() | ||
23 | { | ||
24 | DAEMON=$1 | ||
25 | DAEMON_ARGS=$2 | ||
26 | PIDFILE=$3 | ||
27 | # Return | ||
28 | # 0 if daemon has been started | ||
29 | # 1 if daemon could not be started | ||
30 | # if daemon had already been started, start-stop-daemon will return 1 | ||
31 | # so add -o/--oknodo(if nothing is done, exit 0) | ||
32 | start-stop-daemon -S --quiet --pidfile $PIDFILE --exec $DAEMON \ | ||
33 | --oknodo -- $DAEMON_ARGS || return 1 | ||
34 | } | ||
35 | # | ||
36 | # Function that stops the daemon/service | ||
37 | # | ||
38 | do_stop() | ||
39 | { | ||
40 | NAME=$1 | ||
41 | PIDFILE=$2 | ||
42 | # Return | ||
43 | # 0 if daemon has been stopped | ||
44 | # 1 if daemon was already stopped | ||
45 | # 2 if daemon could not be stopped | ||
46 | # other if a failure occurred | ||
47 | # QUIT/TERM/INT should work here, but they don't ????? | ||
48 | start-stop-daemon -K --quiet --signal KILL --pidfile $PIDFILE --name $NAME | ||
49 | RETVAL="$?" | ||
50 | rm -f $PIDFILE | ||
51 | return "$RETVAL" | ||
52 | } | ||
53 | # | ||
54 | # Function that sends a SIGHUP to the daemon/service | ||
55 | # | ||
56 | do_reload() { | ||
57 | NAME=$1 | ||
58 | PIDFILE=$2 | ||
59 | start-stop-daemon -K --signal HUP --quiet --pidfile $PIDFILE --name $NAME | ||
60 | return 0 | ||
61 | } | ||
62 | |||
63 | do_status() { | ||
64 | NAME=$1 | ||
65 | PIDFILE=$2 | ||
66 | # -t: test only but not stop | ||
67 | start-stop-daemon -K -t --quiet --pidfile $PIDFILE --name $NAME | ||
68 | # exit with status 0 if process is found | ||
69 | if [ "$?" = "0" ]; then | ||
70 | return 0 | ||
71 | else | ||
72 | return 1 | ||
73 | fi | ||
74 | } | ||
75 | |||
76 | case "$1" in | ||
77 | start) | ||
78 | echo -n "starting $RSYSLOGD ... " | ||
79 | do_start "$RSYSLOGD_BIN" "$RSYSLOGD_OPTIONS" "$RSYSLOGD_PIDFILE" | ||
80 | case "$?" in | ||
81 | 0) echo "done" ;; | ||
82 | 1) echo "failed" ;; | ||
83 | esac | ||
84 | ;; | ||
85 | stop) | ||
86 | echo -n "stopping $RSYSLOGD ... " | ||
87 | do_stop "$RSYSLOGD" "$RSYSLOGD_PIDFILE" | ||
88 | case "$?" in | ||
89 | 0|1) echo "done" ;; | ||
90 | 2) echo "failed" ;; | ||
91 | esac | ||
92 | ;; | ||
93 | reload|force-reload) | ||
94 | echo -n "reloading $RSYSLOGD ... " | ||
95 | do_reload "$RSYSLOGD" "$RSYSLOGD_PIDFILE" | ||
96 | echo "done" | ||
97 | ;; | ||
98 | restart) | ||
99 | $0 stop | ||
100 | $0 start | ||
101 | ;; | ||
102 | status) | ||
103 | echo -n "status $RSYSLOGD ... " | ||
104 | do_status "$RSYSLOGD" "$RSYSLOGD_PIDFILE" | ||
105 | if [ "$?" = "0" ]; then | ||
106 | echo "running" | ||
107 | exit 0 | ||
108 | else | ||
109 | echo "stopped" | ||
110 | exit 1 | ||
111 | fi | ||
112 | ;; | ||
113 | *) | ||
114 | echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload}" >&2 | ||
115 | exit 3 | ||
116 | ;; | ||
117 | esac | ||
118 | exit 0 | ||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch new file mode 100644 index 000000000..bdcb6e22a --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch | |||
@@ -0,0 +1,96 @@ | |||
1 | $MaxMessageSize doesn't work if before $IncludeConfig diag-common.conf, then | ||
2 | test cases fall into infinite loop with error message: | ||
3 | |||
4 | 8062.511110729:4902c480: error: message received is larger than max msg size, we split it | ||
5 | 8062.511152265:4902c480: discarding zero-sized message | ||
6 | |||
7 | Update configure to fix it. | ||
8 | |||
9 | Upstream-Status: pending | ||
10 | |||
11 | Kai Kang <kai.kang@windriver.com> | ||
12 | --- | ||
13 | diff -Nru rsyslog-7.4.4/tests/testsuites/complex1.conf rsyslog-7.4.4.new/tests/testsuites/complex1.conf | ||
14 | --- rsyslog-7.4.4/tests/testsuites/complex1.conf 2013-08-31 00:30:41.000000000 +0800 | ||
15 | +++ rsyslog-7.4.4.new/tests/testsuites/complex1.conf 2013-12-18 14:28:10.644004184 +0800 | ||
16 | @@ -1,7 +1,7 @@ | ||
17 | # complex test case with multiple actions in gzip mode | ||
18 | # rgerhards, 2009-05-22 | ||
19 | -$MaxMessageSize 10k | ||
20 | $IncludeConfig diag-common.conf | ||
21 | +$MaxMessageSize 10k | ||
22 | |||
23 | $MainMsgQueueTimeoutEnqueue 5000 | ||
24 | |||
25 | diff -Nru rsyslog-7.4.4/tests/testsuites/gzipwr_large.conf rsyslog-7.4.4.new/tests/testsuites/gzipwr_large.conf | ||
26 | --- rsyslog-7.4.4/tests/testsuites/gzipwr_large.conf 2012-04-04 14:29:55.000000000 +0800 | ||
27 | +++ rsyslog-7.4.4.new/tests/testsuites/gzipwr_large.conf 2013-12-18 14:28:10.645004186 +0800 | ||
28 | @@ -1,7 +1,7 @@ | ||
29 | # simple async writing test | ||
30 | # rgerhards, 2010-03-09 | ||
31 | -$MaxMessageSize 10k | ||
32 | $IncludeConfig diag-common.conf | ||
33 | +$MaxMessageSize 10k | ||
34 | |||
35 | $ModLoad ../plugins/imtcp/.libs/imtcp | ||
36 | $MainMsgQueueTimeoutShutdown 10000 | ||
37 | diff -Nru rsyslog-7.4.4/tests/testsuites/gzipwr_large_dynfile.conf rsyslog-7.4.4.new/tests/testsuites/gzipwr_large_dynfile.conf | ||
38 | --- rsyslog-7.4.4/tests/testsuites/gzipwr_large_dynfile.conf 2012-04-04 14:29:55.000000000 +0800 | ||
39 | +++ rsyslog-7.4.4.new/tests/testsuites/gzipwr_large_dynfile.conf 2013-12-18 14:28:10.645004186 +0800 | ||
40 | @@ -1,7 +1,7 @@ | ||
41 | # simple async writing test | ||
42 | # rgerhards, 2010-03-09 | ||
43 | -$MaxMessageSize 10k | ||
44 | $IncludeConfig diag-common.conf | ||
45 | +$MaxMessageSize 10k | ||
46 | |||
47 | $ModLoad ../plugins/imtcp/.libs/imtcp | ||
48 | $MainMsgQueueTimeoutShutdown 10000 | ||
49 | diff -Nru rsyslog-7.4.4/tests/testsuites/imptcp_conndrop.conf rsyslog-7.4.4.new/tests/testsuites/imptcp_conndrop.conf | ||
50 | --- rsyslog-7.4.4/tests/testsuites/imptcp_conndrop.conf 2013-08-31 00:30:41.000000000 +0800 | ||
51 | +++ rsyslog-7.4.4.new/tests/testsuites/imptcp_conndrop.conf 2013-12-18 14:28:10.646004189 +0800 | ||
52 | @@ -1,7 +1,7 @@ | ||
53 | # simple async writing test | ||
54 | # rgerhards, 2010-03-09 | ||
55 | -$MaxMessageSize 10k | ||
56 | $IncludeConfig diag-common.conf | ||
57 | +$MaxMessageSize 10k | ||
58 | |||
59 | $ModLoad ../plugins/imptcp/.libs/imptcp | ||
60 | $MainMsgQueueTimeoutShutdown 10000 | ||
61 | diff -Nru rsyslog-7.4.4/tests/testsuites/imptcp_large.conf rsyslog-7.4.4.new/tests/testsuites/imptcp_large.conf | ||
62 | --- rsyslog-7.4.4/tests/testsuites/imptcp_large.conf 2013-08-31 00:30:41.000000000 +0800 | ||
63 | +++ rsyslog-7.4.4.new/tests/testsuites/imptcp_large.conf 2013-12-18 14:28:10.646004189 +0800 | ||
64 | @@ -1,7 +1,7 @@ | ||
65 | # simple async writing test | ||
66 | # rgerhards, 2010-03-09 | ||
67 | -$MaxMessageSize 10k | ||
68 | $IncludeConfig diag-common.conf | ||
69 | +$MaxMessageSize 10k | ||
70 | |||
71 | $ModLoad ../plugins/imptcp/.libs/imptcp | ||
72 | $MainMsgQueueTimeoutShutdown 10000 | ||
73 | diff -Nru rsyslog-7.4.4/tests/testsuites/imtcp_conndrop.conf rsyslog-7.4.4.new/tests/testsuites/imtcp_conndrop.conf | ||
74 | --- rsyslog-7.4.4/tests/testsuites/imtcp_conndrop.conf 2013-07-19 20:59:03.000000000 +0800 | ||
75 | +++ rsyslog-7.4.4.new/tests/testsuites/imtcp_conndrop.conf 2013-12-18 14:28:10.646004189 +0800 | ||
76 | @@ -1,7 +1,7 @@ | ||
77 | # simple async writing test | ||
78 | # rgerhards, 2010-03-09 | ||
79 | -$MaxMessageSize 10k | ||
80 | $IncludeConfig diag-common.conf | ||
81 | +$MaxMessageSize 10k | ||
82 | |||
83 | $ModLoad ../plugins/imtcp/.libs/imtcp | ||
84 | $MainMsgQueueTimeoutShutdown 10000 | ||
85 | diff -Nru rsyslog-7.4.4/tests/testsuites/wr_large.conf rsyslog-7.4.4.new/tests/testsuites/wr_large.conf | ||
86 | --- rsyslog-7.4.4/tests/testsuites/wr_large.conf 2012-04-04 14:29:55.000000000 +0800 | ||
87 | +++ rsyslog-7.4.4.new/tests/testsuites/wr_large.conf 2013-12-18 14:28:10.647004190 +0800 | ||
88 | @@ -1,7 +1,7 @@ | ||
89 | # simple async writing test | ||
90 | # rgerhards, 2010-03-09 | ||
91 | -$MaxMessageSize 10k | ||
92 | $IncludeConfig diag-common.conf | ||
93 | +$MaxMessageSize 10k | ||
94 | |||
95 | $ModLoad ../plugins/imtcp/.libs/imtcp | ||
96 | $MainMsgQueueTimeoutShutdown 10000 | ||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-use-serial-tests-config-needed-by-ptest.patch b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-use-serial-tests-config-needed-by-ptest.patch new file mode 100644 index 000000000..3a16f2649 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-use-serial-tests-config-needed-by-ptest.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Subject: [PATCH] rsyslog: use serial-tests config needed by ptest | ||
2 | |||
3 | ptest needs buildtest-TESTS and runtest-TESTS targets. | ||
4 | serial-tests is required to generate those targets. | ||
5 | |||
6 | Upstream-Status: Inappropriate [default automake behavior incompatible with ptest] | ||
7 | |||
8 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
9 | --- | ||
10 | configure.ac | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/configure.ac b/configure.ac | ||
14 | index 1b880f8..0e29742 100644 | ||
15 | --- a/configure.ac | ||
16 | +++ b/configure.ac | ||
17 | @@ -3,7 +3,7 @@ | ||
18 | |||
19 | AC_PREREQ(2.61) | ||
20 | AC_INIT([rsyslog],[7.4.4],[rsyslog@lists.adiscon.com]) | ||
21 | -AM_INIT_AUTOMAKE | ||
22 | +AM_INIT_AUTOMAKE([serial-tests]) | ||
23 | |||
24 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | ||
25 | |||
26 | -- | ||
27 | 2.0.0 | ||
28 | |||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf new file mode 100644 index 000000000..54f8bb6a5 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf | |||
@@ -0,0 +1,84 @@ | |||
1 | # if you experience problems, check | ||
2 | # http://www.rsyslog.com/troubleshoot for assistance | ||
3 | |||
4 | # rsyslog v3: load input modules | ||
5 | # If you do not load inputs, nothing happens! | ||
6 | # You may need to set the module load path if modules are not found. | ||
7 | # | ||
8 | # Ported from debian's sysklogd.conf | ||
9 | |||
10 | $ModLoad immark # provides --MARK-- message capability | ||
11 | $ModLoad imuxsock # provides support for local system logging (e.g. via logger command) | ||
12 | $ModLoad imklog # kernel logging (formerly provided by rklogd) | ||
13 | |||
14 | # | ||
15 | # Set the default permissions | ||
16 | # | ||
17 | $FileCreateMode 0640 | ||
18 | $DirCreateMode 0755 | ||
19 | $Umask 0022 | ||
20 | |||
21 | auth,authpriv.* /var/log/auth.log | ||
22 | *.*;auth,authpriv.none -/var/log/syslog | ||
23 | cron.* /var/log/cron.log | ||
24 | daemon.* -/var/log/daemon.log | ||
25 | kern.* -/var/log/kern.log | ||
26 | lpr.* -/var/log/lpr.log | ||
27 | mail.* -/var/log/mail.log | ||
28 | user.* -/var/log/user.log | ||
29 | |||
30 | # | ||
31 | # Logging for the mail system. Split it up so that | ||
32 | # it is easy to write scripts to parse these files. | ||
33 | # | ||
34 | mail.info -/var/log/mail.info | ||
35 | mail.warn -/var/log/mail.warn | ||
36 | mail.err /var/log/mail.err | ||
37 | |||
38 | # Logging for INN news system | ||
39 | # | ||
40 | news.crit /var/log/news.crit | ||
41 | news.err /var/log/news.err | ||
42 | news.notice -/var/log/news.notice | ||
43 | |||
44 | # | ||
45 | # Some `catch-all' logfiles. | ||
46 | # | ||
47 | *.=debug;\ | ||
48 | auth,authpriv.none;\ | ||
49 | news.none;mail.none -/var/log/debug | ||
50 | *.=info;*.=notice;*.=warn;\ | ||
51 | auth,authpriv.none;\ | ||
52 | cron,daemon.none;\ | ||
53 | mail,news.none -/var/log/messages | ||
54 | |||
55 | # | ||
56 | # Emergencies are sent to everybody logged in. | ||
57 | # | ||
58 | *.emerg :omusrmsg:* | ||
59 | |||
60 | # Save boot messages also to boot.log | ||
61 | local7.* /var/log/boot.log | ||
62 | |||
63 | # Remote Logging (we use TCP for reliable delivery) | ||
64 | # An on-disk queue is created for this action. If the remote host is | ||
65 | # down, messages are spooled to disk and sent when it is up again. | ||
66 | #$WorkDirectory /var/spool/rsyslog # where to place spool files | ||
67 | #$ActionQueueFileName uniqName # unique name prefix for spool files | ||
68 | $ActionQueueMaxDiskSpace 10m # 1gb space limit (use as much as possible) | ||
69 | #$ActionQueueSaveOnShutdown on # save messages to disk on shutdown | ||
70 | #$ActionQueueType LinkedList # run asynchronously | ||
71 | #$ActionResumeRetryCount -1 # infinite retries if host is down | ||
72 | # remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional | ||
73 | #*.* @@remote-host:514 | ||
74 | |||
75 | |||
76 | # ######### Receiving Messages from Remote Hosts ########## | ||
77 | # TCP Syslog Server: | ||
78 | # provides TCP syslog reception and GSS-API (if compiled to support it) | ||
79 | #$ModLoad imtcp.so # load module | ||
80 | #$InputTCPServerRun 514 # start up TCP listener at port 514 | ||
81 | |||
82 | # UDP Syslog Server: | ||
83 | #$ModLoad imudp.so # provides UDP syslog reception | ||
84 | #$UDPServerRun 514 # start a UDP syslog server at standard port 514 | ||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate new file mode 100644 index 000000000..ba1120af4 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate | |||
@@ -0,0 +1,39 @@ | |||
1 | # /etc/logrotate.d/rsyslog - Ported from Debian | ||
2 | |||
3 | /var/log/syslog | ||
4 | { | ||
5 | rotate 7 | ||
6 | daily | ||
7 | missingok | ||
8 | notifempty | ||
9 | delaycompress | ||
10 | compress | ||
11 | postrotate | ||
12 | /etc/init.d/rsyslog reload 2> /dev/null || true | ||
13 | endscript | ||
14 | } | ||
15 | |||
16 | /var/log/mail.info | ||
17 | /var/log/mail.warn | ||
18 | /var/log/mail.err | ||
19 | /var/log/mail.log | ||
20 | /var/log/daemon.log | ||
21 | /var/log/kern.log | ||
22 | /var/log/auth.log | ||
23 | /var/log/user.log | ||
24 | /var/log/lpr.log | ||
25 | /var/log/cron.log | ||
26 | /var/log/debug | ||
27 | /var/log/messages | ||
28 | { | ||
29 | rotate 4 | ||
30 | weekly | ||
31 | missingok | ||
32 | notifempty | ||
33 | compress | ||
34 | delaycompress | ||
35 | sharedscripts | ||
36 | postrotate | ||
37 | /etc/init.d/rsyslog reload 2> /dev/null || true | ||
38 | endscript | ||
39 | } | ||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest b/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest new file mode 100644 index 000000000..38a1d1b72 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | make -C tests -k runtest-TESTS | ||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch b/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch new file mode 100644 index 000000000..ebc10707c --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 5c3ba79177f7d1763db33c4358af2af60ff214b7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Roy Li <rongqing.li@windriver.com> | ||
3 | Date: Wed, 18 Jun 2014 13:46:52 +0800 | ||
4 | Subject: [PATCH] use pkgconfig to check libgcrypt | ||
5 | |||
6 | Upstream-status: Inappropriate [configuration] | ||
7 | |||
8 | libgcrypt does no longer provide libgcrypt-config, and provide | ||
9 | *.pc, so we should use pkgconfig to check | ||
10 | |||
11 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
12 | --- | ||
13 | configure.ac | 19 +------------------ | ||
14 | 1 file changed, 1 insertion(+), 18 deletions(-) | ||
15 | |||
16 | diff --git a/configure.ac b/configure.ac | ||
17 | index 017116e..1b880f8 100644 | ||
18 | --- a/configure.ac | ||
19 | +++ b/configure.ac | ||
20 | @@ -784,24 +784,7 @@ AC_ARG_ENABLE(libgcrypt, | ||
21 | [enable_libgcrypt=yes] | ||
22 | ) | ||
23 | if test "x$enable_libgcrypt" = "xyes"; then | ||
24 | - AC_CHECK_PROG( | ||
25 | - [HAVE_LIBGCRYPT_CONFIG], | ||
26 | - [libgcrypt-config], | ||
27 | - [yes],,, | ||
28 | - ) | ||
29 | - if test "x${HAVE_LIBGCRYPT_CONFIG}" != "xyes"; then | ||
30 | - AC_MSG_FAILURE([libgcrypt-config not found in PATH]) | ||
31 | - fi | ||
32 | - AC_CHECK_LIB( | ||
33 | - [gcrypt], | ||
34 | - [gcry_cipher_open], | ||
35 | - [LIBGCRYPT_CFLAGS="`libgcrypt-config --cflags`" | ||
36 | - LIBGCRYPT_LIBS="`libgcrypt-config --libs`" | ||
37 | - ], | ||
38 | - [AC_MSG_FAILURE([libgcrypt is missing])], | ||
39 | - [`libgcrypt-config --libs --cflags`] | ||
40 | - ) | ||
41 | - AC_DEFINE([ENABLE_LIBGCRYPT], [1], [Indicator that LIBGCRYPT is present]) | ||
42 | + PKG_CHECK_MODULES(LIBGCRYPT, libgcrypt) | ||
43 | fi | ||
44 | AM_CONDITIONAL(ENABLE_LIBGCRYPT, test x$enable_libgcrypt = xyes) | ||
45 | AC_SUBST(LIBGCRYPT_CFLAGS) | ||
46 | -- | ||
47 | 1.7.9.5 | ||
48 | |||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb new file mode 100644 index 000000000..db7900cf5 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb | |||
@@ -0,0 +1,169 @@ | |||
1 | SUMMARY = "Rsyslog is an enhanced multi-threaded syslogd" | ||
2 | DESCRIPTION = "\ | ||
3 | Rsyslog is an enhanced syslogd supporting, among others, MySQL,\ | ||
4 | PostgreSQL, failover log destinations, syslog/tcp, fine grain\ | ||
5 | output format control, high precision timestamps, queued operations\ | ||
6 | and the ability to filter on any message part. It is quite\ | ||
7 | compatible to stock sysklogd and can be used as a drop-in replacement.\ | ||
8 | Its advanced features make it suitable for enterprise-class,\ | ||
9 | encryption protected syslog relay chains while at the same time being\ | ||
10 | very easy to setup for the novice user." | ||
11 | |||
12 | DEPENDS = "zlib libestr json-c bison-native flex-native" | ||
13 | HOMEPAGE = "http://www.rsyslog.com/" | ||
14 | LICENSE = "GPLv3 & LGPLv3 & Apache-2.0" | ||
15 | LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \ | ||
16 | file://COPYING.LESSER;md5=cb7903f1e5c39ae838209e130dca270a \ | ||
17 | file://COPYING.ASL20;md5=052f8a09206615ab07326ff8ce2d9d32\ | ||
18 | " | ||
19 | |||
20 | SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \ | ||
21 | file://initscript \ | ||
22 | file://rsyslog.conf \ | ||
23 | file://rsyslog.logrotate \ | ||
24 | file://use-pkgconfig-to-check-libgcrypt.patch \ | ||
25 | file://run-ptest \ | ||
26 | file://rsyslog-fix-ptest-not-finish.patch \ | ||
27 | file://rsyslog-use-serial-tests-config-needed-by-ptest.patch \ | ||
28 | " | ||
29 | |||
30 | SRC_URI[md5sum] = "ebcc010a6205c28eb505c0fe862f32c6" | ||
31 | SRC_URI[sha256sum] = "276d094d1e4c62c770ec8a72723667f119eee038912b79cf3337d439bc2f9087" | ||
32 | |||
33 | inherit autotools pkgconfig systemd update-rc.d update-alternatives ptest | ||
34 | |||
35 | EXTRA_OECONF += "--enable-cached-man-pages" | ||
36 | |||
37 | # first line is default yes in configure | ||
38 | PACKAGECONFIG ??= " \ | ||
39 | zlib rsyslogd rsyslogrt klog inet regexp uuid libgcrypt \ | ||
40 | imdiag gnutls \ | ||
41 | ${@base_contains('DISTRO_FEATURES', 'snmp', 'snmp', '', d)} \ | ||
42 | ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ | ||
43 | ${@base_contains('DISTRO_FEATURES', 'ptest', 'testbench ${VALGRIND}', '', d)} \ | ||
44 | " | ||
45 | |||
46 | # default yes in configure | ||
47 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib," | ||
48 | PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,," | ||
49 | PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,," | ||
50 | PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,," | ||
51 | PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,," | ||
52 | PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,," | ||
53 | PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux," | ||
54 | PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt," | ||
55 | PACKAGECONFIG[testbench] = "--enable-testbench,--disable-testbench,," | ||
56 | |||
57 | # default no in configure | ||
58 | PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," | ||
59 | PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,," | ||
60 | PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp," | ||
61 | PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," | ||
62 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd," | ||
63 | PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," | ||
64 | PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql," | ||
65 | PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi," | ||
66 | PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," | ||
67 | PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,," | ||
68 | PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind," | ||
69 | |||
70 | TESTDIR = "tests" | ||
71 | do_compile_ptest() { | ||
72 | sed -i 's/\(^buildtest-TESTS: \)/\1 $(check_PROGRAMS) /' ${TESTDIR}/Makefile | ||
73 | oe_runmake -C ${TESTDIR} buildtest-TESTS | ||
74 | } | ||
75 | |||
76 | do_install_ptest() { | ||
77 | # install the tests | ||
78 | cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} | ||
79 | cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} | ||
80 | |||
81 | # do NOT need to rebuild Makefile itself | ||
82 | sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile | ||
83 | |||
84 | # fix the srcdir | ||
85 | sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile | ||
86 | |||
87 | # valgrind is not compatible with arm and mips, | ||
88 | # so remove related test cases if there is no valgrind. | ||
89 | if [ x${VALGRIND} = x ]; then | ||
90 | sed -i '/udp-msgreduc-/d' ${D}${PTEST_PATH}/${TESTDIR}/Makefile | ||
91 | fi | ||
92 | |||
93 | # install necessary links | ||
94 | install -d ${D}${PTEST_PATH}/tools | ||
95 | ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd | ||
96 | |||
97 | install -d ${D}${PTEST_PATH}/runtime | ||
98 | install -d ${D}${PTEST_PATH}/runtime/.libs | ||
99 | ( | ||
100 | cd ${D}/${libdir}/rsyslog | ||
101 | allso="*.so" | ||
102 | for i in $allso; do | ||
103 | ln -sf ${libdir}/rsyslog/$i ${D}${PTEST_PATH}/runtime/.libs/$i | ||
104 | done | ||
105 | ) | ||
106 | |||
107 | # fix the module load path with runtime/.libs | ||
108 | find ${D}${PTEST_PATH}/${TESTDIR} -name \*.conf -exec \ | ||
109 | sed -i -e 's:../plugins/.*/.libs/:../runtime/.libs/:' \ | ||
110 | '{}' \; | ||
111 | } | ||
112 | |||
113 | do_install_append() { | ||
114 | install -d "${D}${sysconfdir}/init.d" | ||
115 | install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog.${BPN} | ||
116 | install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf | ||
117 | install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.rsyslog | ||
118 | } | ||
119 | |||
120 | FILES_${PN} += "${bindir}" | ||
121 | |||
122 | INITSCRIPT_NAME = "syslog" | ||
123 | INITSCRIPT_PARAMS = "defaults" | ||
124 | |||
125 | # higher than sysklogd's 100 | ||
126 | ALTERNATIVE_PRIORITY = "110" | ||
127 | |||
128 | ALTERNATIVE_${PN} = "syslogd syslog-conf syslog-logrotate" | ||
129 | |||
130 | ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" | ||
131 | ALTERNATIVE_TARGET[syslogd] = "${sbindir}/rsyslogd" | ||
132 | ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" | ||
133 | ALTERNATIVE_TARGET[syslog-conf] = "${sysconfdir}/rsyslog.conf" | ||
134 | ALTERNATIVE_LINK_NAME[syslog-logrotate] = "${sysconfdir}/logrotate.d/syslog" | ||
135 | ALTERNATIVE_TARGET[syslog-logrotate] = "${sysconfdir}/logrotate.rsyslog" | ||
136 | |||
137 | CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf" | ||
138 | |||
139 | RPROVIDES_${PN} += "${PN}-systemd" | ||
140 | RREPLACES_${PN} += "${PN}-systemd" | ||
141 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
142 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" | ||
143 | |||
144 | RDEPENDS_${PN} += "logrotate update-rc.d" | ||
145 | |||
146 | # for rsyslog-ptest | ||
147 | VALGRIND = "valgrind" | ||
148 | VALGRIND_mips = "" | ||
149 | VALGRIND_mips64 = "" | ||
150 | VALGRIND_arm = "" | ||
151 | VALGRIND_aarch64 = "" | ||
152 | RDEPENDS_${PN}-ptest += "make diffutils gzip" | ||
153 | RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" | ||
154 | |||
155 | # no syslog-init for systemd | ||
156 | python () { | ||
157 | if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
158 | pn = d.getVar('PN', True) | ||
159 | sysconfdir = d.getVar('sysconfdir', True) | ||
160 | d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init') | ||
161 | d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir)) | ||
162 | d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True))) | ||
163 | |||
164 | if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d): | ||
165 | pn = d.getVar('PN', True) | ||
166 | d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-service') | ||
167 | d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-service', '%s/systemd/system/syslog.service' % (d.getVar('sysconfdir', True))) | ||
168 | d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-service', '%s/system/rsyslog.service' % (d.getVar('systemd_unitdir', True))) | ||
169 | } | ||