1 |
commit: 4bb2ccc3523ad9e5b6b96d3c5645d5d0fed6a572 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 28 13:39:34 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 28 13:39:55 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bb2ccc3 |
7 |
|
8 |
net-misc/ntp: Bump to version 4.2.8_p11 |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
net-misc/ntp/Manifest | 2 + |
13 |
net-misc/ntp/ntp-4.2.8_p11.ebuild | 145 ++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 147 insertions(+) |
15 |
|
16 |
diff --git a/net-misc/ntp/Manifest b/net-misc/ntp/Manifest |
17 |
index bd21a69ce01..b939cb21d06 100644 |
18 |
--- a/net-misc/ntp/Manifest |
19 |
+++ b/net-misc/ntp/Manifest |
20 |
@@ -1,2 +1,4 @@ |
21 |
DIST ntp-4.2.8p10-manpages.tar.xz 25004 BLAKE2B 8bb830dddc9b664cb974cb9ef887a6c1913e9695b0519e21cd0db0af71c08dd6cf90ce35904ad38605ee0bf90115f1e8e3fcdd6c624806c3448fbc47ba7eb697 SHA512 5b31a1429484ad30a35c8fa38157190a66b0983b5bf1a802c0817613901b5e0644941a3f4d5b660fcfe4ca04968766a5981331a6f9353316e7de953e55c33a09 |
22 |
DIST ntp-4.2.8p10.tar.gz 6998648 BLAKE2B 93875ddb71fda1a24bcde0358640eb0cdab7aa0020219e7d3f7632cad15c962012c871e04cae5b81156aa30b60f55e9d02ef4c402a921587b980d24fb1134ca4 SHA512 67e01ab533c3dfabb0bdd3ced848bdd239980bde28fdb2791d167b7e9690ab3b3759e1bd99e9fddcce03ddef4cd63a47eb85941bb127ceb79b7ecff22cce9c05 |
23 |
+DIST ntp-4.2.8p11-manpages.tar.xz 25700 BLAKE2B 8efff006297925e4dfe57abfb8130d0dcb69e804744a597ad92b9969019b87c7b3e44f032187073d3c19092ca92445ce06b93f89f449430fd21cc540f11f5f3b SHA512 403bc238681abaadc838f5a6619851dcd0cfa5bf780e8aeaa94e8f77e776998d1f5142d65e3fa99c23e22e4cb7207d24b059fbbc6ddcf4414f0076a4b6ab4e81 |
24 |
+DIST ntp-4.2.8p11.tar.gz 7076566 BLAKE2B e81ce2093ea7307a565089bba9cb267be64c71499872272cda221d7356676762a23ac1066ddfed7fb803083dbb9b26ca7376ea75277a63ee8de1c70409e81432 SHA512 05ac60f15a6aac50aaf340d40e4e439a421fa6e3d897bf30a69b2cef0cc97f8a6956012bfc6ceba055f4c3485a24f7fb8ebbd055e1875f1c69cbfdc35e71f236 |
25 |
|
26 |
diff --git a/net-misc/ntp/ntp-4.2.8_p11.ebuild b/net-misc/ntp/ntp-4.2.8_p11.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..179de05fc60 |
29 |
--- /dev/null |
30 |
+++ b/net-misc/ntp/ntp-4.2.8_p11.ebuild |
31 |
@@ -0,0 +1,145 @@ |
32 |
+# Copyright 1999-2018 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=6 |
36 |
+ |
37 |
+inherit autotools toolchain-funcs flag-o-matic user systemd |
38 |
+ |
39 |
+MY_P=${P/_p/p} |
40 |
+DESCRIPTION="Network Time Protocol suite/programs" |
41 |
+HOMEPAGE="http://www.ntp.org/" |
42 |
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz |
43 |
+ https://dev.gentoo.org/~polynomial-c/${MY_P}-manpages.tar.xz" |
44 |
+ |
45 |
+LICENSE="HPND BSD ISC" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~m68k-mint" |
48 |
+IUSE="caps debug ipv6 libressl openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf" |
49 |
+ |
50 |
+CDEPEND="readline? ( >=sys-libs/readline-4.1:0= ) |
51 |
+ >=dev-libs/libevent-2.0.9:=[threads?] |
52 |
+ kernel_linux? ( caps? ( sys-libs/libcap ) ) |
53 |
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] ) |
54 |
+ snmp? ( net-analyzer/net-snmp ) |
55 |
+ ssl? ( |
56 |
+ !libressl? ( dev-libs/openssl:0= ) |
57 |
+ libressl? ( dev-libs/libressl ) |
58 |
+ ) |
59 |
+ parse-clocks? ( net-misc/pps-tools )" |
60 |
+DEPEND="${CDEPEND} |
61 |
+ virtual/pkgconfig" |
62 |
+RDEPEND="${CDEPEND} |
63 |
+ selinux? ( sec-policy/selinux-ntp ) |
64 |
+ vim-syntax? ( app-vim/ntp-syntax ) |
65 |
+ !net-misc/ntpsec |
66 |
+ !openntpd? ( !net-misc/openntpd ) |
67 |
+" |
68 |
+PDEPEND="openntpd? ( net-misc/openntpd )" |
69 |
+ |
70 |
+S="${WORKDIR}/${MY_P}" |
71 |
+ |
72 |
+PATCHES=( |
73 |
+ "${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966 |
74 |
+ "${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922 |
75 |
+ "${FILESDIR}"/${PN}-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch |
76 |
+) |
77 |
+ |
78 |
+pkg_setup() { |
79 |
+ enewgroup ntp 123 |
80 |
+ enewuser ntp 123 -1 /dev/null ntp |
81 |
+} |
82 |
+ |
83 |
+src_prepare() { |
84 |
+ default |
85 |
+ append-cppflags -D_GNU_SOURCE #264109 |
86 |
+ # Make sure every build uses the same install layout. #539092 |
87 |
+ find sntp/loc/ -type f '!' -name legacy -delete || die |
88 |
+ eautoreconf #622754 |
89 |
+ # Disable pointless checks. |
90 |
+ touch .checkChangeLog .gcc-warning FRC.html html/.datecheck |
91 |
+} |
92 |
+ |
93 |
+src_configure() { |
94 |
+ # avoid libmd5/libelf |
95 |
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no |
96 |
+ export ac_cv_lib_elf_nlist=no |
97 |
+ # blah, no real configure options #176333 |
98 |
+ export ac_cv_header_dns_sd_h=$(usex zeroconf) |
99 |
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h} |
100 |
+ # Increase the default memlimit from 32MiB to 128MiB. #533232 |
101 |
+ local myeconfargs=( |
102 |
+ --with-lineeditlibs=readline,edit,editline |
103 |
+ --with-yielding-select |
104 |
+ --disable-local-libevent |
105 |
+ --docdir='$(datarootdir)'/doc/${PF} |
106 |
+ --htmldir='$(docdir)/html' |
107 |
+ --with-memlock=256 |
108 |
+ $(use_enable caps linuxcaps) |
109 |
+ $(use_enable parse-clocks) |
110 |
+ $(use_enable ipv6) |
111 |
+ $(use_enable debug debugging) |
112 |
+ $(use_with readline lineeditlibs readline) |
113 |
+ $(use_enable samba ntp-signd) |
114 |
+ $(use_with snmp ntpsnmpd) |
115 |
+ $(use_with ssl crypto) |
116 |
+ $(use_enable threads thread-support) |
117 |
+ ) |
118 |
+ econf "${myeconfargs[@]}" |
119 |
+} |
120 |
+ |
121 |
+src_install() { |
122 |
+ default |
123 |
+ # move ntpd/ntpdate to sbin #66671 |
124 |
+ dodir /usr/sbin |
125 |
+ mv "${ED%/}"/usr/bin/{ntpd,ntpdate} "${ED%/}"/usr/sbin/ || die "move to sbin" |
126 |
+ |
127 |
+ dodoc INSTALL WHERE-TO-START |
128 |
+ doman "${WORKDIR}"/man/*.[58] |
129 |
+ |
130 |
+ insinto /etc |
131 |
+ doins "${FILESDIR}"/ntp.conf |
132 |
+ use ipv6 || sed -i '/^restrict .*::1/d' "${ED%/}"/etc/ntp.conf #524726 |
133 |
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd |
134 |
+ newconfd "${FILESDIR}"/ntpd.confd ntpd |
135 |
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client |
136 |
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client |
137 |
+ newinitd "${FILESDIR}"/sntp.rc sntp |
138 |
+ newconfd "${FILESDIR}"/sntp.confd sntp |
139 |
+ if ! use caps ; then |
140 |
+ sed -i "s|-u ntp:ntp||" "${ED%/}"/etc/conf.d/ntpd || die |
141 |
+ fi |
142 |
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED%/}"/etc/init.d/ntpd || die |
143 |
+ |
144 |
+ keepdir /var/lib/ntp |
145 |
+ use prefix || fowners ntp:ntp /var/lib/ntp |
146 |
+ |
147 |
+ if use openntpd ; then |
148 |
+ cd "${ED}" || die |
149 |
+ rm usr/sbin/ntpd || die |
150 |
+ rm -r var/lib || die |
151 |
+ rm etc/{conf,init}.d/ntpd || die |
152 |
+ rm usr/share/man/*/ntpd.8 || die |
153 |
+ else |
154 |
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service |
155 |
+ if use caps ; then |
156 |
+ sed -i '/ExecStart/ s|$| -u ntp:ntp|' \ |
157 |
+ "${D%/}$(systemd_get_systemunitdir)"/ntpd.service \ |
158 |
+ || die |
159 |
+ fi |
160 |
+ systemd_enable_ntpunit 60-ntpd ntpd.service |
161 |
+ fi |
162 |
+ |
163 |
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service |
164 |
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf |
165 |
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service |
166 |
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf |
167 |
+} |
168 |
+ |
169 |
+pkg_postinst() { |
170 |
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then |
171 |
+ eerror "The notrust option was found in your /etc/ntp.conf!" |
172 |
+ ewarn "If your ntpd starts sending out weird responses," |
173 |
+ ewarn "then make sure you have keys properly setup and see" |
174 |
+ ewarn "https://bugs.gentoo.org/41827" |
175 |
+ fi |
176 |
+} |