diff options
author | Jeroen Roovers <jer@gentoo.org> | 2010-06-10 02:24:56 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2010-06-10 02:24:56 +0000 |
commit | 03115e9cc8bf20eeb7009258d062d2b8bb55e97a (patch) | |
tree | 480bebb16db64ee668b7d8b3a6f5401ed64b1c31 /net-misc/chrony | |
parent | Add logrotate to RDEPEND. Improve USE flag description. (diff) | |
download | gentoo-2-03115e9cc8bf20eeb7009258d062d2b8bb55e97a.tar.gz gentoo-2-03115e9cc8bf20eeb7009258d062d2b8bb55e97a.tar.bz2 gentoo-2-03115e9cc8bf20eeb7009258d062d2b8bb55e97a.zip |
Add USE=logrotate with a logrotate script contributed by Georg Sauthoff (bug #106391).
(Portage version: 2.2_rc67/cvs/Linux i686)
Diffstat (limited to 'net-misc/chrony')
-rw-r--r-- | net-misc/chrony/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/chrony/chrony-1.24-r2.ebuild | 72 | ||||
-rw-r--r-- | net-misc/chrony/files/chrony.logrotate | 10 | ||||
-rw-r--r-- | net-misc/chrony/metadata.xml | 3 |
4 files changed, 93 insertions, 1 deletions
diff --git a/net-misc/chrony/ChangeLog b/net-misc/chrony/ChangeLog index b669028fb79c..cd1a255789be 100644 --- a/net-misc/chrony/ChangeLog +++ b/net-misc/chrony/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/chrony # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/ChangeLog,v 1.56 2010/06/09 22:09:30 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/ChangeLog,v 1.57 2010/06/10 02:24:55 jer Exp $ + +*chrony-1.24-r2 (10 Jun 2010) + + 10 Jun 2010; Jeroen Roovers <jer@gentoo.org> +chrony-1.24-r2.ebuild, + +files/chrony.logrotate, metadata.xml: + Add USE=logrotate with a logrotate script contributed by Georg Sauthoff + (bug #106391). 09 Jun 2010; Jeroen Roovers <jer@gentoo.org> metadata.xml: Maintain. diff --git a/net-misc/chrony/chrony-1.24-r2.ebuild b/net-misc/chrony/chrony-1.24-r2.ebuild new file mode 100644 index 000000000000..dd343e56dbf1 --- /dev/null +++ b/net-misc/chrony/chrony-1.24-r2.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/chrony-1.24-r2.ebuild,v 1.1 2010/06/10 02:24:55 jer Exp $ + +EAPI=2 + +inherit eutils toolchain-funcs + +DESCRIPTION="NTP client and server programs" +HOMEPAGE="http://chrony.tuxfamily.org/" +SRC_URI="http://download.tuxfamily.org/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~mips ~ppc ~sparc ~x86" +IUSE="caps logrotate readline" + +RDEPEND=" + readline? ( >=sys-libs/readline-4.1-r4 ) + caps? ( sys-libs/libcap ) + logrotate? ( app-admin/logrotate ) +" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.21-hppa.patch + sed -i "s:/etc/chrony\.:/etc/chrony/chrony.:g" \ + examples/* chrony*.{1,5,8} faq.txt chrony.texi || die "sed failed" +} + +src_configure() { + tc-export CC + local myconf + use readline || myconf+=" --disable-readline" + #use ipv6 || myconf+=" --disable-ipv6" + use caps || myconf+=" --disable-linuxcaps" + # selfwritten configure + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc/chrony \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man \ + --docdir=/usr/share/doc/${PF} \ + ${myconf} ${EXTRA_ECONF} || die "configure failed" +} + +src_compile() { + emake all || die "make failed" + emake docs || die "make docs failed" +} + +src_install() { + emake DESTDIR="${D}" install || die + rm "${D}"/usr/share/doc/${PF}/COPYING || die + dodoc examples/chrony.{conf,keys}.example || die + doinfo chrony.info* || die + + newinitd "${FILESDIR}"/chronyd.rc chronyd || die + dosed "s:the documentation directory:/usr/share/doc/${PF}/:" \ + /etc/init.d/chronyd || die "doc sed failed" + newconfd "${FILESDIR}"/chronyd.conf chronyd || die + + keepdir /var/{lib,log}/chrony /etc/chrony + + if use logrotate; then + insinto /etc/logrotate.d + newins "${FILESDIR}"/chrony.logrotate chrony + + elog "Rotating logs works through chronyc and requires" + elog "a password to be set in /etc/chrony/chrony.keys." + fi +} diff --git a/net-misc/chrony/files/chrony.logrotate b/net-misc/chrony/files/chrony.logrotate new file mode 100644 index 000000000000..a88537d74b61 --- /dev/null +++ b/net-misc/chrony/files/chrony.logrotate @@ -0,0 +1,10 @@ +/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 +} diff --git a/net-misc/chrony/metadata.xml b/net-misc/chrony/metadata.xml index 4a9e80e69b4a..3365838251ce 100644 --- a/net-misc/chrony/metadata.xml +++ b/net-misc/chrony/metadata.xml @@ -5,6 +5,9 @@ <maintainer> <email>jer@gentoo.org</email> </maintainer> +<use> + <flag name="logrotate">Use <pkg>app-admin/logrotate</pkg> for log rotation</flag> +</use> <longdescription> Chrony is a pair of programs (chronyd and chronyc) which are used to maintain the accuracy of the system clock on a computer. chronyd has been specifically |