# # spec file for package syslogd (Version 1.4.1) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: syslogd %define omc_prefix /usr/share/omc %define omc_svcdir %{omc_prefix}/svcinfo.d License: GPL v2 or later Group: System/Daemons PreReq: klogd Provides: syslog Autoreqprov: on Version: 1.4.1 Release: 623 Summary: The Syslog daemon Source: sysklogd-1.4.1.tar.bz2 Source1: logrotate.syslog Source2: sysconfig.syslog Source3: rc.syslog Source4: rc.earlysyslog Source5: syslog.xml Patch0: sysklogd-1.4.1.dif Patch1: sysklogd-1.4.1-dgram.patch Patch2: sysklogd-1.4.1-sparc.patch Patch3: sysklogd-1.4.1-forw.patch Patch4: sysklogd-1.4.1-fileleak.patch Patch5: sysklogd-ipv6.diff Patch6: sysklogd-1.4.1-klogd24.dif Patch7: sysklogd-1.4.1-large.patch Patch8: sysklogd-1.4.1-dns.patch Patch9: sysklogd-1.4.1-reopen.patch Patch10: sysklogd-1.4.1-no_SO_BSDCOMPAT.diff Patch11: sysklogd-1.4.1-owl-crunch_list.diff Patch12: sysklogd-1.4.1-ksyslogsize.diff Patch13: sysklogd-1.4.1-unix_sockets.patch Patch14: sysklogd-1.4.1-showpri.patch Patch15: sysklogd-1.4.1-preserve_percents.patch Patch16: sysklogd-1.4.1-utf8.patch Patch17: sysklogd-1.4.1-ksym.patch Patch18: sysklogd-1.4.1-dontsleep.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The syslogd daemon is the general system logging daemon, which is responsible for handling requests for syslog services. This version of syslogd is similar to the standard Berkeley product, but with a number of compatible extensions. Authors: -------- Dr. Greg Wettstein Stephen Tweedie Juha Virtanen Shane Alderton %package -n klogd PreReq: %insserv_prereq %fillup_prereq Provides: sysklogd Provides: syslogd:/sbin/klogd Requires: /etc/init.d/network Summary: The kernel log daemon Group: System/Daemons %description -n klogd The klogd daemon 'listens' to kernel log messages, prioritizes them, and routes them to either output files or to syslog daemon. This version of klogd will optionally translate kernel addresses to their symbolic equivalents if provided with a system map. Authors: -------- Dr. Greg Wettstein Stephen Tweedie Juha Virtanen Shane Alderton %prep %setup -n sysklogd-1.4.1 %patch1 -p0 -b .dgram %patch2 -p0 -b .sparc %patch3 -p0 -b .forw %patch4 -p0 -b .fileleak %patch5 -p0 -b .ipv6 %patch6 -p0 -b .klogd24 %patch7 -p0 -b .large %patch8 -p1 -b .dns %patch9 -p0 -b .reopen %patch10 -p0 -b .sobsd %patch11 -p1 -b .owlcr %patch12 -p1 -b .klsize %patch13 -p0 -b .usock %patch14 -p0 -b .shprio %patch15 -p1 -b .presperc %patch16 -p1 -b .utf8 %patch17 -p1 -b .ksym %patch18 -p1 -b .sleep %patch0 -p0 %build %ifarch s390 s390x mv sample-s390.conf sample.conf %endif # honor the increased LOG_BUF_LEN in kernel/printk.c make LOG_BUFFER_SIZE=-DLOG_BUFFER_SIZE=131072 %install mkdir -p $RPM_BUILD_ROOT/{sbin,etc} mkdir -p $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man{5,8} mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates make install MANDIR=%{_mandir} DESTDIR=$RPM_BUILD_ROOT ln -sf ../etc/init.d/syslog $RPM_BUILD_ROOT/sbin/rcsyslog install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/syslog install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 754 %{SOURCE3} $RPM_BUILD_ROOT/etc/init.d/syslog install -m 754 %{SOURCE4} $RPM_BUILD_ROOT/etc/init.d/earlysyslog install -d $RPM_BUILD_ROOT/%{omc_svcdir}/ install -m 600 %{SOURCE5} $RPM_BUILD_ROOT/%{omc_svcdir}/ %ifarch s390 s390x sed 's/^KERNEL_LOGLEVEL=1/KERNEL_LOGLEVEL=7/' %{SOURCE2} \ > $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.syslog %endif %post # # add syslog variables provided by klogd if needed # %{fillup_and_insserv -npy syslog syslog} %{fillup_and_insserv -npY syslog earlysyslog} # # check if daemon configured in SYSLOG_DAEMON is # installed and switch to ourself if it's missed # source etc/sysconfig/syslog replace_syslog=no if test "$SYSLOG_DAEMON" != "syslogd" ; then if test -z "$SYSLOG_DAEMON" || \ test ! -x sbin/${SYSLOG_DAEMON} ; then replace_syslog=yes fi fi if test "$replace_syslog" == "yes" ; then sed -i -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON="syslogd"/g' \ etc/sysconfig/syslog fi # # create dirs, touch log default files # mkdir -p var/log touch var/log/messages; chmod 640 var/log/messages touch var/log/boot.log; chmod 640 var/log/boot.log touch var/log/mail; chmod 640 var/log/mail touch var/log/mail.info; chmod 640 var/log/mail.info touch var/log/mail.warn; chmod 640 var/log/mail.warn touch var/log/mail.err; chmod 640 var/log/mail.err test -f var/log/news && mv var/log/news var/log/news.bak mkdir -p -m 0750 var/log/news chown news:news var/log/news touch var/log/news/news.crit; chmod 640 var/log/news/news.crit chown news:news var/log/news/news.crit touch var/log/news/news.err; chmod 640 var/log/news/news.err chown news:news var/log/news/news.err touch var/log/news/news.notice; chmod 640 var/log/news/news.notice chown news:news var/log/news/news.notice %preun %stop_on_removal syslog %postun %restart_on_update syslog %{insserv_cleanup} # reset SYSLOG_DAEMON variable if test -f etc/sysconfig/syslog ; then source etc/sysconfig/syslog if test "$SYSLOG_DAEMON" == "syslogd" ; then sed -i -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON=""/g' \ etc/sysconfig/syslog fi fi %preun -n klogd %stop_on_removal syslog %postun -n klogd %restart_on_update syslog %{insserv_cleanup} %files %defattr(-,root,root) %config %verify(not mode) /etc/syslog.conf %doc %{_mandir}/man5/syslog.conf.5.gz %doc %{_mandir}/man8/syslogd.8.gz /sbin/syslogd %files -n klogd %defattr(-,root,root) /var/adm/fillup-templates/sysconfig.syslog %config(noreplace) /etc/logrotate.d/syslog %config /etc/init.d/syslog %config /etc/init.d/earlysyslog %doc %{_mandir}/man8/klogd.8.gz %doc %{_mandir}/man8/sysklogd.8.gz /sbin/rcsyslog /sbin/klogd %dir %{omc_prefix}/ %dir %{omc_svcdir}/ %{omc_svcdir}/syslog.xml %changelog * Thu Aug 09 2007 - olh@suse.de - remove inclusion of asm/bitops.h * Mon Jun 18 2007 - coolo@suse.de - don't sleep during boot - and rather sync the logfile * Mon May 14 2007 - mt@suse.de - Bug #256671: Changed default value of SYSLOG_DAEMON variable in /etc/sysconfig/syslog to "" (autodetect), adopted description. Added check to init scripts, that sets SYSLOG_DAEMON variable to one of the currently installed daemons in case it is empty or not up-to-date. Added reset of the variable in rpm postun. * Tue Jan 09 2007 - mt@suse.de - Changed to install syslog.xml to /usr/share/omc/svcinfo.d, fate #301833. * Thu Jan 04 2007 - mt@suse.de - Added syslogd path to processInformation tag in syslog.xml and moved it to klogd file list; used by syslog-ng too (FATE #301833) - Improved run-time switch from syslogd to syslog-ng (bug #166933) * Mon Dec 11 2006 - mskibbe@suse.de - add service xml file * Wed Nov 15 2006 - werner@suse.de - Require rcnetwork due rcsyslog script does it (bug #214297) * Wed Sep 13 2006 - mt@suse.de - Feature #300891: Remove SuSEconfig dependency of syslog-ng * Adopted /etc/init.d/syslog script to append additional sockets using -a options for syslog-ng as well. * Thu Aug 24 2006 - werner@suse.de - Just use to to the same * Fri Aug 18 2006 - aj@suse.de - Fix build. * Tue Jul 11 2006 - werner@suse.de - Enable run-time switch from syslogd to syslog-ng (bug #166933) * Mon May 22 2006 - schwab@suse.de - Don't strip binaries. * Wed Feb 15 2006 - mt@suse.de - Added log rotation for /var/log/news/news.* files * Wed Feb 08 2006 - werner@suse.de - Prevent directly the fortified cpp macros of the system syslog function and revert the skip of _FORTIFY_SOURCE. * Wed Feb 08 2006 - werner@suse.de - Skip _FORTIFY_SOURCE for klogd/syslogd to be able to use our own functions without any filter (bug #147363) * Wed Jan 25 2006 - mls@suse.de - converted neededforbuild to BuildRequires * Tue Dec 20 2005 - ro@suse.de - remove explicit requires for devs * Wed Oct 05 2005 - werner@suse.de - Enable 64 bit file interface * Thu Sep 29 2005 - dmueller@suse.de - add norootforbuild * Tue Sep 20 2005 - werner@suse.de - Avoid broken function implementation by fortified header * Mon Jul 25 2005 - mt@suse.de - Bug #94743: Added note to the logrotate.syslog file about changing log file permissions in case syslog-ng is used. * Fri Jun 17 2005 - werner@suse.de - Use -fpie/-pie * Tue May 24 2005 - werner@suse.de - Fix of the priority and facility patch: do not pass SHOWPRI flag if no no facility and priority values are used (bug #85453). * Tue Apr 19 2005 - aj@suse.de - Fix messages. * Wed Mar 09 2005 - ro@suse.de - added split-provides for klogd * Tue Mar 08 2005 - mt@suse.de - Bug #71264: added stop_on_removal/restart_on_removal to the spec file, fixed try-restart action in the init script * Mon Mar 07 2005 - mt@suse.de - Bug #71085: removed syslog requirement from klogd sub-package * Fri Feb 11 2005 - mt@suse.de - fixed rpm post-install script to switch SYSLOG_DAEMON to ourself if it is set to a daemon that is not installed (happens if we replace a syslog-ng installed before) - fixed init scripts to not to report failures on stop * Fri Feb 11 2005 - ro@suse.de - split off klogd package - provide "syslog" * Thu Jan 27 2005 - werner@suse.de - Add UTF8 compatibility (bug #49980) - Make early syslog more smooth for e.g. rcsyslog restart * Tue Jan 25 2005 - ro@suse.de - change klogd params from "-2" to "-x" by default * Thu Jan 20 2005 - coolo@suse.de - only skip syslog start when booting into init 5 * Mon Jan 10 2005 - coolo@suse.de - add an early syslog that is started before network and checks for hostnames in syslog.conf * Thu Dec 16 2004 - werner@suse.de - Add preserve percents patch to fix bug #49228 - Be sure that recvfrom() is awaken by SIGALRM and SIGTERM * Tue Nov 16 2004 - werner@suse.de - Quieten the build * Fri Oct 15 2004 - werner@suse.de - Add two patches from sgi (bug #46783) * Add logging on UNIX sockets * Add priority and facility marks in the log messages * Thu Aug 19 2004 - od@suse.de - removed creation of unused /dev/:[0-5]; GetDevices of xorg-x11.rpm uses /dev/tty0 to find the virtual terminal of a local X-server (#43931) * Thu Jul 29 2004 - od@suse.de - klogd now reads log buffer size from kernel. Falls back to probing as in dmesg (#39761). * Tue May 18 2004 - werner@suse.de - Correct last change * Mon May 17 2004 - werner@suse.de - No more symbol and EIP translation for 2.6 kernels (#40651) * Mon Apr 19 2004 - werner@suse.de - Fix syslogd argument list handling (fix from Solar Designer) * Wed Mar 24 2004 - werner@suse.de - Be prepared for udev (bug #36671) * Thu Jan 29 2004 - werner@suse.de - Enable sample-s390.conf also for s390x (aka zSeries?, bug #34153) * Mon Sep 29 2003 - kukuk@suse.de - Use SO_BSDCOMPAT only if defined * Tue Sep 16 2003 - werner@suse.de - Clean last klogd24.dif * Tue Sep 09 2003 - werner@suse.de - Is there a 128bit lseek around? Use some workarounds to get lseek working above LONG_MAX on x86_64 on /dev/kmem (kernel bug?) * Mon Sep 08 2003 - werner@suse.de - Use special seek routine for signless addresses, fixes crash on i386. * Wed Sep 03 2003 - werner@suse.de - Change symbol addresses to __off64_t and sizes to size_t (#28639) * Tue Aug 26 2003 - mt@suse.de - bug #28949: added new 'Config' meta data to sysconfig file - bug #27971: reconnect to log socket if a write fails with ECONNREFUSED or ENOTCONN, e.g. if the log socket has been reopened by "rcsyslog reload" while syslog-ng is used. new patch file: sysklogd-1.4.1-reopen.patch * Fri Aug 15 2003 - kukuk@suse.de - Add devs to PreReq and don't create xconsole device itself * Thu Aug 07 2003 - werner@suse.de - Change permissions of mail log files (bug #28561) * Mon Jul 28 2003 - werner@suse.de - Fix trivial bug #27072: use warning instead of warn * Fri Jul 25 2003 - schwab@suse.de - Fix uses of chown in %%post script. * Fri Jul 18 2003 - werner@suse.de - Add DNS timeout patch from Olaf Kirch * Tue May 20 2003 - werner@suse.de - Use large file support, gnore signal SIGXFSZ (bug #26960) * Wed May 14 2003 - kukuk@suse.de - Fix klogd to build independend of installed kernel headers. klogd still does not work with 2.5.xx correct. * Wed Apr 16 2003 - coolo@suse.de - fixing s390 build * Wed Apr 16 2003 - coolo@suse.de - use BuildRoot * Mon Feb 24 2003 - schwab@suse.de - Add workaround for use of kernel headers. * Fri Jan 31 2003 - werner@suse.de - Add some code for supporting syslog-ng - Split off boot script and sysconfig file from patch * Wed Jan 08 2003 - werner@suse.de - bug #22695: add missed meta data within sysconfig file - bug #22551: do not let read any user /var/log/messages * Wed Dec 11 2002 - werner@suse.de - New log files for sorting priorities of mail messages (# 22394) * Tue Nov 05 2002 - ro@suse.de - fillup/sysconfig.syslog: set kernel loglevel to 7 on s390/s390x * Mon Oct 14 2002 - ro@suse.de - moved logrotate config for syslog's files to this package - changed create to 640 for /var/log/mail (#20816) * Mon Oct 07 2002 - olh@suse.de - honor the increased LOG_BUF_LEN in kernel/printk.c (#19888) LOG_BUFFER_SIZE=131072 * Tue Sep 10 2002 - olh@suse.de - provides syslog for hotplug * Wed Aug 28 2002 - nashif@suse.de - fixed PreReq to use macros * Fri Aug 23 2002 - werner@suse.de - Enable the `-2' of klogd option for clean and untraced oops. * Fri Aug 16 2002 - werner@suse.de - Add PreReq (bug #18004) - Change order of main and ipv6 patch * Fri Aug 02 2002 - kukuk@suse.de - Add patch to enable IPv6 support (based on the USAGI version plus some fixes for IPv4 only). * Wed Jul 17 2002 - poeml@suse.de - run with additional sockets from SYSLOGD_ADDITIONAL_SOCKET_* that other packages can fill up into /etc/sysconfig/syslog * Mon Mar 04 2002 - zoz@suse.de - Change Required from $network to network * Mon Mar 04 2002 - ro@suse.de - postinstall-script: disable perl-hack (-p for fillup_and_insserv) - no extra insserv call * Thu Feb 14 2002 - werner@suse.de - Fix the bug fix * Thu Feb 14 2002 - werner@suse.de - Fix bug #12747: move to fillup_and_insserv and sysconfig scheme * Wed Sep 19 2001 - ro@suse.de - fixed typo in rc_script SYSLOGD_PARAM -> SYSLOGD_PARAMS (#10950) * Thu Aug 30 2001 - werner@suse.de - Fix bug #9096 - Make TAB a printable character * Fri Jun 15 2001 - schwab@suse.de - Don't define __KERNEL__. * Tue May 29 2001 - werner@suse.de - Update to version 1.4.1 - Porting our patches to this version * Fri Apr 27 2001 - mt@suse.de - added syslog-ng hook in init script * Tue Apr 17 2001 - werner@suse.de - Avoid zero bytes from kernel messages * Thu Jan 11 2001 - werner@suse.de - Correct deep or relative symlink rcsyslog * Thu Jan 11 2001 - werner@suse.de - Move syslogd and klogd to /sbin - Change Required from $remote_fs to $network * Thu Dec 07 2000 - werner@suse.de - Change boot.log to localmessages and add local0 upto local7 * Mon Dec 04 2000 - ro@suse.de - added var/log/boot.log * Tue Nov 28 2000 - ro@suse.de - fixed startscript * Mon Nov 13 2000 - ro@suse.de - fixed to compile on 2.4 kernel header * Tue Oct 17 2000 - bk@suse.de - add sample-s390.conf for s390. * Thu Sep 14 2000 - werner@suse.de - Fix format handling within Syslog() * Wed Sep 13 2000 - werner@suse.de - Fix the two printline bugs in syslogd.c * Tue Sep 12 2000 - werner@suse.de - Fix missed format * Wed May 24 2000 - schwab@suse.de - Fix resource leak. * Tue Feb 29 2000 - schwab@suse.de - Fix type of last arg to recvfrom - Add group tag. * Sun Feb 27 2000 - kukuk@suse.de - Move /usr/man -> /usr/share/man * Fri Feb 11 2000 - werner@suse.de - The pid file is /var/run/syslogd.pid not /var/run/syslogd.conf * Wed Nov 17 1999 - kukuk@suse.de - Add fix to syslogd for SIGHUP race condition * Thu Nov 04 1999 - werner@suse.de - next typo fix in comment in /etc/syslogd.conf * Thu Nov 04 1999 - bs@suse.de - typo fix in comment in /etc/syslogd.conf * Tue Oct 26 1999 - mge@suse.de - (sysklogd-1.3-forw.patch) Andreas Siegert Added -t flag that triggers tagging of forwarded messages with the sending hosts name as seen by the forwarder. Useful for relaying syslog from DMZs through the firwall to an internal loghost. Format is "<""hostname" * Fri Oct 08 1999 - werner@suse.de - New version 1.3.33 * Fri Oct 01 1999 - werner@suse.de - Udatet version of nodos patch * Fri Sep 24 1999 - werner@suse.de - Disable *.alert message on root tty's * Mon Sep 13 1999 - bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Fri Sep 10 1999 - ro@suse.de - fixed nodos patch * Mon Sep 06 1999 - werner@suse.de - Avoid possible crash if no kernel symbols are available. * Fri Sep 03 1999 - werner@suse.de - Update to new version 1.3.32 - Add sparc patch - Add security patch (DOS) - Make it work with alpha (time_t and size_t) - wallmsg() only for user processes marked in utmp - The last character of al kernel log is ascii null - Lock fd of the socket to the syslogd * Thu Sep 02 1999 - werner@suse.de - Use RPM_OPT_FLAGS - Use a pipe to redirect console message to xconsole - Make reading of ring buffer an (undocumented) option (-r reading, -R reading and clearing, both one shot) * Tue Aug 31 1999 - werner@suse.de - Use 16k buffer because newer kernels do have such a big log - Avoid trouble due longjmp and fork with a few variables * Tue Aug 31 1999 - werner@suse.de - Use sysctl argument 3 (Read up to the last 4k of messages in the ring buffer) instead of 2 (Read from the log) if one shot method for klogd is used. * Sat Aug 21 1999 - garloff@suse.de - syslog.conf: Only write *.crit synchronously * Fri Jan 08 1999 - florian@suse.de - /var/log/news should be owned by news.news * Thu Jan 07 1999 - bs@suse.de - fixed comment in syslog.conf * Mon Dec 14 1998 - ro@suse.de - removed noreplace from syslogd.conf: necessary change for news-logs * Fri Dec 11 1998 - ro@suse.de - split up news logs * Wed Dec 09 1998 - ro@suse.de - changed syslog.conf to back to suse-defaults * Tue Dec 08 1998 - ro@suse.de - updated init script and added link rcsyslog * Mon Dec 07 1998 - ro@suse.de - update to 1.3-30 - syslog.conf marked as config(noreplace) * Fri Dec 04 1998 - ro@suse.de - bootscript: silently restart if already running on "start" * Wed Dec 02 1998 - werner@suse.de - New boot script syslog * Mon Jun 22 1998 - ro@suse.de - used patches from trevor@jpj.net to build for glibc: - renamed syslogd's dprintf to syslog_dprintf - don't declare sys_errlist - use sys/time.h instead of linux/time.h * Tue Mar 10 1998 - ro@suse.de - react if KERNEL_LOGLEVEL="" - added SYSLOGD_PARAMS * Tue Mar 10 1998 - ro@suse.de - added KERNEL_LOGLEVEL to fillup for rc.config and rcfile * Fri Feb 27 1998 - florian@suse.de - removed duplicate entry for news messages in syslog.conf * Wed Oct 22 1997 - ro@suse.de - removed doinst.sh from specfile-filelist * Sun Jun 01 1997 - bs@suse.de - don't include log files under var/log but touch them in doinst.sh * Thu May 29 1997 - bs@suse.de - cleared var/log/warn * Wed Apr 30 1997 - florian@suse.de - add lots of fixes from debian and other places - new /etc/syslog.conf: mail/news messages are in separate files * Wed Apr 30 1997 - bs@suse.de added & when starting syslogd. * Thu Jan 02 1997 - bs@suse.de runlevel value changed to S09 and K35 * Thu Jan 02 1997 - florian@suse.de - klogd liest jetzt wieder die System.map ein. - Neue Option "-x", mit der man das Lesen der System.map abschalten kann. - Start- und Stop-Scripte sind jetzt im Paket und nicht mehr in aaa_base.tgz.