Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > ed2aa41cfff1bfba77ecfcc3009ef4bb > files > 5

sysklogd-1.4.1-7mdk.src.rpm

# rh 1.4.1-5

Summary:	System logging and kernel message trapping daemons.
Name:		sysklogd
Version:	1.4.1
Release: 	7mdk
License:	GPL
Group:		System/Kernel and hardware 
URL:		http://www.infodrom.org/projects/sysklogd/
Source:		ftp://sunsite.unc.edu/pub/Linux/system/daemons/%{name}-%{version}rh.tar.bz2
Patch0:		sysklogd-1.4.1rh-mdkconf.patch.bz2
Patch1: 	sysklogd-1.4rh-do_not_use_initlog_when_restarting.patch.bz2
Patch2:		sysklogd-1.4.1-owl-syslogd-crunch_list.diff.bz2
Prereq:		fileutils, /sbin/chkconfig, initscripts >= 5.60
Requires:	logrotate >= 3.3-8mdk, bash >= 2.0
Prereq:		rpm-helper
Provides:	syslog-daemon
BuildRoot:	%{_tmppath}/%{name}-root

%description
The sysklogd package contains two system utilities (syslogd and klogd)
which provide support for system logging.  Syslogd and klogd run as
daemons (background processes) and log system messages to different
places, like sendmail logs, security logs, error logs, etc.

%prep

%setup -q -n %{name}-%{version}rh
%patch0 -p1 -b .mkdconf
%patch1 -p1 -b .initlog
%patch2 -p1 -b .sec

%build

%serverbuild

%make

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}{/etc,%{_bindir},%{_mandir}/man{5,8},/usr/sbin}
install -d %{buildroot}/etc/{rc.d/init.d,logrotate.d,sysconfig}
install -d %{buildroot}/sbin

make install TOPDIR=%{buildroot} MANDIR=%{buildroot}%{_mandir} \
	MAN_OWNER=`id -nu`

install -m644 redhat/syslog.conf.rhs %{buildroot}/etc/syslog.conf
install -m755 redhat/syslog.init %{buildroot}/etc/rc.d/init.d/syslog
install -m644 redhat/syslog.log %{buildroot}/etc/logrotate.d/syslog
install -m644 redhat/syslog %{buildroot}/etc/sysconfig/syslog

chmod 755 %{buildroot}/sbin/syslogd
chmod 755 %{buildroot}/sbin/klogd

%pre
# Because RPM do not know the difference about a file or a directory,
# We need to verify if there is no file with the same name as the directory
# we want to create for the new logdir architecture.
# If the name is the same and it is a file, rename it to name.old
for file in mail cron kernel lpr news daemons; do
	if [ -f /var/log/$file ]; then 
		mv -f /var/log/$file /var/log/$file.old \
		&& mkdir /var/log/$file && mv /var/log/$file.old /var/log/$file/$file.old  
	fi
done

%post
# Create each log directory with logfiles : info, warnings, errors :
for dir in /var/log/{mail,cron,kernel,lpr,news,daemons}; do
    [ -d $dir ] || mkdir ${dir}
    for file in $dir/{info,warnings,errors}; do
        [ -f $file ] || touch $file && chmod 600 $file
    done
done

# Create standard logfiles if they do not exist:
for file in \
 /var/log/{auth.log,syslog,user.log,messages,secure,spooler,boot.log,explanations};
do
    [ -f $file ] || touch $file && chmod 600 $file
done

%_post_service syslog

%preun
%_preun_service syslog

%postun
if [ "$1" -ge "1" ]; then
	service syslog condrestart > /dev/null 2>&1
fi	

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc ANNOUNCE README* NEWS INSTALL 
%config(noreplace) %{_sysconfdir}/syslog.conf
%config(noreplace) %{_sysconfdir}/sysconfig/syslog
%config(noreplace) %{_sysconfdir}/logrotate.d/syslog
%config(noreplace) %{_initrddir}/syslog
/sbin/*
%{_mandir}/*/*

%changelog
* Wed Jul 13 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 1.4.1-7mdk
- added Provides: syslog-daemon.

* Sun Jun 20 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.4.1-6mdk
- security fix (Vincent Danen)
- misc spec file fixes

