1

[alpine-aports] [PATCH] main/chrony: chrony doesn't log to /var/log/chrony by default

Sören Tempel
Details
Message ID
<1442928091-11772-1-git-send-email-soeren+git@soeren-tempel.net>
Sender timestamp
1442928091
DKIM signature
missing
Download raw message
Patch: +2 -21
Dues don't create /var/log/chrony by default and don't ship a logrotate
file.
---
 main/chrony/APKBUILD         | 12 ++----------
 main/chrony/chrony.logrotate | 11 -----------
 2 files changed, 2 insertions(+), 21 deletions(-)
 delete mode 100644 main/chrony/chrony.logrotate

diff --git a/main/chrony/APKBUILD b/main/chrony/APKBUILD
index 767754c..f4afdb1 100644
--- a/main/chrony/APKBUILD
+++ b/main/chrony/APKBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
 pkgname=chrony
 pkgver=2.1.1
-pkgrel=5
+pkgrel=6
 _ver=${pkgver/_/-}
 pkgdesc="NTP client and server programs"
 url="http://chrony.tuxfamily.org/"
@@ -18,7 +18,6 @@ source="http://download.tuxfamily.org/chrony/$pkgname-$_ver.tar.gz
 	max_resolve_interval.patch
 	chronyd.confd
 	chronyd.initd
-	chrony.logrotate
 	chrony.conf
 	timepps.h
 	"
@@ -61,17 +60,13 @@ package() {
 	cd "$_builddir"
 	make DESTDIR="$pkgdir" install
 
-	mkdir -p "$pkgdir"/etc/logrotate.d
-	install -Dm644 "$srcdir"/chrony.logrotate "$pkgdir"/etc/logrotate.d/chrony || return 1
-
 	install -Dm644 examples/*.example "$pkgdir"/usr/share/doc/chrony/
 	install -Dm755 "$srcdir"/chronyd.initd "$pkgdir"/etc/init.d/chronyd
 	install -Dm644 "$srcdir"/chronyd.confd "$pkgdir"/etc/conf.d/chronyd
 
 	mkdir -p "$pkgdir"/var/lib/chrony \
-		"$pkgdir"/var/log/chrony \
 		"$pkgdir"/etc/chrony
-	
+
 	# chrony.drift must be writable by chrony user
 	chown $pkgusers:$pkggroups "$pkgdir"/etc/chrony
 	install -m644 "$srcdir"/chrony.conf "$pkgdir"/etc/chrony/chrony.conf
@@ -86,7 +81,6 @@ c479553205e2dfe1409c7924b0d0f81b  0001-uclibc-res-do-not-call-res_init.patch
 a756428186bb27884d157a9f2c9732c6  max_resolve_interval.patch
 d62521b4c8837e15262c47ac88359307  chronyd.confd
 2d5cd89a21dc3c2fbb0c30cd89e41ad3  chronyd.initd
-468eaf2b5465d60b3ee021ce3f948ab1  chrony.logrotate
 15fd3724c7e171c3e75a29d217e707b2  chrony.conf
 28f6835098a216f4a620f9218d15b5b8  timepps.h"
 sha256sums="b0565148eaa38e971291281d76556c32f0138ec22e9784f8bceab9c65f7ad7d4  chrony-2.1.1.tar.gz
@@ -94,7 +88,6 @@ sha256sums="b0565148eaa38e971291281d76556c32f0138ec22e9784f8bceab9c65f7ad7d4  ch
 61528337a48ac82f0c393547b78a972c57fb3727ff75407c4335c9b014eb8db5  max_resolve_interval.patch
 29040502f86c419dbfbc7e2627cc658a8df82b37da21b3d1fce2eed9136d8f99  chronyd.confd
 ac58a3e5ffb26202e501223418f12a110f50e1008c059337536c363e3ecfcdc6  chronyd.initd
-d25ce3f5ce4a28184931c68a97340a5b332cbaf071434d172f262122240ad652  chrony.logrotate
 d50a474d654ff4a1b742e712bbfc2d9e6c75e04b28ec9b86ee2054bdaf830fc0  chrony.conf
 ab4f459ee9d1037d7fa962a66ea652b08935539a4f443dc216e82b5717d8bb22  timepps.h"
 sha512sums="bbb6d4b3436b7c3c7d45628500678ce31291aaa7f59df0f616268fcdb9285f21a79b085d232773ce732eea82f28fa87f4c56ac5b6a7388275c67889daf641499  chrony-2.1.1.tar.gz
@@ -102,6 +95,5 @@ sha512sums="bbb6d4b3436b7c3c7d45628500678ce31291aaa7f59df0f616268fcdb9285f21a79b
 19faf017e4502947a9b549b8165bf31bf11b814f2bf7b013a1ac11460afa654287d58de341cfa1f10b6a34334ed7d1d34e58b350c3c68bf6336530712d4db13c  max_resolve_interval.patch
 6919c7bddce2a8f81c0f2759c7c58506e97f89102bfeb7b5c19c6da5ed4cbd9070faddd4f3fb411bb4c653fffbdcc93a7f7dc810f38b199f038b1d4072f57640  chronyd.confd
 d182fc81df9c9751f487434990127bbd40eb9e4a567d1810d987fbd48746d28890a9174d1ee65ceb203452234d17db0cf1f2c4073459ee2aa2b8c62e6fa221de  chronyd.initd
-8c2f9b396bde7f0124fdc4bb25fb31d154ae4ec73717401e5dd36a3730cd55ff91e60c70bcafb917883e437993ee245ad56e7a12c3711b482c6df592896a42dc  chrony.logrotate
 2719b71251a110d3a9f697fad17f74a898bb0cf33cfbf60f4ec3e598ad8f09cadc6afbb069be06aff8da8f58e00ba622f4384b9dd88f25b279e6f3b6cb43ad3c  chrony.conf
 eb11fc19243d1789016d88eb7645bfe67c46304547781489bf36eb1dd4c252d523681ff835a6488fa0ef62b6b9e2f781c672279f4439f5d5640a3f214a113048  timepps.h"
diff --git a/main/chrony/chrony.logrotate b/main/chrony/chrony.logrotate
deleted file mode 100644
index 1b7b589..0000000
--- a/main/chrony/chrony.logrotate
@@ -1,11 +0,0 @@
-/var/log/chrony/*.log
-	sharedscripts
-	postrotate
-        	PASSWORD=`awk '$1 ~ /^1$/ {print $2; exit}' /etc/chrony/chrony.keys`
-		cat << EOF | /usr/bin/chronyc | sed '/^200 OK$/d'
-		password $PASSWORD
-		cyclelogs
-		EOF
-	endscript
-}
-
-- 
2.5.3



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Sören Tempel
Details
Message ID
<20150928124716.GA5262@francium.lan>
In-Reply-To
<1442928091-11772-1-git-send-email-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1443444436
DKIM signature
missing
Download raw message
On 22.09.15, Sören Tempel wrote:
> diff --git a/main/chrony/chrony.logrotate b/main/chrony/chrony.logrotate
> deleted file mode 100644
> index 1b7b589..0000000
> --- a/main/chrony/chrony.logrotate
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -/var/log/chrony/*.log
> -	sharedscripts
> -	postrotate
> -        	PASSWORD=`awk '$1 ~ /^1$/ {print $2; exit}' /etc/chrony/chrony.keys`
> -		cat << EOF | /usr/bin/chronyc | sed '/^200 OK$/d'
> -		password $PASSWORD
> -		cyclelogs
> -		EOF
> -	endscript
> -}

Thinking about this again I do believe that it would be probably better
to fix the logrotate script instead of removing it…

Sören.


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---