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-09-23 14:14:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/logrotate (Old) and /work/SRC/openSUSE:Factory/.logrotate.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "logrotate" Fri Sep 23 14:14:50 2022 rev:74 rq:1005406 version:3.20.1 Changes: -------- --- /work/SRC/openSUSE:Factory/logrotate/logrotate.changes 2022-06-21 17:15:28.514349513 +0200 +++ /work/SRC/openSUSE:Factory/.logrotate.new.2275/logrotate.changes 2022-09-23 14:15:13.709981952 +0200 @@ -1,0 +2,10 @@ +Wed Sep 14 11:15:55 UTC 2022 - Stefan Schubert <[email protected]> + +- Ignoring vendor logs settings in /usr/etc/logrotate.d if they + have already been defined by the the admin in the /etc/logrotate.d + directory (bsc#1173319). + +- Removed logrotate-3.20.0-man_logrotate.patch. +- Added logrotate-vendor-dir.patch + +------------------------------------------------------------------- Old: ---- logrotate-3.20.0-man_logrotate.patch New: ---- logrotate-vendor-dir.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ logrotate.spec ++++++ --- /var/tmp/diff_new_pack.sHpJn5/_old 2022-09-23 14:15:14.333983406 +0200 +++ /var/tmp/diff_new_pack.sHpJn5/_new 2022-09-23 14:15:14.337983416 +0200 @@ -32,7 +32,7 @@ Source3: logrotate.service Source10: https://github.com/%{name}/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz.asc Source100: %{name}-rpmlintrc -Patch0: logrotate-3.20.0-man_logrotate.patch +Patch0: logrotate-vendor-dir.patch BuildRequires: acl BuildRequires: automake BuildRequires: libacl-devel @@ -60,7 +60,8 @@ %configure \ --disable-silent-rules \ --with-state-file-path=%{_localstatedir}/lib/misc/logrotate.status \ - --disable-werror + --disable-werror \ + --enable-vendordir %make_build %check ++++++ logrotate-vendor-dir.patch ++++++ diff -Naur logrotate-3.20.1.org/config.c logrotate-3.20.1.patch/config.c --- logrotate-3.20.1.org/config.c 2022-05-24 17:20:14.000000000 +0200 +++ logrotate-3.20.1.patch/config.c 2022-09-14 12:48:02.293003630 +0200 @@ -1847,11 +1847,19 @@ for (k = 0; k < log->numFiles; k++) { if (!strcmp(log->files[k], globResult.gl_pathv[glob_count])) { - message(MESS_ERROR, +#ifdef ENABLE_VENDORDIR + message(MESS_DEBUG, + "%s:%d duplicate log entry for %s --> ignoring\n", + configFile, lineNum, + globResult.gl_pathv[glob_count]); + state = STATE_SKIP_CONFIG; +#else + message(MESS_ERROR, "%s:%d duplicate log entry for %s\n", configFile, lineNum, globResult.gl_pathv[glob_count]); - logerror = 1; + logerror = 1; +#endif goto duperror; } } diff -Naur logrotate-3.20.1.org/configure.ac logrotate-3.20.1.patch/configure.ac --- logrotate-3.20.1.org/configure.ac 2021-07-27 10:25:23.000000000 +0200 +++ logrotate-3.20.1.patch/configure.ac 2022-09-14 13:49:13.052981225 +0200 @@ -58,6 +58,14 @@ AS_IF([test "$ac_cv_lib_acl_acl_get_file" = yes], echo "1" > ./test/test.ACL; WITH_ACL="yes";, echo "0" > ./test/test.ACL;) +AC_ARG_ENABLE([vendordir], + AS_HELP_STRING([--enable-vendordir],[ignore redefined logs; prefering user defined logs defintions])) + +if test x"$enable_vendordir" = x"yes" ; then + AC_DEFINE([ENABLE_VENDORDIR],, + [ignore redefined logs; prefering user defined logs defintions]) +fi + DEFAULT_MAIL_COMMAND="/bin/mail" COMPRESS_COMMAND="/bin/gzip" UNCOMPRESS_COMMAND="/bin/gunzip" diff -Naur logrotate-3.20.1.org/logrotate.8.in logrotate-3.20.1.patch/logrotate.8.in --- logrotate-3.20.1.org/logrotate.8.in 2022-03-31 14:00:36.000000000 +0200 +++ logrotate-3.20.1.patch/logrotate.8.in 2022-09-14 13:06:32.116996856 +0200 @@ -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 @@ -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.sHpJn5/_old 2022-09-23 14:15:14.429983630 +0200 +++ /var/tmp/diff_new_pack.sHpJn5/_new 2022-09-23 14:15:14.433983640 +0200 @@ -19,6 +19,6 @@ compresscmd /usr/bin/xz uncompresscmd /usr/bin/xzdec -# RPM packages drop log rotation information into this directory -include /usr/etc/logrotate.d +# Additinal location (directory or file) for rotation information +# include <file_or_directory> ++++++ logrotate.service ++++++ --- /var/tmp/diff_new_pack.sHpJn5/_old 2022-09-23 14:15:14.461983705 +0200 +++ /var/tmp/diff_new_pack.sHpJn5/_new 2022-09-23 14:15:14.465983714 +0200 @@ -8,9 +8,13 @@ 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 usr_etc_conf=" ; \ + /bin/sh -c "if [ -f /usr/etc/logrotate.conf ]; then /usr/bin/systemctl set-environment usr_etc_conf=/usr/etc/logrotate.conf; fi" ; \ + /bin/sh -c "/usr/bin/systemctl set-environment usr_etc_dir=" ; \ + /bin/sh -c "if [ -d /usr/etc/logrotate.d ]; then /usr/bin/systemctl set-environment usr_etc_dir=/usr/etc/logrotate.d; 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}" +ExecStart=/bin/sh -c "/usr/sbin/logrotate ${usr_etc_conf} ${etc_conf} ${etc_dir} ${usr_etc_dir}" # performance options Nice=19
