Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/ntpsec/
Date: Mon, 23 Dec 2019 20:52:12
Message-Id: 1577134308.1077f6b1db9de0b0ddeb75432316491c0f748c1b.blueness@gentoo
1 commit: 1077f6b1db9de0b0ddeb75432316491c0f748c1b
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 23 20:51:48 2019 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 23 20:51:48 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1077f6b1
7
8 net-misc/ntpsec: version bump to 1.1.8, bug #703618
9
10 Package-Manager: Portage-2.3.79, Repoman-2.3.16
11 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
12
13 net-misc/ntpsec/Manifest | 1 +
14 net-misc/ntpsec/ntpsec-1.1.8.ebuild | 159 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 160 insertions(+)
16
17 diff --git a/net-misc/ntpsec/Manifest b/net-misc/ntpsec/Manifest
18 index 31d78e746ff..3989a106bba 100644
19 --- a/net-misc/ntpsec/Manifest
20 +++ b/net-misc/ntpsec/Manifest
21 @@ -1,3 +1,4 @@
22 DIST ntpsec-1.1.4.tar.gz 2536268 BLAKE2B 320e7afee1b776e0327f8bf34bc0b8cd3a2c67fd9fd16564323ce825cb9e36d7d5fb48a38b734600286cbd039f41f296d9e488e25d2680f08412aa983101987b SHA512 1b74e7cb87e189137e1b66b52ce89498e0061a10abf017c36bfdecb4aefe9c3fb6e8fd7819a9f822fb946dca6ae20ee724b2aed35e03d73f8e3015d8818d02db
23 DIST ntpsec-1.1.6.tar.gz 2600632 BLAKE2B 1ee3e266f9a0ff45fc8f001a2b5a1722c6acf75a2151ee3724812acef3409eccbb865b321a3a346c7ced1770aa24190281a94593b881b4bbb0a2b2e6df5629cc SHA512 f57fde6f329a858313968798d64df5e93d7eba43edf4752cd0eb45ff1a2237ce2731b4603ec997c493dea85edb42976f96eb1508beae087a8c2ae8a76c0a6941
24 DIST ntpsec-1.1.7.tar.gz 2534524 BLAKE2B 5777ecca4ceb988632fadc0e7124530993a7758cdf335e8cd90f0ec1a8b643be89b67c0e2bf49d6d7193bf92ded138af0df4b5856c0d113f552ef22dd8a6cadf SHA512 734b12820539e655e504dd5071a58b9d1f80c0b0c3c7458c797ba7ada23d8e446751fbcbddd9832d9151a3ba9464749878db9e77e23cdd5f6215ab9e1d908ae9
25 +DIST ntpsec-1.1.8.tar.gz 2589363 BLAKE2B e7e11a7d980599ac598f084608160d3f6f6cf8e2aab5fb45cc15cabca30462bd03db7b9ecc140826c5d7b5e26f49b48f7f2b6043bdc2ffa1d73167347fb8123f SHA512 0920f25adf68f1b8ccd1734c5d61ba1c858cd86b342db7b5155dd9b58e538aa96aad3fd4058597f079ec3df63cb51d2900ac8e6d9c84d6f2bd4a3a22cc0c967c
26
27 diff --git a/net-misc/ntpsec/ntpsec-1.1.8.ebuild b/net-misc/ntpsec/ntpsec-1.1.8.ebuild
28 new file mode 100644
29 index 00000000000..0d9f22dc3aa
30 --- /dev/null
31 +++ b/net-misc/ntpsec/ntpsec-1.1.8.ebuild
32 @@ -0,0 +1,159 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +PYTHON_COMPAT=( python2_7 python3_{5,6} )
39 +PYTHON_REQ_USE='threads(+)'
40 +
41 +inherit flag-o-matic python-r1 waf-utils systemd
42 +
43 +if [[ ${PV} == *9999* ]]; then
44 + inherit git-r3
45 + EGIT_REPO_URI="https://gitlab.com/NTPsec/ntpsec.git"
46 + BDEPEND=""
47 + KEYWORDS=""
48 +else
49 + SRC_URI="ftp://ftp.ntpsec.org/pub/releases/${PN}-${PV}.tar.gz"
50 + RESTRICT="mirror"
51 + BDEPEND=""
52 + KEYWORDS="~amd64 ~arm ~arm64 ~x86"
53 +fi
54 +
55 +DESCRIPTION="The NTP reference implementation, refactored"
56 +HOMEPAGE="https://www.ntpsec.org/"
57 +
58 +NTPSEC_REFCLOCK=(
59 + oncore trimble truetime gpsd jjy generic spectracom
60 + shm pps hpgps zyfer arbiter nmea neoclock modem
61 + local)
62 +
63 +IUSE_NTPSEC_REFCLOCK=${NTPSEC_REFCLOCK[@]/#/rclock_}
64 +
65 +LICENSE="HPND MIT BSD-2 BSD CC-BY-SA-4.0"
66 +SLOT="0"
67 +IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early gdb heat libbsd nist ntpviz samba seccomp smear tests" #ionice
68 +REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
69 +
70 +# net-misc/pps-tools oncore,pps
71 +CDEPEND="${PYTHON_DEPS}
72 + ${BDEPEND}
73 + sys-libs/libcap
74 + dev-python/psutil[${PYTHON_USEDEP}]
75 + libbsd? ( dev-libs/libbsd:0= )
76 + dev-libs/openssl:0=
77 + seccomp? ( sys-libs/libseccomp )
78 +"
79 +RDEPEND="${CDEPEND}
80 + ntpviz? ( sci-visualization/gnuplot media-fonts/liberation-fonts )
81 + !net-misc/ntp
82 + !net-misc/openntpd
83 + acct-group/ntp
84 + acct-user/ntp
85 +"
86 +DEPEND="${CDEPEND}
87 + app-text/asciidoc
88 + dev-libs/libxslt
89 + app-text/docbook-xsl-stylesheets
90 + sys-devel/bison
91 + rclock_oncore? ( net-misc/pps-tools )
92 + rclock_pps? ( net-misc/pps-tools )
93 +"
94 +
95 +WAF_BINARY="${S}/waf"
96 +
97 +src_prepare() {
98 + default
99 + # Remove autostripping of binaries
100 + sed -i -e '/Strip binaries/d' wscript
101 + if ! use libbsd ; then
102 + epatch "${FILESDIR}/${PN}-no-bsd.patch"
103 + fi
104 + python_copy_sources
105 +}
106 +
107 +src_configure() {
108 + is-flagq -flto* && filter-flags -flto* -fuse-linker-plugin
109 +
110 + local string_127=""
111 + local rclocks="";
112 + local CLOCKSTRING=""
113 +
114 + for refclock in ${NTPSEC_REFCLOCK[@]} ; do
115 + if use rclock_${refclock} ; then
116 + string_127+="$refclock,"
117 + fi
118 + done
119 + CLOCKSTRING="`echo ${string_127}|sed 's|,$||'`"
120 +
121 + local myconf=(
122 + --nopyc
123 + --nopyo
124 + --refclock="${CLOCKSTRING}"
125 + --build-epoch="$(date +%s)"
126 + $(use doc && echo "--enable-doc")
127 + $(use early && echo "--enable-early-droproot")
128 + $(use gdb && echo "--enable-debug-gdb")
129 + $(use samba && echo "--enable-mssntp")
130 + $(use seccomp && echo "--enable-seccomp")
131 + $(use smear && echo "--enable-leap-smear")
132 + $(use tests && echo "--alltests")
133 + $(use debug && echo "--enable-debug")
134 + )
135 +
136 + python_configure() {
137 + waf-utils_src_configure "${myconf[@]}"
138 + }
139 + python_foreach_impl run_in_build_dir python_configure
140 +}
141 +
142 +src_compile() {
143 + unset MAKEOPTS
144 + python_compile() {
145 + waf-utils_src_compile
146 + }
147 + python_foreach_impl run_in_build_dir python_compile
148 +}
149 +
150 +src_install() {
151 + python_install() {
152 + waf-utils_src_install
153 + }
154 + python_foreach_impl run_in_build_dir python_install
155 + python_foreach_impl python_optimize
156 +
157 + # Install heat generating scripts
158 + use heat && dosbin "${S}"/contrib/ntpheat{,usb}
159 +
160 + # Install the openrc files
161 + newinitd "${FILESDIR}"/ntpd.rc-r2 ntp
162 + newconfd "${FILESDIR}"/ntpd.confd ntp
163 +
164 + # Install the systemd unit file
165 + systemd_newunit "${FILESDIR}"/ntpd-r1.service ntpd.service
166 +
167 + # Prepare a directory for the ntp.drift file
168 + mkdir -pv "${ED}"/var/lib/ntp
169 + chown ntp:ntp "${ED}"/var/lib/ntp
170 + chmod 770 "${ED}"/var/lib/ntp
171 + keepdir /var/lib/ntp
172 +
173 + # Install a log rotate script
174 + mkdir -pv "${ED}"/etc/logrotate.d
175 + cp -v "${S}"/etc/logrotate-config.ntpd "${ED}"/etc/logrotate.d/ntpd
176 +
177 + # Install the configuration file and sample configuration
178 + cp -v "${FILESDIR}"/ntp.conf "${ED}"/etc/ntp.conf
179 + cp -Rv "${S}"/etc/ntp.d/ "${ED}"/etc/
180 +
181 + # move doc files to /usr/share/doc/"${P}"
182 + use doc && mv -v "${ED}"/usr/share/doc/"${PN}" "${ED}"/usr/share/doc/"${P}"/html
183 +}
184 +
185 +pkg_postinst() {
186 + einfo "If you want to serve time on your local network, then"
187 + einfo "you should disable all the ref_clocks unless you have"
188 + einfo "one and can get stable time from it. Feel free to try"
189 + einfo "it but PPS probably won't work unless you have a UART"
190 + einfo "GPS that actually provides PPS messages."
191 +}