summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-05-22 19:20:06 +0200
committerDavid Seifert <soap@gentoo.org>2021-05-22 19:20:06 +0200
commit5830639f50629bd01a8c96416dc6a31e7beae497 (patch)
treed17694e7639cae690e46c953f9e42049a5692300 /app-admin
parentdev-util/byacc: add 20210520 (diff)
downloadgentoo-5830639f50629bd01a8c96416dc6a31e7beae497.tar.gz
gentoo-5830639f50629bd01a8c96416dc6a31e7beae497.tar.bz2
gentoo-5830639f50629bd01a8c96416dc6a31e7beae497.zip
app-admin/logrotate: tidy up
Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/logrotate/logrotate-3.18.1.ebuild26
1 files changed, 12 insertions, 14 deletions
diff --git a/app-admin/logrotate/logrotate-3.18.1.ebuild b/app-admin/logrotate/logrotate-3.18.1.ebuild
index ddc0d62508b4..d49a3017aaba 100644
--- a/app-admin/logrotate/logrotate-3.18.1.ebuild
+++ b/app-admin/logrotate/logrotate-3.18.1.ebuild
@@ -14,20 +14,16 @@ SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE="acl +cron selinux"
-COMMON_DEPEND="
+DEPEND="
>=dev-libs/popt-1.5
selinux? ( sys-libs/libselinux )
acl? ( virtual/acl )"
-
-DEPEND="${COMMON_DEPEND}
- >=sys-apps/sed-4"
-
-RDEPEND="${COMMON_DEPEND}
+RDEPEND="${DEPEND}
selinux? ( sec-policy/selinux-logrotate )
cron? ( virtual/cron )"
-STATEFILE="/var/lib/misc/logrotate.status"
-OLDSTATEFILE="/var/lib/logrotate.status"
+STATEFILE="${EPREFIX}/var/lib/misc/logrotate.status"
+OLDSTATEFILE="${EPREFIX}/var/lib/logrotate.status"
move_old_state_file() {
elog "logrotate state file is now located at ${STATEFILE}"
@@ -48,15 +44,15 @@ PATCHES=(
)
src_prepare() {
- sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die
+ sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' examples/logrotate.{cron,service} || die
default
}
src_configure() {
econf \
- $(use_with acl) \
- $(use_with selinux) \
- --with-state-file-path="${STATEFILE}"
+ $(use_with acl) \
+ $(use_with selinux) \
+ --with-state-file-path="${STATEFILE}"
}
src_test() {
@@ -64,7 +60,6 @@ src_test() {
}
src_install() {
- insinto /usr
dobin logrotate
doman logrotate.8
dodoc ChangeLog.md
@@ -75,7 +70,7 @@ src_install() {
use cron && install_cron_file
systemd_dounit examples/logrotate.{service,timer}
- newtmpfiles "${FILESDIR}/${PN}.tmpfiles" "${PN}".conf
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
keepdir /etc/logrotate.d
}
@@ -85,11 +80,14 @@ pkg_postinst() {
elog "The ${PN} binary is now installed under /usr/bin. Please"
elog "update your links"
elog
+
move_old_state_file
+
elog "If you are running systemd you might need to run:"
elog "systemd-tmpfiles --create /usr/lib/tmpfiles.d/logrotate.conf"
elog "in order to create the new location of the logrotate state file"
elog
+
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "If you wish to have logrotate e-mail you updates, please"
elog "emerge virtual/mailx and configure logrotate in"