CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
sysklogd: updated to 1.5.1
authorVictor Martinez <pitillo@ono.com>
Wed, 5 Apr 2017 04:09:16 +0000 (04:09 +0000)
committerVictor Martinez <pitillo@ono.com>
Wed, 5 Apr 2017 04:09:16 +0000 (04:09 +0000)
sysklogd/.md5sum
sysklogd/Pkgfile
sysklogd/rotatelog
sysklogd/sysklogd
sysklogd/sysklogd.diff [new file with mode: 0644]
sysklogd/syslog
sysklogd/syslog.conf

index 83f4b8ad026f0ba3f7827564a8b2648f50868763..ab0b2d2cc986f74702b9549516bb28c6decfadf0 100644 (file)
@@ -1,5 +1,6 @@
-b379693c8b89c99994e58efd49f98a71  rotatelog
-30b06790cf14ecf843392aba05610b7f  sysklogd
+41dfad9077311e159c793216adf90723  rotatelog
+b34c927b05f072083d801deba5420e80  sysklogd
 c70599ab0d037fde724f7210c2c8d7f8  sysklogd-1.5.1.tar.gz
-bf5c13b44ab9fa15cda9bfa9df9b584e  syslog
-022ca2758664748ae096d57eac9ac555  syslog.conf
+f713765b6840ee73733ff58120de52f5  sysklogd.diff
+844e5e75944beb8cf4f39a0535e56ba4  syslog
+f8d478b8d60c1d3879f4a10a955db6e5  syslog.conf
index 96cea88d061b2df0138987131568b3d20d866066..061a63c83255b67a6fbf2cf5e2e2e27c98426194 100644 (file)
@@ -6,17 +6,16 @@
 
 name=sysklogd
 version=1.5.1
-release=3
+release=6
 source=(http://www.infodrom.org/projects/$name/download/$name-$version.tar.gz \
-        rotatelog syslog syslog.conf sysklogd)
+        rotatelog syslog syslog.conf sysklogd sysklogd.diff)
 
 build() {
   cd $name-$version
 
-  # don't try to fclose(NULL)
-  sed -i -e '192d' ksym_mod.c
+  patch -p1 -i $SRC/sysklogd.diff
 
-  mkdir -p $PKG/usr/sbin \
+  install -d $PKG/usr/sbin \
            $PKG/etc/{cron/weekly,rc.d} \
            $PKG/var/log \
            $PKG/usr/share/man/{man5,man8}
index 7ecb623554fe4e2d9810c476ddfbb7e18434190f..3e790a73ff25b8509e632b4281ce4148d576b770 100755 (executable)
@@ -22,6 +22,6 @@ fi
 [ -f /var/log/old/$1.3 ] && mv /var/log/old/$1.3 /var/log/old/$1.4
 [ -f /var/log/old/$1.2 ] && mv /var/log/old/$1.2 /var/log/old/$1.3
 [ -f /var/log/old/$1.1 ] && mv /var/log/old/$1.1 /var/log/old/$1.2
-[ -f /var/log/$1 ] && (cp /var/log/$1 /var/log/old/$1.1; echo -n "" > /var/log/$1)
+[ -f /var/log/$1 ] && (cp /var/log/$1 /var/log/old/$1.1 && echo -n "" > /var/log/$1)
 
 # End of file
index d14870cae1e0598757297c211d5904142a6a52b2..90a0835253d5b51f34a4d70f0cebf17c8c13207e 100644 (file)
@@ -1,23 +1,45 @@
 #!/bin/sh
 #
-# /etc/rc.d/sysklogd: start/stop sysklogd logging daemons
+# /etc/rc.d/sysklogd: start/stop syslog and klog daemons
 #
 
+SSD=/sbin/start-stop-daemon
+SLOG=/usr/sbin/syslogd
+KLOG=/usr/sbin/klogd
+SLOG_PID=/var/run/syslogd.pid
+KLOG_PID=/var/run/klogd.pid
+
+
+print_status() {
+       $SSD --status --pidfile $2
+       case $? in
+       0) echo "$1 is running with pid $(cat $2)" ;;
+       1) echo "$1 is not running but the pid file $2 exists" ;;
+       3) echo "$1 is not running" ;;
+       4) echo "Unable to determine the program status" ;;
+       esac
+}
+
 case $1 in
 start)
