summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2013-02-04 12:27:46 +0000
committerJeroen Roovers <jer@gentoo.org>2013-02-04 12:27:46 +0000
commit6eb1d0afad4993f072b827cdddbbe81cc084361a (patch)
treef91a65bb9bdf04d0b1f246346d49174661337057 /net-misc
parentVersion bump for the 3.7 series (diff)
downloadgentoo-2-6eb1d0afad4993f072b827cdddbbe81cc084361a.tar.gz
gentoo-2-6eb1d0afad4993f072b827cdddbbe81cc084361a.tar.bz2
gentoo-2-6eb1d0afad4993f072b827cdddbbe81cc084361a.zip
Version bump.
(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/chrony/ChangeLog8
-rw-r--r--net-misc/chrony/chrony-1.27.ebuild (renamed from net-misc/chrony/chrony-1.27_pre1.ebuild)32
-rw-r--r--net-misc/chrony/files/chronyd.init66
-rw-r--r--net-misc/chrony/metadata.xml3
4 files changed, 94 insertions, 15 deletions
diff --git a/net-misc/chrony/ChangeLog b/net-misc/chrony/ChangeLog
index d2aaa9ff2906..c1837aab92c3 100644
--- a/net-misc/chrony/ChangeLog
+++ b/net-misc/chrony/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/chrony
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/ChangeLog,v 1.91 2013/01/26 17:48:11 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/ChangeLog,v 1.92 2013/02/04 12:27:46 jer Exp $
+
+*chrony-1.27 (04 Feb 2013)
+
+ 04 Feb 2013; Jeroen Roovers <jer@gentoo.org> -chrony-1.27_pre1.ebuild,
+ +chrony-1.27.ebuild, +files/chronyd.init, metadata.xml:
+ Version bump.
26 Jan 2013; Jeroen Roovers <jer@gentoo.org> chrony-1.26.ebuild,
chrony-1.27_pre1.ebuild:
diff --git a/net-misc/chrony/chrony-1.27_pre1.ebuild b/net-misc/chrony/chrony-1.27.ebuild
index a3c5f3740e8f..1ea1cdab39ad 100644
--- a/net-misc/chrony/chrony-1.27_pre1.ebuild
+++ b/net-misc/chrony/chrony-1.27.ebuild
@@ -1,33 +1,35 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/chrony-1.27_pre1.ebuild,v 1.4 2013/01/26 17:48:11 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/chrony-1.27.ebuild,v 1.1 2013/02/04 12:27:46 jer Exp $
-EAPI=4
+EAPI=5
inherit eutils toolchain-funcs
-MY_P="${P/_/-}"
DESCRIPTION="NTP client and server programs"
HOMEPAGE="http://chrony.tuxfamily.org/"
-SRC_URI="http://download.tuxfamily.org/${PN}/${MY_P}.tar.gz"
+SRC_URI="http://download.tuxfamily.org/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~sparc ~x86"
-IUSE="caps +ipv6 +readline"
+IUSE="caps ipv6 +readline +rtc"
-RDEPEND="
- readline? ( >=sys-libs/readline-4.1-r4 )
+DEPEND="
caps? ( sys-libs/libcap )
+ readline? ( >=sys-libs/readline-4.1-r4 )
"
-DEPEND="${RDEPEND}"
-DOCS=( examples/chrony.{conf,keys}.example )
+RDEPEND="${REPEND}"
-S="${WORKDIR}/${MY_P}"
+DOCS=( examples/chrony.{conf,keys}.example )
src_prepare() {
- sed -i examples/* chrony*.{1,5,8} faq.txt chrony.texi \
- -e "s:/etc/chrony\.:/etc/chrony/chrony.:g" \
- || die
+ sed -i \
+ -e 's:/etc/chrony\.:/etc/chrony/chrony.:g' \
+ examples/* chrony*.{1,5,8} faq.txt chrony.texi || die
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ conf.c chrony.texi chrony.txt \
+ examples/chrony.conf.example || die
}
src_configure() {
@@ -38,6 +40,7 @@ src_configure() {
$( use caps || echo --disable-linuxcaps ) \
$( use ipv6 || echo --disable-ipv6 ) \
$( use readline || echo --disable-readline ) \
+ $( use rtc || echo --disable-rtc ) \
${EXTRA_ECONF} \
--docdir=/usr/share/doc/${PF} \
--infodir=/usr/share/info \
@@ -45,6 +48,7 @@ src_configure() {
--prefix=/usr \
--sysconfdir=/etc/chrony \
--without-nss \
+ --without-tomcrypt \
|| die
}
@@ -57,7 +61,7 @@ src_install() {
rm "${D}"/usr/share/doc/${PF}/COPYING || die
doinfo chrony.info*
- newinitd "${FILESDIR}"/chronyd.rc chronyd
+ newinitd "${FILESDIR}"/chronyd.init chronyd
newconfd "${FILESDIR}"/chronyd.conf chronyd
keepdir /var/{lib,log}/chrony /etc/chrony
diff --git a/net-misc/chrony/files/chronyd.init b/net-misc/chrony/files/chronyd.init
new file mode 100644
index 000000000000..c06a82288c27
--- /dev/null
+++ b/net-misc/chrony/files/chronyd.init
@@ -0,0 +1,66 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/files/chronyd.init,v 1.1 2013/02/04 12:27:46 jer Exp $
+
+depend() {
+ use dns
+}
+
+checkconfig() {
+ # Note that /etc/chrony/chrony.keys is *NOT* checked. This
+ # is because the user may have specified another key
+ # file, and we don't want to force the user to use that
+ # exact name for the key file.
+ if [ ! -f "${CFGFILE}" ] ; then
+ eerror "Please create ${CFGFILE} and the"
+ eerror "chrony key file (usually /etc/chrony/chrony.keys)"
+ eerror "by using the"
+ eerror ""
+ eerror " chrony.conf.example"
+ eerror " chrony.keys.example"
+ eerror ""
+ eerror "files (from the documentation directory)"
+ eerror "as templates."
+ return 1
+ else
+ # Actually, I tried it, and chrony seems to ignore the pidfile
+ # option. I'm going to leave it here anyway, since you never
+ # 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"
+ fi
+ grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r"
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ setxtrarg
+
+ [ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid
+
+ ebegin "Starting chronyd"
+ start-stop-daemon --start --background --quiet \
+ --exec /usr/sbin/chronyd \
+ --pidfile "${PIDFILE}" \
+ -- -f "${CFGFILE}" ${ARGS}
+ eend $? "Failed to start chronyd"
+}
+
+stop() {
+ checkconfig || return $?
+
+ [ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid
+
+ ebegin "Stopping chronyd"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${PIDFILE}"
+ eend $? "Failed to stop chronyd"
+}
diff --git a/net-misc/chrony/metadata.xml b/net-misc/chrony/metadata.xml
index 30272d794b17..10fecd3edce8 100644
--- a/net-misc/chrony/metadata.xml
+++ b/net-misc/chrony/metadata.xml
@@ -17,4 +17,7 @@ Chrony はコンピュータのシステム・クロックの精度を保つた
接続(e.g. dial-up)しか持たないシステムで機能するよう書かれています。ですが永続的
な接続でも機能します。
</longdescription>
+<use>
+<flag name='rtc'>Include support for the Linux Real Time Clock interface</flag>
+</use>
</pkgmetadata>