diff options
Diffstat (limited to 'meta/recipes-extended/sysklogd')
-rw-r--r-- | meta/recipes-extended/sysklogd/files/no-strip-install.patch | 17 | ||||
-rw-r--r-- | meta/recipes-extended/sysklogd/files/no-vectorization.patch | 20 | ||||
-rwxr-xr-x | meta/recipes-extended/sysklogd/files/sysklogd | 151 | ||||
-rw-r--r-- | meta/recipes-extended/sysklogd/files/syslog.conf | 71 | ||||
-rw-r--r-- | meta/recipes-extended/sysklogd/sysklogd.inc | 58 | ||||
-rw-r--r-- | meta/recipes-extended/sysklogd/sysklogd_1.5.bb | 5 |
6 files changed, 322 insertions, 0 deletions
diff --git a/meta/recipes-extended/sysklogd/files/no-strip-install.patch b/meta/recipes-extended/sysklogd/files/no-strip-install.patch new file mode 100644 index 0000000000..00fba71017 --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/no-strip-install.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: sysklogd-1.5/Makefile | ||
4 | =================================================================== | ||
5 | --- sysklogd-1.5.orig/Makefile 2009-06-09 13:02:41.000000000 +0200 | ||
6 | +++ sysklogd-1.5/Makefile 2009-06-09 13:03:06.000000000 +0200 | ||
7 | @@ -127,8 +127,8 @@ | ||
8 | rm -f syslogd klogd ksym syslog_tst oops_test TAGS tsyslogd tklogd | ||
9 | |||
10 | install_exec: syslogd klogd | ||
11 | - ${INSTALL} -m 500 -s syslogd ${BINDIR}/syslogd | ||
12 | - ${INSTALL} -m 500 -s klogd ${BINDIR}/klogd | ||
13 | + ${INSTALL} -m 500 syslogd ${BINDIR}/syslogd | ||
14 | + ${INSTALL} -m 500 klogd ${BINDIR}/klogd | ||
15 | |||
16 | install_man: | ||
17 | ${INSTALL} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8 | ||
diff --git a/meta/recipes-extended/sysklogd/files/no-vectorization.patch b/meta/recipes-extended/sysklogd/files/no-vectorization.patch new file mode 100644 index 0000000000..c1cc042c9c --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/no-vectorization.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Upstream-Status: Inappropriate | ||
2 | |||
3 | The compiler should not be generating vectorized instructions on this target. | ||
4 | This is a work around until I can determine why this is occuring on this | ||
5 | particular recipe | ||
6 | |||
7 | Index: sysklogd-1.5/Makefile | ||
8 | =================================================================== | ||
9 | --- sysklogd-1.5.orig/Makefile | ||
10 | +++ sysklogd-1.5/Makefile | ||
11 | @@ -20,7 +20,8 @@ | ||
12 | CC= gcc | ||
13 | #SKFLAGS= -g -DSYSV -Wall | ||
14 | #LDFLAGS= -g | ||
15 | -SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce | ||
16 | +SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce \ | ||
17 | + -fno-tree-vectorize | ||
18 | # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE | ||
19 | # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE | ||
20 | # $(shell getconf LFS_SKFLAGS) | ||
diff --git a/meta/recipes-extended/sysklogd/files/sysklogd b/meta/recipes-extended/sysklogd/files/sysklogd new file mode 100755 index 0000000000..258f882803 --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/sysklogd | |||
@@ -0,0 +1,151 @@ | |||
1 | #! /bin/sh | ||
2 | # /etc/init.d/sysklogd: start the system log daemon. | ||
3 | |||
4 | ### BEGIN INIT INFO | ||
5 | # Provides: sysklogd | ||
6 | # Required-Start: $remote_fs $time | ||
7 | # Required-Stop: $remote_fs $time | ||
8 | # Should-Start: $network | ||
9 | # Should-Stop: $network | ||
10 | # Default-Start: 2 3 4 5 | ||
11 | # Default-Stop: 0 1 6 | ||
12 | # Short-Description: System logger | ||
13 | ### END INIT INFO | ||
14 | |||
15 | # Source function library. | ||
16 | . /etc/init.d/functions | ||
17 | |||
18 | PATH=/bin:/usr/bin:/sbin:/usr/sbin | ||
19 | |||
20 | pidfile_syslogd=/var/run/syslogd.pid | ||
21 | pidfile_klogd=/var/run/klogd.pid | ||
22 | binpath_syslogd=/sbin/syslogd | ||
23 | binpath_klogd=/sbin/klogd | ||
24 | |||
25 | test -x $binpath || exit 0 | ||
26 | |||
27 | test ! -r /etc/default/syslogd || . /etc/default/syslogd | ||
28 | |||
29 | create_xconsole() | ||
30 | { | ||
31 | # Only proceed if /dev/xconsole is used at all | ||
32 | if ! grep -q '^[^#].*/dev/xconsole' /etc/syslog.conf | ||
33 | then | ||
34 | return | ||
35 | fi | ||
36 | |||
37 | if [ ! -e /dev/xconsole ]; then | ||
38 | mknod -m 640 /dev/xconsole p | ||
39 | else | ||
40 | chmod 0640 /dev/xconsole | ||
41 | fi | ||
42 | chown root:adm /dev/xconsole | ||
43 | test ! -x /sbin/restorecon || /sbin/restorecon /dev/xconsole | ||
44 | } | ||
45 | |||
46 | log_begin_msg () { | ||
47 | echo -n $1 | ||
48 | } | ||
49 | |||
50 | log_end_msg () { | ||
51 | echo $1 | ||
52 | } | ||
53 | |||
54 | log_success_msg () { | ||
55 | echo $1 | ||
56 | } | ||
57 | |||
58 | running() | ||
59 | { | ||
60 | # No pidfile, probably no daemon present | ||
61 | # | ||
62 | if [ ! -f $pidfile ] | ||
63 | then | ||
64 | return 1 | ||
65 | fi | ||
66 | |||
67 | pid=`cat $pidfile_syslogd` | ||
68 | |||
69 | # No pid, probably no daemon present | ||
70 | # | ||
71 | if [ -z "$pid" ] | ||
72 | then | ||
73 | return 1 | ||
74 | fi | ||
75 | |||
76 | if [ ! -d /proc/$pid ] | ||
77 | then | ||
78 | return 1 | ||
79 | fi | ||
80 | |||
81 | cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1` | ||
82 | |||
83 | # No syslogd? | ||
84 | # | ||
85 | if [ "$cmd" != "$binpath" ] | ||
86 | then | ||
87 | return 1 | ||
88 | fi | ||
89 | |||
90 | return 0 | ||
91 | } | ||
92 | |||
93 | case "$1" in | ||
94 | start) | ||
95 | log_begin_msg "Starting system log daemon..." | ||
96 | create_xconsole | ||
97 | start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD | ||
98 | log_end_msg $? | ||
99 | log_begin_msg "Starting kernel log daemon..." | ||
100 | start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD | ||
101 | log_end_msg $? | ||
102 | ;; | ||
103 | stop) | ||
104 | log_begin_msg "Stopping system log daemon..." | ||
105 | start-stop-daemon --stop --quiet --pidfile $pidfile_syslogd --name syslogd | ||
106 | log_end_msg $? | ||
107 | log_begin_msg "Stopping kernel log daemon..." | ||
108 | start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd | ||
109 | log_end_msg $? | ||
110 | ;; | ||
111 | reload|force-reload) | ||
112 | log_begin_msg "Reloading system log daemon..." | ||
113 | start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile_syslogd --name syslogd | ||
114 | log_end_msg $? | ||
115 | log_begin_msg "Reloading kernel log daemon..." | ||
116 | start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd | ||
117 | start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD | ||
118 | log_end_msg $? | ||
119 | ;; | ||
120 | restart) | ||
121 | log_begin_msg "Restarting system log daemon..." | ||
122 | start-stop-daemon --stop --retry 5 --quiet --pidfile $pidfile_syslogd --name syslogd | ||
123 | start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD | ||
124 | log_end_msg $? | ||
125 | log_begin_msg "Reloading kernel log daemon..." | ||
126 | start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd | ||
127 | start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD | ||
128 | log_end_msg $? | ||
129 | ;; | ||
130 | reload-or-restart) | ||
131 | if running | ||
132 | then | ||
133 | $0 reload | ||
134 | else | ||
135 | $0 start | ||
136 | fi | ||
137 | ;; | ||
138 | status) | ||
139 | status syslogd | ||
140 | RETVAL=$? | ||
141 | status klogd | ||
142 | rval=$? | ||
143 | [ $RETVAL -eq 0 ] && exit $rval | ||
144 | exit $RETVAL | ||
145 | ;; | ||
146 | *) | ||
147 | log_success_msg "Usage: /etc/init.d/sysklogd {start|stop|reload|restart|force-reload|reload-or-restart|status}" | ||
148 | exit 1 | ||
149 | esac | ||
150 | |||
151 | exit 0 | ||
diff --git a/meta/recipes-extended/sysklogd/files/syslog.conf b/meta/recipes-extended/sysklogd/files/syslog.conf new file mode 100644 index 0000000000..0849de1268 --- /dev/null +++ b/meta/recipes-extended/sysklogd/files/syslog.conf | |||
@@ -0,0 +1,71 @@ | |||
1 | # /etc/syslog.conf Configuration file for syslogd. | ||
2 | # | ||
3 | # Ported from debian by Yu Ke <ke.yu@intel.com> | ||
4 | # | ||
5 | |||
6 | # | ||
7 | # First some standard logfiles. Log by facility. | ||
8 | # | ||
9 | |||
10 | auth,authpriv.* /var/log/auth.log | ||
11 | *.*;auth,authpriv.none -/var/log/syslog | ||
12 | #cron.* /var/log/cron.log | ||
13 | daemon.* -/var/log/daemon.log | ||
14 | kern.* -/var/log/kern.log | ||
15 | lpr.* -/var/log/lpr.log | ||
16 | mail.* -/var/log/mail.log | ||
17 | user.* -/var/log/user.log | ||
18 | |||
19 | # | ||
20 | # Logging for the mail system. Split it up so that | ||
21 | # it is easy to write scripts to parse these files. | ||
22 | # | ||
23 | mail.info -/var/log/mail.info | ||
24 | mail.warn -/var/log/mail.warn | ||
25 | mail.err /var/log/mail.err | ||
26 | |||
27 | # Logging for INN news system | ||
28 | # | ||
29 | news.crit /var/log/news.crit | ||
30 | news.err /var/log/news.err | ||
31 | news.notice -/var/log/news.notice | ||
32 | |||
33 | # | ||
34 | # Some `catch-all' logfiles. | ||
35 | # | ||
36 | *.=debug;\ | ||
37 | auth,authpriv.none;\ | ||
38 | news.none;mail.none -/var/log/debug | ||
39 | |||
40 | *.=info;*.=notice;*.=warn;\ | ||
41 | auth,authpriv.none;\ | ||
42 | cron,daemon.none;\ | ||
43 | mail,news.none -/var/log/messages | ||
44 | |||
45 | # | ||
46 | # Emergencies are sent to everybody logged in. | ||
47 | # | ||
48 | *.emerg * | ||
49 | |||
50 | # | ||
51 | # I like to have messages displayed on the console, but only on a virtual | ||
52 | # console I usually leave idle. | ||
53 | # | ||
54 | #daemon,mail.*;\ | ||
55 | #news.=crit;news.=err;news.=notice;\ | ||
56 | #*.=debug;*.=info;\ | ||
57 | #*.=notice;*.=warn /dev/tty8 | ||
58 | |||
59 | # The named pipe /dev/xconsole is for the `xconsole' utility. To use it, | ||
60 | # you must invoke `xconsole' with the `-file' option: | ||
61 | # | ||
62 | # $ xconsole -file /dev/xconsole [...] | ||
63 | # | ||
64 | # NOTE: adjust the list below, or you'll go crazy if you have a reasonably | ||
65 | # busy site.. | ||
66 | # | ||
67 | daemon.*;mail.*;\ | ||
68 | news.err;\ | ||
69 | *.=debug;*.=info;\ | ||
70 | *.=notice;*.=warn |/dev/xconsole | ||
71 | |||
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc new file mode 100644 index 0000000000..3a518103ea --- /dev/null +++ b/meta/recipes-extended/sysklogd/sysklogd.inc | |||
@@ -0,0 +1,58 @@ | |||
1 | SUMMARY = "System Log Daemons" | ||
2 | DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd" | ||
3 | HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/" | ||
4 | SECTION = "base" | ||
5 | |||
6 | LICENSE = "GPLv2+ & BSD" | ||
7 | LICENSE_syslogd = "BSD" | ||
8 | LICENSE_klogd = "GPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ | ||
10 | file://syslogd.c;beginline=2;endline=15;md5=77ffb2fec48c46d7ca0abb2d5813e7fd \ | ||
11 | file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \ | ||
12 | " | ||
13 | |||
14 | inherit update-rc.d update-alternatives | ||
15 | |||
16 | SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \ | ||
17 | file://no-strip-install.patch \ | ||
18 | file://sysklogd \ | ||
19 | file://syslog.conf \ | ||
20 | " | ||
21 | |||
22 | SRC_URI_append_e500v2 = " file://no-vectorization.patch" | ||
23 | |||
24 | INITSCRIPT_NAME = "syslog" | ||
25 | CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}" | ||
26 | |||
27 | CFLAGS_append = " -DSYSV" | ||
28 | |||
29 | do_install () { | ||
30 | install -d ${D}${mandir}/man8 \ | ||
31 | ${D}${mandir}/man5 \ | ||
32 | ${D}${base_sbindir} | ||
33 | oe_runmake 'BINDIR=${D}${base_sbindir}' \ | ||
34 | 'MANDIR=${D}${mandir}' install | ||
35 | install -d ${D}${sysconfdir} | ||
36 | install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf | ||
37 | install -d ${D}${sysconfdir}/init.d | ||
38 | install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog | ||
39 | } | ||
40 | |||
41 | # sysklogd package has no internal systemd support, so we weigh busybox's | ||
42 | # sysklogd utility over it in case of systemd | ||
43 | ALTERNATIVE_PRIORITY = "${@base_contains('DISTRO_FEATURES','systemd','10','100',d)}" | ||
44 | |||
45 | ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf" | ||
46 | |||
47 | ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" | ||
48 | ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd" | ||
49 | ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog" | ||
50 | ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" | ||
51 | |||
52 | pkg_prerm_${PN} () { | ||
53 | if test "x$D" = "x"; then | ||
54 | if test "$1" = "upgrade" -o "$1" = "remove"; then | ||
55 | /etc/init.d/syslog stop | ||
56 | fi | ||
57 | fi | ||
58 | } | ||
diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb new file mode 100644 index 0000000000..5c9588945d --- /dev/null +++ b/meta/recipes-extended/sysklogd/sysklogd_1.5.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | require sysklogd.inc | ||
2 | PR = "r7" | ||
3 | |||
4 | SRC_URI[md5sum] = "e053094e8103165f98ddafe828f6ae4b" | ||
5 | SRC_URI[sha256sum] = "6169b8e91d29288e90404f01462b69e7f2afb1161aa419826fe4736c7f9eb773" | ||