* Wed Apr  9 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.4.1-5mdk
- Revert s/fileutils/coreutils/ the latter should provide the former

* Thu Nov 07 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.4.1-4mdk
- prereq: rpm-helper
- rpmlint fixes
- requires s/fileutils/coreutils/

* Wed Aug 14 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.4.1-3mdk
- Automated rebuild with gcc 3.2-0.3mdk

* Mon Mar  4 2002 Frederic Lepied <flepied@mandrakesoft.com> 1.4.1-2mdk
- merged with rh

* Wed Nov 28 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.4.1-1mdk
- 1.4.1
- add the explanations log file for local1.

* Mon Sep 10 2001 Pixel <pixel@mandrakesoft.com> 1.4-12mdk
- sysklogd-1.4rh-do_not_use_initlog_when_restarting:
  why doing this: the pb of initlog being called when syslog is being
  restarted is that minilogd is started to keep the logs waiting for syslog to
  really treat them. Alas with devfs mounted (with or without devfsd),
  minilogd do not exit as it should. I don't know why.
  
  minilogd keeping the logs means its memory usage grows a lot as time goes.
  Restarting syslog mainly happens when upgrading glibc.

* Fri Jun 15 2001 Philippe Libat <philippe@mandrakesoft.com> 1.4-11mdk
- fix news entry

* Thu Mar 29 2001 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.4-10mdk
- recompiled without omit-frame-pointer and ease upgrades (new macros)

* Mon Feb 19 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.4-9mdk
- Add /etc/sysconfig/syslog configuration files.
- Upgrade initscripts (which now get work condrestart).
- Merge with rh package.

* Wed Feb 07 2001 Francis Galiegue <fg@mandrakesoft.com> 1.4-8mdk
- Apply patch1 and patch5 even if non alpha - type enforcing and foolproof
  checks never hurt

* Tue Jan 23 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.4-7mdk
- Don't do busy loop when encounter two zero bytes (Troels Walsted
  Hansen (troels@thule.no)).

