diff options
author | Chema Alonso Josa <nimiux@gentoo.org> | 2017-08-04 21:24:04 +0200 |
---|---|---|
committer | Chema Alonso Josa <nimiux@gentoo.org> | 2017-08-04 21:24:30 +0200 |
commit | 74a6a06fa5fecb0b403bfbce3f0318a19eb92b26 (patch) | |
tree | c8a96d4c9a722a6935ea675b9b6fd1521a96b97f /app-admin | |
parent | dev-vcs/git: bump. (diff) | |
download | gentoo-74a6a06fa5fecb0b403bfbce3f0318a19eb92b26.tar.gz gentoo-74a6a06fa5fecb0b403bfbce3f0318a19eb92b26.tar.bz2 gentoo-74a6a06fa5fecb0b403bfbce3f0318a19eb92b26.zip |
app-admin/logrotate: Moves state file to /var/lib/misc/
Gentoo-Bug: 357275
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/logrotate/logrotate-3.12.3.ebuild | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/app-admin/logrotate/logrotate-3.12.3.ebuild b/app-admin/logrotate/logrotate-3.12.3.ebuild index 410660a032a6..34807c80e888 100644 --- a/app-admin/logrotate/logrotate-3.12.3.ebuild +++ b/app-admin/logrotate/logrotate-3.12.3.ebuild @@ -27,6 +27,18 @@ RDEPEND="${CDEPEND} cron? ( virtual/cron ) bzip2? ( app-arch/bzip2 )" +STATEFILE="/var/lib/misc/logrotate.status" +OLDSTATEFILE="/var/lib/logrotate.status" + +move_old_state_file() { + elog "logrotate state file is now located at ${STATEFILE}" + elog "See bug #357275" + if [[ -e "${OLDSTATEFILE}" ]] ; then + elog "Moving your current state file to new location: ${STATEFILE}" + mv -n "${OLDSTATEFILE}" "${STATEFILE}" + fi +} + install_cron_file() { exeinto /etc/cron.daily newexe "${S}"/examples/logrotate.cron "${PN}" @@ -46,7 +58,7 @@ src_configure() { if use bzip2 ; then compressconf="--with-compress-command=/bin/bzip2 --with-uncompress-command=/bin/bunzip2 --with-compress-extension=.bz2" fi - econf $(use_with acl) $(use_with selinux) ${compressconf} + econf $(use_with acl) $(use_with selinux) ${compressconf} --with-state-file-path="${STATEFILE}" } src_test() { @@ -73,12 +85,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 [[ -z ${REPLACING_VERSIONS} ]] ; then elog "If you wish to have logrotate e-mail you updates, please" elog "emerge virtual/mailx and configure logrotate in" elog "/etc/logrotate.conf appropriately" elog elog "Additionally, /etc/logrotate.conf may need to be modified" - elog "for your particular needs. See man logrotate for details." + elog "for your particular needs. See man logrotate for details." fi } |