From: Michael Tremer Date: Sat, 6 Dec 2008 11:21:25 +0000 (+0100) Subject: Added syslog-ng which replaces sysklogd. X-Git-Tag: v3.0-alpha1~410 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d178ccd6d9aa0fc4a1fc13e8d59b7654f969bc46;p=ipfire-3.x.git Added syslog-ng which replaces sysklogd. This is because sysklogd is pretty old and hard to configure. So let's do something new. --- diff --git a/config/syslog-ng/syslog-ng.conf b/config/syslog-ng/syslog-ng.conf new file mode 100644 index 000000000..3e7c3cfe4 --- /dev/null +++ b/config/syslog-ng/syslog-ng.conf @@ -0,0 +1,76 @@ +options { long_hostnames(off); sync(0); }; + +source src { unix-stream("/dev/log"); internal(); }; +source kernsrc { file("/proc/kmsg"); }; + +destination authlog { file("/var/log/auth.log"); }; +destination syslog { file("/var/log/syslog"); }; +destination cron { file("/var/log/cron.log"); }; +destination daemon { file("/var/log/daemon.log"); }; +destination kern { file("/var/log/kern.log"); }; +destination lpr { file("/var/log/lpr.log"); }; +destination user { file("/var/log/user.log"); }; +destination uucp { file("/var/log/uucp.log"); }; +destination ppp { file("/var/log/ppp.log"); }; +destination mail { file("/var/log/mail.log"); }; + +destination mailinfo { file("/var/log/mail.info"); }; +destination mailwarn { file("/var/log/mail.warn"); }; +destination mailerr { file("/var/log/mail.err"); }; +destination local0 { file("/var/log/local0.log"); }; +destination local1 { file("/var/log/local1.log"); }; +destination all { file("/var/log/all.log"); }; + +destination newscrit { file("/var/log/news/news.crit"); }; +destination newserr { file("/var/log/news/news.err"); }; +destination newsnotice { file("/var/log/news/news.notice"); }; + +destination debug { file("/var/log/debug"); }; +destination messages { file("/var/log/messages"); }; +destination console { usertty("root"); }; +destination console_all { file("/dev/tty12"); }; + +filter f_auth { facility(auth); }; +filter f_authpriv { facility(auth, authpriv); }; +filter f_syslog { not facility(authpriv, mail) and not match(ppp.*LCP); }; +filter f_cron { facility(cron); }; +filter f_daemon { facility(daemon); }; +filter f_kern { facility(kern); }; +filter f_lpr { facility(lpr); }; +filter f_mail { facility(mail) and not match (imapd); }; +filter f_user { facility(user); }; +filter f_uucp { facility(cron); }; +filter f_ppp { program(ppp); }; +filter f_news { facility(news); }; +filter f_debug { not facility(auth, authpriv, news, mail) and not match(ppp.*LCP); }; +filter f_messages { level(info..warn)and not facility(auth, authpriv, mail, news); }; +filter f_emergency { level(emerg); }; + +filter f_info { level(info); }; +filter f_notice { level(notice); }; +filter f_warn { level(warn); }; +filter f_crit { level(crit); }; +filter f_err { level(err); }; + +log { source(src); filter(f_authpriv); destination(authlog); }; +log { source(src); filter(f_syslog); destination(syslog); }; +log { source(src); filter(f_cron); destination(cron); }; +log { source(src); filter(f_daemon); destination(daemon); }; +log { source(kernsrc); filter(f_kern); destination(kern); }; +log { source(src); filter(f_lpr); destination(lpr); }; +log { source(src); filter(f_mail); destination(mail); }; +log { source(src); filter(f_user); destination(user); }; +log { source(src); filter(f_uucp); destination(uucp); }; +log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); }; +log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); }; +log { source(src); filter(f_mail); filter(f_err); destination(mailerr); }; +log { source(src); filter(f_news); filter(f_crit); destination(newscrit); }; +log { source(src); filter(f_news); filter(f_err); destination(newserr); }; +log { source(src); filter(f_news); filter(f_notice); destination(newsnotice); }; +log { source(src); filter(f_debug); destination(debug); }; +log { source(src); filter(f_messages); destination(messages); }; +log { source(src); filter(f_emergency); destination(console); }; +log { source(src); filter(f_ppp); destination(ppp); }; +log { source(src); destination(console_all); }; +log { source(src); destination(all); }; + diff --git a/lfs/sysklogd b/lfs/eventlog similarity index 74% rename from lfs/sysklogd rename to lfs/eventlog index 9a35214e8..26dca0fee 100644 --- a/lfs/sysklogd +++ b/lfs/eventlog @@ -24,8 +24,9 @@ include Config -PKG_NAME = sysklogd -VER = 1.5 +PKG_NAME = eventlog +VER = 0.2.7 +PKG_VER = 0 THISAPP = $(PKG_NAME)-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -33,38 +34,54 @@ DIR_APP = $(DIR_SRC)/$(THISAPP) OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) +MAINTAINER = +GROUP = System/Tools +EXTRA = no +DEBUG = no +DEPS = + +URL = http://www.balabit.com/ +LICENSE = GPLv2+ +SHORT_DESC = Eventlog is an API for syslog-ng. + +define LONG_DESC + A new API to format and send structured log messages. It supports multiple \ + message representations (plain, XML attributes and XML tags) and multiple \ + output methods (local syslogd). +endef + ############################################################################### # Top-level Rules ############################################################################### -objects = $(DL_FILE) $(THISAPP)-disable__syslog_chk-1.patch \ - $(THISAPP)-priv_sep-1.patch +objects = $(DL_FILE) + +download: $(objects) -install : $(OBJECT) +install: $(OBJECT) -download : $(objects) +package: + @$(DO_PACKAGE) -$(objects) : +$(objects): @$(LOAD) ############################################################################### # Installation Details ############################################################################### -$(OBJECT) : +$(OBJECT): $(objects) @$(PREBUILD) - @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - - cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-disable__syslog_chk-1.patch - cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-priv_sep-1.patch - - install -d -m0000 /var/lib/syslogd - install -d -m0000 /var/lib/klogd - - cd $(DIR_APP) && sed 's/644/600/' -i.orig syslogd.c + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && \ + ./configure \ + --prefix=/usr cd $(DIR_APP) && make $(PARALLELISMFLAGS) cd $(DIR_APP) && make install + mv -v /usr/lib/libevent.so.0* /lib + ln -svf ../../lib/libevent.so.0.* /usr/lib/libevent.so + @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/syslog-ng b/lfs/syslog-ng new file mode 100644 index 000000000..50678404f --- /dev/null +++ b/lfs/syslog-ng @@ -0,0 +1,90 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +PKG_NAME = syslog-ng +VER = 2.0.10 +PKG_VER = 0 + +THISAPP = $(PKG_NAME)-$(VER) +DL_FILE = $(THISAPP).tar.gz +DIR_APP = $(DIR_SRC)/$(THISAPP) + +OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) + +MAINTAINER = +GROUP = System/Tools +EXTRA = no +DEBUG = no +DEPS = eventlog glib + +URL = http://www.balabit.com/network-security/syslog-ng/ +LICENSE = GPLv2+ +SHORT_DESC = Syslog-ng is a daemon that handles the logging stuff. + +define LONG_DESC + The syslog-ng application can operate in server or agent mode, and - \ + apart from UDP - supports the reliable TCP and the encrypted TLS protocols. \ + That way syslog-ng can be used to create flexible and reliable logging \ + infrastructure even in heterogeneous environments. +endef + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +download: $(objects) + +install: $(OBJECT) + +package: + @$(DO_PACKAGE) + +$(objects): + @$(LOAD) + +############################################################################### +# Installation Details +############################################################################### + +$(OBJECT): $(objects) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE) + + cd $(DIR_APP) && \ + ./configure \ + --prefix=/ \ + --sysconfdir=/etc/syslog-ng \ + --enable-dynamic-linking + cd $(DIR_APP) && make $(PARALLELISMFLAGS) + cd $(DIR_APP) && make install + + cp -vf $(DIR_CONF)/$(PKG_NAME)/$(PKG_NAME).conf \ + /etc/$(PKG_NAME)/$(PKG_NAME).conf + + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index 063f51f9e..6536745dc 100755 --- a/make.sh +++ b/make.sh @@ -133,6 +133,7 @@ base_build() { ipfire_make bash ipfire_make bzip2 ipfire_make diffutils + ipfire_make eventlog ipfire_make file ipfire_make findutils ipfire_make flex @@ -154,7 +155,7 @@ base_build() { ipfire_make patch ipfire_make psmisc ipfire_make shadow - ipfire_make sysklogd + ipfire_make syslog-ng ipfire_make sysvinit ipfire_make tar ipfire_make texinfo