diff options
-rw-r--r-- | abs/core/rsyslog/PKGBUILD | 67 | ||||
-rw-r--r-- | abs/core/rsyslog/__changelog | 9 | ||||
-rw-r--r-- | abs/core/rsyslog/gnutls.patch | 36 | ||||
-rw-r--r-- | abs/core/rsyslog/mythtv.conf | 36 | ||||
-rw-r--r-- | abs/core/rsyslog/rsyslog.conf.d | 6 | ||||
-rw-r--r-- | abs/core/rsyslog/rsyslog.conf.linhes | 14 | ||||
-rw-r--r-- | abs/core/rsyslog/rsyslog.install | 16 | ||||
-rw-r--r-- | abs/core/rsyslog/rsyslog.logrotate | 7 |
8 files changed, 113 insertions, 78 deletions
diff --git a/abs/core/rsyslog/PKGBUILD b/abs/core/rsyslog/PKGBUILD index 89739bc..641af25 100644 --- a/abs/core/rsyslog/PKGBUILD +++ b/abs/core/rsyslog/PKGBUILD @@ -1,55 +1,64 @@ -# $Id: PKGBUILD 58329 2011-11-11 14:26:11Z spupykin $ +# $Id$ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> pkgname=rsyslog -pkgver=5.8.13 -pkgrel=3 +pkgver=8.11.0 +pkgrel=1 pkgdesc="An enhanced multi-threaded syslogd with a focus on security and reliability" url="http://www.rsyslog.com/" arch=('i686' 'x86_64') license=('GPL3') -depends=('zlib') -makedepends=( 'libmysqlclient' 'gnutls') -optdepends=( 'libmysqlclient: MySQL Database Support' +depends=('zlib' 'libestr' 'libee' 'json-c' 'systemd' 'liblogging' 'librelp') +makedepends=('postgresql-libs>=8.4.1' 'libmariadbclient' 'net-snmp' 'gnutls' + 'python2-docutils') +optdepends=('postgresql-libs: PostgreSQL Database Support' + 'libmariadbclient: MySQL Database Support' + 'net-snmp' 'gnutls') -backup=('etc/rsyslog.conf' \ - 'etc/conf.d/rsyslog') -conflicts=('syslog-ng') -replaces=('syslog-ng') groups=('base') - -options=('strip' 'zipman' '!libtool') -#install=('rsyslog.install') +options=('strip' 'zipman') source=("http://www.rsyslog.com/files/download/rsyslog/rsyslog-$pkgver.tar.gz" - 'rsyslog' 'rsyslog.conf.d' 'rsyslog.conf.linhes' 'mythtv.conf' - 'log_care.sh') + 'rsyslog.conf.linhes' + 'mythtv.conf' + 'log_care.sh' + 'gnutls.patch') + +prepare() { + cd ${srcdir}/${pkgname}-${pkgver} +# patch -p1 <$srcdir/gnutls.patch + sed -i rsyslog.service.in \ + -e 's|rsyslogd -n|rsyslogd -n -i /run/rsyslogd.pid|' \ + -e '/ExecStart=.*$/iPIDFile=/run/rsyslogd.pid' +} build() { cd ${srcdir}/${pkgname}-${pkgver} ./configure --prefix=/usr \ - --sbindir=/usr/bin \ + --sbindir=/usr/bin \ --enable-mysql \ + --enable-pgsql \ --enable-mail \ --enable-imfile \ - --enable-imtemplate \ + --enable-snmp \ --enable-gnutls \ --enable-inet \ + --enable-imjournal \ + --enable-omjournal \ + --enable-relp \ + --enable-impstats \ --with-systemdsystemunitdir=/usr/lib/systemd/system make } + package() { cd ${srcdir}/${pkgname}-${pkgver} make install DESTDIR=${pkgdir} - # Install Daemons and Configuration Files - install -D -m755 ${srcdir}/${pkgname} ${pkgdir}/etc/rc.d/${pkgname}d - install -D -m644 ${srcdir}/${pkgname}.conf.linhes ${pkgdir}/etc/${pkgname}.conf - install -D -m644 ${srcdir}/mythtv.conf ${pkgdir}/etc/rsyslog.d/mythtv.conf - install -D -m644 ${srcdir}/${pkgname}.conf.d ${pkgdir}/etc/conf.d/${pkgname} - install -D -m755 ${srcdir}/log_care.sh ${pkgdir}/etc/cron.daily/log_care + install -D -m644 $srcdir/${pkgname}.conf.linhes ${pkgdir}/etc/${pkgname}.conf + install -D -m644 $srcdir/mythtv.conf ${pkgdir}/etc/rsyslog.d/mythtv.conf + install -D -m755 $srcdir/log_care.sh ${pkgdir}/etc/cron.daily/log_care } -md5sums=('8d228a8b622f90b320c95f38be7fc5bb' - 'a18bbcbb6ebdaa13a6ec6d9f3d9eb2da' - '1a0cd4530dd5d1439456d5ae230574d9' - '8dd27270e882e8707924dbca0c66f66f' - 'c71fa75857ff7b9e24e41457e89c76ca' - 'cd39e6edc1fcbbae2093c40c880e0079') +md5sums=('35f0b7024ae7b5677e49f14f36304d77' + '61750ec989c319470b466946f6404931' + 'd99814eeea48b370b3e0fe2899792fdb' + 'cd39e6edc1fcbbae2093c40c880e0079' + 'aafafdf4502f5e4de5fcfebd21499700') diff --git a/abs/core/rsyslog/__changelog b/abs/core/rsyslog/__changelog index 69aa96c..d8a1749 100644 --- a/abs/core/rsyslog/__changelog +++ b/abs/core/rsyslog/__changelog @@ -1 +1,8 @@ -- removed rsyslog.logrotate from PKGBUILD. LH uses log_care.sh as a cron job to maintain logs +PKGBUILD +- change dep python-docutils to python2-docutils +- removed rsyslog.logrotate +- add log_care.sh: LH uses log_care.sh as a cron job to maintain logs +- add groups=('base') +- replace rsyslog.conf with rsyslog.conf.linhes +- add mythtv.conf +- delete backup=('etc/rsyslog.conf' 'etc/logrotate.d/rsyslog') to ensure LH config diff --git a/abs/core/rsyslog/gnutls.patch b/abs/core/rsyslog/gnutls.patch new file mode 100644 index 0000000..fcf199b --- /dev/null +++ b/abs/core/rsyslog/gnutls.patch @@ -0,0 +1,36 @@ +diff -wbBur rsyslog-8.9.0.org/runtime/nsd_gtls.c rsyslog-8.9.0/runtime/nsd_gtls.c +--- rsyslog-8.9.0.org/runtime/nsd_gtls.c 2015-03-29 16:00:04.000000000 +0300 ++++ rsyslog-8.9.0/runtime/nsd_gtls.c 2015-04-16 15:42:44.701275194 +0300 +@@ -231,13 +231,13 @@ + gtlsClientCertCallback(gnutls_session_t session, + __attribute__((unused)) const gnutls_datum_t* req_ca_rdn, int __attribute__((unused)) nreqs, + __attribute__((unused)) const gnutls_pk_algorithm_t* sign_algos, int __attribute__((unused)) sign_algos_length, +- gnutls_retr_st *st) ++ gnutls_retr2_st *st) + { + nsd_gtls_t *pThis; + + pThis = (nsd_gtls_t*) gnutls_session_get_ptr(session); + +- st->type = GNUTLS_CRT_X509; ++ st->cert_type = GNUTLS_CRT_X509; + st->ncerts = 1; + st->cert.x509 = &pThis->ourCert; + st->key.x509 = pThis->ourKey; +@@ -1673,14 +1673,14 @@ + gnutls_session_set_ptr(pThis->sess, (void*)pThis); + iRet = gtlsLoadOurCertKey(pThis); /* first load .pem files */ + if(iRet == RS_RET_OK) { +- gnutls_certificate_client_set_retrieve_function(xcred, gtlsClientCertCallback); ++ gnutls_certificate_set_retrieve_function(xcred, gtlsClientCertCallback); + } else if(iRet != RS_RET_CERTLESS) { + FINALIZE; /* we have an error case! */ + } + + /* Use default priorities */ + CHKgnutls(gnutls_set_default_priority(pThis->sess)); +- CHKgnutls(gnutls_certificate_type_set_priority(pThis->sess, cert_type_priority)); ++ CHKgnutls(gnutls_set_default_priority(pThis->sess)); + + /* put the x509 credentials to the current session */ + CHKgnutls(gnutls_credentials_set(pThis->sess, GNUTLS_CRD_CERTIFICATE, xcred)); diff --git a/abs/core/rsyslog/mythtv.conf b/abs/core/rsyslog/mythtv.conf index 1878b74..9f3efe7 100644 --- a/abs/core/rsyslog/mythtv.conf +++ b/abs/core/rsyslog/mythtv.conf @@ -26,38 +26,38 @@ $template DynMythNoLogServer,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_%progr if $syslogfacility-text == 'local6' and $msg startswith ' mythbackend' then ?DynMythBackend;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythfrontend' then ?DynMythFrontend;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythjobqueue' then ?DynMythJobQueue;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythmediaserver' then ?DynMythMediaServer;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythtv-setup' then ?DynMythSetup;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythfilldatabase' then ?DynMythFillDatabase;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythcommflag' then ?DynMythCommflag;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythpreviewgen' then ?DynMythPreviewGen;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythtranscode' then ?DynMythTranscode;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythmetadatalookup' then ?DynMythMetadataLookup;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythutil' then ?DynMythUtil;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythwelcome' then ?DynMythWelcome;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythshutdown' then ?DynMythShutdown;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythlcdserver' then ?DynMythLCDServer;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythccextractor' then ?DynMythccExtractor;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythavtest' then ?DynMythAVTest;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $msg startswith ' mythlogserver' then ?DynMythLogServer;DynMythFormat -& ~ +& stop if $syslogfacility-text == 'local6' and $programname startswith 'myth' then ?DynMythNoLogServer -& ~ +& stop diff --git a/abs/core/rsyslog/rsyslog.conf.d b/abs/core/rsyslog/rsyslog.conf.d deleted file mode 100644 index e39f8c3..0000000 --- a/abs/core/rsyslog/rsyslog.conf.d +++ /dev/null @@ -1,6 +0,0 @@ -# -# Parameters to be passed to rsyslogd -# This should almost certainly include at least the current compatability -# level, e.g. -c4 -# -RSYSLOGD_ARGS="-c4" diff --git a/abs/core/rsyslog/rsyslog.conf.linhes b/abs/core/rsyslog/rsyslog.conf.linhes index dc1317c..3f7723a 100644 --- a/abs/core/rsyslog/rsyslog.conf.linhes +++ b/abs/core/rsyslog/rsyslog.conf.linhes @@ -1,13 +1,12 @@ # if you experience problems, check # http://www.rsyslog.com/troubleshoot for assistance -# rsyslog v3: load input modules -# If you do not load inputs, nothing happens! -# You may need to set the module load path if modules are not found. - $ModLoad immark # provides --MARK-- message capability $ModLoad imuxsock # provides support for local system logging (e.g. via logger command) $ModLoad imklog # kernel logging (formerly provided by rklogd) +$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat +$FileOwner root +$FileGroup root $FileCreateMode 0644 $DirCreateMode 0755 $SystemLogRateLimitInterval 2 @@ -27,9 +26,9 @@ $template DynMythExpress,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythexpres if $programname contains 'lighttpd' then ?DynLighttpd -& ~ +& stop if $programname startswith 'mythexpress' then ?DynMythExpress -& ~ +& stop # Log anything (except mail) of level info or higher. # Don't log private authentication messages! @@ -50,7 +49,7 @@ mail.* ?DynMail cron.* ?DynCron # Everybody gets emergency messages -*.emerg * +*.emerg :omusrmsg:* # Save news errors of level crit and higher in a special file. #uucp,news.crit -/var/log/spooler @@ -91,4 +90,3 @@ $IncludeConfig /etc/rsyslog.d/*.conf #$ModLoad ommysql # load MySQL functionality #*.* :ommysql:vmbe,Syslog,syslog,passwd - diff --git a/abs/core/rsyslog/rsyslog.install b/abs/core/rsyslog/rsyslog.install deleted file mode 100644 index 2153832..0000000 --- a/abs/core/rsyslog/rsyslog.install +++ /dev/null @@ -1,16 +0,0 @@ -# arg 1: the new package version -# arg 2: the old package version - -post_install() { - remove_service.sh syslog-ng - add_service.sh rsyslog - if [ ! -e /var/log/old_syslog ] - then - mkdir -p /var/log/old_sysng - mv /var/log/*log* /var/log/old_sysng - echo "#########################################" - echo "/var/log/old_sysng contains old log files" - echo "it may be removed at your convenience" - echo "#########################################" - fi -} diff --git a/abs/core/rsyslog/rsyslog.logrotate b/abs/core/rsyslog/rsyslog.logrotate new file mode 100644 index 0000000..889c989 --- /dev/null +++ b/abs/core/rsyslog/rsyslog.logrotate @@ -0,0 +1,7 @@ +/var/log/auth.log /var/log/cron.log /var/log/daemon.log /var/log/debug /var/log/kern.log /var/log/lpr.log /var/log/mail.err /var/log/mail.info /var/log/mail.log /var/log/mail.warn /var/log/messages /var/log/news /var/log/syslog /var/log/user.log { + missingok + sharedscripts + postrotate + /usr/bin/killall -HUP /usr/bin/rsyslogd + endscript +} |