Accepting request 440124 from home:kukuk:branches:Base:System

- Move logrotate.status to /var/lib/misc following FHS/LSB and
  making implementing read-only root filesystem much easier.
  [FATE#322036]

OBS-URL: https://build.opensuse.org/request/show/440124
OBS-URL: https://build.opensuse.org/package/show/Base:System/logrotate?expand=0&rev=50
This commit is contained in:
Tomáš Chvátal 2016-11-14 13:39:27 +00:00 committed by Git OBS Bridge
parent 841db056ae
commit ca1e0ce6d9
3 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,20 @@
--- config.h
+++ config.h 2016/11/12 21:04:31
@@ -43,5 +43,5 @@
#endif
#ifndef STATEFILE
-#define STATEFILE "/var/lib/logrotate.status"
+#define STATEFILE "/var/lib/misc/logrotate.status"
#endif
--- logrotate.8
+++ logrotate.8 2016/11/12 21:00:05
@@ -65,7 +65,7 @@
\fB\-s\fR, \fB\-\-state <statefile>\fR
Tells \fBlogrotate\fR to use an alternate state file. This is useful
if logrotate is being run as a different user for various sets of
-log files. The default state file is \fI/var/lib/logrotate.status\fR.
+log files. The default state file is \fI/var/lib/misc/logrotate.status\fR.
.TP
\fB\-\-usage\fR

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Nov 12 22:08:25 CET 2016 - kukuk@suse.de
- Move logrotate.status to /var/lib/misc following FHS/LSB and
making implementing read-only root filesystem much easier.
[FATE#322036]
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Oct 5 11:38:13 UTC 2016 - tchvatal@suse.com Wed Oct 5 11:38:13 UTC 2016 - tchvatal@suse.com

View File

@ -34,6 +34,11 @@ Patch3: logrotate-addextension.patch
Patch5: logrotate-manpage_config_clarification.patch Patch5: logrotate-manpage_config_clarification.patch
# PATCH-FIX-UPSTREAM logrotate-fix-test62_with_bash-4.4.patch gh#logrotate/logrotate#66 dimstar@opensuse.org -- Fix test suite in combination with bash 4.4 # PATCH-FIX-UPSTREAM logrotate-fix-test62_with_bash-4.4.patch gh#logrotate/logrotate#66 dimstar@opensuse.org -- Fix test suite in combination with bash 4.4
Patch6: logrotate-fix-test62_with_bash-4.4.patch Patch6: logrotate-fix-test62_with_bash-4.4.patch
# PATCH-FEATURE-SLE logrotate-var-lib-misc.patch FATE#322036:
# According to FHS/LSB, this should be in /var/lib/misc. Which
# would allow a read-only root filesystem without breaking snapshots,
# rollback and transactional updates
Patch7: logrotate-var-lib-misc.patch
BuildRequires: acl BuildRequires: acl
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
@ -60,6 +65,7 @@ daily cron job.
%patch3 %patch3
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p0
%build %build
%configure %configure
@ -87,6 +93,10 @@ if [ -f %{_sysconfdir}/logrotate.d/aaa_base ] ; then
echo "Saving old logrotate system configuration" echo "Saving old logrotate system configuration"
mv -v %{_sysconfdir}/logrotate.d/aaa_base %{_sysconfdir}/logrotate.d.aaa_base.save mv -v %{_sysconfdir}/logrotate.d/aaa_base %{_sysconfdir}/logrotate.d.aaa_base.save
fi fi
# Move /var/lib/logrotate.status
if [ -f /var/lib/logrotate.status -a !-f /var/lib/misc/logrotate.status ]; then
mv /var/lib/logrotate.status /var/lib/misc/logrotate.status ||:
fi
%service_add_post %{name}.service %{name}.timer %service_add_post %{name}.service %{name}.timer