-       /usr/sbin/syslogd
-       /usr/sbin/klogd -c 3
+       $SSD --start --pidfile $SLOG_PID --exec $SLOG
+       $SSD --start --pidfile $KLOG_PID --exec $KLOG -- -c4
        ;;
 stop)
-       /usr/bin/killall syslogd
-       /usr/bin/killall klogd
+       $SSD --stop --retry 10 --pidfile $SLOG_PID 
+       $SSD --stop --retry 10 --pidfile $KLOG_PID 
        ;;
 restart)
        $0 stop
-       sleep 2
        $0 start
        ;;
+status)
+       print_status $SLOG $SLOG_PID
+       print_status $KLOG $KLOG_PID
+       ;;
 *)
-       echo "usage: $0 [start|stop|restart]"
+       echo "usage: $0 [start|stop|restart|status]"
        ;;
 esac
+
+# End of file
diff --git a/sysklogd/sysklogd.diff b/sysklogd/sysklogd.diff
new file mode 100644 (file)
index 0000000..105eeef
--- /dev/null
@@ -0,0 +1,36 @@
+diff -Nru sysklogd-1.5.1.orig/Makefile sysklogd-1.5.1/Makefile
+--- sysklogd-1.5.1.orig/Makefile       2016-08-27 17:05:36.783075199 +0200
++++ sysklogd-1.5.1/Makefile    2016-08-27 17:05:52.512526347 +0200
+@@ -20,7 +20,8 @@
+ CC= gcc
+ #SKFLAGS= -g -DSYSV -Wall
+ #LDFLAGS= -g
+-SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce
++RPM_OPT_FLAGS ?= -O2
++SKFLAGS= $(RPM_OPT_FLAGS) -DSYSV  -Wall
+ # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+ # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
+ # $(shell getconf LFS_SKFLAGS)
+diff -Nru sysklogd-1.5.1.orig/ksym_mod.c sysklogd-1.5.1/ksym_mod.c
+--- sysklogd-1.5.1.orig/ksym_mod.c     2016-08-27 17:05:36.783075199 +0200
++++ sysklogd-1.5.1/ksym_mod.c  2016-08-27 17:05:52.512526347 +0200
+@@ -189,7 +189,6 @@
+               else
+                       Syslog(LOG_ERR, "Error loading kernel symbols " \
+                              "- %s\n", strerror(errno));
+-              fclose(ksyms);
+               return(0);
+       }
+diff -Nru sysklogd-1.5.1.orig/syslogd.c sysklogd-1.5.1/syslogd.c
+--- sysklogd-1.5.1.orig/syslogd.c      2016-08-27 17:05:36.783075199 +0200
++++ sysklogd-1.5.1/syslogd.c   2016-08-27 17:08:12.964223932 +0200
+@@ -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)
+               ;
index 89f71c4be4db4b33191d959c6a92559f5391eac6..5da248deff0a1c861519497a80696ab35e71402e 100755 (executable)
@@ -3,8 +3,10 @@
 # /etc/cron/weekly/syslog: rotate log files
 #
 
-/usr/sbin/rotatelog cron
 /usr/sbin/rotatelog auth
+/usr/sbin/rotatelog cron
+/usr/sbin/rotatelog debug
+/usr/sbin/rotatelog kernel
 /usr/sbin/rotatelog mail
 /usr/sbin/rotatelog messages
 
index 4222a1b43c913f594d232d453b3bf14d7eae1cb3..1851b98753e1ebf40dcd3d56d9fc274070fd146d 100644 (file)
@@ -2,9 +2,12 @@
 # /etc/syslog.conf
 #
 
-*.emerg                                        *
-authpriv.*;auth.*                      /var/log/auth
-mail.*                                 -/var/log/mail
-*.info;authpriv,auth,mail.none         /var/log/messages
+*.emerg                                                *
+kern.*                                         /var/log/kernel
+authpriv,auth.info                             /var/log/auth
+mail.info                                      /var/log/mail
+cron.info                                      /var/log/cron
+*.info;authpriv,auth,mail,cron,kern.none       /var/log/messages
+*.=debug;kern.none                             /var/log/debug
 
 # End of file