]> git.pld-linux.org Git - packages/logrotate.git/commitdiff
- kill /var/log/archiv kloczkish by renaming it to /var/log/archive; rel 4
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 28 Dec 2005 13:14:07 +0000 (13:14 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    logrotate.spec -> 1.67

logrotate.spec

index 688a5354c012e032f5546af70c63476c3ed37349..aa4e9fe70e5a6e46808487c0119cfd47501311b9 100644 (file)
@@ -13,7 +13,7 @@ Summary(tr):  Sistem g
 Summary(uk):   òÏÔÕ¤, ËÏÍÐÒÅÓÕ¤, ×ÉÄÁÌѤ ÔÁ ×¦ÄÐÒÁ×ÌѤ ÐÏÛÔÏÀ ÌÏÇ-ÆÁÊÌÉ
 Name:          logrotate
 Version:       3.7
-Release:       3
+Release:       4
 License:       GPL v2
 Group:         Applications/System
 Source0:       %{name}-%{version}.tar.gz
@@ -115,7 +115,7 @@ Logrotate 
 %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} \
@@ -124,10 +124,28 @@ install -d $RPM_BUILD_ROOT/etc/{cron.daily,logrotate.d} \
 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
@@ -146,5 +164,6 @@ fi
 %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/*
This page took 0.03842 seconds and 4 git commands to generate.