diff options
author | Aric Belsito <lluixhi@gmail.com> | 2017-07-29 09:42:39 -0700 |
---|---|---|
committer | Aric Belsito <lluixhi@gmail.com> | 2017-07-29 09:42:39 -0700 |
commit | e8a5709a53937562315e56da075d4048e77cacad (patch) | |
tree | 8c5a4305db424fa58b30b8610f25ba8056e440c1 /net-misc | |
parent | app-emulation/qemu: restore patch (diff) | |
download | musl-e8a5709a53937562315e56da075d4048e77cacad.tar.gz musl-e8a5709a53937562315e56da075d4048e77cacad.tar.bz2 musl-e8a5709a53937562315e56da075d4048e77cacad.zip |
net-misc/chrony: add 3.2_pre1
Uses GNU regex extension 'GLOB_MAGIC', which is not in musl.
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/chrony/Manifest | 8 | ||||
-rw-r--r-- | net-misc/chrony/chrony-3.2_pre1.ebuild | 123 | ||||
-rw-r--r-- | net-misc/chrony/files/chrony-2.4-r1.logrotate | 7 | ||||
-rw-r--r-- | net-misc/chrony/files/chrony-3.2-no-glob_magic.patch | 14 | ||||
-rw-r--r-- | net-misc/chrony/files/chronyd.conf | 12 | ||||
-rw-r--r-- | net-misc/chrony/files/chronyd.init-r1 | 69 | ||||
-rw-r--r-- | net-misc/chrony/files/chronyd.service-r2 | 12 | ||||
-rw-r--r-- | net-misc/chrony/metadata.xml | 30 |
8 files changed, 275 insertions, 0 deletions
diff --git a/net-misc/chrony/Manifest b/net-misc/chrony/Manifest new file mode 100644 index 00000000..6577756b --- /dev/null +++ b/net-misc/chrony/Manifest @@ -0,0 +1,8 @@ +AUX chrony-2.4-r1.logrotate 131 SHA256 834647530769c6ae29db6a5dcdba04b97c1537f17f5908aebd7938c2140ba17e SHA512 e6febb744476be6c83ac086f2054dc2c190b6e1abd2cf20d4187f222b2485817f06c4ad62b8d40fcea3e18a771cf21899fe0a1dafbfb31f5c99da9092d24d79b WHIRLPOOL 338393e500fb49eb90ff83b66e1b1467a7e3aedf0cbc334a6d636232cbf64bff547a43917aec0192a3c1091c204344ebdbaf2eabd40cf2a180f43454fb422e47 +AUX chrony-3.2-no-glob_magic.patch 404 SHA256 0e85df5fcc6138ea67636a9f0295efd6ec423a24d461ee6e2e5333d7a5cf62b0 SHA512 0ab70920e1807262ebbabe6fec8228d9dd79a3906383d873dcc0c1de69bdb352dc6145e1a8e39d115c16afce6db6833ce3735aad4e8b7a085e9fe82f2513d342 WHIRLPOOL d040b389ee12b0813a0ca835215c17fee4c047d083a07f7e3b18dcb57b0b88ac0963491fe9712dd1252890e31cc9f22faa8da675f0a42c454e2b3b602b50e8fa +AUX chronyd.conf 378 SHA256 29040502f86c419dbfbc7e2627cc658a8df82b37da21b3d1fce2eed9136d8f99 SHA512 6919c7bddce2a8f81c0f2759c7c58506e97f89102bfeb7b5c19c6da5ed4cbd9070faddd4f3fb411bb4c653fffbdcc93a7f7dc810f38b199f038b1d4072f57640 WHIRLPOOL 14e6e90959e434475f8d74a144fd342588e99a7102b15cedbf7a436ca32db3e09bbe4bd2630634fac9045db4b75a6c7afcd8f91c67bd8bb4f977d821d220ced9 +AUX chronyd.init-r1 1637 SHA256 f3c8b8dfbb1ee14b251d3502cb799411aa4fb71d107ddd90b41b4841eee22f5c SHA512 cbfafe8210cc3d86d417d590fa6c54924ef9f3487c3766a17fffb34d2421a5fc2dfb98ce53dcc33c5811e7c2fd428a235bfde68d999cb50c7d9e5100f769a37b WHIRLPOOL d1b31217ede912611bf7aec69a37d4321913cff0e41f8dfe1df1ff1a6605fd21bbfbdced53ea6e9dc0a22ff5848fe0b705ddf0a6b0e5154ddd4e9b6ed1fe656a +AUX chronyd.service-r2 261 SHA256 d5996c6b8596e137b36099d0ce7974bfd8e36411d999712d2f0393ac738f3754 SHA512 671415208e123628e123575d708dbe4ed7946bc45832dce506d539cc747e84ae63783b53398e96a60d815f1758fe44836f34d804e28859538cf560715474dffe WHIRLPOOL f95d9472ad30fb06e3d0014ddc2be492dd1a6d2b5590bed27214ba1b0566d83e89e108a8df3de9dade939a9feff005bfff431d796f9e813388830e3f3dfc437b +DIST chrony-3.2-pre1.tar.gz 431211 SHA256 3c6fa2fe71ba670955498dcecab6a57c0b4ed8bc5a761629e96cd6038946942f SHA512 8ce54f246c3e11e72d90ba03e6f39894445eed314b26113c4a98b5746a00c1886291bf1bb20db68318c3310350b36ea6c88fe05607ae82e551ee93aea6e3fcb6 WHIRLPOOL 1fdf2b0d66b048b448e184b947416bd5ac10996633a41b77749f787ac88b2e605925174483ba8b52f398a1adc8c79b56a2c75d759d187066981dad8045c32eb2 +EBUILD chrony-3.2_pre1.ebuild 2958 SHA256 15b6207d43ca1de44d3369d7e2730096f536f6881fe950531acfd7f74c4a1521 SHA512 e83a6d0a53c86d47613432c03f9cd7ef5f825ee3728667bd44cf14f80d667c7384c1abd3e7a8864dafa3a1ecc7cc83c7381a71a5591a3ac14a4b913acc06ddde WHIRLPOOL 582e8e29e71e6dc2a6c02e1ad6db7031ff06e22b004a730b3083aa32c08cd1f8771e603d401076356a08d2c301baa3e4399be608d832fc7a2ab59bd3e2bd79b4 +MISC metadata.xml 1566 SHA256 df519c8729414da92dabce3e6fcfd98e7cbee2c3ca31c1271d280d63f39cfdc2 SHA512 bc9d33fa4f146feb7b934ffa6cf8e4d235316f23b9e08dbd6bf6d071496508a9c1dfbed2fca686244360ef848acdeec0d3b96992601aeb669c30482f9ca5ee84 WHIRLPOOL 12b3b29c032ba953e7d945d5a7cc1264e03468fe0c9c7201bc0cc82a1927c253856f714fcce957dc74eb95f23457265ac3e08925b9a4a3530e5a710d93275c96 diff --git a/net-misc/chrony/chrony-3.2_pre1.ebuild b/net-misc/chrony/chrony-3.2_pre1.ebuild new file mode 100644 index 00000000..24347f58 --- /dev/null +++ b/net-misc/chrony/chrony-3.2_pre1.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils systemd toolchain-funcs + +DESCRIPTION="NTP client and server programs" +HOMEPAGE="https://chrony.tuxfamily.org/" +SRC_URI="https://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz" +LICENSE="GPL-2" +SLOT="0" + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64" +IUSE="caps +cmdmon html ipv6 libedit +ntp +phc pps readline +refclock +rtc seccomp selinux +adns" +REQUIRED_USE=" + ?? ( libedit readline ) +" + +CDEPEND=" + caps? ( sys-libs/libcap ) + libedit? ( dev-libs/libedit ) + readline? ( >=sys-libs/readline-4.1-r4:= ) + seccomp? ( sys-libs/libseccomp ) +" +DEPEND=" + ${CDEPEND} + html? ( dev-ruby/asciidoctor ) + pps? ( net-misc/pps-tools ) +" +RDEPEND=" + ${CDEPEND} + selinux? ( sec-policy/selinux-chronyd ) +" + +PATCHES=( "${FILESDIR}"/${PN}-3.2-no-glob_magic.patch ) + +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 doc/*.man.in examples/* || die + + default +} + +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 \ + $(use_enable seccomp scfilter) \ + $(usex adns '' --disable-asyncdns) \ + $(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 refclock '' --disable-refclock) \ + $(usex rtc '' --disable-rtc) \ + ${CHRONY_EDITLINE} \ + ${EXTRA_ECONF} \ + --docdir=/usr/share/doc/${PF} \ + --chronysockdir=/run/chrony \ + --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 $(usex html '' 'ADOC=true') +} + +src_install() { + default + + newinitd "${FILESDIR}"/chronyd.init-r1 chronyd + newconfd "${FILESDIR}"/chronyd.conf chronyd + + insinto /etc/${PN} + newins examples/chrony.conf.example1 chrony.conf + + docinto examples + dodoc examples/*.example* + + if use html; then + docinto html + dodoc doc/*.html + fi + + keepdir /var/{lib,log}/chrony + + insinto /etc/logrotate.d + newins "${FILESDIR}"/chrony-2.4-r1.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-2.4-r1.logrotate b/net-misc/chrony/files/chrony-2.4-r1.logrotate new file mode 100644 index 00000000..a2cf8feb --- /dev/null +++ b/net-misc/chrony/files/chrony-2.4-r1.logrotate @@ -0,0 +1,7 @@ +/var/log/chrony/*.log { + missingok + sharedscripts + postrotate + /usr/bin/chronyc cyclelogs |grep -v '^200 OK'; exit 0 + endscript +} diff --git a/net-misc/chrony/files/chrony-3.2-no-glob_magic.patch b/net-misc/chrony/files/chrony-3.2-no-glob_magic.patch new file mode 100644 index 00000000..4b07f473 --- /dev/null +++ b/net-misc/chrony/files/chrony-3.2-no-glob_magic.patch @@ -0,0 +1,14 @@ +diff -Naur chrony-3.2-pre1.orig/conf.c chrony-3.2-pre1/conf.c +--- chrony-3.2-pre1.orig/conf.c 2017-07-29 09:37:52.464925620 -0700 ++++ chrony-3.2-pre1/conf.c 2017-07-29 09:39:11.161169295 -0700 +@@ -42,6 +42,10 @@ + #include "cmdparse.h" + #include "util.h" + ++#if !defined(GLOB_NOMAGIC) ++#define GLOB_NOMAGIC 0 ++#endif ++ + /* ================================================== */ + /* Forward prototypes */ + diff --git a/net-misc/chrony/files/chronyd.conf b/net-misc/chrony/files/chronyd.conf new file mode 100644 index 00000000..fc43a95c --- /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-r1 b/net-misc/chrony/files/chronyd.init-r1 new file mode 100644 index 00000000..a76e2533 --- /dev/null +++ b/net-misc/chrony/files/chronyd.init-r1 @@ -0,0 +1,69 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 \ + --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 00000000..90255675 --- /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 00000000..fe0c5f66 --- /dev/null +++ b/net-misc/chrony/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>jer@gentoo.org</email> +</maintainer> +<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 +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. +</longdescription> +<longdescription lang="ja"> +Chrony はコンピュータのシステム・クロックの精度を保つために使われるプログラムの +ペア(chronyd と chronyc)です。chronyd は NTP サーバがあるネットワークと断続的な +接続(e.g. dial-up)しか持たないシステムで機能するよう書かれています。ですが永続的 +な接続でも機能します。 +</longdescription> +<use> +<flag name="cmdmon">Support for command and monitoring</flag> +<flag name="html">Install HTML documentation</flag> +<flag name="ntp">Support for the Network Time Protocol (NTP)</flag> +<flag name="phc">Support for the PTP (Precision Time Protocol) Hardware Clock (PHC) interface</flag> +<flag name="pps">Support for the Linux Pulse Per Second (PPS) interface</flag> +<flag name="refclock">Support for reference clocks</flag> +<flag name="rtc">Support for the Linux Real Time Clock interface</flag> +<flag name="adns">Support for asynchronous DNS</flag> +</use> +</pkgmetadata> |