logrotate/logrotate-all
David Anes 3188edb86f Accepting request 1060601 from home:favogt:branches:Base:System
- Update to 3.21.0:
  * add ignoreduplicates directive to allow duplicate file matches
  * add --wait-for-state-lock option to wait for lock on the state file
  * avoid failure when an anonymous non-privileged user runs logrotate
  * support home dir expansion in olddir
  * reduce unnecessary rename operations with start N where N > 1
  * unify handling of log levels
  * do not print error: when exit code is unaffected

- Replace the vendor config logic:
  * Remove logrotate-vendor-dir.patch and the code from logrotate.service
    (also addresses boo#1202406)
  * Add a wrapper script which collects all config files in the right
    order
- Create logrotate.keyring with kdudka's public key
- Drop logrotate-rpmlintrc: rpmlint doesn't look at /usr/etc/logrotate.d/,
  so the false positive doesn't trigger.

OBS-URL: https://build.opensuse.org/request/show/1060601
OBS-URL: https://build.opensuse.org/package/show/Base:System/logrotate?expand=0&rev=106
2023-01-25 08:53:22 +00:00

29 lines
736 B
Bash

#!/bin/sh
set -eu
configs=
# Only read /usr/etc/logrotate.conf if /etc/logrotate.conf does not exist
if ! [ -e /etc/logrotate.conf ]; then
configs="$configs /usr/etc/logrotate.conf"
else
configs="$configs /etc/logrotate.conf"
fi
# Then read in all of {/usr,}/etc/logrotate.d/*, with /etc/ overriding /usr/etc/.
dirs=
[ -d /usr/etc/logrotate.d ] && dirs="/usr/etc/logrotate.d"
[ -d /etc/logrotate.d ] && dirs="$dirs /etc/logrotate.d"
if [ -n "$dirs" ]; then
for confname in $(find $dirs -type f -printf "%P\n" | sort -u); do
if [ -e "/etc/logrotate.d/$confname" ]; then
configs="$configs /etc/logrotate.d/$confname"
else
configs="$configs /usr/etc/logrotate.d/$confname"
fi
done
fi
exec /usr/sbin/logrotate $configs