From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- net-misc/chrony/Manifest | 1 + net-misc/chrony/chrony-2.1.1.ebuild | 114 +++++++++++++++++++++++++++++++ net-misc/chrony/files/chrony.logrotate | 11 +++ net-misc/chrony/files/chronyd.conf | 12 ++++ net-misc/chrony/files/chronyd.init | 66 ++++++++++++++++++ net-misc/chrony/files/chronyd.service-r2 | 12 ++++ net-misc/chrony/metadata.xml | 29 ++++++++ 7 files changed, 245 insertions(+) create mode 100644 net-misc/chrony/Manifest create mode 100644 net-misc/chrony/chrony-2.1.1.ebuild create mode 100644 net-misc/chrony/files/chrony.logrotate create mode 100644 net-misc/chrony/files/chronyd.conf create mode 100644 net-misc/chrony/files/chronyd.init create mode 100644 net-misc/chrony/files/chronyd.service-r2 create mode 100644 net-misc/chrony/metadata.xml (limited to 'net-misc/chrony') diff --git a/net-misc/chrony/Manifest b/net-misc/chrony/Manifest new file mode 100644 index 000000000000..a5c073d60eee --- /dev/null +++ b/net-misc/chrony/Manifest @@ -0,0 +1 @@ +DIST chrony-2.1.1.tar.gz 391037 SHA256 b0565148eaa38e971291281d76556c32f0138ec22e9784f8bceab9c65f7ad7d4 SHA512 bbb6d4b3436b7c3c7d45628500678ce31291aaa7f59df0f616268fcdb9285f21a79b085d232773ce732eea82f28fa87f4c56ac5b6a7388275c67889daf641499 WHIRLPOOL a431253f173fb8c52f417c0a074c66e3125bb46247b3a177d6ad4c96d953a4557fb159e5940f03d39a83ad1b5a92dd73f84333e3d2274a42a5e93337ca2f6d7e diff --git a/net-misc/chrony/chrony-2.1.1.ebuild b/net-misc/chrony/chrony-2.1.1.ebuild new file mode 100644 index 000000000000..ac2cc6a2ac16 --- /dev/null +++ b/net-misc/chrony/chrony-2.1.1.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils systemd 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 ~arm hppa ~mips ppc ppc64 sparc x86" +IUSE="caps +cmdmon ipv6 libedit +ntp +phc +pps readline +refclock +rtc selinux +adns" +REQUIRED_USE=" + ?? ( libedit readline ) +" + +CDEPEND=" + caps? ( sys-libs/libcap ) + libedit? ( dev-libs/libedit ) + readline? ( >=sys-libs/readline-4.1-r4:= ) +" +DEPEND=" + ${CDEPEND} + sys-apps/texinfo +" +RDEPEND=" + ${CDEPEND} + selinux? ( sec-policy/selinux-chronyd ) +" + +RESTRICT=test + +S="${WORKDIR}/${P/_/-}" + +src_prepare() { + sed -i \ + -e 's:/etc/chrony\.:/etc/chrony/chrony.:g' \ + -e 's:/var/run:/run:g' \ + conf.c chrony.texi.in chrony.txt examples/* FAQ || die +} + +src_configure() { + tc-export CC + + local CHRONY_EDITLINE + # ./configure legend: + # --disable-readline : disable line editing entirely + # --without-readline : do not use sys-libs/readline (enabled by default) + # --without-editline : do not use dev-libs/libedit (enabled by default) + if ! use readline && ! use libedit; then + CHRONY_EDITLINE='--disable-readline' + else + CHRONY_EDITLINE+=" $(usex readline '' --without-readline)" + CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)" + fi + + # not an autotools generated script + local CHRONY_CONFIGURE=" + ./configure \ + $(usex caps '' --disable-linuxcaps) \ + $(usex cmdmon '' --disable-cmdmon) \ + $(usex ipv6 '' --disable-ipv6) \ + $(usex ntp '' --disable-ntp) \ + $(usex phc '' --disable-phc) \ + $(usex pps '' --disable-pps) \ + $(usex rtc '' --disable-rtc) \ + $(usex refclock '' --disable-refclock) \ + $(usex adns '' --disable-asyncdns) \ + ${CHRONY_EDITLINE} \ + ${EXTRA_ECONF} \ + --docdir=/usr/share/doc/${PF} \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man \ + --prefix=/usr \ + --sysconfdir=/etc/chrony \ + --disable-sechash \ + --without-nss \ + --without-tomcrypt + " + + # print the ./configure call to aid in future debugging + einfo ${CHRONY_CONFIGURE} + bash ${CHRONY_CONFIGURE} || die +} + +src_compile() { + emake all docs +} + +src_install() { + default + rm "${D}"/usr/share/doc/${PF}/COPYING || die + doinfo chrony.info* + + newinitd "${FILESDIR}"/chronyd.init chronyd + newconfd "${FILESDIR}"/chronyd.conf chronyd + + insinto /etc/${PN} + newins examples/chrony.conf.example3 chrony.conf + newins examples/chrony.keys.example chrony.keys + + dodoc examples/*.example* + + keepdir /var/{lib,log}/chrony + + insinto /etc/logrotate.d + newins "${FILESDIR}"/chrony.logrotate chrony + + systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service + systemd_enable_ntpunit 50-chrony chronyd.service +} diff --git a/net-misc/chrony/files/chrony.logrotate b/net-misc/chrony/files/chrony.logrotate new file mode 100644 index 000000000000..b788874c52c6 --- /dev/null +++ b/net-misc/chrony/files/chrony.logrotate @@ -0,0 +1,11 @@ +/var/log/chrony/*.log { + missingok + 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/files/chronyd.conf b/net-misc/chrony/files/chronyd.conf new file mode 100644 index 000000000000..fc43a95c40fe --- /dev/null +++ b/net-misc/chrony/files/chronyd.conf @@ -0,0 +1,12 @@ +# /etc/conf.d/chronyd + +CFGFILE="/etc/chrony/chrony.conf" + +# Configuration dependant options : +# -s - Set system time from RTC if rtcfile directive present +# -r - Reload sample histories if dumponexit directive present +# +# The combination of "-s -r" allows chronyd to perform long term averaging of +# the gain or loss rate across system reboots and shutdowns. + +ARGS="" diff --git a/net-misc/chrony/files/chronyd.init b/net-misc/chrony/files/chronyd.init new file mode 100644 index 000000000000..83d668567e5f --- /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 +# $Id$ + +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/files/chronyd.service-r2 b/net-misc/chrony/files/chronyd.service-r2 new file mode 100644 index 000000000000..90255675c838 --- /dev/null +++ b/net-misc/chrony/files/chronyd.service-r2 @@ -0,0 +1,12 @@ +[Unit] +Description=Chrony Network Time Service +After=ntpdate.service sntp.service network.target +Conflicts=ntpd.service systemd-timesyncd.service + +[Service] +Type=forking +ExecStart=/usr/sbin/chronyd +PIDFile=/run/chronyd.pid + +[Install] +WantedBy=multi-user.target diff --git a/net-misc/chrony/metadata.xml b/net-misc/chrony/metadata.xml new file mode 100644 index 000000000000..a9622740d6c2 --- /dev/null +++ b/net-misc/chrony/metadata.xml @@ -0,0 +1,29 @@ + + + + + jer@gentoo.org + + +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 +written to work well for systems which have only an intermittent (e.g. dial-up) +connection to the network where the NTP servers are. It still works well +in a "permanently connected" mode. + + +Chrony はコンピュータのシステム・クロックの精度を保つために使われるプログラムの +ペア(chronyd と chronyc)です。chronyd は NTP サーバがあるネットワークと断続的な +接続(e.g. dial-up)しか持たないシステムで機能するよう書かれています。ですが永続的 +な接続でも機能します。 + + +Support for command and monitoring +Support for the Network Time Protocol (NTP) +Support for the PTP (Precision Time Protocol) Hardware Clock (PHC) interface +Support for the Linux Pulse Per Second (PPS) interface +Support for reference clocks +Support for the Linux Real Time Clock interface +Support for asynchronous DNS + + -- cgit v1.2.3-65-gdbad