diff options
author | Mario Preksavec <mario@slackware.hr> | 2016-09-28 22:28:40 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-10-01 07:29:19 +0700 |
commit | 7500b1bbf47a2951f0b0fd87c6070961eeb331dc (patch) | |
tree | e6e0716b2f98831065f2b2879775fd2df4a189e4 /system | |
parent | 2c63e36ab3441a96256fe4d8769523c748eba407 (diff) | |
download | slackbuilds-7500b1bbf47a2951f0b0fd87c6070961eeb331dc.tar.gz |
system/syslog-ng: Updated for version 3.8.1.
Signed-off-by: Mario Preksavec <mario@slackware.hr>
Diffstat (limited to 'system')
-rw-r--r-- | system/syslog-ng/rc.syslog-ng | 34 | ||||
-rw-r--r-- | system/syslog-ng/syslog-ng.SlackBuild | 66 | ||||
-rw-r--r-- | system/syslog-ng/syslog-ng.conf | 9 | ||||
-rw-r--r-- | system/syslog-ng/syslog-ng.info | 6 |
4 files changed, 94 insertions, 21 deletions
diff --git a/system/syslog-ng/rc.syslog-ng b/system/syslog-ng/rc.syslog-ng index 61f4a2beee..d386665cb6 100644 --- a/system/syslog-ng/rc.syslog-ng +++ b/system/syslog-ng/rc.syslog-ng @@ -2,12 +2,13 @@ # # Start/stop/restart the syslog-ng daemon # Drop-in replacement for a stock Slackware rc.syslog script -# Written by Mario Preksavec <mario@slackware.hr> +# Written by Mario Preksavec <mario at slackware dot hr> +# Updated by Janos Szigetvari <jszigetvari at gmail dot com> syslog_start() { if [ -x /usr/sbin/syslog-ng ]; then if [ -f /var/run/syslog-ng.pid ] && kill -0 $(cat /var/run/syslog-ng.pid) 2> /dev/null; then - echo "syslog-ng daemon already running!" + echo "syslog-ng daemon already running!" >&2 return fi @@ -37,6 +38,24 @@ syslog_restart() { syslog_start } +syslog_reload() { + if [ -f /var/run/syslog-ng.pid ] && kill -0 $(cat /var/run/syslog-ng.pid) 2> /dev/null; then + /usr/sbin/syslog-ng-ctl reload + else + echo "syslog-ng daemon is not running!" >&2 + fi +} + +syslog_debug() { + if [ -f /var/run/syslog-ng.pid ] && kill -0 $(cat /var/run/syslog-ng.pid) 2> /dev/null; then + /usr/sbin/syslog-ng-ctl verbose --set="$1" + /usr/sbin/syslog-ng-ctl debug --set="$1" + /usr/sbin/syslog-ng-ctl trace --set="$1" + else + echo "syslog-ng daemon is not running!" >&2 + fi +} + case "$1" in 'start') syslog_start @@ -47,7 +66,16 @@ case "$1" in 'restart') syslog_restart ;; +'reload') + syslog_reload + ;; +'enable-debug') + syslog_debug on + ;; +'disable-debug') + syslog_debug off + ;; *) - echo "usage $0 start|stop|restart" + echo "usage $0 start|stop|reload|restart|enable-debug|disable-debug" esac diff --git a/system/syslog-ng/syslog-ng.SlackBuild b/system/syslog-ng/syslog-ng.SlackBuild index d48861f7c5..eeba4000a3 100644 --- a/system/syslog-ng/syslog-ng.SlackBuild +++ b/system/syslog-ng/syslog-ng.SlackBuild @@ -22,8 +22,10 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Updates and extras, thanks to Janos Szigetvari, Szekesfehervar, Hungary + PRGNAM=syslog-ng -VERSION=${VERSION:-3.7.3} +VERSION=${VERSION:-3.8.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -61,6 +63,48 @@ case "$GEOIP" in *) GEOIP='--disable-geoip' ;; esac +# Build without debug information by default +DEBUG=${DEBUG:-no} +case "$DEBUG" in + yes) DEBUG='--enable-debug' ;; + *) DEBUG='--disable-debug' ;; +esac + +# Build without SQL support by default +SQL=${SQL:-no} +case "$SQL" in + yes) SQL='--enable-sql' ;; + *) SQL='--disable-sql' ;; +esac + +# Build without MongoDB support by default +MONGODB=${MONGODB:-no} +case "$MONGODB" in + yes) MONGODB='--enable-mongodb' ;; + *) MONGODB='--disable-mongodb' ;; +esac + +# Build without Riemann support by default +RIEMANN=${RIEMANN:-no} +case "$RIEMANN" in + yes) RIEMANN='--enable-riemann' ;; + *) RIEMANN='--disable-riemann' ;; +esac + +# Build without support for Java-based destinations by default +JAVA=${JAVA:-no} +case "$JAVA" in + yes) JAVA='--enable-java --enable-java-modules' ;; + *) JAVA='--disable-java --disable-java-modules' ;; +esac + +# Build with support for UDP source-address spoofing by default +SPOOF_SOURCE=${SPOOF_SOURCE:-no} +case "$SPOOF_SOURCE" in + yes) SPOOF_SOURCE='--enable-spoof-source' ;; + *) SPOOF_SOURCE='--disable-spoof-source' ;; +esac + set -e rm -rf $PKG @@ -76,6 +120,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +[ -f configure ] || ./autogen.sh + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -84,23 +130,18 @@ CXXFLAGS="$SLKCFLAGS" \ --sysconfdir=/etc/syslog-ng \ --localstatedir=/var \ --with-pidfile-dir=/var/run \ + --enable-manpages \ --mandir=/usr/man \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --enable-dynamic-linking \ --with-embedded-crypto \ - $GEOIP \ + $GEOIP $DEBUG $SQL $MONGODB \ + $RIEMANN $JAVA $SPOOF_SOURCE \ --build=$ARCH-slackware-linux make make install DESTDIR=$PKG -# Generate manual pages by hand -for i in 1 5 8; do - xsltproc --xinclude --output $PKG/usr/man/man$i/ \ - /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \ - doc/man/*.$i.xml -done - find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -124,10 +165,13 @@ install -D -m0644 -oroot -groot $CWD/syslog-ng.logrotate $PKG/etc/logrotate.d/sy mkdir -p $PKG/var/lib/syslog-ng # Cruft removal -rmdir $PKG/usr/libexec +[ -d $PKG/usr/libexec ] && rmdir $PKG/usr/libexec mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS CONTRIBUTING.md COPYING INSTALL NEWS.md VERSION $PKG/usr/doc/$PRGNAM-$VERSION +# Copy whatever documentation upstream provides +for i in AUTHORS CONTRIBUTING* COPYING GPL* INSTALL LGPL* NEWS* README* VERSION + do [ -f $i ] && cp -a $i $PKG/usr/doc/$PRGNAM-$VERSION +done cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE diff --git a/system/syslog-ng/syslog-ng.conf b/system/syslog-ng/syslog-ng.conf index ac46d7a226..7b7917f147 100644 --- a/system/syslog-ng/syslog-ng.conf +++ b/system/syslog-ng/syslog-ng.conf @@ -1,8 +1,10 @@ -@version: 3.5 +@version: 3.8 +@include "scl.conf" # Drop-in replacement for a stock Slackware syslog.conf # For info about the format of this file, see "man syslog-ng.conf" -# Written by Mario Preksavec <mario@slackware.hr> +# Written by Mario Preksavec <mario at slackware dot hr> +# Updated by Janos Szigetvari <jszigetvari at gmail dot com> options { flush_lines(0); @@ -25,8 +27,7 @@ options { source s_system { internal(); - unix-dgram("/dev/log"); - file("/proc/kmsg" program_override("kernel")); + system(); }; filter f_messages { level(info,notice) and not facility(authpriv,cron,mail,news); }; diff --git a/system/syslog-ng/syslog-ng.info b/system/syslog-ng/syslog-ng.info index bb807842ba..b06c40d918 100644 --- a/system/syslog-ng/syslog-ng.info +++ b/system/syslog-ng/syslog-ng.info @@ -1,8 +1,8 @@ PRGNAM="syslog-ng" -VERSION="3.7.3" +VERSION="3.8.1" HOMEPAGE="http://www.balabit.com/" -DOWNLOAD="https://github.com/balabit/syslog-ng/releases/download/syslog-ng-3.7.3/syslog-ng-3.7.3.tar.gz" -MD5SUM="803d61a713d6d41a973942d417fec999" +DOWNLOAD="https://github.com/balabit/syslog-ng/releases/download/syslog-ng-3.8.1/syslog-ng-3.8.1.tar.gz" +MD5SUM="acf14563cf5ce435db8db35486ce66af" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="%README% eventlog" |