diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2020-06-26 19:18:25 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2020-06-27 08:59:53 +0200 |
commit | 93abc85df8a72067aecc72c4773d00b040d6a1e2 (patch) | |
tree | c61f7ece039acb850385e181135f89817e8b340d /source/a/sysklogd | |
parent | 6cf862d3dc4bb739f05176b134e0da7db6cb4616 (diff) | |
download | current-93abc85df8a72067aecc72c4773d00b040d6a1e2.tar.gz |
Fri Jun 26 19:18:25 UTC 202020200626191825
a/sysklogd-2.1.2-x86_64-1.txz: Upgraded.
Make sure to move the .new init script and config into place for this.
ap/undervolt-20200612_07d0c70-x86_64-1.txz: Added.
l/popt-1.18-x86_64-1.txz: Upgraded.
x/libglvnd-1.3.2-x86_64-1.txz: Upgraded.
x/libva-2.8.0-x86_64-1.txz: Upgraded.
x/libva-utils-2.8.0-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/a/sysklogd')
-rw-r--r-- | source/a/sysklogd/config/rc.syslog.new | 36 | ||||
-rw-r--r-- | source/a/sysklogd/config/syslog.conf.new | 31 | ||||
-rw-r--r-- | source/a/sysklogd/config/syslogd.new | 4 | ||||
-rw-r--r-- | source/a/sysklogd/doinst.sh | 5 | ||||
-rw-r--r-- | source/a/sysklogd/slack-desc | 12 | ||||
-rwxr-xr-x | source/a/sysklogd/sysklogd.SlackBuild | 137 | ||||
-rw-r--r-- | source/a/sysklogd/sysklogd.allow.repeated.messages.diff | 69 | ||||
-rw-r--r-- | source/a/sysklogd/sysklogd.union.wait.int.diff | 11 | ||||
-rw-r--r-- | source/a/sysklogd/sysklogd.url | 1 | ||||
-rw-r--r-- | source/a/sysklogd/use_memmove_not_strcpy.diff | 15 |
10 files changed, 132 insertions, 189 deletions
diff --git a/source/a/sysklogd/config/rc.syslog.new b/source/a/sysklogd/config/rc.syslog.new index f2b51d5e..a802ec38 100644 --- a/source/a/sysklogd/config/rc.syslog.new +++ b/source/a/sysklogd/config/rc.syslog.new @@ -1,42 +1,22 @@ #!/bin/sh -# Start/stop/restart the system logging daemons. +# Start/stop/restart the system logging daemon. # # Written for Slackware Linux by Patrick J. Volkerding <volkerdi@slackware.com>. -# Uncomment the following line to use the -c option to syslogd. This will -# disable suppressing repeated messages, which may be useful with tools that -# parse the logs, such as fail2ban: -#SYSLOGD_OPTIONS="-c " - -# Options for klogd: -# '-c 3' = display level 'error' or higher messages on console -# '-x' = turn off broken EIP translation -KLOGD_OPTIONS="-c 3 -x" +# Source default settings: +if [ -r /etc/default/syslogd ]; then + . /etc/default/syslogd +fi syslogd_start() { - if [ -x /usr/sbin/syslogd -a -x /usr/sbin/klogd ]; then - echo -n "Starting sysklogd daemons: " - echo -n "/usr/sbin/syslogd ${SYSLOGD_OPTIONS};" - /usr/sbin/syslogd $SYSLOGD_OPTIONS - # prevent syslogd/klogd race condition on SMP kernels - if ps acx | grep -q udevd ; then - while [ ! -e /dev/log ] ; do - sleep 0 - done - else - sleep 1 - fi - # Run klogd, unless we are in a container: - if [ -z $container ]; then - echo " /usr/sbin/klogd $KLOGD_OPTIONS" - /usr/sbin/klogd $KLOGD_OPTIONS - fi + if [ -x /usr/sbin/syslogd ]; then + echo -n "Starting syslogd daemon: /usr/sbin/syslogd ${SYSLOGD_OPTS}" + /usr/sbin/syslogd $SYSLOGD_OPTS fi } syslogd_stop() { killall syslogd 2> /dev/null - killall klogd 2> /dev/null } syslogd_restart() { diff --git a/source/a/sysklogd/config/syslog.conf.new b/source/a/sysklogd/config/syslog.conf.new index 15bc5ee4..4cf787ae 100644 --- a/source/a/sysklogd/config/syslog.conf.new +++ b/source/a/sysklogd/config/syslog.conf.new @@ -1,26 +1,31 @@ # /etc/syslog.conf # For info about the format of this file, see "man syslog.conf" -# and /usr/doc/sysklogd/README.linux. Note the '-' prefixing some -# of these entries; this omits syncing the file after every logging. +# and /usr/doc/sysklogd/README.linux. Note the '-' prefixing some +# of these entries; this omits syncing the file after every logging. # In the event of a crash, some log information might be lost, so # if this is a concern to you then you might want to remove the '-'. -# Be advised this will cause a performation loss if you're using +# Be advised this will cause a performance loss if you're using # programs that do heavy logging. -# Uncomment this to see kernel messages on the console. -#kern.* /dev/console +# Uncomment to see kernel messages 'err' or higher on the console. +# Note that this is disabled by default because the kernel has defined +# the "No irq handler for vector" message as 'emerg' (the highest, your +# system should be considered unusable) level and will spam the console +# during boot. But perhaps you can live with that in order to see the +# other kernel messages... +#kern.err /dev/console # Log anything 'info' or higher, but lower than 'warn'. -# Exclude authpriv, cron, mail, and news. These are logged elsewhere. +# Exclude authpriv, cron, mail, and news. These are logged elsewhere. *.info;*.!warn;\ authpriv.none;cron.none;mail.none;news.none -/var/log/messages # Log anything 'warn' or higher. -# Exclude authpriv, cron, mail, and news. These are logged elsewhere. +# Exclude authpriv, cron, mail, and news. These are logged elsewhere. *.warn;\ authpriv.none;cron.none;mail.none;news.none -/var/log/syslog -# Debugging information is logged here. +# Debugging information is logged here: *.=debug -/var/log/debug # Private authentication message logging: @@ -35,12 +40,14 @@ mail.* -/var/log/maillog # Emergency level messages go to all users: *.emerg * -# This log is for news and uucp errors: -uucp,news.crit -/var/log/spooler +# Uncomment to log news and uucp errors: +#uucp,news.crit -/var/log/spooler -# Uncomment these if you'd like INN to keep logs on everything. -# You won't need this if you don't run INN (the InterNetNews daemon). +# Uncomment these if you run a news server and would like to log related +# messages: #news.=crit -/var/log/news/news.crit #news.=err -/var/log/news/news.err #news.notice -/var/log/news/news.notice +# Include all config files in /etc/syslog.d/: +include /etc/syslog.d/*.conf diff --git a/source/a/sysklogd/config/syslogd.new b/source/a/sysklogd/config/syslogd.new new file mode 100644 index 00000000..b621cd8f --- /dev/null +++ b/source/a/sysklogd/config/syslogd.new @@ -0,0 +1,4 @@ +# Options for the syslog daemon. +# Default is "-s" to run in secure mode - not accepting network connections. +# For other options, see syslog(8). +SYSLOGD_OPTS="-s" diff --git a/source/a/sysklogd/doinst.sh b/source/a/sysklogd/doinst.sh index fcaf830d..25150813 100644 --- a/source/a/sysklogd/doinst.sh +++ b/source/a/sysklogd/doinst.sh @@ -9,15 +9,15 @@ config() { fi # Otherwise, we leave the .new copy for the admin to consider... } +config etc/default/syslogd.new config etc/logrotate.d/syslog.new -config etc/syslog.conf.new config etc/rc.d/rc.syslog.new +config etc/syslog.conf.new config var/log/cron.new config var/log/debug.new config var/log/maillog.new config var/log/messages.new config var/log/secure.new -config var/log/spooler.new config var/log/syslog.new # Remove any leftover empty files: @@ -26,6 +26,5 @@ rm -f var/log/debug.new rm -f var/log/maillog.new rm -f var/log/messages.new rm -f var/log/secure.new -rm -f var/log/spooler.new rm -f var/log/syslog.new diff --git a/source/a/sysklogd/slack-desc b/source/a/sysklogd/slack-desc index f20ffbe9..0a3a20e9 100644 --- a/source/a/sysklogd/slack-desc +++ b/source/a/sysklogd/slack-desc @@ -8,12 +8,12 @@ |-----handy-ruler------------------------------------------------------| sysklogd: sysklogd (Linux system logging utilities) sysklogd: -sysklogd: Dr. Greg Wettstein and Stephen Tweedie's syslogd/klogd. -sysklogd: -sysklogd: This package contains a modified version of syslogd for the Linux -sysklogd: environment. An additional utility, klogd, is included which allows -sysklogd: kernel logging to be directed through the syslogd facility. -sysklogd: Syslogd and klogd are started when your system boots. +sysklogd: The syslogd utility reads and logs messages to the system console, log +sysklogd: files, other machines and/or users as specified by its configuration +sysklogd: file. It was originally ported to Linux by Dr. Greg Wettstein, Stephen +sysklogd: Tweedie, Juha Virtanen, Shane Alderton, and Martin Schulze, and is +sysklogd: currently maintained by Joachim Nilsson. sysklogd: +sysklogd: Homepage: https://github.com/troglobit/sysklogd sysklogd: sysklogd: diff --git a/source/a/sysklogd/sysklogd.SlackBuild b/source/a/sysklogd/sysklogd.SlackBuild index 6f934c1e..c797be8a 100755 --- a/source/a/sysklogd/sysklogd.SlackBuild +++ b/source/a/sysklogd/sysklogd.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2005-2018 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2005-2020 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,15 +23,18 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=sysklogd -VERSION=1.5.1 -BUILD=${BUILD:-3} +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} +# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) export ARCH=i586 ;; - arm*) export ARCH=arm ;; - *) export ARCH=$( uname -m ) ;; + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; esac + export ARCH fi # If the variable PRINT_PACKAGE_NAME is set, then this script will report what @@ -44,15 +47,37 @@ fi NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + TMP=${TMP:-/tmp} -PKG=$TMP/package-sysklogd +PKG=$TMP/package-$PKGNAM rm -rf $PKG mkdir -p $TMP $PKG + cd $TMP -rm -rf sysklogd-$VERSION -tar xvf $CWD/sysklogd-$VERSION.tar.gz || exit 1 -cd sysklogd-$VERSION +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 +cd $PKGNAM-$VERSION || exit 1 + chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -60,30 +85,24 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ -# Use memmove() instead of strcpy() in syslogd.c -zcat $CWD/use_memmove_not_strcpy.diff.gz | patch -p1 --verbose || exit 1 - -# Allow -c option to log all (even repeated) messages: -zcat $CWD/sysklogd.allow.repeated.messages.diff.gz | patch -p1 --verbose || exit 1 - -# union wait removed in glibc, use int instead: -zcat $CWD/sysklogd.union.wait.int.diff.gz | patch -p1 --verbose || exit 1 - -make all syslog_tst $NUMJOBS || make || exit 1 - -mkdir -p $PKG/usr/sbin -cat klogd > $PKG/usr/sbin/klogd -cat syslog_tst > $PKG/usr/sbin/syslog_tst -cat syslogd > $PKG/usr/sbin/syslogd -chmod 0755 $PKG/usr/sbin/* - -mkdir -p $PKG/usr/man/man{5,8} -cat syslog.conf.5 | gzip -9c > $PKG/usr/man/man5/syslog.conf.5.gz -cat klogd.8 | gzip -9c > $PKG/usr/man/man8/klogd.8.gz -cat sysklogd.8 | gzip -9c > $PKG/usr/man/man8/sysklogd.8.gz -( cd $PKG/usr/man/man8 ; ln -s sysklogd.8.gz syslogd.8.gz ) - -mkdir -p $PKG/etc +# Configure, build, and install: +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --docdir=/usr/doc/$PKGNAM-$VERSION \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --disable-static \ + --without-logger \ + --build=$ARCH-slackware-linux || exit 1 +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +mkdir -p $PKG/etc/syslog.d cat $CWD/config/syslog.conf.new > $PKG/etc/syslog.conf.new mkdir -p $PKG/etc/logrotate.d @@ -93,25 +112,53 @@ mkdir -p $PKG/etc/rc.d cat $CWD/config/rc.syslog.new > $PKG/etc/rc.d/rc.syslog.new chmod 0755 $PKG/etc/rc.d/rc.syslog.new +mkdir -p $PKG/etc/default +cat $CWD/config/syslogd.new > $PKG/etc/default/syslogd.new + mkdir -p $PKG/var/log -for i in cron debug maillog messages secure spooler syslog ; do +for i in cron debug maillog messages secure syslog ; do touch $PKG/var/log/$i.new chmod 640 $PKG/var/log/$i.new done -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +# Strip binaries: +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Compress manual pages: +find $PKG/usr/man -type f -exec gzip -9 {} \+ +for i in $( find $PKG/usr/man -type l ) ; do + ln -s $( readlink $i ).gz $i.gz + rm $i +done -mkdir -p $PKG/usr/doc/sysklogd-$VERSION +# Compress info files, if any: +if [ -d $PKG/usr/info ]; then + ( cd $PKG/usr/info + rm -f dir + gzip -9 * + ) +fi + +# Add a documentation directory: +mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION cp -a \ - ANNOUNCE CHANGES COPYING INSTALL MANIFEST NEWS README.1st README.linux \ - $PKG/usr/doc/sysklogd-$VERSION -chmod 0644 $PKG/usr/doc/sysklogd-$VERSION/* + ChangeLog* COPYING* LICENSE* NEWS* README* THANKS* TODO* \ + $PKG/usr/doc/${PKGNAM}-$VERSION + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat ChangeLog.md | head -n 1000 > $DOCSDIR/ChangeLog.md + touch -r ChangeLog.md $DOCSDIR/ChangeLog.md +fi mkdir -p $PKG/install +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc -zcat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $TMP/sysklogd-$VERSION-$ARCH-$BUILD.txz - +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz diff --git a/source/a/sysklogd/sysklogd.allow.repeated.messages.diff b/source/a/sysklogd/sysklogd.allow.repeated.messages.diff deleted file mode 100644 index 41e6bf15..00000000 --- a/source/a/sysklogd/sysklogd.allow.repeated.messages.diff +++ /dev/null @@ -1,69 +0,0 @@ ---- ./syslogd.c.orig 2014-10-04 14:47:18.000000000 -0500 -+++ ./syslogd.c 2016-06-29 01:46:39.355541929 -0500 -@@ -776,6 +776,7 @@ - }; - - int Debug; /* debug flag */ -+int Compress = 1; /* compress repeated messages flag */ - char LocalHostName[MAXHOSTNAMELEN+1]; /* our hostname */ - char *LocalDomain; /* our local domain name */ - char *emptystring = ""; -@@ -888,7 +889,7 @@ - funix[i] = -1; - } - -- while ((ch = getopt(argc, argv, "a:dhf:l:m:np:rs:v")) != EOF) -+ while ((ch = getopt(argc, argv, "a:cdhf:l:m:np:rs:v")) != EOF) - switch((char)ch) { - case 'a': - if (nfunix < MAXFUNIX) -@@ -896,6 +897,9 @@ - else - fprintf(stderr, "Out of descriptors, ignoring %s\n", optarg); - break; -+ case 'c': /* don't compress repeated messages */ -+ Compress = 0; -+ break; - case 'd': /* debug */ - Debug = 1; - break; -@@ -1240,7 +1244,7 @@ - - int usage() - { -- fprintf(stderr, "usage: syslogd [-drvh] [-l hostlist] [-m markinterval] [-n] [-p path]\n" \ -+ fprintf(stderr, "usage: syslogd [-cdrvh] [-l hostlist] [-m markinterval] [-n] [-p path]\n" \ - " [-s domainlist] [-f conffile]\n"); - exit(1); - } -@@ -1703,7 +1707,7 @@ - /* - * suppress duplicate lines to this file - */ -- if ((flags & MARK) == 0 && msglen == f->f_prevlen && -+ if (Compress && (flags & MARK) == 0 && msglen == f->f_prevlen && - !strcmp(msg, f->f_prevline) && - !strcmp(from, f->f_prevhost)) { - (void) strncpy(f->f_lasttime, timestamp, 15); ---- ./sysklogd.8.orig 2014-10-04 14:47:18.000000000 -0500 -+++ ./sysklogd.8 2016-06-29 01:59:45.311525189 -0500 -@@ -10,6 +10,7 @@ - .RB [ " \-a " - .I socket - ] -+.RB [ " \-c " ] - .RB [ " \-d " ] - .RB [ " \-f " - .I config file -@@ -83,6 +84,11 @@ - described by the people from OpenBSD at - <http://www.guides.sk/psionic/dns/>. - .TP -+.B "\-c" -+Disable the repeating line compression that normally suppresses the -+repeated lines and logs a message such as 'last message repeated 124 -+times'. With this option, all repeated lines will be logged. -+.TP - .B "\-d" - Turns on debug mode. Using this the daemon will not proceed a - .BR fork (2) diff --git a/source/a/sysklogd/sysklogd.union.wait.int.diff b/source/a/sysklogd/sysklogd.union.wait.int.diff deleted file mode 100644 index 7bbc1944..00000000 --- a/source/a/sysklogd/sysklogd.union.wait.int.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ./syslogd.c.orig 2014-10-04 14:47:18.000000000 -0500 -+++ ./syslogd.c 2018-02-03 15:04:06.324301613 -0600 -@@ -2094,7 +2094,7 @@ - (void) signal(SIGCHLD, reapchild); /* reset signal handler -ASP */ - wait ((int *)0); - #else -- union wait status; -+ int status; - - while (wait3(&status, WNOHANG, (struct rusage *) NULL) > 0) - ; diff --git a/source/a/sysklogd/sysklogd.url b/source/a/sysklogd/sysklogd.url new file mode 100644 index 00000000..d1fe076d --- /dev/null +++ b/source/a/sysklogd/sysklogd.url @@ -0,0 +1 @@ +https://github.com/troglobit/sysklogd diff --git a/source/a/sysklogd/use_memmove_not_strcpy.diff b/source/a/sysklogd/use_memmove_not_strcpy.diff deleted file mode 100644 index 8fb7c504..00000000 --- a/source/a/sysklogd/use_memmove_not_strcpy.diff +++ /dev/null @@ -1,15 +0,0 @@ -Adapted from this upstream git commit: 2a80f8117f40dc6a3fce30c6d0f15f3c5af55ccf -http://git.infodrom.org/?p=infodrom/sysklogd;a=commit;h=2a80f8117f40dc6a3fce30c6d0f15f3c5af55ccf - -diff -Nur sysklogd-1.5.orig//syslogd.c sysklogd-1.5/syslogd.c ---- sysklogd-1.5.orig//syslogd.c 2007-07-04 14:04:01.000000000 -0500 -+++ sysklogd-1.5/syslogd.c 2010-10-14 13:12:15.808000011 -0500 -@@ -2392,7 +2392,7 @@ - if (*p == '\0' || *p == '#') - continue; - #if CONT_LINE -- strcpy(cline, p); -+ memmove(cline, p, strlen(p)+1); - #endif - for (p = strchr(cline, '\0'); isspace(*--p);); - #if CONT_LINE |