From 09b0b2910c42fdd924ac17083de67ae2eca01772b4b85ac3154a388dc7cf9815 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Wed, 12 Aug 2009 23:32:50 +0000 Subject: [PATCH] Accepting request 17595 from Base:System Copy from Base:System/syslogd based on submit request 17595 from user WernerFink OBS-URL: https://build.opensuse.org/request/show/17595 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/syslogd?expand=0&rev=19 --- sysklogd-1.4.1-sysmap-prior-to-2.5.patch | 64 ++++ syslogd.changes | 6 + syslogd.spec | 373 +---------------------- 3 files changed, 74 insertions(+), 369 deletions(-) create mode 100644 sysklogd-1.4.1-sysmap-prior-to-2.5.patch diff --git a/sysklogd-1.4.1-sysmap-prior-to-2.5.patch b/sysklogd-1.4.1-sysmap-prior-to-2.5.patch new file mode 100644 index 0000000..a09c33e --- /dev/null +++ b/sysklogd-1.4.1-sysmap-prior-to-2.5.patch @@ -0,0 +1,64 @@ +From: Jeff Mahoney +Subject: klogd: Silence System.map and symbol lookup warnings with modern kernels +References: bnc#505421 + + klogd complains about not being able to parse the version of System.map and + about not being able to load the kernel module symbol table. + + Since kernels starting with 2.5 accurately report their own symbol table in + Oopses, this is no longer necessary. The warnings are a harmless annoyance, + but an annoyance nonetheless. + + This patch detects if the running kernel is newer newer than 2.5.0 and + disables the symbol lookup on startup, thus avoiding the warnings. + +Signed-off-by: Jeff Mahoney +--- + klogd.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +--- sysklogd-1.4.1/klogd.c ++++ sysklogd-1.4.1/klogd.c 2009-08-12 14:19:17.333901686 +0200 +@@ -275,6 +275,8 @@ + #define ksyslog klogctl + #endif + ++#include ++ + #define LOG_BUFFER_SIZE 4096 + #define LOG_LINE_LENGTH 1000 + +@@ -999,6 +1001,23 @@ + } + } + ++#ifndef KERNEL_VERSION ++#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) ++#endif ++ ++static int ++need_lookup(void) ++{ ++ struct utsname utsname; ++ int major, minor, patch; ++ if (uname(&utsname) < 0) { ++ Syslog(LOG_ERR, "Cannot get kernel version information."); ++ return 0; ++ } ++ sscanf(utsname.release, "%d.%d.%d", &major, &minor, &patch); ++ ++ return (KERNEL_VERSION(major, minor, patch) < KERNEL_VERSION(2,5,0)); ++} + + int main(argc, argv) + +@@ -1166,6 +1185,9 @@ + else + openlog("kernel", 0, LOG_KERN); + ++ /* We don't need lookups on kernels > 2.4 */ ++ if (symbol_lookup) ++ symbol_lookup = need_lookup(); + + /* Handle one-shot logging. */ + if ( one_shot ) diff --git a/syslogd.changes b/syslogd.changes index 76ff946..65eed61 100644 --- a/syslogd.changes +++ b/syslogd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 11 23:47:12 CEST 2009 - jeffm@suse.de + +- klogd: Silence System.map and symbol lookup warnings on modern + kernels (bnc#505421) + ------------------------------------------------------------------- Thu Oct 16 12:07:20 CEST 2008 - werner@suse.de diff --git a/syslogd.spec b/syslogd.spec index d7f0239..8b2c1bf 100644 --- a/syslogd.spec +++ b/syslogd.spec @@ -1,7 +1,7 @@ # # spec file for package syslogd (Version 1.4.1) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,7 +27,7 @@ PreReq: coreutils %fillup_prereq klogd sed Provides: syslog AutoReqProv: on Version: 1.4.1 -Release: 708 +Release: 709 Summary: The Syslog daemon Source: sysklogd-1.4.1.tar.bz2 Source1: logrotate.syslog @@ -58,6 +58,7 @@ Patch18: sysklogd-1.4.1-dontsleep.patch Patch19: sysklogd-1.4.1-signal.dif Patch20: sysklogd-1.4.1-clearing.patch Patch21: sysklogd-1.4.1-nofortify.patch +Patch22: sysklogd-1.4.1-sysmap-prior-to-2.5.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -124,6 +125,7 @@ Authors: %patch19 -p0 -b .signal %patch20 -p0 -b .clear %patch21 -p0 -b .nofortify +%patch22 -p1 -b .sysmap %patch0 -p0 %build @@ -238,370 +240,3 @@ fi %{omc_svcdir}/syslog.xml %changelog -* Thu Oct 16 2008 werner@suse.de -- Let's avoid currants in shell code of boot script (bnc#435525) -* Thu Oct 02 2008 mt@suse.de -- Fixed start in /etc/init.d/syslog script to restart rsyslogd - with correct config when running in early mode (bnc#431599), - changed to use earlysyslog in runleves 2 and 3 as well. -* Wed Sep 03 2008 mt@suse.de -- Added log files used by syslog-ng (and rsyslog) daemons to the - /etc/logrotate.d/syslog file. Added logrotate to klogd requires. -- Added rsyslog support to the /etc/init.d/syslog and earlysyslog - init scripts. -* Fri Aug 22 2008 ro@suse.de -- remove deprecated options from fillup_and_insserv call -* Wed Aug 13 2008 werner@suse.de -- Fix boot script and use correct Stop tags -* Fri May 30 2008 werner@suse.de -- No flock() as this seems to be broken in newer glibc (bnc#395114) -- No fortify, make sylog function of klogd private (bnc#395666) -* Wed May 28 2008 werner@suse.de -- Be able to write errors on writing pid file to tty (bnc#394787) -* Tue May 20 2008 mt@suse.de -- Added syslog(8) meta manual page to klogd package describing the - syslog service (SYSLOG_DAEMON variable) handling (bnc#373960). -* Thu May 08 2008 werner@suse.de -- Clean syslog boot script and replace mkfifo with mknod (bnc#382236) -* Thu Apr 03 2008 mkoenig@suse.de -- readd removed defines for svcinfo path -* Tue Apr 01 2008 mkoenig@suse.de -- remove dir /usr/share/omc/svcinfo.d as it is provided now - by filesystem -* Wed Mar 26 2008 werner@suse.de -- Do not exit within signal handlers -- Avoid race condition between fork() and signal handling -- Use setsid() only once -* Thu Jan 24 2008 werner@suse.de -- Add missing prerequirements (bug #355801) -* 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 -* Thu Sep 20 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 -* Wed Oct 18 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 -* Sat Feb 12 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 -* Tue Sep 07 1999 werner@suse.de -- Avoid possible crash if no kernel symbols are available. -* Sat Sep 04 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) -* Wed Sep 01 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 -* Tue Dec 15 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.