diff options
author | Torsten Veller <tove@gentoo.org> | 2010-03-23 09:09:50 +0000 |
---|---|---|
committer | Torsten Veller <tove@gentoo.org> | 2010-03-23 09:09:50 +0000 |
commit | 328acabb8e1f6fa1906422ccab25b9b299644c36 (patch) | |
tree | 1fe7637adaaf001b89f81e958d1c5eadae838251 /net-misc/chrony | |
parent | Version bump (diff) | |
download | gentoo-2-328acabb8e1f6fa1906422ccab25b9b299644c36.tar.gz gentoo-2-328acabb8e1f6fa1906422ccab25b9b299644c36.tar.bz2 gentoo-2-328acabb8e1f6fa1906422ccab25b9b299644c36.zip |
Anchor the config options check in the init script (#310773)
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/chrony')
-rw-r--r-- | net-misc/chrony/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/chrony/chrony-1.24-r1.ebuild | 61 | ||||
-rw-r--r-- | net-misc/chrony/files/chronyd.rc | 12 |
3 files changed, 76 insertions, 5 deletions
diff --git a/net-misc/chrony/ChangeLog b/net-misc/chrony/ChangeLog index 5aaae59d79d5..8122422f8895 100644 --- a/net-misc/chrony/ChangeLog +++ b/net-misc/chrony/ChangeLog @@ -1,6 +1,12 @@ # 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.49 2010/03/15 18:42:49 fauli Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/ChangeLog,v 1.50 2010/03/23 09:09:48 tove Exp $ + +*chrony-1.24-r1 (23 Mar 2010) + + 23 Mar 2010; Torsten Veller <tove@gentoo.org> +chrony-1.24-r1.ebuild, + files/chronyd.rc: + Anchor the config options check in the init script (#310773) 15 Mar 2010; Christian Faulhammer <fauli@gentoo.org> chrony-1.24.ebuild: stable x86, security bug 307757 diff --git a/net-misc/chrony/chrony-1.24-r1.ebuild b/net-misc/chrony/chrony-1.24-r1.ebuild new file mode 100644 index 000000000000..51999f25cdff --- /dev/null +++ b/net-misc/chrony/chrony-1.24-r1.ebuild @@ -0,0 +1,61 @@ +# 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-r1.ebuild,v 1.1 2010/03/23 09:09:48 tove 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 readline" + +RDEPEND="readline? ( >=sys-libs/readline-4.1-r4 ) + caps? ( sys-libs/libcap )" +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 +} diff --git a/net-misc/chrony/files/chronyd.rc b/net-misc/chrony/files/chronyd.rc index c6b28a488d6b..32dfd424e081 100644 --- a/net-misc/chrony/files/chronyd.rc +++ b/net-misc/chrony/files/chronyd.rc @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/files/chronyd.rc,v 1.9 2009/11/16 14:28:14 cla Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/files/chronyd.rc,v 1.10 2010/03/23 09:09:50 tove Exp $ depend() { need net @@ -30,16 +30,20 @@ checkconfig() { # know if it might be handy PIDFILE=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"` fi + return 0 +} +setxtrarg() { if [ -c /dev/rtc ]; then - grep -q 'rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s" + grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s" fi - grep -q 'dumponexit' "${CFGFILE}" && ARGS="${ARGS} -r" + grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r" return 0 } start() { checkconfig || return $? + setxtrarg [ -n "${PIDFILE}" ] || PIDFILE=/var/run/chronyd.pid |