Gentoo Archives: gentoo-commits

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