SPECS: logrotate.spec - kill /var/log/archiv kloczkish by renaming...

glen glen at pld-linux.org
Wed Dec 28 14:14:12 CET 2005


Author: glen                         Date: Wed Dec 28 13:14:12 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- kill /var/log/archiv kloczkish by renaming it to /var/log/archive; rel 4

---- Files affected:
SPECS:
   logrotate.spec (1.66 -> 1.67) 

---- Diffs:

================================================================
Index: SPECS/logrotate.spec
diff -u SPECS/logrotate.spec:1.66 SPECS/logrotate.spec:1.67
--- SPECS/logrotate.spec:1.66	Sun Dec  4 23:58:06 2005
+++ SPECS/logrotate.spec	Wed Dec 28 14:14:07 2005
@@ -14,7 +14,7 @@
 Summary(uk):	ňĎÔŐ¤, ËĎÍĐŇĹÓŐ¤, ×ÉÄÁĚѤ ÔÁ ׌ÄĐŇÁ×ĚѤ ĐĎŰÔĎŔ ĚĎÇ-ĆÁĘĚÉ
 Name:		logrotate
 Version:	3.7
-Release:	3
+Release:	4
 License:	GPL v2
 Group:		Applications/System
 Source0:	%{name}-%{version}.tar.gz
@@ -116,7 +116,7 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{cron.daily,logrotate.d} \
-	$RPM_BUILD_ROOT{%{_mandir},%{statdir},/var/log/archiv}
+	$RPM_BUILD_ROOT{%{_mandir},%{statdir},/var/log/archive}
 
 %{__make} install \
 	BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
@@ -125,10 +125,28 @@
 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
+if [ ! -L /var/log/archiv ]; then
+	if [ -d /var/log/archiv ]; then
+		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
+
+	# always have httpd.conf symlink (until all packages from Ac use new dir)
+	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
@@ -147,7 +165,8 @@
 %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/archiv
+%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"`)
@@ -156,6 +175,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+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)
 
@@ -171,11 +193,11 @@
 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)
+  (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
+- 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
@@ -240,7 +262,7 @@
 
 Revision 1.42  2002/07/02 07:44:26  kloczek
 - updated to 3.6.5 (bug fix release),
-- use new %%doc,
+- use new %doc,
 - merge translations from KSI.
 
 Revision 1.41  2002/07/01 10:18:35  ankry
@@ -256,11 +278,11 @@
   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/"
+- 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
+- STBR
 
 Revision 1.36  2001/12/22 00:26:47  kloczek
 - release 3: fixed default logrotate.conf(blues): s/errors/mail/
@@ -272,7 +294,7 @@
 - release 4.
 
 Revision 1.33  2001/12/13 03:07:08  gotar
-- touch, chown and chmod on /var/lib/logrotate.status in %%post,
+- 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
@@ -292,7 +314,7 @@
 - better Summary(pl)
 
 Revision 1.27  2001/04/30 16:05:21  kloczek
-- added using %%{rpmcflags} macro.
+- 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
@@ -303,10 +325,10 @@
 - 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.
+- 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...}
+- changed %{!?debug:...}%{?debug...} to %{?debug:...}%{!?debug...}
   (now it's more C like)
 
 Revision 1.22  2000/10/20 03:21:50  kloczek
@@ -324,7 +346,7 @@
 - requires: /bin/mail
 
 Revision 1.18  2000/06/09 07:23:25  kloczek
-- added using %%{__make} macro.
+- added using %{__make} macro.
 
 Revision 1.17  2000/05/27 18:45:34  kloczek
 - updated to 3.3.2,
@@ -361,7 +383,7 @@
 - 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).
+- added using CVS keywords in %changelog (for automating them).
 
 * Thu May 20 1999 Wojtek Ślusarczyk <wojtek at shadow.eu.org>
   [3.2-4]
@@ -374,9 +396,9 @@
 * 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,
+- 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,
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/logrotate.spec?r1=1.66&r2=1.67&f=u



More information about the pld-cvs-commit mailing list