Репозиторий Sisyphus
Последнее обновление: 27 сентября 2021 | Пакетов: 17343 | Посещений: 21960980
en ru br
Репозитории ALT
S:1.8.0-alt1
5.1: 1.4.1-alt30
4.1: 1.4.1-alt28
4.0: 1.4.1-alt27
3.0: 1.4.1-alt20
www.altlinux.org/Changes

Группа :: Система/Ядро и оборудование
Пакет: sysklogd

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Name: sysklogd
Version: 1.4.1
Release: alt20

%define syslog_name syslogd
%define ROOT %_localstatedir/klogd

Summary: Base package for system logging and kernel message trapping daemons
License: GPL
Group: System/Kernel and hardware
Url: http://www.infodrom.org/projects/sysklogd/

Source0: http://www.infodrom.org/projects/sysklogd/download/%name-%version.tar.bz2
Source1: syslog.conf
Source2: syslogd.log
Source3: syslogd.init
Source4: syslogd.sysconfig
Source5: klogd.init
Source6: klogd.sysconfig
Source7: reload-syslog

Patch0: %name-1.4.1-up-20040627.patch

# RH

Patch1: %name-1.4.2-rh-alt-alpha.patch
Patch2: %name-1.3-31-rh-utmp.patch
Patch3: %name-1.3-31-rh-ksyslog-nul.patch
Patch4: %name-1.3-31-rh-ksymless.patch

# ALT

Patch11: %name-1.4.2-alt-makefile.patch
Patch12: %name-1.4.1-alt-klogd-reopenlog.patch
Patch13: %name-1.4.1-alt-ksym-leak-fix.patch
Patch14: %name-1.4.1-alt-devnull.patch
Patch15: %name-1.4.2-alt-format.patch

# Owl

Patch21: %name-1.4.1-owl-longjmp.patch
Patch22: %name-1.4.1-owl-syslogd-create-mode.patch
Patch23: %name-1.4.1-caen-owl-syslogd-bind.patch
Patch24: %name-1.4.1-caen-owl-syslogd-drop-root.patch
Patch25: %name-1.4.1-caen-owl-klogd-drop-root.patch
Patch26: %name-1.4.1-owl-syslogd-crunch_list.patch

# ALT

Patch31: %name-1.4.1-alt-syslogd-chroot.patch
Patch32: %name-1.4.1-alt-funix_dir.patch
Patch33: %name-1.4.1-alt-nonblock.patch

PreReq: %syslog_name = %version-%release, klogd = %version-%release
Conflicts: logrotate < 0:3.3-ipl9mdk, vixie-cron < 0:3.0.1-ipl45mdk

BuildPreReq: coreutils, kernel-headers-std

%description
This virtual package contains dependencies on syslogd and klogd.

%package -n %syslog_name
Summary: System logging daemon (%syslog_name)
Group: System/Kernel and hardware
Provides: %syslog_name-daemon
PreReq: syslog-common = %version-%release
PreReq: shadow-utils, service, coreutils, grep, chrooted-resolv, /var/resolv

%description -n %syslog_name
This package contains %syslog_name wich provide support for system logging.
syslogd runs as daemon (background process) and logs system messages to
different places according to a configuration file.

%package -n klogd
Summary: Kernel message trapping daemon (klogd)
Group: System/Kernel and hardware
PreReq: %syslog_name-daemon, shadow-utils, service
Conflicts: %syslog_name < %version-%release

%description -n klogd
This package contains klogd wich provide support for kernel logging.
klogd runs as daemon (background process) and logs kernel messages
via system logger.

%package -n syslog-common
Summary: Common stuff for system logs
Group: System/Kernel and hardware
Provides: /etc/syslog.d

%description -n syslog-common
This package contains log directories structure and logrotate scripts both for
classic syslog and syslog-ng.

%prep
%setup -q

%patch -p1

%patch1 -p1
#%patch2 -p1
#%patch3 -p1
%patch4 -p1

%patch11 -p1
%patch12 -p1
#%patch13 -p1
%patch14 -p1
%patch15 -p1

#%patch21 -p1

%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
#%patch26 -p1

%patch31 -p1
%patch32 -p1
%patch33 -p1

find -type f -name \*.orig -print -delete

%build
%make_build

%install
%__mkdir_p $RPM_BUILD_ROOT{%_mandir/man{5,8},/sbin}

%makeinstall prefix=$RPM_BUILD_ROOT

%__install -pD -m640 %SOURCE1 $RPM_BUILD_ROOT%_sysconfdir/syslog.conf
%__install -pD -m640 %SOURCE2 $RPM_BUILD_ROOT%_sysconfdir/logrotate.d/syslog
%__install -pD -m755 %SOURCE3 $RPM_BUILD_ROOT%_initdir/syslogd
%__install -pD -m640 %SOURCE4 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/%syslog_name

