Summary: | net-misc/rsync-3.1.1 logrotate script overrides user-set values | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dimitrios Semitsoglou-Tsiapos <kmhzsem> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | christo.kotsi |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
net-misc-rsync-logrotate.diff
net-misc-rsync-logrotate.diff rsync-3.1.1.ebuild.patch rsyncd.logrotate.patch |
Description
Dimitrios Semitsoglou-Tsiapos
2015-05-18 20:33:59 UTC
Created attachment 469434 [details, diff]
net-misc-rsync-logrotate.diff
Created attachment 469516 [details, diff]
net-misc-rsync-logrotate.diff
Removed the following variables from the file, for the case where rsyncd.logrotate overrides those from logrotate.conf.
- compress
- maxage 365
- rotate 7
- size=+1024k
A more general, however unneeded solution, is to use conditions on the ebuild. I post it here, in case someone finds other variables being overridden from the above file, now or in a future version.
--- net-misc-rsync-logrotate 2017-04-08 02:31:45.255640339 +0300
+++ net-misc-rsync-logrotate-new 2017-04-08 17:25:04.781719466 +0300
@@ -50,9 +50,32 @@
dodoc NEWS OLDNEWS README TODO tech_report.tex
insinto /etc
newins "${FILESDIR}"/rsyncd.conf-3.0.9-r1 rsyncd.conf
-
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/rsyncd.logrotate rsyncd
+
+ # Adding conditions for rsyncd protection
+ if [ ! -e "/etc/logrotate.conf" ] # Checking for longrotate.conf if it exists
+ then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/rsyncd.logrotate rsyncd
+ else # deleting overriding lines, then proceed
+ sed -i '/compress/d' "${FILESDIR}"/rsyncd.logrotate
+ sed -i '/maxage 365/d' "${FILESDIR}"/rsyncd.logrotate
+ sed -i '/rotate 7/d' "${FILESDIR}"/rsyncd.logrotate
+ sed -i '/size=+1024k/d' "${FILESDIR}"/rsyncd.logrotate
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/rsyncd.logrotate rsyncd
+
+ # Alternativly
+
+ # insinto /etc/logrotate.d
+ # newins "${FILESDIR}"/rsyncd.logrotate rsyncd
+
+ # local rsy
+ # rsy="/etc/logrotate.d/rsyncd"
+ # sed -i '/compress/d' "$rsy"
+ # sed -i '/maxage 365/d' $rsy"
+ # sed -i '/rotate 7/d' "$rsy"
+ # sed -i '/size=+1024k/d' "$rsy"
+ fi
insinto /etc/xinetd.d
newins "${FILESDIR}"/rsyncd.xinetd-3.0.9-r1 rsyncd
@@ -86,4 +109,4 @@
einfo "You maybe have to update the certificates configured in"
einfo "${EROOT}/etc/stunnel/rsync.conf"
fi
-}
+}
\ No newline at end of file
Created attachment 469574 [details, diff]
rsync-3.1.1.ebuild.patch
Created attachment 469586 [details, diff]
rsyncd.logrotate.patch
Applies to files/rsyncd.logrotate
|