diff options
| -rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf | 84 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate | 39 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb | 31 |
3 files changed, 152 insertions, 2 deletions
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 0000000000..54f8bb6a56 --- /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 0000000000..ba1120af44 --- /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_7.4.4.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb index 3801933b56..31d2935a12 100644 --- a/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb +++ b/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb | |||
| @@ -19,12 +19,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \ | |||
| 19 | 19 | ||
| 20 | SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \ | 20 | SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \ |
| 21 | file://initscript \ | 21 | file://initscript \ |
| 22 | file://rsyslog.conf \ | ||
| 23 | file://rsyslog.logrotate \ | ||
| 22 | " | 24 | " |
| 23 | 25 | ||
| 24 | SRC_URI[md5sum] = "ebcc010a6205c28eb505c0fe862f32c6" | 26 | SRC_URI[md5sum] = "ebcc010a6205c28eb505c0fe862f32c6" |
| 25 | SRC_URI[sha256sum] = "276d094d1e4c62c770ec8a72723667f119eee038912b79cf3337d439bc2f9087" | 27 | SRC_URI[sha256sum] = "276d094d1e4c62c770ec8a72723667f119eee038912b79cf3337d439bc2f9087" |
| 26 | 28 | ||
| 27 | inherit autotools pkgconfig systemd update-rc.d | 29 | inherit autotools pkgconfig systemd update-rc.d update-alternatives |
| 28 | 30 | ||
| 29 | EXTRA_OECONF += "--enable-cached-man-pages" | 31 | EXTRA_OECONF += "--enable-cached-man-pages" |
| 30 | 32 | ||
| @@ -62,7 +64,8 @@ PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,," | |||
| 62 | do_install_append() { | 64 | do_install_append() { |
| 63 | install -d "${D}${sysconfdir}/init.d" | 65 | install -d "${D}${sysconfdir}/init.d" |
| 64 | install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/rsyslogd | 66 | install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/rsyslogd |
| 65 | install -m 755 ${S}/platform/redhat/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf | 67 | install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf |
| 68 | install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.rsyslog | ||
| 66 | } | 69 | } |
| 67 | 70 | ||
| 68 | FILES_${PN} += "${bindir}" | 71 | FILES_${PN} += "${bindir}" |
| @@ -70,9 +73,33 @@ FILES_${PN} += "${bindir}" | |||
| 70 | INITSCRIPT_NAME = "rsyslogd" | 73 | INITSCRIPT_NAME = "rsyslogd" |
| 71 | INITSCRIPT_PARAMS = "defaults" | 74 | INITSCRIPT_PARAMS = "defaults" |
| 72 | 75 | ||
| 76 | # higher than sysklogd's 100 | ||
| 77 | ALTERNATIVE_PRIORITY = "110" | ||
| 78 | |||
| 79 | ALTERNATIVE_${PN} = "rsyslogd syslog-conf syslog-logrotate" | ||
| 80 | |||
| 81 | ALTERNATIVE_LINK_NAME[rsyslogd] = "${base_sbindir}/syslogd" | ||
| 82 | ALTERNATIVE_TARGET[rsyslogd] = "${sbindir}/rsyslogd" | ||
| 83 | ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" | ||
| 84 | ALTERNATIVE_TARGET[syslog-conf] = "${sysconfdir}/rsyslog.conf" | ||
| 85 | ALTERNATIVE_LINK_NAME[syslog-logrotate] = "${sysconfdir}/logrotate.d/syslog" | ||
| 86 | ALTERNATIVE_TARGET[syslog-logrotate] = "${sysconfdir}/logrotate.rsyslog" | ||
| 87 | |||
| 73 | CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf" | 88 | CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf" |
| 74 | 89 | ||
| 75 | RPROVIDES_${PN} += "${PN}-systemd" | 90 | RPROVIDES_${PN} += "${PN}-systemd" |
| 76 | RREPLACES_${PN} += "${PN}-systemd" | 91 | RREPLACES_${PN} += "${PN}-systemd" |
| 77 | RCONFLICTS_${PN} += "${PN}-systemd" | 92 | RCONFLICTS_${PN} += "${PN}-systemd" |
| 78 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" | 93 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" |
| 94 | |||
| 95 | RDEPENDS_${PN} += "logrotate" | ||
| 96 | |||
| 97 | # no syslog-init for systemd | ||
| 98 | python () { | ||
| 99 | if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split(): | ||
| 100 | pn = d.getVar('PN', True) | ||
| 101 | sysconfdir = d.getVar('sysconfdir', True) | ||
| 102 | d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init') | ||
| 103 | d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslogd' % (sysconfdir)) | ||
| 104 | d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/rsyslogd' % (sysconfdir)) | ||
| 105 | } | ||