* Wed Dec 20 2000 David BAUDENS <baudens@mandrakesoft.com> 1.4-6mdk
- Build on Cooker (sorry... :()

* Wed Dec 20 2000 David BAUDENS <baudens@mandrakesoft.com> 1.4-5mdk
- Fix build for PPC (aka, don't apply sparc & alpha patches on non sparc &
  alpha archs)

* Mon Sep 25 2000 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.4-4mdk
- readded requirement for initscripts (but removed sysklogd 
  requirement in initscripts, see initscripts-5.27-27mdk) to 
  ease install.

* Mon Sep 25 2000 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.4-3mdk
- added postun to restart syslog when upgrading
- sylog script relies on /etc/rc.d/init.d/functions so depends from 
  initscripts; starting and stopping syslog relies also on initscripts.
  But /sbin/initlog called by rc.sysinit from initscripts relies on 
  sysklogd... So for now I remove the initscripts requirement here.

* Fri Sep 22 2000 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.4-2mdk
- added prereq on initscripts
- some cleanup

* Fri Sep 22 2000 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.4-1mdk
- new version with several fixes

* Tue Sep 19 2000 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.3.33-8mdk
- removed news.xxx entries also, they're added by inn package

* Tue Sep 19 2000 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.3.33-7mdk
- removed mail.xxx entries in logrotate conf file

* Tue Sep 19 2000 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.3.33-6mdk
- applied "format bug" patch to correct vulnerability (thanks to V.Danen)

* Thu Sep 14 2000 Renaud Chaillat <rchaillat@mandrakesoft.com> 1.3.33-5mdk
- modified logrotate.d conf file to avoid using * (see logrotate 3.3-9)

* Wed Sep 13 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 1.3.33-4mdk
- applied patch from Grzegorz Nosek <blackfire@go2.pl>,
  pass the system.map for our kernel version as argument to klogd if possible.

* Tue Sep 05 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 1.3.33-3mdk
- create all log file to avoid syslog warning.

- I was knowing that rpm sucked... Now I know that it suck hard.

  %ghost tag isn't able to create a directory, nor to touch file
  in a newly created by the %dir tag directory.
  So I'm creating all file in %post which is dirty.

  The conclusion of all this is that :
  It is good to make good package, but it's even better if you do it without rpm.
  (Thanks to Frederic Lepied who was as frightened as me when he saw that).

- Due to the new logdir architecture, 
  and that RPM can not distinguish a file and a directory :
    - Search for a file of the same name as the directory we wish to create,
      if such file exist, rename it to file.old and put it in the created
      directory in order for it to be rotated.

- In syslog initscript, created separate start and stop function
  (instead of having them in the case), and added a condrestart case which use them.
  This avoid having to re execute the syslog init script.

* Mon Sep 04 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 1.3.33-2mdk
- Completly rewritten syslog configuration
- Updated logrotate configuration file for new syslog config
  (log rotation recurssion is now avoided by logrotate itself, not
   configuration tweak)
- do not create init script link manually

* Fri Aug 25 2000 Frederic Crozat <fcrozat@mandrakesoft.com> 1.3.33-1mdk
- update to 1.3-33
- Use new initrddir macro 
- Correct logrotate config script to prevent rotating previous files

* Thu Aug 10 2000 Frederic Crozat <fcrozat@mandrakesoft.com> 1.3.31-15mdk
- add noreplace to make rpmlint happy

* Fri Jul 28 2000 Frederic Crozat <fcrozat@mandrakesoft.com> 1.3.31-14mdk
- BM + macroszification
- bzipped config files

* Tue May 17 2000 Yoann Vandoorselaere <yoann@mandrakeosft.com> 1.3.31-13mdk
- correct path to killall in syslog.log

* Thu May 04 2000 Yoann Vandoorselaere <yoann@mandrakeosft.com> 1.3.31-12mdk
- create the mail & news log directory.
- update syslog.log

* Tue May 02 2000 Yoann Vandoorselaere <yoann@mandrakeosft.com> 1.3.31-11mdk
- kern.* is now logged to kern.log
- much more logfile now (cron, syslog, kernel, mail.log, mail.warn, 
  mail.err, mail.info, auth.log, user.log, lpr.log, daemon.log ).
- do not sync() not important logfile everytime an entry is added.
- syslog.conf.rhs -> syslog.conf.mdk
- mail & news log are in their own directory.
- again a little config change.

* Thu Mar 23 2000 Daouda Lo <daouda@mandrakesoft.com> 1.3.31-8mdk
- fix group for the next release 7.1
* Tue Oct 26 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Merge with rh changes.

* Sat Apr 10 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com>
- Mandrake adaptions
- bzip2 man/info pages
- add de locale
- fix handling of RPM_OPT_FLAGS

* Wed Feb 24 1999 Bill Nottingham <notting@redhat.com>
- update to sysklogd-1.3-31
- stop klogd *before* syslogd

* Tue Feb  9 1999 Jeff Johnson <jbj@redhat.com>
- escape naked percent chars in kernel messages (#1088).

* Thu Dec 17 1998 Jeff Johnson <jbj@redhat.com>
- rework last-gasp address-in-module oops trace for both 2.0.x/2.1.x modules.

* Mon Dec  7 1998 Jakub Jelinek <jj@ultra.linux.cz>
- make klogd translate SPARC register dumps and oopses.

* Tue Aug 11 1998 Jeff Johnson <jbj@redhat.com>
- add %clean

* Tue Aug  4 1998 Chris Adams <cadams@ro.com>
- only log to entries that are USER_PROCESS (fix #822)

* Mon Jul 27 1998 Jeff Johnson <jbj@redhat.com>
- remove RPM_BUILD_ROOT from %post

* Wed Apr 29 1998 Cristian Gafton <gafton@redhat.com>
- patch to support Buildroot
- package is now buildrooted

* Wed Apr 29 1998 Michael K. Johnson <johnsonm@redhat.com>
- Added exit patch so that a normal daemon exit is not flagged as an error.

* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Wed Oct 29 1997 Donnie Barnes <djb@redhat.com>
- added (missingok) to init symlinks

* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com>
- added status|restart support to syslog.init
- added chkconfig support
- various spec file cleanups

* Tue Jun 17 1997 Erik Troan <ewt@redhat.com>
- built against glibc