%__install -pD -m755 %SOURCE5 $RPM_BUILD_ROOT%_initdir/klogd
%__install -pD -m640 %SOURCE6 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/klogd

chmod 755 $RPM_BUILD_ROOT/sbin/*
%__mkdir_p $RPM_BUILD_ROOT%_logdir/{kernel,user,mail,daemons,auth,lpr,news,uucp,cron,ftp,syslog}
%__ln_s syslog/alert $RPM_BUILD_ROOT%_logdir/alert
%__ln_s syslog/boot $RPM_BUILD_ROOT%_logdir/boot.log
%__ln_s mail/all $RPM_BUILD_ROOT%_logdir/maillog
%__ln_s syslog/messages $RPM_BUILD_ROOT%_logdir/messages
%__ln_s auth/secure $RPM_BUILD_ROOT%_logdir/secure
%__ln_s syslog/spooler $RPM_BUILD_ROOT%_logdir/spooler

/bin/ls -1 $RPM_BUILD_ROOT%_logdir |fgrep -v uucp |sed -e 's|.*|%attr(-,root,adm) %_logdir/&|g' >%name.files

%__chmod -R o-rwx $RPM_BUILD_ROOT%_logdir

%__install -pD -m700 %SOURCE7 $RPM_BUILD_ROOT/sbin/reload-syslog
%__mkdir_p -m700 $RPM_BUILD_ROOT%_sysconfdir/syslog.d
%__ln_s %ROOT/dev/log $RPM_BUILD_ROOT%_sysconfdir/syslog.d/klogd

#chroot stuff

%__mkdir_p $RPM_BUILD_ROOT/%ROOT/dev
mksock $RPM_BUILD_ROOT%ROOT/dev/log

%pre -n syslog-common
# Because RPM doesn't know the difference between files and directories,
# we need to verify if there is no file with the same name as the directory
# to be created for the new logdir architecture.
# If the name is the same and it is a file, rename it to name.old

for f in kernel user mail daemons auth lpr news uucp cron ftp syslog; do
if [ -f "%_logdir/$f" -a ! -L "%_logdir/$f" ]; then
%__mv -f "%_logdir/$f" "%_logdir/$f.old" &&
%__mkdir "%_logdir/$f" &&
%__mv "%_logdir/$f.old" "%_logdir/$f/"
fi
done ||:

# Same comment about compatibility links.

for f in alert boot.log maillog messages secure spooler; do
if [ -f "%_logdir/$f" -a ! -L "%_logdir/$f" ]; then
%__mv -f "%_logdir/$f" "%_logdir/$f.old"
fi
done ||:

%triggerpostun -- %name <= 1.4.1-alt3
if [ $1 -gt 1 ]; then
if pidof /sbin/klogd >/dev/null; then
/sbin/service klogd restart ||:
fi
if pidof /sbin/syslogd >/dev/null; then
/sbin/service syslogd restart ||:
fi
fi

%post -n syslog-common
cd %_logdir
# Create each log directory with logfiles.
for f in \
{kernel,user,mail,daemons,lpr,news,uucp,cron,ftp}/{info,warnings,errors} \
auth/{all,messages,secure} mail/all \
syslog/{messages,alert,spooler,boot,sudo}
do
if [ ! -f "$f" ]; then
:>>"$f"
%__chgrp adm "$f"
%__chmod 640 "$f"
fi
done ||:

%pre -n %syslog_name
/usr/sbin/groupadd -r -f syslogd
/usr/sbin/useradd -r -g syslogd -d /dev/null -s /dev/null -n syslogd >/dev/null 2>&1 ||:

%post -n %syslog_name
%post_service syslogd

%preun -n %syslog_name
%preun_service syslogd

%pre -n klogd
/usr/sbin/groupadd -r -f klogd
/usr/sbin/useradd -r -g klogd -d /dev/null -s /dev/null -n klogd >/dev/null 2>&1 ||:

%post -n klogd
%post_service klogd

%preun -n klogd
%preun_service klogd

%files

%files -n klogd
%config %_initdir/klogd
%config(noreplace) %_sysconfdir/sysconfig/klogd
%_sysconfdir/syslog.d/klogd
/sbin/klogd
%_mandir/man?/klogd*
%attr(710,root,klogd) %dir %ROOT
%attr(710,root,klogd) %dir %ROOT/dev
%attr(666,root,root) %ghost %ROOT/dev/log

%files -n %syslog_name
%config(noreplace) %attr(640,root,adm) %_sysconfdir/syslog.conf
%config(noreplace) %_sysconfdir/sysconfig/%syslog_name
%config %_initdir/syslogd
/sbin/syslog*
%doc ANNOUNCE README* NEWS

%_mandir/man?/sys*

%files -n syslog-common -f %name.files
%attr(700,root,root) %dir %_sysconfdir/syslog.d
%config(noreplace) %_sysconfdir/logrotate.d/*
%attr(-,uucp,adm) %_logdir/uucp
/sbin/reload-syslog

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin