mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-12 15:36:58 +02:00
app-admin/logrotate: Sync with Gentoo
It's from Gentoo commit db15d48223204aa7ef27420940db13afdf7ec681.
This commit is contained in:
parent
1f4794f863
commit
bc063957c4
@ -1,4 +1,2 @@
|
||||
DIST logrotate-3.21.0.tar.xz 168532 BLAKE2B f7fa0050bde51e2517eac8456ecf87648bc8423621830894ceb2a3ff6b9dfe32c5b53df6a4ee59aa91bd563ed94376a635159535f4fdc170fbc673354bcef508 SHA512 c576df7d2bc1a1db2f99befdd0ea627aef2d97bdcd4a7cdea76870623ba92fb1f04f1af6d15b75e4a9085f4aef2ae5e9843c4094cdd01e24d89872ccaf9c0d4a
|
||||
DIST logrotate-3.21.0.tar.xz.asc 833 BLAKE2B b2099a0b8c15d1ea7f7325884027dff08dcc8305113411448797b8089d17026242a3f10bd6d7f3d865e3e339ec6fb5faf4ff48f8fd65bca3af4da8b335c3b5f1 SHA512 8f4c1853cd84f85c796b72b43048f4cf04e3409703e7669ee91e1d1aa5e9e5c04261fac1cdf85ec303508d5b6dbf126a44eb9ec819bcc772c664830d39e1068c
|
||||
DIST logrotate-3.22.0.tar.xz 172108 BLAKE2B c1c9f1ff792905d2917e9ba3cee360c50259e1520e04073cb69abe475499adcf01aeb3cb4c6933af61255fbb5978577c4fdf9d6ab6ebf9568358d2446791c7f3 SHA512 16fd95b4daef779212008c4a968c7a7130be8d550f58531d24fc04599cb9adff6323a745725b3b14d7312ad36cb6646fe33a3defdb5b70cda2cec9646aab066a
|
||||
DIST logrotate-3.22.0.tar.xz.asc 833 BLAKE2B 379d4fd71c6161211234903560770cf14a7ddf769b83e76ef27ad96d1204e2f4dc73d1e44aa69401db87c252c4471d5bdbace0555dfbb66c8751c20131a7751f SHA512 93664c45bfe9ea20aedc54fe216825db38eaf81d43b238cd7bf8ea3e03f7d282f53743fb6d914766a9ed0cb5b33376435d253db5b9ec7039facd66e25d349dd4
|
||||
|
@ -1,99 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kamildudka.asc
|
||||
inherit systemd tmpfiles verify-sig
|
||||
|
||||
DESCRIPTION="Rotates, compresses, and mails system logs"
|
||||
HOMEPAGE="https://github.com/logrotate/logrotate"
|
||||
SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz"
|
||||
SRC_URI+=" verify-sig? ( https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz.asc )"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
||||
IUSE="acl +cron selinux"
|
||||
|
||||
DEPEND="
|
||||
>=dev-libs/popt-1.5
|
||||
selinux? ( sys-libs/libselinux )
|
||||
acl? ( virtual/acl )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
selinux? ( sec-policy/selinux-logrotate )
|
||||
cron? ( virtual/cron )
|
||||
"
|
||||
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-kamildudka )"
|
||||
|
||||
STATEFILE="${EPREFIX}/var/lib/misc/logrotate.status"
|
||||
OLDSTATEFILE="${EPREFIX}/var/lib/logrotate.status"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-3.15.0-ignore-hidden.patch
|
||||
)
|
||||
|
||||
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}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
install_cron_file() {
|
||||
exeinto /etc/cron.daily
|
||||
newexe "${S}"/examples/logrotate.cron "${PN}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' examples/logrotate.{cron,service} || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_with acl) \
|
||||
$(use_with selinux) \
|
||||
--with-state-file-path="${STATEFILE}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin logrotate
|
||||
doman logrotate.8
|
||||
dodoc ChangeLog.md
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/logrotate.conf
|
||||
|
||||
use cron && install_cron_file
|
||||
|
||||
systemd_dounit examples/logrotate.{service,timer}
|
||||
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
|
||||
|
||||
keepdir /etc/logrotate.d
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "The ${PN} binary is now installed under /usr/bin. Please"
|
||||
elog "update your links"
|
||||
elog
|
||||
|
||||
move_old_state_file
|
||||
|
||||
tmpfiles_process ${PN}.conf
|
||||
|
||||
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."
|
||||
fi
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@ -18,13 +18,13 @@ IUSE="acl +cron selinux"
|
||||
|
||||
DEPEND="
|
||||
>=dev-libs/popt-1.5
|
||||
selinux? ( sys-libs/libselinux )
|
||||
acl? ( virtual/acl )
|
||||
selinux? ( sys-libs/libselinux )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
selinux? ( sec-policy/selinux-logrotate )
|
||||
cron? ( virtual/cron )
|
||||
selinux? ( sec-policy/selinux-logrotate )
|
||||
"
|
||||
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-cgzones )"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<email>base-system@gentoo.org</email>
|
||||
<name>Gentoo Base System</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
<longdescription>
|
||||
Logrotate allows for the automatic rotation compression, removal
|
||||
and mailing of log files. Logrotate can be set to handle a log
|
||||
file daily, weekly, monthly or when the log file gets to a certain
|
||||
@ -19,11 +19,11 @@
|
||||
su tamaño alcanza cierto valor.
|
||||
</longdescription>
|
||||
<use>
|
||||
<flag name="acl">Installs acl support</flag>
|
||||
<flag name="cron">Installs cron file</flag>
|
||||
<flag name="selinux">Installs Security Enhanced Linux support</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/logrotate/logrotate/issues</bugs-to>
|
||||
<changelog>https://github.com/logrotate/logrotate/releases</changelog>
|
||||
<remote-id type="github">logrotate/logrotate</remote-id>
|
||||
<remote-id type="cpe">cpe:/a:logrotate_project:logrotate</remote-id>
|
||||
</upstream>
|
||||
|
Loading…
Reference in New Issue
Block a user