aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/logrotate/APKBUILD3
-rw-r--r--main/logrotate/logrotate.post-upgrade12
2 files changed, 14 insertions, 1 deletions
diff --git a/main/logrotate/APKBUILD b/main/logrotate/APKBUILD
index 005ab24d144..4c7cb82ea3b 100644
--- a/main/logrotate/APKBUILD
+++ b/main/logrotate/APKBUILD
@@ -2,11 +2,12 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=logrotate
pkgver=3.18.0
-pkgrel=2
+pkgrel=3
pkgdesc="Tool to rotate logfiles"
url="https://github.com/logrotate/logrotate"
arch="all"
license="GPL-2.0-or-later"
+install="$pkgname.post-upgrade"
makedepends="popt-dev autoconf automake libtool"
checkdepends="coreutils"
subpackages="$pkgname-doc $pkgname-openrc"
diff --git a/main/logrotate/logrotate.post-upgrade b/main/logrotate/logrotate.post-upgrade
new file mode 100644
index 00000000000..b2dd6301bb9
--- /dev/null
+++ b/main/logrotate/logrotate.post-upgrade
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+ver_old=$2
+
+if [ "$(apk version -t "$ver_old" '3.18.0-r3')" = '<' ]; then
+ # need to remove world permissions from status file, to dodge
+ # error: state file /var/lib/logrotate.status is world-readable
+ # 640 matches the spec file
+ chmod 640 /var/lib/logrotate.status
+fi
+
+exit 0