SOURCES: logrotate.conf - /var/log/archiv -> /var/log/archive
Elan Ruusamäe
glen at delfi.ee
Fri Dec 30 01:58:22 CET 2005
On Thursday 29 December 2005 01:05, Jakub Bogusz wrote:
> On Wed, Dec 28, 2005 at 11:28:38PM +0100, Paweł Gołaszewski wrote:
> > On Wed, 28 Dec 2005, Elan Ruusamäe wrote:
> > > > > Author: glen Date: Wed Dec 28 13:15:13 2005
> > > > > GMT Module: SOURCES Tag: HEAD
> > > > > ---- Log message:
> > > > > - /var/log/archiv -> /var/log/archive
> > > >
> > > > why??? It breaks a lot of things and gives nothing...
> > >
> > > read .spec diff. breaks nothing.
> >
> > I know what is in diff...
> >
> > Remember that this setting is in PLD since _years_ and it is connected
> > with few things you can't handle with trigger. i.e.: mountpoint of
> > /var/log/archiv and entries in configs.
>
> Mountmoint?
attached diff and spec
should handle common cases of /var/log/archiv and making use any of them (new
and old) identical.
> Does logrotate support moving old logs to different fs now?
> It didn't some time ago.
--
glen
-------------- next part --------------
# $Revision: 1.68 $, $Date: 2005/12/28 13:33:32 $
#
# Conditional build:
%bcond_without selinux # build without SELinux support
#
Summary: Rotates, compresses, removes and mails system log files
Summary(de): Rotiert, komprimiert und verschickt Systemlogs
Summary(es): Hace el rutado, comprime y envía mail de logs del sistema
Summary(fr): Fait tourner, compresse, et envoie par mail les connexions au systčme
Summary(pl): System rotacji i kompresowania logów
Summary(pt_BR): Rotaciona, comprime e envia mail de logs do sistema
Summary(ru): ňĎÔÉŇŐĹÔ, ËĎÍĐŇĹÓÓÉŇŐĹÔ, ŐÄÁĚŃĹÔ É ĎÔĐŇÁ×ĚŃĹÔ ĐĎ ĐĎŢÔĹ ĚĎÇ-ĆÁĘĚŮ
Summary(tr): Sistem günlüklerini yönlendirir, sýkýţtýrýr ve mektup olarak yollar
Summary(uk): ňĎÔŐ¤, ËĎÍĐŇĹÓŐ¤, ×ÉÄÁĚѤ ÔÁ ׌ÄĐŇÁ×ĚѤ ĐĎŰÔĎŔ ĚĎÇ-ĆÁĘĚÉ
Name: logrotate
Version: 3.7
Release: 4.6
License: GPL v2
Group: Applications/System
Source0: %{name}-%{version}.tar.gz
# Source0-md5: caa28cb5e26db34f7c14236e4058bb5f
Source1: %{name}.conf
Patch0: %{name}-man.patch
# patches from ftp://ftp.suse.com/pub/people/ro/logrotate, updated for 3.7
Patch1: %{name}-dateext.dif
Patch2: %{name}-maxage.dif
Patch3: %{name}-noexec-tmp.patch
%{?with_selinux:BuildRequires: libselinux-devel}
BuildRequires: popt-devel >= 1.3
Requires(post): fileutils
Requires: /bin/mail
Requires: crondaemon
Requires: setup >= 2.4.6
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define statdir /var/lib/misc
%description
The logrotate utility is designed to simplify the administration of
log files on a system which generates a lot of log files. Logrotate
allows for the automatic rotation compression, removal and mailing of
log files. Logrotate can be set to handle a log file daily, weekly,
monthly or when the log file gets to a certain size. Normally,
logrotate runs as a daily cron job.
%description -l de
Logrotate vereinfacht die Verwaltung von Systemen, die sehr viele
Log-Dateien erzeugen, indem es das automatische Rotieren,
Komprimieren, Entfernen, und Senden von Log-Dateien ermöglicht. Jede
Log-Datei kann täglich, wöchentlich oder monatlich verarbeitet werden,
wenn sie zu groß wird.
%description -l es
Logrotate fue proyectado para facilitar la administración de sistemas
que generan gran número de archivos de log. Permite automatización en
la rotación, compresión, remoción y envío de mail de archivos de logs.
Cada archivo de log puede ser tratado diariamente, semanalmente,
mensualmente o cuanto crezca demasiado.
%description -l fr
Logrotate est conçu pour faciliter l'administration de systčmes qui
générent un grand nombre de fichiers de \"log\". Il permet le
roulement, la suppréssion la compression et l'envoi automatiques de
ces fichiers. Chaque fichier de \"log\" peut ętre pris en charge de
maničre quotidienne, hebdomadaire, mensuelle, ou quand il devient trop
volumineux.
%description -l pl
Logrotate jest przeznaczony do łatwej administracji plikami logów.
Program ten pozwala na automatyczną kompresję logów. Może kontrolować
logi raz dziennie, raz na miesiąc, raz na tydzień lub wtedy kiedy
pliki z logami systemowymi są już duże.
%description -l pt_BR
Logrotate foi projetado para facilitar a administraçăo de sistemas que
geram grande número de arquivos de log. Permite automatizaçăo na
rotaçăo, compressăo, remoçăo e envio de mail de arquivos de logs. Cada
arquivo de log pode ser tratado diariamente, semanalmente, mensalmente
ou quanto crescer demais.
%description -l ru
Logrotate ĐŇĹÄÎÁÚÎÁŢĹÎ ÄĚŃ ĎÂĚĹÇŢĹÎÉŃ ÁÄÍÉÎÉÓÔŇÉŇĎ×ÁÎÉŃ ÓÉÓÔĹÍŮ,
ËĎÔĎŇÁŃ ÇĹÎĹŇÉŇŐĹÔ ÂĎĚŘŰĎĹ ËĎĚÉŢĹÓÔ×Ď ĆÁĘĚĎ× Ó ĚĎÇÁÍÉ. ďÎ ĐĎÚ×ĎĚŃĹÔ
Á×ÔĎÍÁÔÉŢĹÓËÉ ŇĎÔÉŇĎ×ÁÔŘ, ËĎÍĐŇĹÓÓÉŇĎ×ÁÔŘ, ŐÄÁĚŃÔŘ É ĐĎÓŮĚÁÔŘ ĆÁĘĚŮ Ó
ĚĎÇÁÍÉ ĐĎ e-mail. ëÁÖÄŮĘ ĚĎÇ ÍĎÖĹÔ ĎÂŇÁÂÁÔŮ×ÁÔŘÓŃ ĹÖĹÄÎĹ×ÎĎ,
ĹÖĹÎĹÄĹĚŘÎĎ, ĹÖĹÍĹÓŃŢÎĎ ÉĚÉ ĐĎ ÄĎÓÔÉÖĹÎÉÉ ĎĐŇĹÄĹĚĹÎÎĎÇĎ ŇÁÚÍĹŇÁ.
%description -l tr
logrotate çok fazla sayýda günlük dosyasý üreten sistemlerin
yönetimini kolaylaţtýrmak için tasarlanmýţtýr. Kayýt dosyalarýnýn
otomatik olarak yönlendirilmesini, sýkýţtýrýlmasýný, silinmesiný ve
mektup olarak yollanmasýný sađlar. Her dosya günlük, haftalýk, aylýk
olarak ya da çok büyük boyutlara ulaţtýđýnda iţlenebilir.
%description -l uk
Logrotate ĐŇÉÚÎÁŢĹÎÉĘ ÄĚŃ ĐĎĚĹÇŰĹÎÎŃ ÁÄÍŚÎŚÓÔŇŐ×ÁÎÎŃ ÓÉÓÔĹÍÉ, ŃËÁ
ÇĹÎĹŇŐ¤ ×ĹĚÉËŐ ËŚĚŘËŚÓÔŘ ĆÁĘĚŚ× Ú ĚĎÇÁÍÉ. ÷ŚÎ ÄĎÚ×ĎĚѤ Á×ÔĎÍÁÔÉŢÎĎ
ŇĎÔŐ×ÁÔÉ, ËĎÍĐŇĹÓŐ×ÁÔÉ, ×ÉÄÁĚŃÔÉ ÔÁ ĐĎÓÉĚÁÔÉ ĐĎŰÔĎŔ ĚĎÇ-ĆÁĘĚÉ. ëĎÖĹÎ
ĚĎÇ ÍĎÖĹ ĎÂŇĎÂĚŃÔÉÓŃ ÝĎÄĹÎÎĎ, ÝĎÔÉÖÎŃ, ÝĎÍŚÓŃĂŃ ÁÂĎ ĐĎ ÄĎÓŃÇÎĹÎÎŚ
×ÉÚÎÁŢĹÎĎÇĎ ŇĎÚÍŚŇŐ.
%prep
%setup -q
%patch0 -p1
%patch1 -p0
%patch2 -p0
%patch3 -p1
%build
%{__make} \
CC="%{__cc}" \
RPM_OPT_FLAGS="%{rpmcflags}" \
WITH_SELINUX=%{?with_selinux:yes}%{!?with_selinux:no} \
STATEFILE="%{statdir}/logrotate.status"
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/{cron.daily,logrotate.d} \
$RPM_BUILD_ROOT{%{_mandir},%{statdir},/var/log/archive}
%{__make} install \
BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
MANDIR=$RPM_BUILD_ROOT%{_mandir}
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.conf
install examples/logrotate.cron $RPM_BUILD_ROOT/etc/cron.daily/logrotate
> $RPM_BUILD_ROOT%{statdir}/logrotate.status
> $RPM_BUILD_ROOT/var/log/archiv
%clean
rm -rf $RPM_BUILD_ROOT
%pre
# change /var/log/archiv to /var/log/archive
# always have archiv symlink (until all packages from Ac use new dir)
if [ -L /var/log/archiv ]; then
old=$(readlink /var/log/archiv)
if [ "$old" != "archive" ]; then
# if archiv was symlink, make archive also symlink pointing to
# the same location and archiv pointing to archive
if [ -d /var/log/archive ]; then
# mountpoint not handled, but that's ok
mv -v /var/log/archive{,.rpmsave}
fi
ln -s $old /var/log/archive
ln -snf archive /var/log/archiv
fi
else
if [ -d /var/log/archiv ]; then
if mountpoint -q /var/log/archiv; then
mkdir -p /var/log/archive
mount --move /var/log/archiv /var/log/archive
rmdir /var/log/archiv 2>/dev/null || mv -v /var/log/archiv{,.rpmsave}
else
if [ -d /var/log/archive ]; then
mv /var/log/archiv/* /var/log/archive
rmdir /var/log/archiv 2>/dev/null || mv -v /var/log/archiv{,.rpmsave}
else
mv /var/log/archiv /var/log/archive
fi
fi
fi
ln -s archive /var/log/archiv
fi
exit 0
%post
if [ -f /var/lib/logrotate.status ]; then
mv -f /var/lib/logrotate.status %{statdir}/logrotate.status
else
touch %{statdir}/logrotate.status
chmod 000 %{statdir}/logrotate.status
chown root:root %{statdir}/logrotate.status
chmod 640 %{statdir}/logrotate.status
fi
%files
%defattr(644,root,root,755)
%doc CHANGES
%attr(755,root,root) %{_sbindir}/logrotate
%attr(750,root,root) %dir /etc/logrotate.d
%attr(750,root,root) /etc/cron.daily/logrotate
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
%attr(640,root,root) %ghost %{statdir}/logrotate.status
%attr(750,root,logs) %dir /var/log/archive
%ghost /var/log/archiv
%{_mandir}/man8/*
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log: logrotate.spec,v $
Revision 1.68 2005/12/28 13:33:32 hawk
- s/httpd.conf/archiv/
Revision 1.67 2005/12/28 13:14:07 glen
- kill /var/log/archiv kloczkish by renaming it to /var/log/archive; rel 4
Revision 1.66 2005/12/04 22:58:06 glen
- adapterized (sorted %verify flags)
Revision 1.65 2005/07/08 19:39:45 darekr
- description for bcond, proper License
Revision 1.64 2005/01/14 19:54:25 qboosh
- nobody complaints? so patches were tested, I assume
Revision 1.63 2004/10/29 10:42:52 jajcus
- grant 'logs' group read access to the log archive
Revision 1.62 2004/05/11 11:45:55 baggins
- release 2
- fixed executing scripts from /tmp
(use /bin/sh -c command as /tmp can be mounted noexec)
- I don't care for TODO, you had two months to do it
Revision 1.61 2004/04/15 19:48:37 agaran
- added bcond without selinux
Revision 1.60 2004/02/29 16:24:17 qboosh
- removed no longer used moveout patch, try to update dateext,maxage patches
Revision 1.59 2004/02/25 11:21:52 qboosh
- updated to new Fedora tarball (with the same name :/) with updated
is_selinux_enabled() calls; release 1.2
Revision 1.58 2004/01/09 14:52:20 qboosh
- attr is not needed (pass LOADLIBES)
- added TODO, release 1.1 (functionality loss since 3.6.x)
Revision 1.57 2004/01/08 18:39:44 kosmo
- added BR: attr-devel (thx. Pawel Sikora)
Revision 1.56 2003/12/26 18:53:37 arekm
- updated to 3.7, patches temporary commented out (part of them are already merged). enabled selinux support
Revision 1.55 2003/11/01 16:04:10 arekm
- rel3
Revision 1.54 2003/11/01 16:01:40 arekm
- dateext (allows to use YYYYMMDD extension instead of just number)
- maxage (remove log files older than XXX days)
- better way for remove/compress/mail log files
Revision 1.53 2003/09/18 00:59:40 domelu
- small fix in %files
Revision 1.52 2003/09/10 14:54:43 mick3y
- requires crondaemon (domelu)
Revision 1.51 2003/08/30 21:40:58 mmazur
- rel 2 for ac
Revision 1.50 2003/08/27 11:15:34 arekm
- updated to 3.6.10
Revision 1.49 2003/08/04 11:35:58 qboosh
- use SUSv2-compliant chown syntax (user:group) instead of deprecated
Revision 1.48 2003/07/27 19:47:07 blues
- cosmetics
Revision 1.47 2003/07/23 17:12:35 gotar
- one more fix to man page (logrotate-man.patch),
- release 5.
Revision 1.46 2003/05/25 11:00:54 malekith
- massive attack, adding Source-md5
Revision 1.45 2003/05/25 05:50:16 misi3k
- massive attack s/pld.org.pl/pld-linux.org/
Revision 1.44 2002/10/17 14:38:34 ankry
- fixed patch
Revision 1.43 2002/10/15 18:45:49 kloczek
- release 4,
- fixed http://bugs.pld.org.pl/index.php?bug=380: change logrotate status file
name to /var/lib/misc/logrotate.status.
Revision 1.42 2002/07/02 07:44:26 kloczek
- updated to 3.6.5 (bug fix release),
- use new %doc,
- merge translations from KSI.
Revision 1.41 2002/07/01 10:18:35 ankry
- fixed some typos in man page
- release 6, STBR
Revision 1.40 2002/04/18 10:26:47 qboosh
- moved logrotate.status to /var/lib/misc (FHS 2.2 compliant)
- release 5
Revision 1.39 2002/02/22 23:29:13 kloczek
- removed all Group fields translations (our rpm now can handle translating
Group field using gettext).
Revision 1.38 2002/01/18 02:13:45 kloczek
- perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
Revision 1.37 2001/12/23 00:28:21 blues
- release 4: bugfix - s/mail root/nomail/ in default config
- STBR
Revision 1.36 2001/12/22 00:26:47 kloczek
- release 3: fixed default logrotate.conf(blues): s/errors/mail/
Revision 1.35 2001/12/19 04:44:12 kloczek
- updated to 3.6 (bug fix release).
Revision 1.34 2001/12/18 20:17:32 gotar
- release 4.
Revision 1.33 2001/12/13 03:07:08 gotar
- touch, chown and chmod on /var/lib/logrotate.status in %post,
- added Requires(post): fileutils.
Revision 1.32 2001/12/11 00:23:39 blues
- added config(noreplace) to /etc/cron.daily/logrotate
Revision 1.31 2001/11/30 20:35:35 gotar
- fixed broken logs.
Revision 1.30 2001/11/30 20:23:11 gotar
- added /var/lib/logrotate.status log,
- release 3.
Revision 1.29 2001/06/16 16:26:10 kloczek
- updated to 3.5.5.
Revision 1.28 2001/05/03 15:25:42 qboosh
- better Summary(pl)
Revision 1.27 2001/04/30 16:05:21 kloczek
- added using %{rpmcflags} macro.
Revision 1.26 2001/02/07 20:28:30 kloczek
- updated to 3.5.4 - this is important upgrade because contains fix for tmp
race condition.
Revision 1.25 2001/02/07 16:44:29 baggins
- release 3
- nodelaycompress in logrotate.conf
Revision 1.24 2001/01/25 20:03:24 misiek
- Massive attack. We use -O0 instead -O flags while debug enabled.
Revision 1.23 2000/12/23 00:48:45 michuz
- changed %{!?debug:...}%{?debug...} to %{?debug:...}%{!?debug...}
(now it's more C like)
Revision 1.22 2000/10/20 03:21:50 kloczek
- updated to 3.5.2,
- use new rpm automation.
Revision 1.21 2000/08/09 15:34:30 kloczek
- updated to 3.4 (release 3).
Revision 1.20 2000/08/09 10:36:44 zagrodzki
- release 3
- adapterized
Revision 1.19 2000/08/09 10:35:26 zagrodzki
- requires: /bin/mail
Revision 1.18 2000/06/09 07:23:25 kloczek
- added using %{__make} macro.
Revision 1.17 2000/05/27 18:45:34 kloczek
- updated to 3.3.2,
- in system config file for logrotate "include" moved to the end so all
directives should work now they seem to be ignored after logrotate.d was
processed (jajcus),
- spec adapterized.
Revision 1.16 2000/04/25 16:16:48 baggins
- release++
- FHS 2.1, /var/state -> /var/lib
Revision 1.15 2000/04/01 11:14:52 zagrodzki
- changed all BuildRoot definitons
- removed all applnkdir defs
- changed some prereqs/requires
- removed duplicate empty lines
Revision 1.14 2000/03/28 16:54:41 baggins
- translated kloczkish into english
Revision 1.13 1999/11/26 21:04:23 kloczek
- updated to 3.3 (revision 2 - in rawhide is 1),
- added default config file for logrotate. Diffrences between RH config:
- added to create "640 root root" parameters,
- added delaycompress
- enabled compressing logs,
- added notifempty,
- added default archiv directory (/var/log/archiv),
- added missingok,
- added to package /var/log/archiv directory.
Revision 1.12 1999/07/20 12:48:09 wiget
- switch to rpm 3.0.2
Revision 1.11 1999/07/12 23:06:06 kloczek
- added using CVS keywords in %changelog (for automating them).
* Thu May 20 1999 Wojtek Ślusarczyk <wojtek at shadow.eu.org>
[3.2-4]
- added new config file (commpres postrotate && chmod 640 ),
- removed rotate of /var/log/{wtmp,lastlog}
lastlog provides SysVinit, wtmp(x) provides syslogd
- fixes for build,
- FHS 2.0.
* Wed Apr 21 1999 Piotr Czerwiński <pius at pld.org.pl>
[3.2-1]
- updated to 3.2,
- changed Buildroot to /tmp/%{name}-%{version}-root,
- added full %defattr description in files,
- added %doc,
- removed man group from man pages,
- added passing $RPM_OPT_FLAGS during compile,
- cosmetic changes for common l&f,
- added "BuildPrereq: popt >= 1.3",
- recompiled on rpm 3.
* Tue Oct 06 1998 Wojtek Ślusarczyk <wojtek at shadow.eu.org>
[2.6-4]
- added pl translation,
- minor modifications of the spec file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logrotate-mountpoint.patch
Type: text/x-diff
Size: 1478 bytes
Desc: not available
Url : /mailman/pipermail/pld-devel-en/attachments/20051230/008720c7/logrotate-mountpoint-0001.bin
More information about the pld-devel-en
mailing list