Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package logrotate for openSUSE:Factory 
checked in at 2022-03-11 21:39:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/logrotate (Old)
 and      /work/SRC/openSUSE:Factory/.logrotate.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "logrotate"

Fri Mar 11 21:39:59 2022 rev:71 rq:960296 version:3.19.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/logrotate/logrotate.changes      2022-01-11 
00:01:44.505232352 +0100
+++ /work/SRC/openSUSE:Factory/.logrotate.new.25692/logrotate.changes   
2022-03-11 21:40:03.098017666 +0100
@@ -1,0 +2,18 @@
+Thu Feb 24 10:36:07 UTC 2022 - Stefan Schubert <[email protected]>
+
+- Added own logrotate.service file in order to define a new order
+  of parsed config files:
+  /usr/etc/logrotate.conf   Default configuration file defined by
+                            the vendor.
+  /usr/etc/logrotate.d/*    Directory for additional configuration
+                            files defined by the vendor.
+  /etc/logrotate.conf       Default configuration file defined by
+                            the administrator. (optional)
+  /etc/logrotate.d/*        Directory for additional configuration
+                            files defined by the administrator.
+                            (optional)
+- drop logrotate-3.19.0-systemd_add_home_env.patch: 
+  - included in new logrotate.service
+- Adapted man page: logrotate-3.19.0-man_logrotate.patch  
+
+-------------------------------------------------------------------

Old:
----
  logrotate-3.19.0-systemd_add_home_env.patch

New:
----
  logrotate-3.19.0-man_logrotate.patch
  logrotate.service

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ logrotate.spec ++++++
--- /var/tmp/diff_new_pack.vXC7Po/_old  2022-03-11 21:40:03.998018306 +0100
+++ /var/tmp/diff_new_pack.vXC7Po/_new  2022-03-11 21:40:04.006018312 +0100
@@ -16,6 +16,8 @@
 #
 
 
+%{!?_distconfdir: %global _distconfdir %{_prefix}%{_sysconfdir}}
+
 Name:           logrotate
 Version:        3.19.0
 Release:        0
@@ -27,9 +29,10 @@
 # SUSE specific logrotate configurations
 Source1:        logrotate.wtmp
 Source2:        logrotate.default
+Source3:        logrotate.service
 Source10:       
https://github.com/%{name}/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz.asc
 Source100:      %{name}-rpmlintrc
-Patch0:         logrotate-3.19.0-systemd_add_home_env.patch
+Patch0:         logrotate-3.19.0-man_logrotate.patch
 BuildRequires:  acl
 BuildRequires:  libacl-devel
 BuildRequires:  pkgconfig
@@ -63,10 +66,10 @@
 
 %install
 %make_install
-mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
-install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/wtmp
-install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.conf
-install -D -m 0644 examples/%{name}.service 
%{buildroot}%{_unitdir}/%{name}.service
+mkdir -p %{buildroot}%{_distconfdir}/logrotate.d
+install -m 644 %{SOURCE1} %{buildroot}%{_distconfdir}/logrotate.d/wtmp
+install -m 644 %{SOURCE2} %{buildroot}%{_distconfdir}/logrotate.conf
+install -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service
 install -D -m 0644 examples/%{name}.timer %{buildroot}%{_unitdir}/%{name}.timer
 ln -s service %{buildroot}%{_sbindir}/rc%{name}
 
@@ -90,14 +93,18 @@
 %service_del_postun %{name}.service %{name}.timer
 
 %files
+%if %{?suse_version} <= 1500
+%dir %{_distconfdir}
+%endif
+%dir %{_distconfdir}/logrotate.d
 %license COPYING
 %doc ChangeLog.md README.md
 %{_sbindir}/logrotate
 %{_sbindir}/rc%{name}
 %{_mandir}/man8/logrotate.8%{?ext_man}
 %{_mandir}/man5/logrotate.conf.5%{?ext_man}
-%config %{_sysconfdir}/logrotate.conf
-%config(noreplace) %{_sysconfdir}/logrotate.d/wtmp
+%{_distconfdir}/logrotate.conf
+%{_distconfdir}/logrotate.d/wtmp
 %{_unitdir}/%{name}.service
 %{_unitdir}/%{name}.timer
 

++++++ logrotate-3.19.0-man_logrotate.patch ++++++
diff -Naur logrotate-3.19.0.orig/logrotate.8.in logrotate-3.19.0/logrotate.8.in
--- logrotate-3.19.0.orig/logrotate.8.in        2022-02-24 11:18:24.202811846 
+0100
+++ logrotate-3.19.0/logrotate.8.in     2022-02-24 11:28:25.137690351 +0100
@@ -48,6 +48,17 @@
 is given on the command line, every file in that directory is used as
 a config file.
 .P
+If \fBlogrotate\fR is called via \fBsystemd\fR(1), following  order of
+parsed config files is defined in the \fIlogrotate.service\fR file:
+.TS
+tab(:);
+l l l.
+\fI/usr/etc/logrotate.conf\fR:Default configuration file defined by the vendor.
+\fI/usr/etc/logrotate.d/*\fR:Directory for additional configuration files 
defined by the vendor.
+\fI/etc/logrotate.conf\fR:Default configuration file defined by the 
administrator. (optional)
+\fI/etc/logrotate.d/*\fR:Directory for additional configuration files defined 
by the administrator. (optional)
+.TE
+.P
 If no command line arguments are given, \fBlogrotate\fR will print
 version and copyright information, along with a short usage summary.  If
 any errors occur while rotating logs, \fBlogrotate\fR will exit with
@@ -76,7 +87,7 @@
 acquires a lock on the state file, if it cannot be acquired \fBlogrotate\fR
 will exit with value 3.  The default state file is \fI@STATE_FILE_PATH@\fR.
 If \fI/dev/null\fR is given as the state file, then \fBlogrotate\fR will
-not try to write the state file.
+not try to lock or write the state file.
 
 .TP
 \fB\-\-skip-state-lock\fR
@@ -752,7 +763,8 @@
 tab(:);
 l l l.
 \fI@STATE_FILE_PATH@\fR:Default state file.
-\fI/etc/logrotate.conf\fR:Configuration options.
+\fI/usr/etc/logrotate.conf\fR:Configuration options defined by the vendor.
+\fI/etc/logrotate.conf\fR:Configuration options defined by the administrator.
 .TE
 
 


++++++ logrotate.default ++++++
--- /var/tmp/diff_new_pack.vXC7Po/_old  2022-03-11 21:40:04.138018406 +0100
+++ /var/tmp/diff_new_pack.vXC7Po/_new  2022-03-11 21:40:04.142018409 +0100
@@ -20,5 +20,5 @@
 uncompresscmd /usr/bin/xzdec
 
 # RPM packages drop log rotation information into this directory
-include /etc/logrotate.d
+include /usr/etc/logrotate.d
 

++++++ logrotate.service ++++++
[Unit]
Description=Rotate log files
Documentation=man:logrotate(8) man:logrotate.conf(5)
RequiresMountsFor=/var/log
ConditionACPower=true

[Service]
Type=oneshot
ExecStartPre=/bin/sh -c "/usr/bin/systemctl set-environment etc_conf=" ; \
   /bin/sh -c "if [ -f /etc/logrotate.conf ]; then /usr/bin/systemctl 
set-environment etc_conf=/etc/logrotate.conf; fi" ; \
   /bin/sh -c "/usr/bin/systemctl set-environment etc_dir=" ; \
   /bin/sh -c "if [ -d /etc/logrotate.d ]; then /usr/bin/systemctl 
set-environment etc_dir=/etc/logrotate.d; fi"
ExecStart=/bin/sh -c "/usr/sbin/logrotate /usr/etc/logrotate.conf ${etc_conf} 
${etc_dir}"

# performance options
Nice=19
IOSchedulingClass=best-effort
IOSchedulingPriority=7
Environment=HOME=/root

# hardening options
#  details: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
#  no ProtectHome for userdir logs
#  no PrivateNetwork for mail deliviery
#  no NoNewPrivileges for third party rotate scripts
#  no RestrictSUIDSGID for creating setgid directories
LockPersonality=true
MemoryDenyWriteExecute=true
PrivateDevices=true
PrivateTmp=true
ProtectClock=true
ProtectControlGroups=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=full
RestrictNamespaces=true
RestrictRealtime=true

Reply via email to