public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2015-10-25  1:07 Mike Frysinger
  0 siblings, 0 replies; 15+ messages in thread
From: Mike Frysinger @ 2015-10-25  1:07 UTC (permalink / raw
  To: gentoo-commits

commit:     cd5fac21940cf8460238bf9366087cfa40e2e614
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 25 01:06:20 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Oct 25 01:07:00 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd5fac21

net-misc/ntp: fix pthread linkage errors when running tests #563922

 net-misc/ntp/files/ntp-4.2.8-sntp-test-pthreads.patch | 13 +++++++++++++
 net-misc/ntp/ntp-4.2.8_p4.ebuild                      |  1 +
 2 files changed, 14 insertions(+)

diff --git a/net-misc/ntp/files/ntp-4.2.8-sntp-test-pthreads.patch b/net-misc/ntp/files/ntp-4.2.8-sntp-test-pthreads.patch
new file mode 100644
index 0000000..4f8d15f
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8-sntp-test-pthreads.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/563922
+http://bugs.ntp.org/show_bug.cgi?id=2906
+
+--- a/sntp/tests/Makefile.in
++++ b/sntp/tests/Makefile.in
+@@ -783,6 +783,7 @@ base_LDADD = \
+ 	$(LIBOPTS_LDADD)			\
+ 	$(LDADD_LIBEVENT)			\
+ 	$(top_builddir)/../libntp/libntp.a	\
++	$(PTHREAD_LIBS) \
+ 	$(LDADD_LIBNTP)				\
+ 	$(LDADD_NTP)				\
+ 	$(NULL)

diff --git a/net-misc/ntp/ntp-4.2.8_p4.ebuild b/net-misc/ntp/ntp-4.2.8_p4.ebuild
index 69c2159..ae4fc76 100644
--- a/net-misc/ntp/ntp-4.2.8_p4.ebuild
+++ b/net-misc/ntp/ntp-4.2.8_p4.ebuild
@@ -41,6 +41,7 @@ pkg_setup() {
 
 src_prepare() {
 	epatch "${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
+	epatch "${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
 	append-cppflags -D_GNU_SOURCE #264109
 	# Make sure every build uses the same install layout. #539092
 	find sntp/loc/ -type f '!' -name legacy -delete || die


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2016-04-27  8:21 Lars Wendler
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Wendler @ 2016-04-27  8:21 UTC (permalink / raw
  To: gentoo-commits

commit:     ece0a2dfee9a935903137dad3b81649ec64a4786
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 27 08:20:37 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Apr 27 08:21:17 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ece0a2df

net-misc/ntp: Bump to version 4.2.8_p7

Package-Manager: portage-2.2.28
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-misc/ntp/Manifest            |   2 +
 net-misc/ntp/files/ntpd.rc-r1    |   4 +-
 net-misc/ntp/files/sntp.rc       |  12 ++--
 net-misc/ntp/ntp-4.2.8_p7.ebuild | 137 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 147 insertions(+), 8 deletions(-)

diff --git a/net-misc/ntp/Manifest b/net-misc/ntp/Manifest
index 15e1304..d0f87ce 100644
--- a/net-misc/ntp/Manifest
+++ b/net-misc/ntp/Manifest
@@ -4,3 +4,5 @@ DIST ntp-4.2.8p5-manpages.tar.bz2 24626 SHA256 a26de4f83a6d8d6e0aa2d20bb6b8c8f76
 DIST ntp-4.2.8p5.tar.gz 7138233 SHA256 ca28baf4f6bb6fabdc1b62fd1dcec412be2e621192b40466a469a2496164f696 SHA512 8df3e51027f6bfc5e77b81317b67e75263cb429dc532d21bb5924852f77ea39314a06b94944804991185f93155063cee7c1f28024698ec893c353a4d5561750e WHIRLPOOL bcd60d6ee8b8fd19095fe335cdc05a8d58973ca467c5c603860deaefa43cb25597ded1acf7de57598a2e9a521b7e0fa6d2e544cb1aedd16aad08f44854b9f7fc
 DIST ntp-4.2.8p6-manpages.tar.bz2 24616 SHA256 0c062d240e03320fde25b8824a5cc9b37ee9f50b84325f50b5a0d1f2278e8ee0 SHA512 63b4f6d5183c582229b898dc7799e43664c9111e7eae79e8d3a53972b822883f4ff99782598fa951957460e4d4c7308adb2deef8154a5d26ab1ebc3c18c098aa WHIRLPOOL 0f009fd3b9e6c60e7c1a2c53b4e1a8ccb0d993fde748b0b10614f01a2ea79d30721def1f8ce71285bf4bdf8065bf0458c30af570b98ea8b67ebf4b2d59a86037
 DIST ntp-4.2.8p6.tar.gz 7152557 SHA256 583d0e1c573ace30a9c6afbea0fc52cae9c8c916dbc15c026e485a0dda4ba048 SHA512 797d07980c0b71453f32ae821ef496add0fe712a2bf960ab1af18f0b54caa6029d65238ef7606d1ffb53e2e95c88623b4fb228399b5d4dde9a5fa1b7e256f71b WHIRLPOOL 0a320405dea0239fec9d6d6566e6e8cd7eb37a16232267f822befe4f4c8a359d672d6d58a5e755f7410234482bc7b2198649547dfb49f252b66ac7cee3351e13
+DIST ntp-4.2.8p7-manpages.tar.xz 24988 SHA256 fead8e2c2c7db74c12ba145725932e94595469e128443c01df692889a6efcf33 SHA512 0753c44a51d19af3d6ad24b757a8ebcdaec107cc2d976599d0af15d8e1b91b02223e2af9a78dd8ded22bb041821dee1381db8342679b5e58b65fa3a8916b7f79 WHIRLPOOL 666ffac116a52efb25e6ea072c5fbc79d26181d20f5aa4d2ff9c02056de67d3d2276e593942cc91804e21ddb5660734c9bfe76f60d0c33844cb2d45899c28d17
+DIST ntp-4.2.8p7.tar.gz 7175313 SHA256 81d20c06a0b01abe3b84fac092185bf014252d38fe5e7b2758f604680a0220dc SHA512 7b80192f0e3c4a05cc05f167ab85593acca685d514dcd46fb8f42b4cd2a5525e76ba5e15fd7ff13220e4155de6aab5661554e0ded60bfb1d27a969c589958f55 WHIRLPOOL 858f9f0f22ece06c304f2e19cfd3743facc5f2794d758f88528f2cebbb68f8d7d93dd93d976c1bdb912ad8f7ec4c5c2d6b669d3b2f7723337a70c50da033a323

diff --git a/net-misc/ntp/files/ntpd.rc-r1 b/net-misc/ntp/files/ntpd.rc-r1
index f89bdd3..5bed5ce 100644
--- a/net-misc/ntp/files/ntpd.rc-r1
+++ b/net-misc/ntp/files/ntpd.rc-r1
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/net-misc/ntp/files/sntp.rc b/net-misc/ntp/files/sntp.rc
index b0261d9..5b3b463 100644
--- a/net-misc/ntp/files/sntp.rc
+++ b/net-misc/ntp/files/sntp.rc
@@ -1,15 +1,17 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
+command="/usr/bin/sntp"
+
 depend() {
 	before cron portmap
 	after net
 	use dns logger
 }
 
-checkconfig() {
+start_pre() {
 	if [ -z "${SNTP_OPTS}" ] ; then
 		eerror "Please edit /etc/conf.d/sntp"
 		eerror "I need to know what server/options to use!"
@@ -19,9 +21,7 @@ checkconfig() {
 }
 
 start() {
-	checkconfig || return $?
-
 	ebegin "Setting clock via SNTP"
-	/usr/bin/sntp ${SNTP_OPTS}
+	${command} ${SNTP_OPTS}
 	eend $? "Failed to set clock"
 }

diff --git a/net-misc/ntp/ntp-4.2.8_p7.ebuild b/net-misc/ntp/ntp-4.2.8_p7.ebuild
new file mode 100644
index 0000000..49ee982
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8_p7.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+	https://dev.gentoo.org/~polynomial-c/${MY_P}-manpages.tar.xz"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 libressl openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+CDEPEND="readline? ( >=sys-libs/readline-4.1:0= )
+	>=dev-libs/libevent-2.0.9[threads?]
+	kernel_linux? ( caps? ( sys-libs/libcap ) )
+	zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+	!openntpd? ( !net-misc/openntpd )
+	snmp? ( net-analyzer/net-snmp )
+	ssl? (
+		!libressl? ( dev-libs/openssl:0= )
+		libressl? ( dev-libs/libressl )
+	)
+	parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+	virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-ntp )
+	vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
+	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
+	"${FILESDIR}"/${PN}-4.2.8-ntpd-test-signd.patch
+)
+
+pkg_setup() {
+	enewgroup ntp 123
+	enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+	epatch "${PATCHES[@]}"
+	append-cppflags -D_GNU_SOURCE #264109
+	# Make sure every build uses the same install layout. #539092
+	find sntp/loc/ -type f '!' -name legacy -delete || die
+	# Disable pointless checks.
+	touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+}
+
+src_configure() {
+	# avoid libmd5/libelf
+	export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+	export ac_cv_lib_elf_nlist=no
+	# blah, no real configure options #176333
+	export ac_cv_header_dns_sd_h=$(usex zeroconf)
+	export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+	# Increase the default memlimit from 32MiB to 128MiB.  #533232
+	econf \
+		--with-lineeditlibs=readline,edit,editline \
+		--with-yielding-select \
+		--disable-local-libevent \
+		--docdir='$(datarootdir)'/doc/${PF} \
+		--htmldir='$(docdir)/html' \
+		--with-memlock=256 \
+		$(use_enable caps linuxcaps) \
+		$(use_enable parse-clocks) \
+		$(use_enable ipv6) \
+		$(use_enable debug debugging) \
+		$(use_with readline lineeditlibs readline) \
+		$(use_enable samba ntp-signd) \
+		$(use_with snmp ntpsnmpd) \
+		$(use_with ssl crypto) \
+		$(use_enable threads thread-support)
+}
+
+src_install() {
+	default
+	# move ntpd/ntpdate to sbin #66671
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+	dodoc INSTALL WHERE-TO-START
+	doman "${WORKDIR}"/man/*.[58]
+
+	insinto /etc
+	doins "${FILESDIR}"/ntp.conf
+	use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726
+	newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+	newconfd "${FILESDIR}"/ntpd.confd ntpd
+	newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+	newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+	newinitd "${FILESDIR}"/sntp.rc sntp
+	newconfd "${FILESDIR}"/sntp.confd sntp
+	if ! use caps ; then
+		sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+	fi
+	sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+	keepdir /var/lib/ntp
+	use prefix || fowners ntp:ntp /var/lib/ntp
+
+	if use openntpd ; then
+		cd "${ED}"
+		rm usr/sbin/ntpd || die
+		rm -r var/lib
+		rm etc/{conf,init}.d/ntpd
+		rm usr/share/man/*/ntpd.8 || die
+	else
+		systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+		use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+		systemd_enable_ntpunit 60-ntpd ntpd.service
+	fi
+
+	systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+	systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+	systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+	systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+	if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+		eerror "The notrust option was found in your /etc/ntp.conf!"
+		ewarn "If your ntpd starts sending out weird responses,"
+		ewarn "then make sure you have keys properly setup and see"
+		ewarn "https://bugs.gentoo.org/41827"
+	fi
+}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2016-11-28 22:44 Thomas Deutschmann
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Deutschmann @ 2016-11-28 22:44 UTC (permalink / raw
  To: gentoo-commits

commit:     a118911c3b6177dd447258f6a334a5a2c7314948
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 28 22:43:09 2016 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 28 22:44:03 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a118911c

net-misc/ntp: Fix building w/ SSL or against libressl

Acked-by: Lars Wendler <polynomial-c <AT> gentoo.org>
Gentoo-Bug: https://bugs.gentoo.org/600454
Gentoo-Bug: https://bugs.gentoo.org/600668

Package-Manager: portage-2.3.2

 ...ntp-4.2.8_p9-fix-build-wo-ssl-or-libressl.patch | 236 +++++++++++++++++++++
 net-misc/ntp/ntp-4.2.8_p9.ebuild                   |   1 +
 2 files changed, 237 insertions(+)

diff --git a/net-misc/ntp/files/ntp-4.2.8_p9-fix-build-wo-ssl-or-libressl.patch b/net-misc/ntp/files/ntp-4.2.8_p9-fix-build-wo-ssl-or-libressl.patch
new file mode 100644
index 00000000..5166e5f
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8_p9-fix-build-wo-ssl-or-libressl.patch
@@ -0,0 +1,236 @@
+Fix building with libressl or without SSL.
+
+Origin: http://bugs.ntp.org/attachment.cgi?id=1481
+
+LibreSSL fix from Joe Kappus (https://bugs.gentoo.org/show_bug.cgi?id=600668#c2)
+
+diff -Nru a/include/ntp_md5.h b/include/ntp_md5.h
+--- a/include/ntp_md5.h	2016-11-23 08:35:18.248130387 +0100
++++ b/include/ntp_md5.h	2016-11-23 08:35:18.248130387 +0100
+@@ -8,6 +8,7 @@
+ 
+ #ifdef OPENSSL
+ # include "openssl/evp.h"
++# include "libssl_compat.h"
+ #else	/* !OPENSSL follows */
+ /*
+  * Provide OpenSSL-alike MD5 API if we're not using OpenSSL
+@@ -23,6 +24,9 @@
+ # endif
+ 
+   typedef MD5_CTX			EVP_MD_CTX;
++
++# define EVP_MD_CTX_free(c)		free(c)
++# define EVP_MD_CTX_new()		calloc(1, sizeof(MD5_CTX))
+ # define EVP_get_digestbynid(t)		NULL
+ # define EVP_md5()			NULL
+ # define EVP_MD_CTX_init(c)
+diff -Nru a/libntp/a_md5encrypt.c b/libntp/a_md5encrypt.c
+--- a/libntp/a_md5encrypt.c	2016-11-23 08:35:18.248130387 +0100
++++ b/libntp/a_md5encrypt.c	2016-11-23 08:35:18.248130387 +0100
+@@ -11,7 +11,6 @@
+ #include "ntp.h"
+ #include "ntp_md5.h"	/* provides OpenSSL digest API */
+ #include "isc/string.h"
+-#include "libssl_compat.h"
+ /*
+  * MD5authencrypt - generate message digest
+  *
+diff -Nru a/libntp/libssl_compat.c b/libntp/libssl_compat.c
+--- a/libntp/libssl_compat.c	2016-11-23 08:35:18.248130387 +0100
++++ b/libntp/libssl_compat.c	2016-11-23 08:35:18.248130387 +0100
+@@ -15,15 +15,18 @@
+  * ---------------------------------------------------------------------
+  */
+ #include "config.h"
+-
+-#include <string.h>
+-#include <openssl/bn.h>
+-#include <openssl/evp.h>
+-
+ #include "ntp_types.h"
+ 
+ /* ----------------------------------------------------------------- */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#ifdef OPENSSL
++# include <string.h>
++# include <openssl/bn.h>
++# include <openssl/evp.h>
++#endif
++/* ----------------------------------------------------------------- */
++
++/* ----------------------------------------------------------------- */
++#if defined(OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER)
+ /* ----------------------------------------------------------------- */
+ 
+ #include "libssl_compat.h"
+@@ -325,7 +328,7 @@
+ }
+ 
+ /* ----------------------------------------------------------------- */
+-#else /* OPENSSL_VERSION_NUMBER >= v1.1.0 */
++#else /* OPENSSL && OPENSSL_VERSION_NUMBER >= v1.1.0 */
+ /* ----------------------------------------------------------------- */
+ 
+ NONEMPTY_TRANSLATION_UNIT
+diff -Nru a/ntpd/ntp_control.c b/ntpd/ntp_control.c
+--- a/ntpd/ntp_control.c	2016-11-23 08:35:18.256130015 +0100
++++ b/ntpd/ntp_control.c	2016-11-23 08:35:18.260129828 +0100
+@@ -33,8 +33,6 @@
+ # include "ntp_syscall.h"
+ #endif
+ 
+-#include "libssl_compat.h"
+-
+ /*
+  * Structure to hold request procedure information
+  */
+@@ -1653,8 +1651,10 @@
+ }
+ 
+ /*
+- * ctl_putcal - write a decoded calendar data into the response
++ * ctl_putcal - write a decoded calendar data into the response.
++ * only used with AUTOKEY currently, so compiled conditional
+  */
++#ifdef AUTOKEY
+ static void
+ ctl_putcal(
+ 	const char *tag,
+@@ -1678,6 +1678,7 @@
+ 
+ 	return;
+ }
++#endif
+ 
+ /*
+  * ctl_putfs - write a decoded filestamp into the response
+@@ -1838,7 +1839,7 @@
+ 	char *	oplim;
+ 	char *	iptr;
+ 	char *	iplim;
+-	char *	past_eq;
++	char *	past_eq = NULL;
+ 
+ 	optr = output;
+ 	oplim = output + sizeof(output);
+diff -Nru a/ntpd/ntp_io.c b/ntpd/ntp_io.c
+--- a/ntpd/ntp_io.c	2016-11-23 08:35:18.268129456 +0100
++++ b/ntpd/ntp_io.c	2016-11-23 08:35:18.272129269 +0100
+@@ -516,13 +516,17 @@
+ /*
+  * function to dump the contents of the interface structure
+  * for debugging use only.
++ * We face a dilemma here -- sockets are FDs under POSIX and
++ * actually HANDLES under Windows. So we use '%lld' as format
++ * and cast the value to 'long long'; this should not hurt
++ * with UNIX-like systems and does not truncate values on Win64.
+  */
+ void
+ interface_dump(const endpt *itf)
+ {
+ 	printf("Dumping interface: %p\n", itf);
+-	printf("fd = %d\n", itf->fd);
+-	printf("bfd = %d\n", itf->bfd);
++	printf("fd = %lld\n", (long long)itf->fd);
++	printf("bfd = %lld\n", (long long)itf->bfd);
+ 	printf("sin = %s,\n", stoa(&itf->sin));
+ 	sockaddr_dump(&itf->sin);
+ 	printf("bcast = %s,\n", stoa(&itf->bcast));
+@@ -570,11 +574,11 @@
+ static void
+ print_interface(const endpt *iface, const char *pfx, const char *sfx)
+ {
+-	printf("%sinterface #%d: fd=%d, bfd=%d, name=%s, flags=0x%x, ifindex=%u, sin=%s",
++	printf("%sinterface #%d: fd=%lld, bfd=%lld, name=%s, flags=0x%x, ifindex=%u, sin=%s",
+ 	       pfx,
+ 	       iface->ifnum,
+-	       iface->fd,
+-	       iface->bfd,
++	       (long long)iface->fd,
++	       (long long)iface->bfd,
+ 	       iface->name,
+ 	       iface->flags,
+ 	       iface->ifindex,
+diff -Nru a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c
+--- a/ntpd/ntp_proto.c	2016-11-23 08:35:18.280128897 +0100
++++ b/ntpd/ntp_proto.c	2016-11-23 08:35:18.284128711 +0100
+@@ -4054,7 +4054,7 @@
+ 		    ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen,
+ 		    peer->keynumber));
+ #else	/* !AUTOKEY follows */
+-	DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d keyid %08x len %d\n",
++	DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d keyid %08x len %zu\n",
+ 		    current_time, peer->dstadr ?
+ 		    ntoa(&peer->dstadr->sin) : "-",
+ 		    ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen));
+diff -Nru a/ports/winnt/ntpd/ntp_iocompletionport.c b/ports/winnt/ntpd/ntp_iocompletionport.c
+--- a/ports/winnt/ntpd/ntp_iocompletionport.c	2016-11-23 08:35:18.288128524 +0100
++++ b/ports/winnt/ntpd/ntp_iocompletionport.c	2016-11-23 08:35:18.288128524 +0100
+@@ -1391,8 +1391,7 @@
+ 		goto fail;
+ 	}
+ 
+-	;
+-	if ( ! (rio->ioreg_ctx = iopad = iohpCreate(rio))) {
++	if (NULL == (rio->ioreg_ctx = iopad = iohpCreate(rio))) {
+ 		msyslog(LOG_ERR, "%s: Failed to create shared lock",
+ 			msgh);
+ 		goto fail;
+@@ -1401,13 +1400,13 @@
+ 	iopad->riofd      = rio->fd;
+ 	iopad->rsrc.rio   = rio;
+ 
+-	if (!(rio->device_ctx = DevCtxAttach(serial_devctx(h)))) {
++	if (NULL == (rio->device_ctx = DevCtxAttach(serial_devctx(h)))) {
+ 		msyslog(LOG_ERR, "%s: Failed to allocate device context",
+ 			msgh);
+ 		goto fail;
+ 	}
+ 
+-	if ( ! (lpo = IoCtxAlloc(iopad, rio->device_ctx))) {
++	if (NULL == (lpo = IoCtxAlloc(iopad, rio->device_ctx))) {
+ 		msyslog(LOG_ERR, "%: Failed to allocate IO context",
+ 			msgh);
+ 		goto fail;
+@@ -1594,7 +1593,6 @@
+ 	static const char * const msg =
+ 		"OnSocketSend: send to socket failed";
+ 
+-	IoHndPad_T *	iopad	= NULL;
+ 	endpt *		ep	= NULL;
+ 	int		rc;
+ 
+@@ -1662,7 +1660,7 @@
+ 
+ 	INSIST(hndIOCPLPort && hMainRpcDone);
+ 	if (iopad)
+-		iocpl_notify(iopad, OnInterfaceDetach, -1);
++		iocpl_notify(iopad, OnInterfaceDetach, (UINT_PTR)-1);
+ }
+ 
+ /* --------------------------------------------------------------------
+diff -Nru a/sntp/crypto.c b/sntp/crypto.c
+--- a/sntp/crypto.c	2016-11-23 08:35:18.288128524 +0100
++++ b/sntp/crypto.c	2016-11-23 08:35:18.288128524 +0100
+@@ -2,7 +2,7 @@
+ #include "crypto.h"
+ #include <ctype.h>
+ #include "isc/string.h"
+-#include "libssl_compat.h"
++#include "ntp_md5.h"
+ 
+ struct key *key_ptr;
+ size_t key_cnt = 0;
+diff -urN ntp-4.2.8p9/include/libssl_compat.h ntp-4.2.8p9_fixed/include/libssl_compat.h
+--- a/include/libssl_compat.h	2016-11-21 07:28:40.000000000 -0500
++++ b/include/libssl_compat.h	2016-11-23 12:10:33.014148604 -0500
+@@ -25,7 +25,7 @@
+ #include "openssl/rsa.h"
+ 
+ /* ----------------------------------------------------------------- */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER)
+ /* ----------------------------------------------------------------- */
+ 
+ # include <openssl/objects.h>

diff --git a/net-misc/ntp/ntp-4.2.8_p9.ebuild b/net-misc/ntp/ntp-4.2.8_p9.ebuild
index f643123..36be9a2 100644
--- a/net-misc/ntp/ntp-4.2.8_p9.ebuild
+++ b/net-misc/ntp/ntp-4.2.8_p9.ebuild
@@ -40,6 +40,7 @@ S=${WORKDIR}/${MY_P}
 PATCHES=(
 	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
 	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
+	"${FILESDIR}"/${P}-fix-build-wo-ssl-or-libressl.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2017-01-27 22:15 Robin H. Johnson
  0 siblings, 0 replies; 15+ messages in thread
From: Robin H. Johnson @ 2017-01-27 22:15 UTC (permalink / raw
  To: gentoo-commits

commit:     6a8a2aa1c51c8f9d94607b1c65c896748bf7c881
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 07:43:24 2017 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Fri Jan 27 22:14:52 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a8a2aa1

net-misc/ntp: drop vulnerable and obssolete patch wrt bug #600430

(cherry picked from commit 42c60b7f25fc89dfa79e447584ad6050ffce1393)
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
Fixes: https://github.com/gentoo/gentoo/pull/3617/
Fixes: https://bugs.gentoo.org/600430

 net-misc/ntp/Manifest                              |   2 -
 net-misc/ntp/files/ntp-4.2.8-ntpd-test-signd.patch |  21 ----
 net-misc/ntp/ntp-4.2.8_p8.ebuild                   | 137 ---------------------
 3 files changed, 160 deletions(-)

diff --git a/net-misc/ntp/Manifest b/net-misc/ntp/Manifest
index 45d0062..4681b59 100644
--- a/net-misc/ntp/Manifest
+++ b/net-misc/ntp/Manifest
@@ -1,4 +1,2 @@
-DIST ntp-4.2.8p8-manpages.tar.xz 24992 SHA256 d1c349c970280b2bdb8ba197b1229c0c909a59782b76f3d650a9d2663e8a4d36 SHA512 1a2b71d66ee9e6f03bfbb8f2c4ab1ed30cb2a5a0673e9769749569aa55e8994bacbef399c4b67da265a9673195618df63d84eafbeb37bef30aea302ab99653ef WHIRLPOOL ec62bc2d01c2494727e385fab4dd40581e69806e5ee7b97dd8cb30c44331386c96650358ff09414536d4b74b8178b0e85a3c436673282f228200b9df863c1890
-DIST ntp-4.2.8p8.tar.gz 7205710 SHA256 2ab3d0b5f0456e6311dda1cc27ab75da108762773a19e46abd938bd9407b97ee SHA512 253675667f78ad8855e961d02f6a120b68b75233c18ddb92cb6c9510fb3847f1672d0d6f93ad1eb11b14e3bdf78fdbc1458e516d906b763e8599490da6a4f225 WHIRLPOOL cc054a550e59b44428989a183978ea59c7f1bc2ed9514e7d1cf82127f3188f73edb3521ee5b215438368a3c22b8cae09a78174e943195ddd752f0571335adb9e
 DIST ntp-4.2.8p9-manpages.tar.xz 24988 SHA256 a7814373e7ceb73a9e426b2e60a9966b6d053f145fd0253bbccf407af9f7ad3f SHA512 23ba80c540d12e78012a448348b94ccb68d0a8078e2e6fe05be58d89aa5e6e31ee8d686920c0f841ad12eade84a081e393885760fdf81bad5c30c76006df0094 WHIRLPOOL 49259ef4bade074bbcb5d87dd21bd93538a3a17405a42e483d10168fd609f908b59c86c73b01d2db2e683ff43fa0fdc0cdf297bfcc452d223dcb78bcef3f46c3
 DIST ntp-4.2.8p9.tar.gz 7231884 SHA256 b724287778e1bac625b447327c9851eedef020517a3545625e9f652a90f30b72 SHA512 ffd9e34060210d1cfb8ca0d89f2577df1c5fbe3ba63c620cdadc3ccc3c9d07f518783c6b91e57bffc77b08f449fdbab12faf226672ebd2dde5a0b4a783322a04 WHIRLPOOL ea96b106fd06f2b536394ad2a3dcc2a973aa0cec96140a292bc13b6ceb4159208a59b9c51936240c8a44fa7b2caa4be60d07d3c53066ce8588b0561bef64c070

diff --git a/net-misc/ntp/files/ntp-4.2.8-ntpd-test-signd.patch b/net-misc/ntp/files/ntp-4.2.8-ntpd-test-signd.patch
deleted file mode 100644
index 403b2d5..00000000
--- a/net-misc/ntp/files/ntp-4.2.8-ntpd-test-signd.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-http://bugs.ntp.org/show_bug.cgi?id=2951
-
---- a/tests/ntpd/Makefile.in
-+++ b/tests/ntpd/Makefile.in
-@@ -205,7 +205,7 @@ test_ntp_scanner_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- 	-o $@
- am_test_ntp_signd_OBJECTS = t-ntp_signd.$(OBJEXT) \
- 	run-t-ntp_signd.$(OBJEXT) test-libntp.$(OBJEXT) \
--	ntp_signd.$(OBJEXT) $(am__objects_1)
-+	$(am__objects_1)
- test_ntp_signd_OBJECTS = $(am_test_ntp_signd_OBJECTS)
- test_ntp_signd_DEPENDENCIES = $(am__DEPENDENCIES_3) \
- 	$(top_builddir)/ntpd/ntp_config.o \
-@@ -871,7 +871,6 @@ test_ntp_signd_SOURCES = \
- 	t-ntp_signd.c				\
- 	run-t-ntp_signd.c			\
- 	$(srcdir)/../libntp/test-libntp.c	\
--	$(srcdir)/../../ntpd/ntp_signd.c	\
- 	$(NULL)
- 
- 

diff --git a/net-misc/ntp/ntp-4.2.8_p8.ebuild b/net-misc/ntp/ntp-4.2.8_p8.ebuild
deleted file mode 100644
index ccb745f..00000000
--- a/net-misc/ntp/ntp-4.2.8_p8.ebuild
+++ /dev/null
@@ -1,137 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-inherit eutils toolchain-funcs flag-o-matic user systemd
-
-MY_P=${P/_p/p}
-DESCRIPTION="Network Time Protocol suite/programs"
-HOMEPAGE="http://www.ntp.org/"
-SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
-	https://dev.gentoo.org/~polynomial-c/${MY_P}-manpages.tar.xz"
-
-LICENSE="HPND BSD ISC"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
-IUSE="caps debug ipv6 libressl openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
-
-CDEPEND="readline? ( >=sys-libs/readline-4.1:0= )
-	>=dev-libs/libevent-2.0.9:=[threads?]
-	kernel_linux? ( caps? ( sys-libs/libcap ) )
-	zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
-	!openntpd? ( !net-misc/openntpd )
-	snmp? ( net-analyzer/net-snmp )
-	ssl? (
-		!libressl? ( dev-libs/openssl:0= )
-		libressl? ( dev-libs/libressl )
-	)
-	parse-clocks? ( net-misc/pps-tools )"
-DEPEND="${CDEPEND}
-	virtual/pkgconfig"
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-ntp )
-	vim-syntax? ( app-vim/ntp-syntax )"
-PDEPEND="openntpd? ( net-misc/openntpd )"
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
-	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
-	"${FILESDIR}"/${PN}-4.2.8-ntpd-test-signd.patch
-)
-
-pkg_setup() {
-	enewgroup ntp 123
-	enewuser ntp 123 -1 /dev/null ntp
-}
-
-src_prepare() {
-	epatch "${PATCHES[@]}"
-	append-cppflags -D_GNU_SOURCE #264109
-	# Make sure every build uses the same install layout. #539092
-	find sntp/loc/ -type f '!' -name legacy -delete || die
-	# Disable pointless checks.
-	touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
-}
-
-src_configure() {
-	# avoid libmd5/libelf
-	export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
-	export ac_cv_lib_elf_nlist=no
-	# blah, no real configure options #176333
-	export ac_cv_header_dns_sd_h=$(usex zeroconf)
-	export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
-	# Increase the default memlimit from 32MiB to 128MiB.  #533232
-	econf \
-		--with-lineeditlibs=readline,edit,editline \
-		--with-yielding-select \
-		--disable-local-libevent \
-		--docdir='$(datarootdir)'/doc/${PF} \
-		--htmldir='$(docdir)/html' \
-		--with-memlock=256 \
-		$(use_enable caps linuxcaps) \
-		$(use_enable parse-clocks) \
-		$(use_enable ipv6) \
-		$(use_enable debug debugging) \
-		$(use_with readline lineeditlibs readline) \
-		$(use_enable samba ntp-signd) \
-		$(use_with snmp ntpsnmpd) \
-		$(use_with ssl crypto) \
-		$(use_enable threads thread-support)
-}
-
-src_install() {
-	default
-	# move ntpd/ntpdate to sbin #66671
-	dodir /usr/sbin
-	mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
-
-	dodoc INSTALL WHERE-TO-START
-	doman "${WORKDIR}"/man/*.[58]
-
-	insinto /etc
-	doins "${FILESDIR}"/ntp.conf
-	use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726
-	newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
-	newconfd "${FILESDIR}"/ntpd.confd ntpd
-	newinitd "${FILESDIR}"/ntp-client.rc ntp-client
-	newconfd "${FILESDIR}"/ntp-client.confd ntp-client
-	newinitd "${FILESDIR}"/sntp.rc sntp
-	newconfd "${FILESDIR}"/sntp.confd sntp
-	if ! use caps ; then
-		sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
-	fi
-	sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
-
-	keepdir /var/lib/ntp
-	use prefix || fowners ntp:ntp /var/lib/ntp
-
-	if use openntpd ; then
-		cd "${ED}"
-		rm usr/sbin/ntpd || die
-		rm -r var/lib
-		rm etc/{conf,init}.d/ntpd
-		rm usr/share/man/*/ntpd.8 || die
-	else
-		systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
-		use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
-		systemd_enable_ntpunit 60-ntpd ntpd.service
-	fi
-
-	systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
-	systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
-	systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
-	systemd_install_serviced "${FILESDIR}"/sntp.service.conf
-}
-
-pkg_postinst() {
-	if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
-		eerror "The notrust option was found in your /etc/ntp.conf!"
-		ewarn "If your ntpd starts sending out weird responses,"
-		ewarn "then make sure you have keys properly setup and see"
-		ewarn "https://bugs.gentoo.org/41827"
-	fi
-}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2017-03-22 18:52 Patrick McLean
  0 siblings, 0 replies; 15+ messages in thread
From: Patrick McLean @ 2017-03-22 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     494143c3b4921a5c8b8596d58f2c8b98296bf688
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 22 18:52:01 2017 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Mar 22 18:52:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=494143c3

net-misc/ntp: Add patch to fix build with gcc-4.9

Upstream somehow dropped -fPIC on the ntpq libraries, this breaks build
with gcc-4.9 (current stable). This adds the calculated NTP_HARD_CFLAGS
to the CFLAGS for ntpq, which includes -fPIC if configure decides it's
needed.

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 net-misc/ntp/files/ntp-4.2.8_p10-ntpq-fpic.patch | 11 +++++++++++
 net-misc/ntp/ntp-4.2.8_p10.ebuild                |  1 +
 2 files changed, 12 insertions(+)

diff --git a/net-misc/ntp/files/ntp-4.2.8_p10-ntpq-fpic.patch b/net-misc/ntp/files/ntp-4.2.8_p10-ntpq-fpic.patch
new file mode 100644
index 00000000000..dcf75d25bf9
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8_p10-ntpq-fpic.patch
@@ -0,0 +1,11 @@
+--- ntp-4.2.8p10.orig/ntpq/Makefile.am	2017-03-21 06:04:21.000000000 -0700
++++ ntp-4.2.8p10/ntpq/Makefile.am	2017-03-22 11:45:48.946630492 -0700
+@@ -23,7 +23,7 @@
+ ntpq_LDADD += $(LDADD_NTP)
+ noinst_HEADERS=	ntpq.h
+ noinst_LIBRARIES=	libntpq.a
+-libntpq_a_CFLAGS=	-DNO_MAIN_ALLOWED -DBUILD_AS_LIB
++libntpq_a_CFLAGS=	$(NTP_HARD_CFLAGS) -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
+ CLEANFILES=
+ DISTCLEANFILES=	.version version.c config.log $(man_MANS)
+ ETAGS_ARGS=	Makefile.am

diff --git a/net-misc/ntp/ntp-4.2.8_p10.ebuild b/net-misc/ntp/ntp-4.2.8_p10.ebuild
index 89b01a6058f..31948a88e5b 100644
--- a/net-misc/ntp/ntp-4.2.8_p10.ebuild
+++ b/net-misc/ntp/ntp-4.2.8_p10.ebuild
@@ -39,6 +39,7 @@ S=${WORKDIR}/${MY_P}
 PATCHES=(
 	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
 	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
+	"${FILESDIR}"/${PN}-4.2.8_p10-ntpq-fpic.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2017-03-31  0:13 Patrick McLean
  0 siblings, 0 replies; 15+ messages in thread
From: Patrick McLean @ 2017-03-31  0:13 UTC (permalink / raw
  To: gentoo-commits

commit:     ce3be83bafb6e93161bf5808ffe097d53655f6b0
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 31 00:12:55 2017 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Mar 31 00:12:55 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce3be83b

net-misc/ntp: Add patch to build 4.2.8_p10 with libressl

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 net-misc/ntp/files/ntp-4.2.8_p10-libressl.patch | 35 +++++++++++++++++++++++++
 net-misc/ntp/ntp-4.2.8_p10.ebuild               |  1 +
 2 files changed, 36 insertions(+)

diff --git a/net-misc/ntp/files/ntp-4.2.8_p10-libressl.patch b/net-misc/ntp/files/ntp-4.2.8_p10-libressl.patch
new file mode 100644
index 00000000000..98ca61af459
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8_p10-libressl.patch
@@ -0,0 +1,35 @@
+diff -ur a/include/libssl_compat.h ntp-4.2.8p10/include/libssl_compat.h
+--- ntp-4.2.8p10.orig/include/libssl_compat.h	2017-03-21 06:04:20.000000000 -0700
++++ ntp-4.2.8p10/include/libssl_compat.h	2017-03-30 16:34:03.892173084 -0700
+@@ -37,7 +37,7 @@
+ #endif
+ 
+ /* ----------------------------------------------------------------- */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER)
+ /* ----------------------------------------------------------------- */
+ 
+ # include <openssl/objects.h>
+diff -ur ntp-4.2.8p10.orig/libntp/a_md5encrypt.c ntp-4.2.8p10/libntp/a_md5encrypt.c
+--- ntp-4.2.8p10.orig/libntp/a_md5encrypt.c	2017-02-01 01:47:13.000000000 -0800
++++ ntp-4.2.8p10/libntp/a_md5encrypt.c	2017-03-30 16:55:49.830229507 -0700
+@@ -11,6 +11,7 @@
+ #include "ntp.h"
+ #include "ntp_md5.h"	/* provides OpenSSL digest API */
+ #include "isc/string.h"
++#include "libssl_compat.h"
+ /*
+  * MD5authencrypt - generate message digest
+  *
+diff -ur ntp-4.2.8p10.orig/libntp/libssl_compat.c ntp-4.2.8p10/libntp/libssl_compat.c
+--- ntp-4.2.8p10.orig/libntp/libssl_compat.c	2017-02-01 01:47:13.000000000 -0800
++++ ntp-4.2.8p10/libntp/libssl_compat.c	2017-03-30 16:52:17.287543795 -0700
+@@ -26,7 +26,7 @@
+ /* ----------------------------------------------------------------- */
+ 
+ /* ----------------------------------------------------------------- */
+-#if defined(OPENSSL) && OPENSSL_VERSION_NUMBER < 0x10100000L
++#if defined(OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER)
+ /* ----------------------------------------------------------------- */
+ 
+ #include "libssl_compat.h"

diff --git a/net-misc/ntp/ntp-4.2.8_p10.ebuild b/net-misc/ntp/ntp-4.2.8_p10.ebuild
index 31948a88e5b..9b7c99d2262 100644
--- a/net-misc/ntp/ntp-4.2.8_p10.ebuild
+++ b/net-misc/ntp/ntp-4.2.8_p10.ebuild
@@ -40,6 +40,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
 	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
 	"${FILESDIR}"/${PN}-4.2.8_p10-ntpq-fpic.patch
+	"${FILESDIR}"/${PN}-4.2.8_p10-libressl.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2017-05-07  7:27 Thomas Deutschmann
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Deutschmann @ 2017-05-07  7:27 UTC (permalink / raw
  To: gentoo-commits

commit:     5a5419a9ce62e34b4def43afecb274bcb61ad627
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun May  7 07:18:20 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun May  7 07:18:20 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a5419a9

net-misc/ntp: Rev bump to fix regression caused by libressl patch

LibreSSL support was silently added via commit ce3be83baf which caused
a regression for building ntp without SSL (see Gentoo-Bug 600668).

Acked-by: Lars Wendler <polynomial-c <AT> gentoo.org>
Gentoo-Bug: https://bugs.gentoo.org/600668
Package-Manager: Portage-2.3.5, Repoman-2.3.2

 ...tp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch |  39 ++++++
 net-misc/ntp/ntp-4.2.8_p10-r1.ebuild               | 137 +++++++++++++++++++++
 2 files changed, 176 insertions(+)

diff --git a/net-misc/ntp/files/ntp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch b/net-misc/ntp/files/ntp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
new file mode 100644
index 00000000000..1b532c6d893
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
@@ -0,0 +1,39 @@
+Fix building with libressl or without SSL.
+
+Origin: http://bugs.ntp.org/attachment.cgi?id=1481
+
+LibreSSL fix from Joe Kappus (https://bugs.gentoo.org/show_bug.cgi?id=600668#c2)
+
+--- a/include/libssl_compat.h
++++ b/include/libssl_compat.h
+@@ -37,7 +37,7 @@
+ #endif
+ 
+ /* ----------------------------------------------------------------- */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ /* ----------------------------------------------------------------- */
+ 
+ # include <openssl/objects.h>
+--- a/libntp/libssl_compat.c
++++ b/libntp/libssl_compat.c
+@@ -26,7 +26,7 @@
+ /* ----------------------------------------------------------------- */
+ 
+ /* ----------------------------------------------------------------- */
+-#if defined(OPENSSL) && OPENSSL_VERSION_NUMBER < 0x10100000L
++#if defined(OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
+ /* ----------------------------------------------------------------- */
+ 
+ #include "libssl_compat.h"
+--- a/libntp/ssl_init.c
++++ b/libntp/ssl_init.c
+@@ -21,7 +21,7 @@
+ 
+ int ssl_init_done;
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ static void
+ atexit_ssl_cleanup(void)

diff --git a/net-misc/ntp/ntp-4.2.8_p10-r1.ebuild b/net-misc/ntp/ntp-4.2.8_p10-r1.ebuild
new file mode 100644
index 00000000000..189cbf0cef1
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8_p10-r1.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+	https://dev.gentoo.org/~polynomial-c/${MY_P}-manpages.tar.xz"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 libressl openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+CDEPEND="readline? ( >=sys-libs/readline-4.1:0= )
+	>=dev-libs/libevent-2.0.9:=[threads?]
+	kernel_linux? ( caps? ( sys-libs/libcap ) )
+	zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+	!openntpd? ( !net-misc/openntpd )
+	snmp? ( net-analyzer/net-snmp )
+	ssl? (
+		!libressl? ( dev-libs/openssl:0= )
+		libressl? ( dev-libs/libressl )
+	)
+	parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+	virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-ntp )
+	vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
+	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
+	"${FILESDIR}"/${PN}-4.2.8_p10-ntpq-fpic.patch
+	"${FILESDIR}"/${PN}-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
+)
+
+pkg_setup() {
+	enewgroup ntp 123
+	enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+	epatch "${PATCHES[@]}"
+	append-cppflags -D_GNU_SOURCE #264109
+	# Make sure every build uses the same install layout. #539092
+	find sntp/loc/ -type f '!' -name legacy -delete || die
+	# Disable pointless checks.
+	touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+}
+
+src_configure() {
+	# avoid libmd5/libelf
+	export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+	export ac_cv_lib_elf_nlist=no
+	# blah, no real configure options #176333
+	export ac_cv_header_dns_sd_h=$(usex zeroconf)
+	export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+	# Increase the default memlimit from 32MiB to 128MiB.  #533232
+	econf \
+		--with-lineeditlibs=readline,edit,editline \
+		--with-yielding-select \
+		--disable-local-libevent \
+		--docdir='$(datarootdir)'/doc/${PF} \
+		--htmldir='$(docdir)/html' \
+		--with-memlock=256 \
+		$(use_enable caps linuxcaps) \
+		$(use_enable parse-clocks) \
+		$(use_enable ipv6) \
+		$(use_enable debug debugging) \
+		$(use_with readline lineeditlibs readline) \
+		$(use_enable samba ntp-signd) \
+		$(use_with snmp ntpsnmpd) \
+		$(use_with ssl crypto) \
+		$(use_enable threads thread-support)
+}
+
+src_install() {
+	default
+	# move ntpd/ntpdate to sbin #66671
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+	dodoc INSTALL WHERE-TO-START
+	doman "${WORKDIR}"/man/*.[58]
+
+	insinto /etc
+	doins "${FILESDIR}"/ntp.conf
+	use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726
+	newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+	newconfd "${FILESDIR}"/ntpd.confd ntpd
+	newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+	newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+	newinitd "${FILESDIR}"/sntp.rc sntp
+	newconfd "${FILESDIR}"/sntp.confd sntp
+	if ! use caps ; then
+		sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+	fi
+	sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+	keepdir /var/lib/ntp
+	use prefix || fowners ntp:ntp /var/lib/ntp
+
+	if use openntpd ; then
+		cd "${ED}"
+		rm usr/sbin/ntpd || die
+		rm -r var/lib
+		rm etc/{conf,init}.d/ntpd
+		rm usr/share/man/*/ntpd.8 || die
+	else
+		systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+		use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+		systemd_enable_ntpunit 60-ntpd ntpd.service
+	fi
+
+	systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+	systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+	systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+	systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+	if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+		eerror "The notrust option was found in your /etc/ntp.conf!"
+		ewarn "If your ntpd starts sending out weird responses,"
+		ewarn "then make sure you have keys properly setup and see"
+		ewarn "https://bugs.gentoo.org/41827"
+	fi
+}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2017-10-20  9:05 Lars Wendler
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Wendler @ 2017-10-20  9:05 UTC (permalink / raw
  To: gentoo-commits

commit:     6d5d02e1341ffa76de4b26a6963d99699afba0c6
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 20 09:05:20 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Oct 20 09:05:20 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d5d02e1

net-misc/ntp: Security cleanup (bug #613550).

Package-Manager: Portage-2.3.12, Repoman-2.3.3

 net-misc/ntp/Manifest                              |   2 -
 ...ntp-4.2.8_p9-fix-build-wo-ssl-or-libressl.patch | 236 ---------------------
 net-misc/ntp/ntp-4.2.8_p9.ebuild                   | 136 ------------
 3 files changed, 374 deletions(-)

diff --git a/net-misc/ntp/Manifest b/net-misc/ntp/Manifest
index 00a743f21e4..f77d8f8a95f 100644
--- a/net-misc/ntp/Manifest
+++ b/net-misc/ntp/Manifest
@@ -1,4 +1,2 @@
 DIST ntp-4.2.8p10-manpages.tar.xz 25004 SHA256 7d968a7e68e0ce26c56635e452468b3583e2cb8bfcf558127c753c62e31d7007 SHA512 5b31a1429484ad30a35c8fa38157190a66b0983b5bf1a802c0817613901b5e0644941a3f4d5b660fcfe4ca04968766a5981331a6f9353316e7de953e55c33a09 WHIRLPOOL 6f5d593be7003fa9212364c0409f7e1ae7adcd6d1134c6db5bfb92fbbeb181495c3d484ff73bdfe55f231bb323e286ef4e1eb2ba588fcf3acd360ac8bf53b259
 DIST ntp-4.2.8p10.tar.gz 6998648 SHA256 ddd2366e64219b9efa0f7438e06800d0db394ac5c88e13c17b70d0dcdf99b99f SHA512 67e01ab533c3dfabb0bdd3ced848bdd239980bde28fdb2791d167b7e9690ab3b3759e1bd99e9fddcce03ddef4cd63a47eb85941bb127ceb79b7ecff22cce9c05 WHIRLPOOL 7a72762d349591808c0f3d4686bbb2fbf60a0915769e77140414795892d6929feb0aae30cf2f2ea1febd3c4fecb9d3d62401e1f66033bb2dc57e3245f41708c8
-DIST ntp-4.2.8p9-manpages.tar.xz 24988 SHA256 a7814373e7ceb73a9e426b2e60a9966b6d053f145fd0253bbccf407af9f7ad3f SHA512 23ba80c540d12e78012a448348b94ccb68d0a8078e2e6fe05be58d89aa5e6e31ee8d686920c0f841ad12eade84a081e393885760fdf81bad5c30c76006df0094 WHIRLPOOL 49259ef4bade074bbcb5d87dd21bd93538a3a17405a42e483d10168fd609f908b59c86c73b01d2db2e683ff43fa0fdc0cdf297bfcc452d223dcb78bcef3f46c3
-DIST ntp-4.2.8p9.tar.gz 7231884 SHA256 b724287778e1bac625b447327c9851eedef020517a3545625e9f652a90f30b72 SHA512 ffd9e34060210d1cfb8ca0d89f2577df1c5fbe3ba63c620cdadc3ccc3c9d07f518783c6b91e57bffc77b08f449fdbab12faf226672ebd2dde5a0b4a783322a04 WHIRLPOOL ea96b106fd06f2b536394ad2a3dcc2a973aa0cec96140a292bc13b6ceb4159208a59b9c51936240c8a44fa7b2caa4be60d07d3c53066ce8588b0561bef64c070

diff --git a/net-misc/ntp/files/ntp-4.2.8_p9-fix-build-wo-ssl-or-libressl.patch b/net-misc/ntp/files/ntp-4.2.8_p9-fix-build-wo-ssl-or-libressl.patch
deleted file mode 100644
index 5166e5f9a1d..00000000000
--- a/net-misc/ntp/files/ntp-4.2.8_p9-fix-build-wo-ssl-or-libressl.patch
+++ /dev/null
@@ -1,236 +0,0 @@
-Fix building with libressl or without SSL.
-
-Origin: http://bugs.ntp.org/attachment.cgi?id=1481
-
-LibreSSL fix from Joe Kappus (https://bugs.gentoo.org/show_bug.cgi?id=600668#c2)
-
-diff -Nru a/include/ntp_md5.h b/include/ntp_md5.h
---- a/include/ntp_md5.h	2016-11-23 08:35:18.248130387 +0100
-+++ b/include/ntp_md5.h	2016-11-23 08:35:18.248130387 +0100
-@@ -8,6 +8,7 @@
- 
- #ifdef OPENSSL
- # include "openssl/evp.h"
-+# include "libssl_compat.h"
- #else	/* !OPENSSL follows */
- /*
-  * Provide OpenSSL-alike MD5 API if we're not using OpenSSL
-@@ -23,6 +24,9 @@
- # endif
- 
-   typedef MD5_CTX			EVP_MD_CTX;
-+
-+# define EVP_MD_CTX_free(c)		free(c)
-+# define EVP_MD_CTX_new()		calloc(1, sizeof(MD5_CTX))
- # define EVP_get_digestbynid(t)		NULL
- # define EVP_md5()			NULL
- # define EVP_MD_CTX_init(c)
-diff -Nru a/libntp/a_md5encrypt.c b/libntp/a_md5encrypt.c
---- a/libntp/a_md5encrypt.c	2016-11-23 08:35:18.248130387 +0100
-+++ b/libntp/a_md5encrypt.c	2016-11-23 08:35:18.248130387 +0100
-@@ -11,7 +11,6 @@
- #include "ntp.h"
- #include "ntp_md5.h"	/* provides OpenSSL digest API */
- #include "isc/string.h"
--#include "libssl_compat.h"
- /*
-  * MD5authencrypt - generate message digest
-  *
-diff -Nru a/libntp/libssl_compat.c b/libntp/libssl_compat.c
---- a/libntp/libssl_compat.c	2016-11-23 08:35:18.248130387 +0100
-+++ b/libntp/libssl_compat.c	2016-11-23 08:35:18.248130387 +0100
-@@ -15,15 +15,18 @@
-  * ---------------------------------------------------------------------
-  */
- #include "config.h"
--
--#include <string.h>
--#include <openssl/bn.h>
--#include <openssl/evp.h>
--
- #include "ntp_types.h"
- 
- /* ----------------------------------------------------------------- */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#ifdef OPENSSL
-+# include <string.h>
-+# include <openssl/bn.h>
-+# include <openssl/evp.h>
-+#endif
-+/* ----------------------------------------------------------------- */
-+
-+/* ----------------------------------------------------------------- */
-+#if defined(OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER)
- /* ----------------------------------------------------------------- */
- 
- #include "libssl_compat.h"
-@@ -325,7 +328,7 @@
- }
- 
- /* ----------------------------------------------------------------- */
--#else /* OPENSSL_VERSION_NUMBER >= v1.1.0 */
-+#else /* OPENSSL && OPENSSL_VERSION_NUMBER >= v1.1.0 */
- /* ----------------------------------------------------------------- */
- 
- NONEMPTY_TRANSLATION_UNIT
-diff -Nru a/ntpd/ntp_control.c b/ntpd/ntp_control.c
---- a/ntpd/ntp_control.c	2016-11-23 08:35:18.256130015 +0100
-+++ b/ntpd/ntp_control.c	2016-11-23 08:35:18.260129828 +0100
-@@ -33,8 +33,6 @@
- # include "ntp_syscall.h"
- #endif
- 
--#include "libssl_compat.h"
--
- /*
-  * Structure to hold request procedure information
-  */
-@@ -1653,8 +1651,10 @@
- }
- 
- /*
-- * ctl_putcal - write a decoded calendar data into the response
-+ * ctl_putcal - write a decoded calendar data into the response.
-+ * only used with AUTOKEY currently, so compiled conditional
-  */
-+#ifdef AUTOKEY
- static void
- ctl_putcal(
- 	const char *tag,
-@@ -1678,6 +1678,7 @@
- 
- 	return;
- }
-+#endif
- 
- /*
-  * ctl_putfs - write a decoded filestamp into the response
-@@ -1838,7 +1839,7 @@
- 	char *	oplim;
- 	char *	iptr;
- 	char *	iplim;
--	char *	past_eq;
-+	char *	past_eq = NULL;
- 
- 	optr = output;
- 	oplim = output + sizeof(output);
-diff -Nru a/ntpd/ntp_io.c b/ntpd/ntp_io.c
---- a/ntpd/ntp_io.c	2016-11-23 08:35:18.268129456 +0100
-+++ b/ntpd/ntp_io.c	2016-11-23 08:35:18.272129269 +0100
-@@ -516,13 +516,17 @@
- /*
-  * function to dump the contents of the interface structure
-  * for debugging use only.
-+ * We face a dilemma here -- sockets are FDs under POSIX and
-+ * actually HANDLES under Windows. So we use '%lld' as format
-+ * and cast the value to 'long long'; this should not hurt
-+ * with UNIX-like systems and does not truncate values on Win64.
-  */
- void
- interface_dump(const endpt *itf)
- {
- 	printf("Dumping interface: %p\n", itf);
--	printf("fd = %d\n", itf->fd);
--	printf("bfd = %d\n", itf->bfd);
-+	printf("fd = %lld\n", (long long)itf->fd);
-+	printf("bfd = %lld\n", (long long)itf->bfd);
- 	printf("sin = %s,\n", stoa(&itf->sin));
- 	sockaddr_dump(&itf->sin);
- 	printf("bcast = %s,\n", stoa(&itf->bcast));
-@@ -570,11 +574,11 @@
- static void
- print_interface(const endpt *iface, const char *pfx, const char *sfx)
- {
--	printf("%sinterface #%d: fd=%d, bfd=%d, name=%s, flags=0x%x, ifindex=%u, sin=%s",
-+	printf("%sinterface #%d: fd=%lld, bfd=%lld, name=%s, flags=0x%x, ifindex=%u, sin=%s",
- 	       pfx,
- 	       iface->ifnum,
--	       iface->fd,
--	       iface->bfd,
-+	       (long long)iface->fd,
-+	       (long long)iface->bfd,
- 	       iface->name,
- 	       iface->flags,
- 	       iface->ifindex,
-diff -Nru a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c
---- a/ntpd/ntp_proto.c	2016-11-23 08:35:18.280128897 +0100
-+++ b/ntpd/ntp_proto.c	2016-11-23 08:35:18.284128711 +0100
-@@ -4054,7 +4054,7 @@
- 		    ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen,
- 		    peer->keynumber));
- #else	/* !AUTOKEY follows */
--	DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d keyid %08x len %d\n",
-+	DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d keyid %08x len %zu\n",
- 		    current_time, peer->dstadr ?
- 		    ntoa(&peer->dstadr->sin) : "-",
- 		    ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen));
-diff -Nru a/ports/winnt/ntpd/ntp_iocompletionport.c b/ports/winnt/ntpd/ntp_iocompletionport.c
---- a/ports/winnt/ntpd/ntp_iocompletionport.c	2016-11-23 08:35:18.288128524 +0100
-+++ b/ports/winnt/ntpd/ntp_iocompletionport.c	2016-11-23 08:35:18.288128524 +0100
-@@ -1391,8 +1391,7 @@
- 		goto fail;
- 	}
- 
--	;
--	if ( ! (rio->ioreg_ctx = iopad = iohpCreate(rio))) {
-+	if (NULL == (rio->ioreg_ctx = iopad = iohpCreate(rio))) {
- 		msyslog(LOG_ERR, "%s: Failed to create shared lock",
- 			msgh);
- 		goto fail;
-@@ -1401,13 +1400,13 @@
- 	iopad->riofd      = rio->fd;
- 	iopad->rsrc.rio   = rio;
- 
--	if (!(rio->device_ctx = DevCtxAttach(serial_devctx(h)))) {
-+	if (NULL == (rio->device_ctx = DevCtxAttach(serial_devctx(h)))) {
- 		msyslog(LOG_ERR, "%s: Failed to allocate device context",
- 			msgh);
- 		goto fail;
- 	}
- 
--	if ( ! (lpo = IoCtxAlloc(iopad, rio->device_ctx))) {
-+	if (NULL == (lpo = IoCtxAlloc(iopad, rio->device_ctx))) {
- 		msyslog(LOG_ERR, "%: Failed to allocate IO context",
- 			msgh);
- 		goto fail;
-@@ -1594,7 +1593,6 @@
- 	static const char * const msg =
- 		"OnSocketSend: send to socket failed";
- 
--	IoHndPad_T *	iopad	= NULL;
- 	endpt *		ep	= NULL;
- 	int		rc;
- 
-@@ -1662,7 +1660,7 @@
- 
- 	INSIST(hndIOCPLPort && hMainRpcDone);
- 	if (iopad)
--		iocpl_notify(iopad, OnInterfaceDetach, -1);
-+		iocpl_notify(iopad, OnInterfaceDetach, (UINT_PTR)-1);
- }
- 
- /* --------------------------------------------------------------------
-diff -Nru a/sntp/crypto.c b/sntp/crypto.c
---- a/sntp/crypto.c	2016-11-23 08:35:18.288128524 +0100
-+++ b/sntp/crypto.c	2016-11-23 08:35:18.288128524 +0100
-@@ -2,7 +2,7 @@
- #include "crypto.h"
- #include <ctype.h>
- #include "isc/string.h"
--#include "libssl_compat.h"
-+#include "ntp_md5.h"
- 
- struct key *key_ptr;
- size_t key_cnt = 0;
-diff -urN ntp-4.2.8p9/include/libssl_compat.h ntp-4.2.8p9_fixed/include/libssl_compat.h
---- a/include/libssl_compat.h	2016-11-21 07:28:40.000000000 -0500
-+++ b/include/libssl_compat.h	2016-11-23 12:10:33.014148604 -0500
-@@ -25,7 +25,7 @@
- #include "openssl/rsa.h"
- 
- /* ----------------------------------------------------------------- */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if (OPENSSL_VERSION_NUMBER < 0x10100000L || defined LIBRESSL_VERSION_NUMBER)
- /* ----------------------------------------------------------------- */
- 
- # include <openssl/objects.h>

diff --git a/net-misc/ntp/ntp-4.2.8_p9.ebuild b/net-misc/ntp/ntp-4.2.8_p9.ebuild
deleted file mode 100644
index 4ff1b7a2eb3..00000000000
--- a/net-misc/ntp/ntp-4.2.8_p9.ebuild
+++ /dev/null
@@ -1,136 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit eutils toolchain-funcs flag-o-matic user systemd
-
-MY_P=${P/_p/p}
-DESCRIPTION="Network Time Protocol suite/programs"
-HOMEPAGE="http://www.ntp.org/"
-SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
-	https://dev.gentoo.org/~polynomial-c/${MY_P}-manpages.tar.xz"
-
-LICENSE="HPND BSD ISC"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~m68k-mint"
-IUSE="caps debug ipv6 libressl openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
-
-CDEPEND="readline? ( >=sys-libs/readline-4.1:0= )
-	>=dev-libs/libevent-2.0.9:=[threads?]
-	kernel_linux? ( caps? ( sys-libs/libcap ) )
-	zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
-	!openntpd? ( !net-misc/openntpd )
-	snmp? ( net-analyzer/net-snmp )
-	ssl? (
-		!libressl? ( dev-libs/openssl:0= )
-		libressl? ( dev-libs/libressl )
-	)
-	parse-clocks? ( net-misc/pps-tools )"
-DEPEND="${CDEPEND}
-	virtual/pkgconfig"
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-ntp )
-	vim-syntax? ( app-vim/ntp-syntax )"
-PDEPEND="openntpd? ( net-misc/openntpd )"
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
-	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
-	"${FILESDIR}"/${P}-fix-build-wo-ssl-or-libressl.patch
-)
-
-pkg_setup() {
-	enewgroup ntp 123
-	enewuser ntp 123 -1 /dev/null ntp
-}
-
-src_prepare() {
-	epatch "${PATCHES[@]}"
-	append-cppflags -D_GNU_SOURCE #264109
-	# Make sure every build uses the same install layout. #539092
-	find sntp/loc/ -type f '!' -name legacy -delete || die
-	# Disable pointless checks.
-	touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
-}
-
-src_configure() {
-	# avoid libmd5/libelf
-	export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
-	export ac_cv_lib_elf_nlist=no
-	# blah, no real configure options #176333
-	export ac_cv_header_dns_sd_h=$(usex zeroconf)
-	export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
-	# Increase the default memlimit from 32MiB to 128MiB.  #533232
-	econf \
-		--with-lineeditlibs=readline,edit,editline \
-		--with-yielding-select \
-		--disable-local-libevent \
-		--docdir='$(datarootdir)'/doc/${PF} \
-		--htmldir='$(docdir)/html' \
-		--with-memlock=256 \
-		$(use_enable caps linuxcaps) \
-		$(use_enable parse-clocks) \
-		$(use_enable ipv6) \
-		$(use_enable debug debugging) \
-		$(use_with readline lineeditlibs readline) \
-		$(use_enable samba ntp-signd) \
-		$(use_with snmp ntpsnmpd) \
-		$(use_with ssl crypto) \
-		$(use_enable threads thread-support)
-}
-
-src_install() {
-	default
-	# move ntpd/ntpdate to sbin #66671
-	dodir /usr/sbin
-	mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
-
-	dodoc INSTALL WHERE-TO-START
-	doman "${WORKDIR}"/man/*.[58]
-
-	insinto /etc
-	doins "${FILESDIR}"/ntp.conf
-	use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726
-	newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
-	newconfd "${FILESDIR}"/ntpd.confd ntpd
-	newinitd "${FILESDIR}"/ntp-client.rc ntp-client
-	newconfd "${FILESDIR}"/ntp-client.confd ntp-client
-	newinitd "${FILESDIR}"/sntp.rc sntp
-	newconfd "${FILESDIR}"/sntp.confd sntp
-	if ! use caps ; then
-		sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
-	fi
-	sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
-
-	keepdir /var/lib/ntp
-	use prefix || fowners ntp:ntp /var/lib/ntp
-
-	if use openntpd ; then
-		cd "${ED}"
-		rm usr/sbin/ntpd || die
-		rm -r var/lib
-		rm etc/{conf,init}.d/ntpd
-		rm usr/share/man/*/ntpd.8 || die
-	else
-		systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
-		use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
-		systemd_enable_ntpunit 60-ntpd ntpd.service
-	fi
-
-	systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
-	systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
-	systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
-	systemd_install_serviced "${FILESDIR}"/sntp.service.conf
-}
-
-pkg_postinst() {
-	if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
-		eerror "The notrust option was found in your /etc/ntp.conf!"
-		ewarn "If your ntpd starts sending out weird responses,"
-		ewarn "then make sure you have keys properly setup and see"
-		ewarn "https://bugs.gentoo.org/41827"
-	fi
-}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2019-08-27 18:50 Craig Andrews
  0 siblings, 0 replies; 15+ messages in thread
From: Craig Andrews @ 2019-08-27 18:50 UTC (permalink / raw
  To: gentoo-commits

commit:     e4b4dea3d09eef699a51f915e96e53db6084b46b
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 27 18:30:25 2019 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Tue Aug 27 18:43:20 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4b4dea3

net-misc/ntp: systemd service improvements

systemd services Wants=network-online.target
Remove explicit reference to NetworkManager,
  use generic network-online.target instead

Closes: https://bugs.gentoo.org/658608
Package-Manager: Portage-2.3.73, Repoman-2.3.17
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 net-misc/ntp/files/ntpdate.service-r2 |  14 ++++
 net-misc/ntp/files/sntp.service-r3    |  14 ++++
 net-misc/ntp/ntp-4.2.8_p13-r1.ebuild  | 146 ++++++++++++++++++++++++++++++++++
 3 files changed, 174 insertions(+)

diff --git a/net-misc/ntp/files/ntpdate.service-r2 b/net-misc/ntp/files/ntpdate.service-r2
new file mode 100644
index 00000000000..7ad294eccde
--- /dev/null
+++ b/net-misc/ntp/files/ntpdate.service-r2
@@ -0,0 +1,14 @@
+[Unit]
+Description=Set time via NTP using ntpdate
+After=network-online.target nss-lookup.target
+Before=time-sync.target
+Wants=network-online.target time-sync.target
+Conflicts=systemd-timesyncd.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/ntpdate -b -u $SERVER
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-misc/ntp/files/sntp.service-r3 b/net-misc/ntp/files/sntp.service-r3
new file mode 100644
index 00000000000..2ab722f2c6f
--- /dev/null
+++ b/net-misc/ntp/files/sntp.service-r3
@@ -0,0 +1,14 @@
+[Unit]
+Description=Set time via SNTP
+After=network.target network-online.target nss-lookup.target
+Before=time-sync.target
+Wants=network-online.target time-sync.target
+Conflicts=systemd-timesyncd.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/sntp -s $SERVER
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-misc/ntp/ntp-4.2.8_p13-r1.ebuild b/net-misc/ntp/ntp-4.2.8_p13-r1.ebuild
new file mode 100644
index 00000000000..75150d17139
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8_p13-r1.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+	https://dev.gentoo.org/~polynomial-c/${MY_P}-manpages.tar.xz"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 libressl openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+CDEPEND="readline? ( >=sys-libs/readline-4.1:0= )
+	>=dev-libs/libevent-2.0.9:=[threads?]
+	kernel_linux? ( caps? ( sys-libs/libcap ) )
+	zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+	snmp? ( net-analyzer/net-snmp )
+	ssl? (
+		!libressl? ( dev-libs/openssl:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+	virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-ntp )
+	vim-syntax? ( app-vim/ntp-syntax )
+	!net-misc/ntpsec
+	!openntpd? ( !net-misc/openntpd )
+"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
+	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
+	"${FILESDIR}"/${PN}-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
+	"${FILESDIR}"/${PN}-4.2.8_p12-libressl-2.8.patch
+)
+
+pkg_setup() {
+	enewgroup ntp 123
+	enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+	default
+	append-cppflags -D_GNU_SOURCE #264109
+	# Make sure every build uses the same install layout. #539092
+	find sntp/loc/ -type f '!' -name legacy -delete || die
+	eautoreconf #622754
+	# Disable pointless checks.
+	touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+}
+
+src_configure() {
+	# avoid libmd5/libelf
+	export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+	export ac_cv_lib_elf_nlist=no
+	# blah, no real configure options #176333
+	export ac_cv_header_dns_sd_h=$(usex zeroconf)
+	export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+	# Increase the default memlimit from 32MiB to 128MiB.  #533232
+	local myeconfargs=(
+		--with-lineeditlibs=readline,edit,editline
+		--with-yielding-select
+		--disable-local-libevent
+		--docdir='$(datarootdir)'/doc/${PF}
+		--htmldir='$(docdir)/html'
+		--with-memlock=256
+		$(use_enable caps linuxcaps)
+		$(use_enable parse-clocks)
+		$(use_enable ipv6)
+		$(use_enable debug debugging)
+		$(use_with readline lineeditlibs readline)
+		$(use_enable samba ntp-signd)
+		$(use_with snmp ntpsnmpd)
+		$(use_with ssl crypto)
+		$(use_enable threads thread-support)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	# move ntpd/ntpdate to sbin #66671
+	dodir /usr/sbin
+	mv "${ED%/}"/usr/bin/{ntpd,ntpdate} "${ED%/}"/usr/sbin/ || die "move to sbin"
+
+	dodoc INSTALL WHERE-TO-START
+	doman "${WORKDIR}"/man/*.[58]
+
+	insinto /etc
+	doins "${FILESDIR}"/ntp.conf
+	use ipv6 || sed -i '/^restrict .*::1/d' "${ED%/}"/etc/ntp.conf #524726
+	newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+	newconfd "${FILESDIR}"/ntpd.confd ntpd
+	newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+	newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+	newinitd "${FILESDIR}"/sntp.rc sntp
+	newconfd "${FILESDIR}"/sntp.confd sntp
+	if ! use caps ; then
+		sed -i "s|-u ntp:ntp||" "${ED%/}"/etc/conf.d/ntpd || die
+	fi
+	sed -i "s:/usr/bin:/usr/sbin:" "${ED%/}"/etc/init.d/ntpd || die
+
+	keepdir /var/lib/ntp
+	use prefix || fowners ntp:ntp /var/lib/ntp
+
+	if use openntpd ; then
+		cd "${ED}" || die
+		rm usr/sbin/ntpd || die
+		rm -r var/lib || die
+		rm etc/{conf,init}.d/ntpd || die
+		rm usr/share/man/*/ntpd.8 || die
+	else
+		systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+		if use caps ; then
+			sed -i '/ExecStart/ s|$| -u ntp:ntp|' \
+				"${D%/}$(systemd_get_systemunitdir)"/ntpd.service \
+				|| die
+		fi
+		systemd_enable_ntpunit 60-ntpd ntpd.service
+	fi
+
+	systemd_newunit "${FILESDIR}"/ntpdate.service-r2 ntpdate.service
+	systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+	systemd_newunit "${FILESDIR}"/sntp.service-r3 sntp.service
+	systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+	if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+		eerror "The notrust option was found in your /etc/ntp.conf!"
+		ewarn "If your ntpd starts sending out weird responses,"
+		ewarn "then make sure you have keys properly setup and see"
+		ewarn "https://bugs.gentoo.org/41827"
+	fi
+}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2019-10-10 22:35 Sergei Trofimovich
  0 siblings, 0 replies; 15+ messages in thread
From: Sergei Trofimovich @ 2019-10-10 22:35 UTC (permalink / raw
  To: gentoo-commits

commit:     ed9224be036418110ed26afa7bfd839410bb76bb
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 23 06:50:53 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Oct 10 22:21:10 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed9224be

net-misc/ntp: fix tests on ia64 and similar, bug #564018

Avoid building problematic tests on platforms
whose linker does not support --gc-sections.

Bug: https://bugs.ntp.org/show_bug.cgi?id=3601
Closes: https://bugs.gentoo.org/564018
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 net-misc/ntp/files/ntp-4.2.8-gc-tests.patch | 41 +++++++++++++++++++++++++++++
 net-misc/ntp/ntp-4.2.8_p13-r2.ebuild        |  1 +
 2 files changed, 42 insertions(+)

diff --git a/net-misc/ntp/files/ntp-4.2.8-gc-tests.patch b/net-misc/ntp/files/ntp-4.2.8-gc-tests.patch
new file mode 100644
index 00000000000..19f0c0f8bfe
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8-gc-tests.patch
@@ -0,0 +1,41 @@
+Avoid building problematic tests on platforms
+whose linker does not support --gc-sections.
+
+https://bugs.ntp.org/show_bug.cgi?id=3601
+https://bugs.gentoo.org/564018
+
+--- a/sntp/m4/ntp_problemtests.m4	2019-09-23 07:19:18.545861137 +0200
++++ b/sntp/m4/ntp_problemtests.m4	2019-09-23 07:19:18.545861137 +0200
+@@ -33,6 +33,10 @@
+  no:0:*-*-solaris*) ;;
+  *) ntp_test_ntp_restrict="yes" ;;
+ esac
++case "$ntp_cv_gc_sections_runs" in
++  no) ntp_test_ntp_restrict="no" ;;
++  * ) ;;
++esac
+ AC_MSG_RESULT([$ntp_test_ntp_restrict])
+ AM_CONDITIONAL([BUILD_TEST_NTP_RESTRICT], [test x$ntp_test_ntp_restrict = xyes])
+ 
+@@ -43,6 +47,10 @@
+  no:0:*-*-solaris*) ;;
+  *) ntp_test_ntp_scanner="yes" ;;
+ esac
++case "$ntp_cv_gc_sections_runs" in
++  no) ntp_test_ntp_scanner="no" ;;
++  * ) ;;
++esac
+ AC_MSG_RESULT([$ntp_test_ntp_scanner])
+ AM_CONDITIONAL([BUILD_TEST_NTP_SCANNER], [test x$ntp_test_ntp_scanner = xyes])
+ 
+@@ -53,6 +61,10 @@
+  no:0:*-*-solaris*) ;;
+  *) ntp_test_ntp_signd="yes" ;;
+ esac
++case "$ntp_cv_gc_sections_runs" in
++  no) ntp_test_ntp_signd="no" ;;
++  * ) ;;
++esac
+ AC_MSG_RESULT([$ntp_test_ntp_signd])
+ AM_CONDITIONAL([BUILD_TEST_NTP_SIGND], [test x$ntp_test_ntp_signd = xyes])
+ 

diff --git a/net-misc/ntp/ntp-4.2.8_p13-r2.ebuild b/net-misc/ntp/ntp-4.2.8_p13-r2.ebuild
index 40f035bdcd4..96d2441f9b3 100644
--- a/net-misc/ntp/ntp-4.2.8_p13-r2.ebuild
+++ b/net-misc/ntp/ntp-4.2.8_p13-r2.ebuild
@@ -47,6 +47,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
 	"${FILESDIR}"/${PN}-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
 	"${FILESDIR}"/${PN}-4.2.8_p12-libressl-2.8.patch
+	"${FILESDIR}"/${PN}-4.2.8-gc-tests.patch #564018
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2021-01-06 23:23 Andreas K. Hüttel
  0 siblings, 0 replies; 15+ messages in thread
From: Andreas K. Hüttel @ 2021-01-06 23:23 UTC (permalink / raw
  To: gentoo-commits

commit:     4d9f459c5afd7b7fe9ae0068b4ad655606c3a544
Author:     Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  6 23:22:23 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Jan  6 23:22:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d9f459c

net-misc/ntp: Fix build with gcc-10

Closes: https://bugs.gentoo.org/759409
Bug: https://bugs.ntp.org/show_bug.cgi?id=3688
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Andreas K. Huettel <dilfridge <AT> gentoo.org>

 net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch | 75 ++++++++++++++++++++++++++++
 net-misc/ntp/ntp-4.2.8_p15.ebuild            |  3 +-
 2 files changed, 77 insertions(+), 1 deletion(-)

diff --git a/net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch b/net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch
new file mode 100644
index 00000000000..619ea07558c
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8_p15-gcc10.patch
@@ -0,0 +1,75 @@
+
+Source:
+https://bugs.ntp.org/show_bug.cgi?id=3688
+
+Juergen Perlinger 2020-12-24 07:10:49 UTC
+Created attachment 1760 [details]
+ultimate patch, v00
+
+--- a/sntp/log.c	2020-12-24 08:02:05.206004072 +0100
++++ a/sntp/log.c	2020-12-24 08:02:05.206004072 +0100
+@@ -2,7 +2,7 @@ 
+ 
+ #include "log.h"
+ 
+-const char *progname;		/* for msyslog use too */
++extern const char *progname;		/* for msyslog use too */
+ 
+ static int counter = 0;
+ 
+--- a/sntp/main.c	2020-12-24 08:02:05.210003956 +0100
++++ a/sntp/main.c	2020-12-24 08:02:05.210003956 +0100
+@@ -20,7 +20,6 @@ 
+ #include "log.h"
+ #include "libntp.h"
+ 
+-
+ int shutting_down;
+ int time_derived;
+ int time_adjusted;
+--- a/sntp/main.h	2020-12-24 08:02:05.210003956 +0100
++++ a/sntp/main.h	2020-12-24 08:02:05.210003956 +0100
+@@ -16,6 +16,14 @@ 
+ 
+ #include "crypto.h"
+ 
++/* !Attention! 'progname' must de instantiated in any program that wants
++ * to use this library.  Putting it into the library breaks a lot of
++ * things, since many programs define it itself and then the symbol
++ * might end up twice in the linker.
++ */
++extern const char * progname;
++
++
+ void	set_li_vn_mode(struct pkt *spkt, char leap, char version, char mode); 
+ extern int sntp_main(int argc, char **argv, const char *);
+ int	generate_pkt(struct pkt *x_pkt, const struct timeval *tv_xmt,
+--- a/sntp/sntp.c	2020-12-24 08:02:05.210003956 +0100
++++ a/sntp/sntp.c	2020-12-24 08:02:05.210003956 +0100
+@@ -2,6 +2,8 @@ 
+ 
+ #include "main.h"
+ 
++const char * progname;
++
+ int 
+ main (
+ 	int	argc,
+--- a/sntp/tests/t-log.c	2020-12-24 08:02:05.210003956 +0100
++++ a/sntp/tests/t-log.c	2020-12-24 08:02:05.210003956 +0100
+@@ -3,7 +3,6 @@ 
+ #include "ntp_types.h"
+ 
+ 
+-//#include "log.h"
+ #include "log.c"
+ 
+ void setUp(void);
+--- a/tests/libntp/test-libntp.h	2020-12-24 08:02:05.210003956 +0100
++++ a/tests/libntp/test-libntp.h	2020-12-24 08:02:05.210003956 +0100
+@@ -5,4 +5,4 @@ 
+ 
+ time_t timefunc(time_t *ptr);
+ void settime(int y, int m, int d, int H, int M, int S);
+-time_t nowtime;
++extern time_t nowtime;

diff --git a/net-misc/ntp/ntp-4.2.8_p15.ebuild b/net-misc/ntp/ntp-4.2.8_p15.ebuild
index 7864b4189d4..1405367f2d4 100644
--- a/net-misc/ntp/ntp-4.2.8_p15.ebuild
+++ b/net-misc/ntp/ntp-4.2.8_p15.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -48,6 +48,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
 	"${FILESDIR}"/${PN}-4.2.8_p12-libressl-2.8.patch
 	"${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch #711530
+	"${FILESDIR}"/${PN}-4.2.8_p15-gcc10.patch #759409
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2021-05-03 18:46 Sam James
  0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2021-05-03 18:46 UTC (permalink / raw
  To: gentoo-commits

commit:     4694004c280b13ecc163de94aa67bd92a83af7b4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May  3 18:31:07 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  3 18:45:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4694004c

net-misc/ntp: drop obsolete LibreSSL patch, restore no-SSL patch

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/ntp/files/ntp-4.2.8_p12-libressl-2.8.patch | 16 ----------------
 net-misc/ntp/ntp-4.2.8_p15.ebuild                   |  1 +
 2 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/net-misc/ntp/files/ntp-4.2.8_p12-libressl-2.8.patch b/net-misc/ntp/files/ntp-4.2.8_p12-libressl-2.8.patch
deleted file mode 100644
index 182fcefe88b..00000000000
--- a/net-misc/ntp/files/ntp-4.2.8_p12-libressl-2.8.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- ntp-4.2.8p12.orig/include/libssl_compat.h	2018-12-08 01:14:58.434733497 +0000
-+++ ntp-4.2.8p12/include/libssl_compat.h	2018-12-08 01:42:04.479474757 +0000
-@@ -107,10 +107,13 @@
- 
- #define OpenSSL_version_num	SSLeay
- #define OpenSSL_version		SSLeay_version
-+
-+# if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x20800000L
- #define X509_get0_notBefore	X509_get_notBefore
- #define X509_getm_notBefore	X509_get_notBefore
- #define X509_get0_notAfter	X509_get_notAfter
- #define X509_getm_notAfter	X509_get_notAfter
-+#endif /* !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x20800000L */
- 
- /* ----------------------------------------------------------------- */
- #endif /* OPENSSL_VERSION_NUMBER < v1.1.0 */

diff --git a/net-misc/ntp/ntp-4.2.8_p15.ebuild b/net-misc/ntp/ntp-4.2.8_p15.ebuild
index 32042db3bd5..0809ce703a5 100644
--- a/net-misc/ntp/ntp-4.2.8_p15.ebuild
+++ b/net-misc/ntp/ntp-4.2.8_p15.ebuild
@@ -44,6 +44,7 @@ S="${WORKDIR}/${MY_P}"
 PATCHES=(
 	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
 	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
+	"${FILESDIR}"/${PN}-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
 	"${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch #711530
 	"${FILESDIR}"/${PN}-4.2.8_p15-gcc10.patch #759409
 )


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2022-03-17 21:31 Sam James
  0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-03-17 21:31 UTC (permalink / raw
  To: gentoo-commits

commit:     e6d014bfdc8b8b5e4a35e66b25762f7e4e0a1f06
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Thu Mar 17 15:35:03 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 17 21:31:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6d014bf

net-misc/ntp: Remove libressl patch

This also fixes the build for libressl-3.5

Signed-off-by: orbea <orbea <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/24623
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...tp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch | 39 ----------------------
 net-misc/ntp/ntp-4.2.8_p15.ebuild                  |  1 -
 2 files changed, 40 deletions(-)

diff --git a/net-misc/ntp/files/ntp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch b/net-misc/ntp/files/ntp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
deleted file mode 100644
index 1b532c6d8931..000000000000
--- a/net-misc/ntp/files/ntp-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Fix building with libressl or without SSL.
-
-Origin: http://bugs.ntp.org/attachment.cgi?id=1481
-
-LibreSSL fix from Joe Kappus (https://bugs.gentoo.org/show_bug.cgi?id=600668#c2)
-
---- a/include/libssl_compat.h
-+++ b/include/libssl_compat.h
-@@ -37,7 +37,7 @@
- #endif
- 
- /* ----------------------------------------------------------------- */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- /* ----------------------------------------------------------------- */
- 
- # include <openssl/objects.h>
---- a/libntp/libssl_compat.c
-+++ b/libntp/libssl_compat.c
-@@ -26,7 +26,7 @@
- /* ----------------------------------------------------------------- */
- 
- /* ----------------------------------------------------------------- */
--#if defined(OPENSSL) && OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if defined(OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
- /* ----------------------------------------------------------------- */
- 
- #include "libssl_compat.h"
---- a/libntp/ssl_init.c
-+++ b/libntp/ssl_init.c
-@@ -21,7 +21,7 @@
- 
- int ssl_init_done;
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- 
- static void
- atexit_ssl_cleanup(void)

diff --git a/net-misc/ntp/ntp-4.2.8_p15.ebuild b/net-misc/ntp/ntp-4.2.8_p15.ebuild
index 7e9d8bc04c23..470ab81b0ace 100644
--- a/net-misc/ntp/ntp-4.2.8_p15.ebuild
+++ b/net-misc/ntp/ntp-4.2.8_p15.ebuild
@@ -44,7 +44,6 @@ S="${WORKDIR}/${MY_P}"
 PATCHES=(
 	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
 	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
-	"${FILESDIR}"/${PN}-4.2.8_p10-fix-build-wo-ssl-or-libressl.patch
 	"${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch #711530
 	"${FILESDIR}"/${PN}-4.2.8_p15-gcc10.patch #759409
 	"${FILESDIR}"/${PN}-4.2.8_p15-glibc-2.34.patch


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2022-11-24 11:27 Sam James
  0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-11-24 11:27 UTC (permalink / raw
  To: gentoo-commits

commit:     2a7bf0374fbbec07e09c5c977e994939c6b79008
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 24 11:25:27 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Nov 24 11:25:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a7bf037

net-misc/ntp: fix configure w/ clang 16

Refresh OpenLDAP macro & use patched variant from Arsen (bug 871288).

Closes: https://bugs.gentoo.org/871372
Bug: https://bugs.gentoo.org/871288
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/ntp-4.2.8_p15-configure-clang16.patch    | 582 +++++++++++++++++++++
 net-misc/ntp/ntp-4.2.8_p15-r2.ebuild               | 144 +++++
 2 files changed, 726 insertions(+)

diff --git a/net-misc/ntp/files/ntp-4.2.8_p15-configure-clang16.patch b/net-misc/ntp/files/ntp-4.2.8_p15-configure-clang16.patch
new file mode 100644
index 000000000000..959050784bf6
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8_p15-configure-clang16.patch
@@ -0,0 +1,582 @@
+Sync with OpenLDAP. Uses Arsen's patch from https://bugs.gentoo.org/871288.
+
+https://bugs.gentoo.org/871372
+--- a/sntp/m4/openldap.m4
++++ b/sntp/m4/openldap.m4
+@@ -1,16 +1,16 @@
+ dnl OpenLDAP Autoconf Macros
+-dnl $OpenLDAP: pkg/ldap/build/openldap.m4,v 1.157.2.10 2010/04/13 20:22:21 kurt Exp $
++dnl $OpenLDAP$
+ dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ dnl
+-dnl Copyright 1998-2010 The OpenLDAP Foundation.
++dnl Copyright 1998-2022 The OpenLDAP Foundation.
+ dnl All rights reserved.
+ dnl
+ dnl Redistribution and use in source and binary forms, with or without
+ dnl modification, are permitted only as authorized by the OpenLDAP
+ dnl Public License.
+ dnl
+-dnl A copy of this license is available in the file LICENSE-OPENLDAP in
+-dnl this directory of the distribution or, alternatively, at
++dnl A copy of this license is available in the file LICENSE in the
++dnl top-level directory of the distribution or, alternatively, at
+ dnl <http://www.OpenLDAP.org/license.html>.
+ dnl
+ dnl --------------------------------------------------------------------
+@@ -170,7 +170,7 @@ exit (0); }
+ ]])],[],[ol_cv_header_stdc=no],[:])
+ fi])
+ if test $ol_cv_header_stdc = yes; then
+-  AC_DEFINE([STDC_HEADERS], [1], [is standard C provided?])
++  AC_DEFINE(STDC_HEADERS)
+ fi
+ ac_cv_header_stdc=disable
+ ])
+@@ -243,312 +243,39 @@ OL_RESOLVER_TRY(ol_cv_resolver_none)
+ OL_RESOLVER_TRY(ol_cv_resolver_resolv,[-lresolv])
+ OL_RESOLVER_TRY(ol_cv_resolver_bind,[-lbind])
+ ])
+-dnl
+-dnl ====================================================================
+-dnl International Components for Unicode (ICU)
+-AC_DEFUN([OL_ICU],
+-[ol_icu=no
+-AC_CHECK_HEADERS( unicode/utypes.h )
+-if test $ac_cv_header_unicode_utypes_h = yes ; then
+-	dnl OL_ICULIBS="-licui18n -licuuc -licudata"
+-	OL_ICULIBS="-licuuc -licudata"
+-
+-	AC_CACHE_CHECK([for ICU libraries], [ol_cv_lib_icu], [
+-		ol_LIBS="$LIBS"
+-		LIBS="$OL_ICULIBS $LIBS"
+-		AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+-#include <unicode/utypes.h>
+-]], [[
+-(void) u_errorName(0);
+-]])],[ol_cv_lib_icu=yes],[ol_cv_lib_icu=no])
+-		LIBS="$ol_LIBS"
+-])
+-
+-	if test $ol_cv_lib_icu != no ; then
+-		ol_icu="$OL_ICULIBS"
+-		AC_DEFINE([HAVE_ICU], [1], [define if you actually have ICU])
+-	fi
+-fi
+-])
+-dnl
+-dnl ====================================================================
+-dnl Berkeley DB macros
+-dnl
+-dnl --------------------------------------------------------------------
+-dnl Try to link
+-AC_DEFUN([OL_BERKELEY_DB_TRY],
+-[if test $ol_cv_lib_db = no ; then
+-	AC_CACHE_CHECK([for Berkeley DB link (]ifelse($2,,default,$2)[)],[$1],
+-[
+-	ol_DB_LIB=ifelse($2,,,$2)
+-	ol_LIBS=$LIBS
+-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
+-
+-	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+-#ifdef HAVE_DB_185_H
+-# include <db_185.h>
+-#else
+-# include <db.h>
+-#endif
+-
+-#ifndef DB_VERSION_MAJOR
+-# define DB_VERSION_MAJOR 1
+-#endif
+-
+-#ifndef NULL
+-#define NULL ((void*)0)
+-#endif
+-]], [[
+-#if DB_VERSION_MAJOR > 2
+-	db_env_create( NULL, 0 );
+-#elif DB_VERSION_MAJOR > 1
+-	db_appexit( NULL );
+-#else
+-	(void) dbopen( NULL, 0, 0, 0, NULL);
+-#endif
+-]])],[$1=yes],[$1=no])
+-
+-	LIBS="$ol_LIBS"
+-])
+-
+-	if test $$1 = yes ; then
+-		ol_cv_lib_db=ifelse($2,,yes,$2)
+-	fi
+-fi
+-])
+-dnl
+-dnl --------------------------------------------------------------------
+-dnl Get major and minor version from <db.h>
+-AC_DEFUN([OL_BDB_HEADER_VERSION],
+-[AC_CACHE_CHECK([for Berkeley DB major version in db.h], [ol_cv_bdb_major],[
+-	AC_LANG_CONFTEST([
+-#include <db.h>
+-#ifndef DB_VERSION_MAJOR
+-#	define DB_VERSION_MAJOR 1
+-#endif
+-__db_version DB_VERSION_MAJOR
+-])
+-	set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
+-	ol_cv_bdb_major=${3}
+-])
+-case $ol_cv_bdb_major in [[1-9]]*) : ;; *)
+-	AC_MSG_ERROR([Unknown Berkeley DB major version in db.h]) ;;
+-esac
+-
+-dnl Determine minor version
+-AC_CACHE_CHECK([for Berkeley DB minor version in db.h], [ol_cv_bdb_minor],[
+-	AC_LANG_CONFTEST([
+-#include <db.h>
+-#ifndef DB_VERSION_MINOR
+-#	define DB_VERSION_MINOR 0
+-#endif
+-__db_version DB_VERSION_MINOR
+-])
+-	set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
+-	ol_cv_bdb_minor=${3}
+-])
+-case $ol_cv_bdb_minor in [[0-9]]*) : ;; *)
+-	AC_MSG_ERROR([Unknown Berkeley DB minor version in db.h]) ;;
+-esac
+-])
+-dnl
+-dnl --------------------------------------------------------------------
+-dnl Try to locate appropriate library
+-AC_DEFUN([OL_BERKELEY_DB_LINK],
+-[ol_cv_lib_db=no
+-
+-if test $ol_cv_bdb_major = 4 ; then
+-	OL_BERKELEY_DB_TRY(ol_cv_db_db_4_dot_m,[-ldb-4.$ol_cv_bdb_minor])
+-	OL_BERKELEY_DB_TRY(ol_cv_db_db4m,[-ldb4$ol_cv_bdb_minor])
+-	OL_BERKELEY_DB_TRY(ol_cv_db_db_4m,[-ldb-4$ol_cv_bdb_minor])
+-	OL_BERKELEY_DB_TRY(ol_cv_db_db_4_m,[-ldb-4-$ol_cv_bdb_minor])
+-	OL_BERKELEY_DB_TRY(ol_cv_db_db_4,[-ldb-4])
+-	OL_BERKELEY_DB_TRY(ol_cv_db_db4,[-ldb4])
+-	OL_BERKELEY_DB_TRY(ol_cv_db_db,[-ldb])
+-fi
+-OL_BERKELEY_DB_TRY(ol_cv_db_none)
+-])
+-dnl
+-dnl --------------------------------------------------------------------
+-dnl Check if Berkeley DB version
+-AC_DEFUN([OL_BERKELEY_DB_VERSION],
+-[AC_CACHE_CHECK([for Berkeley DB library and header version match], [ol_cv_berkeley_db_version], [
+-	ol_LIBS="$LIBS"
+-	LIBS="$LTHREAD_LIBS $LIBS"
+-	if test $ol_cv_lib_db != yes ; then
+-		LIBS="$ol_cv_lib_db $LIBS"
+-	fi
+-
+-	AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#ifdef HAVE_DB_185_H
+-	choke me;
+-#else
+-#include <db.h>
+-#endif
+-#ifndef DB_VERSION_MAJOR
+-# define DB_VERSION_MAJOR 1
+-#endif
+-#ifndef NULL
+-#define NULL ((void *)0)
+-#endif
+-main()
+-{
+-#if DB_VERSION_MAJOR > 1
+-	char *version;
+-	int major, minor, patch;
+-
+-	version = db_version( &major, &minor, &patch );
+-
+-	if( major != DB_VERSION_MAJOR ||
+-		minor != DB_VERSION_MINOR ||
+-		patch != DB_VERSION_PATCH )
+-	{
+-		printf("Berkeley DB version mismatch\n"
+-			"\theader: %s\n\tlibrary: %s\n",
+-			DB_VERSION_STRING, version);
+-		return 1;
+-	}
+-#endif
+ 
+-	return 0;
+-}]])],[ol_cv_berkeley_db_version=yes],[ol_cv_berkeley_db_version=no],[ol_cv_berkeley_db_version=cross])
+-
+-	LIBS="$ol_LIBS"
+-])
+-
+-	if test $ol_cv_berkeley_db_version = no ; then
+-		AC_MSG_ERROR([Berkeley DB version mismatch])
+-	fi
+-])dnl
+-dnl
+ dnl --------------------------------------------------------------------
+-dnl Check if Berkeley DB supports DB_THREAD
+-AC_DEFUN([OL_BERKELEY_DB_THREAD],
+-[AC_CACHE_CHECK([for Berkeley DB thread support], [ol_cv_berkeley_db_thread], [
+-	ol_LIBS="$LIBS"
+-	LIBS="$LTHREAD_LIBS $LIBS"
+-	if test $ol_cv_lib_db != yes ; then
+-		LIBS="$ol_cv_lib_db $LIBS"
+-	fi
+-
+-	AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#ifdef HAVE_DB_185_H
+-	choke me;
+-#else
+-#include <db.h>
+-#endif
+-#ifndef NULL
+-#define NULL ((void *)0)
+-#endif
+-main()
+-{
+-	int rc;
+-	u_int32_t flags = DB_CREATE |
+-#ifdef DB_PRIVATE
+-		DB_PRIVATE |
+-#endif
+-		DB_THREAD;
+-
+-#if DB_VERSION_MAJOR > 2
+-	DB_ENV *env = NULL;
+-
+-	rc = db_env_create( &env, 0 );
+-
+-	flags |= DB_INIT_MPOOL;
+-#ifdef DB_MPOOL_PRIVATE
+-	flags |= DB_MPOOL_PRIVATE;
+-#endif
+-
+-	if( rc ) {
+-		printf("BerkeleyDB: %s\n", db_strerror(rc) );
+-		return rc;
+-	}
+-
+-#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
+-	rc = (env->open)( env, NULL, flags, 0 );
+-#else
+-	rc = (env->open)( env, NULL, NULL, flags, 0 );
+-#endif
+-
+-	if ( rc == 0 ) {
+-		rc = env->close( env, 0 );
+-	}
+-
+-	if( rc ) {
+-		printf("BerkeleyDB: %s\n", db_strerror(rc) );
+-		return rc;
+-	}
+-
+-#else
+-	DB_ENV env;
+-	memset( &env, '\0', sizeof(env) );
++dnl Check for version compatility with back-mdb
++AC_DEFUN([OL_MDB_COMPAT],
++[AC_CACHE_CHECK([if LMDB version supported by MDB backends], [ol_cv_mdb_compat],[
++	AC_EGREP_CPP(__mdb_version_compat,[
++#include <lmdb.h>
+ 
+-	rc = db_appinit( NULL, NULL, &env, flags );
+-
+-	if( rc == 0 ) {
+-		db_appexit( &env );
+-	}
+-
+-	unlink("__db_mpool.share");
+-	unlink("__db_lock.share");
++/* require 0.9.18 or later */
++#if MDB_VERSION_FULL >= 0x000000090012
++	__mdb_version_compat
+ #endif
+-
+-	return rc;
+-}]])],[ol_cv_berkeley_db_thread=yes],[ol_cv_berkeley_db_thread=no],[ol_cv_berkeley_db_thread=cross])
+-
+-	LIBS="$ol_LIBS"
++	], [ol_cv_mdb_compat=yes], [ol_cv_mdb_compat=no])])
+ ])
+ 
+-	if test $ol_cv_berkeley_db_thread != no ; then
+-		AC_DEFINE([HAVE_BERKELEY_DB_THREAD], [1],
+-			[define if Berkeley DB has DB_THREAD support])
+-	fi
+-])dnl
+ dnl
+ dnl --------------------------------------------------------------------
+-dnl Find any DB
+-AC_DEFUN([OL_BERKELEY_DB],
+-[ol_cv_berkeley_db=no
+-AC_CHECK_HEADERS(db.h)
+-if test $ac_cv_header_db_h = yes; then
+-	OL_BDB_HEADER_VERSION
+-	OL_BDB_COMPAT
+-
+-	if test $ol_cv_bdb_compat != yes ; then
+-		AC_MSG_ERROR([BerkeleyDB version incompatible with BDB/HDB backends])
++dnl Find any MDB
++AC_DEFUN([OL_MDB],
++[ol_cv_mdb=no
++AC_CHECK_HEADERS(lmdb.h)
++if test $ac_cv_header_lmdb_h = yes; then
++	OL_MDB_COMPAT
++
++	if test $ol_cv_mdb_compat != yes ; then
++		AC_MSG_ERROR([LMDB version incompatible with MDB backends])
+ 	fi
+ 
+-	OL_BERKELEY_DB_LINK
+-	if test "$ol_cv_lib_db" != no ; then
+-		ol_cv_berkeley_db=yes
+-		OL_BERKELEY_DB_VERSION
+-		OL_BERKELEY_DB_THREAD
+-	fi
++	ol_cv_lib_mdb=-llmdb
++	ol_cv_mdb=yes
+ fi
+ ])
+-dnl --------------------------------------------------------------------
+-dnl Check for version compatility with back-bdb
+-AC_DEFUN([OL_BDB_COMPAT],
+-[AC_CACHE_CHECK([if Berkeley DB version supported by BDB/HDB backends], [ol_cv_bdb_compat],[
+-	AC_EGREP_CPP(__db_version_compat,[
+-#include <db.h>
+-
+- /* this check could be improved */
+-#ifndef DB_VERSION_MAJOR
+-#	define DB_VERSION_MAJOR 1
+-#endif
+-#ifndef DB_VERSION_MINOR
+-#	define DB_VERSION_MINOR 0
+-#endif
+ 
+-#define DB_VERSION_MM	((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR)
+-
+-/* require 4.4 or later */
+-#if DB_VERSION_MM >= 0x0404
+-	__db_version_compat
+-#endif
+-	], [ol_cv_bdb_compat=yes], [ol_cv_bdb_compat=no])])
+-])
+ 
+ dnl
+ dnl ====================================================================
+@@ -664,12 +391,10 @@ AC_DEFUN([OL_PTHREAD_TEST_FUNCTION],[[
+ 	return 0;
+ ]])
+ 
+-AC_DEFUN([OL_PTHREAD_TEST_PROGRAM], [
+-AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES
++AC_DEFUN([OL_PTHREAD_TEST_PROGRAM],
++[AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES
+ 
+-int main(argc, argv)
+-	int argc;
+-	char **argv;
++int main(int argc, char **argv)
+ {
+ OL_PTHREAD_TEST_FUNCTION
+ }
+@@ -706,7 +431,7 @@ dnl Check GNU Pth pthread Header
+ dnl
+ dnl defines ol_cv_header linux_threads to 'yes' or 'no'
+ dnl		'no' implies pthreads.h is not LinuxThreads or pthreads.h
+-dnl		doesn't exists.  Existance of pthread.h should separately
++dnl		doesn't exist.  Existence of pthread.h should separately
+ dnl		checked.
+ dnl 
+ AC_DEFUN([OL_HEADER_GNU_PTH_PTHREAD_H], [
+@@ -728,7 +453,7 @@ AC_DEFUN([OL_NT_THREADS], [
+ 	AC_CHECK_FUNC(_beginthread)
+ 
+ 	if test $ac_cv_func__beginthread = yes ; then
+-		AC_DEFINE([HAVE_NT_THREADS], [1], [if you have NT Threads])
++		AC_DEFINE(HAVE_NT_THREADS,1,[if you have NT Threads])
+ 		ol_cv_nt_threads=yes
+ 	fi
+ ])
+@@ -737,7 +462,7 @@ dnl Check LinuxThreads Header
+ dnl
+ dnl defines ol_cv_header linux_threads to 'yes' or 'no'
+ dnl		'no' implies pthreads.h is not LinuxThreads or pthreads.h
+-dnl		doesn't exists.  Existance of pthread.h should separately
++dnl		doesn't exist.  Existence of pthread.h should separately
+ dnl		checked.
+ dnl 
+ AC_DEFUN([OL_HEADER_LINUX_THREADS], [
+@@ -749,7 +474,7 @@ AC_DEFUN([OL_HEADER_LINUX_THREADS], [
+ 			[ol_cv_header_linux_threads=no])
+ 		])
+ 	if test $ol_cv_header_linux_threads = yes; then
+-		AC_DEFINE([HAVE_LINUX_THREADS], [1], [if you have LinuxThreads])
++		AC_DEFINE(HAVE_LINUX_THREADS,1,[if you have LinuxThreads])
+ 	fi
+ ])dnl
+ dnl --------------------------------------------------------------------
+@@ -791,7 +516,7 @@ AC_CACHE_CHECK([for compatible POSIX regex],ol_cv_c_posix_regex,[
+ #include <sys/types.h>
+ #include <regex.h>
+ static char *pattern, *string;
+-main()
++int main(void)
+ {
+ 	int rc;
+ 	regex_t re;
+@@ -818,7 +543,7 @@ AC_DEFUN([OL_C_UPPER_LOWER],
+ [AC_CACHE_CHECK([if toupper() requires islower()],ol_cv_c_upper_lower,[
+ 	AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <ctype.h>
+-main()
++int main(void)
+ {
+ 	if ('C' == toupper('C'))
+ 		exit(0);
+@@ -826,7 +551,7 @@ main()
+ 		exit(1);
+ }]])],[ol_cv_c_upper_lower=no],[ol_cv_c_upper_lower=yes],[ol_cv_c_upper_lower=safe])])
+ if test $ol_cv_c_upper_lower != no ; then
+-	AC_DEFINE([C_UPPER_LOWER], [1], [define if toupper() requires islower()])
++	AC_DEFINE(C_UPPER_LOWER,1, [define if toupper() requires islower()])
+ fi
+ ])
+ dnl
+@@ -837,29 +562,32 @@ dnl Check for declaration of sys_errlist in one of stdio.h and errno.h.
+ dnl Declaration of sys_errlist on BSD4.4 interferes with our declaration.
+ dnl Reported by Keith Bostic.
+ AC_DEFUN([OL_SYS_ERRLIST],
+-[AC_CACHE_CHECK([declaration of sys_errlist],ol_cv_dcl_sys_errlist,[
+-	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++[AC_CACHE_CHECK([existence of sys_errlist],ol_cv_have_sys_errlist,[
++	AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <errno.h>]], [[char *c = (char *) *sys_errlist]])],[ol_cv_have_sys_errlist=yes],[ol_cv_have_sys_errlist=no])])
++if test $ol_cv_have_sys_errlist = yes ; then
++	AC_DEFINE(HAVE_SYS_ERRLIST,1,
++		[define if you actually have sys_errlist in your libs])
++	AC_CACHE_CHECK([declaration of sys_errlist],ol_cv_dcl_sys_errlist,[
++		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <errno.h>
+ #ifdef _WIN32
+ #include <stdlib.h>
+-#endif ]], [[char *c = (char *) *sys_errlist]])],[ol_cv_dcl_sys_errlist=yes
+-	ol_cv_have_sys_errlist=yes],[ol_cv_dcl_sys_errlist=no])])
++#endif ]], [[char *c = (char *) *sys_errlist]])],[ol_cv_dcl_sys_errlist=yes],
++	[ol_cv_dcl_sys_errlist=no])])
+ #
+-# It's possible (for near-UNIX clones) that sys_errlist doesn't exist
+-if test $ol_cv_dcl_sys_errlist = no ; then
+-	AC_DEFINE([DECL_SYS_ERRLIST], [1],
+-		[define if sys_errlist is not declared in stdio.h or errno.h])
+-
+-	AC_CACHE_CHECK([existence of sys_errlist],ol_cv_have_sys_errlist,[
+-		AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <errno.h>]], [[char *c = (char *) *sys_errlist]])],[ol_cv_have_sys_errlist=yes],[ol_cv_have_sys_errlist=no])])
+-fi
+-if test $ol_cv_have_sys_errlist = yes ; then
+-	AC_DEFINE([HAVE_SYS_ERRLIST], [1],
+-		[define if you actually have sys_errlist in your libs])
++	# It's possible (for near-UNIX clones) that sys_errlist doesn't exist
++	if test $ol_cv_dcl_sys_errlist = no ; then
++		AC_DEFINE(DECL_SYS_ERRLIST,1,
++			[define if sys_errlist is not declared in stdio.h or errno.h])
++	fi
+ fi
+ ])dnl
++dnl
++dnl ====================================================================
++dnl glibc supplies a non-standard strerror_r if _GNU_SOURCE is defined.
++dnl It's actually preferable to the POSIX version, if available.
+ AC_DEFUN([OL_NONPOSIX_STRERROR_R],
+ [AC_CACHE_CHECK([non-posix strerror_r],ol_cv_nonposix_strerror_r,[
+ 	AC_EGREP_CPP(strerror_r,[#include <string.h>],
+@@ -873,24 +601,23 @@ AC_DEFUN([OL_NONPOSIX_STRERROR_R],
+ 			]])],[ol_cv_nonposix_strerror_r=yes],[ol_cv_nonposix_strerror_r=no])
+ 	else
+ 		AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-			main() {
++			int main(void) {
+ 				char buf[100];
+ 				buf[0] = 0;
+ 				strerror_r( 1, buf, sizeof buf );
+ 				exit( buf[0] == 0 );
+ 			}
+-			]])],[ol_cv_nonposix_strerror_r=yes],[ol_cv_nonposix_strerror=no],[ol_cv_nonposix_strerror=no])
++			]])],[ol_cv_nonposix_strerror_r=yes],[ol_cv_nonposix_strerror_r=no],[ol_cv_nonposix_strerror_r=no])
+ 	fi
+ 	])
+ if test $ol_cv_nonposix_strerror_r = yes ; then
+-	AC_DEFINE([HAVE_NONPOSIX_STRERROR_R], [1],
++	AC_DEFINE(HAVE_NONPOSIX_STRERROR_R,1,
+ 		[define if strerror_r returns char* instead of int])
+ fi
+ ])dnl
+ dnl
+ AC_DEFUN([OL_STRERROR],
+-[OL_SYS_ERRLIST dnl TEMPORARY
+-AC_CHECK_FUNCS(strerror strerror_r)
++[AC_CHECK_FUNCS(strerror strerror_r)
+ ol_cv_func_strerror_r=no
+ if test "${ac_cv_func_strerror_r}" = yes ; then
+ 	OL_NONPOSIX_STRERROR_R
+@@ -910,7 +637,7 @@ AC_DEFUN([OL_C_VOLATILE],
+   if test $ol_cv_c_volatile = yes; then
+     : 
+   else
+-    AC_DEFINE([volatile], [], [define as empty if volatile is not supported])
++    AC_DEFINE(volatile,,[define as empty if volatile is not supported])
+   fi
+  ])dnl
+ dnl
+@@ -918,7 +645,7 @@ dnl ====================================================================
+ dnl Look for fetch(3)
+ AC_DEFUN([OL_LIB_FETCH],
+ [ol_LIBS=$LIBS
+-LIBS="-lfetch -lcom_err $LIBS"
++LIBS="-lfetch $LIBS"
+ AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[
+ 	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #ifdef HAVE_SYS_PARAM_H
+@@ -928,8 +655,8 @@ AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[
+ #include <fetch.h>]], [[struct url *u = fetchParseURL("file:///"); ]])],[ol_cv_lib_fetch=yes],[ol_cv_lib_fetch=no])])
+ LIBS=$ol_LIBS
+ if test $ol_cv_lib_fetch != no ; then
+-	ol_link_fetch="-lfetch -lcom_err"
+-	AC_DEFINE([HAVE_FETCH], [1],
++	ol_link_fetch="-lfetch"
++	AC_DEFINE(HAVE_FETCH,1,
+ 		[define if you actually have FreeBSD fetch(3)])
+ fi
+ ])dnl
+@@ -1094,7 +821,7 @@ AC_DEFUN([OL_FUNC_GETHOSTBYADDR_R_NARGS],
+ ])dnl
+ dnl
+ dnl --------------------------------------------------------------------
+-dnl Check for Cyrus SASL version compatility
++dnl Check for Cyrus SASL version compatibility
+ AC_DEFUN([OL_SASL_COMPAT],
+ [AC_CACHE_CHECK([Cyrus SASL library version], [ol_cv_sasl_compat],[
+ 	AC_EGREP_CPP(__sasl_compat,[
+@@ -1113,19 +840,3 @@ AC_DEFUN([OL_SASL_COMPAT],
+ #endif
+ 	],	[ol_cv_sasl_compat=yes], [ol_cv_sasl_compat=no])])
+ ])
+-dnl ====================================================================
+-dnl check for SSL compatibility
+-AC_DEFUN([OL_SSL_COMPAT],
+-[AC_CACHE_CHECK([OpenSSL library version (CRL checking capability)],
+-	[ol_cv_ssl_crl_compat],[
+-		AC_EGREP_CPP(__ssl_compat,[
+-#ifdef HAVE_OPENSSL_SSL_H
+-#include <openssl/ssl.h>
+-#endif
+-
+-/* Require 0.9.7d+ */
+-#if OPENSSL_VERSION_NUMBER >= 0x0090704fL
+-	char *__ssl_compat = "0.9.7d";
+-#endif
+-	], [ol_cv_ssl_crl_compat=yes], [ol_cv_ssl_crl_compat=no])])
+-])

diff --git a/net-misc/ntp/ntp-4.2.8_p15-r2.ebuild b/net-misc/ntp/ntp-4.2.8_p15-r2.ebuild
new file mode 100644
index 000000000000..5bfcc0767728
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8_p15-r2.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+	https://dev.gentoo.org/~polynomial-c/${MY_P}-manpages.tar.xz"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="caps debug ipv6 openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+COMMON_DEPEND="readline? ( >=sys-libs/readline-4.1:0= )
+	>=dev-libs/libevent-2.0.9:=[threads?]
+	kernel_linux? ( caps? ( sys-libs/libcap ) )
+	zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+	snmp? ( net-analyzer/net-snmp )
+	ssl? (
+		dev-libs/openssl:0=
+	)
+	parse-clocks? ( net-misc/pps-tools )"
+BDEPEND="virtual/pkgconfig
+	acct-group/ntp
+	acct-user/ntp"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}
+	acct-group/ntp
+	acct-user/ntp
+	selinux? ( sec-policy/selinux-ntp )
+	vim-syntax? ( app-vim/ntp-syntax )
+	!net-misc/ntpsec
+	!openntpd? ( !net-misc/openntpd )
+"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
+	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
+	"${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch #711530
+	"${FILESDIR}"/${PN}-4.2.8_p15-gcc10.patch #759409
+	"${FILESDIR}"/${PN}-4.2.8_p15-glibc-2.34.patch
+	"${FILESDIR}"/${PN}-4.2.8_p15-configure-clang16.patch
+)
+
+src_prepare() {
+	default
+	append-cppflags -D_GNU_SOURCE #264109
+	# Make sure every build uses the same install layout. #539092
+	find sntp/loc/ -type f '!' -name legacy -delete || die
+	eautoreconf #622754
+	# Disable pointless checks.
+	touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+}
+
+src_configure() {
+	# avoid libmd5/libelf
+	export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+	export ac_cv_lib_elf_nlist=no
+	# blah, no real configure options #176333
+	export ac_cv_header_dns_sd_h=$(usex zeroconf)
+	export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+	local myeconfargs=(
+		--with-lineeditlibs=readline,edit,editline
+		--with-yielding-select
+		--disable-local-libevent
+		# Increase the default memlimit from 32MiB to 128MiB.  #533232
+		--with-memlock=256
+		$(use_enable caps linuxcaps)
+		$(use_enable parse-clocks)
+		$(use_enable ipv6)
+		$(use_enable debug debugging)
+		$(use_with readline lineeditlibs readline)
+		$(use_enable samba ntp-signd)
+		$(use_with snmp ntpsnmpd)
+		$(use_with ssl crypto)
+		$(use_enable threads thread-support)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	# move ntpd/ntpdate to sbin #66671
+	dodir /usr/sbin
+	mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+	dodoc INSTALL WHERE-TO-START
+	doman "${WORKDIR}"/man/*.[58]
+
+	insinto /etc
+	doins "${FILESDIR}"/ntp.conf
+	use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726
+	newinitd "${FILESDIR}"/ntpd.rc-r2 ntpd
+	newconfd "${FILESDIR}"/ntpd.confd ntpd
+	newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+	newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+	newinitd "${FILESDIR}"/sntp.rc sntp
+	newconfd "${FILESDIR}"/sntp.confd sntp
+	if ! use caps ; then
+		sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+	fi
+	sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+	keepdir /var/lib/ntp
+	use prefix || fowners ntp:ntp /var/lib/ntp
+
+	if use openntpd ; then
+		cd "${ED}" || die
+		rm usr/sbin/ntpd || die
+		rm -r var/lib || die
+		rm etc/{conf,init}.d/ntpd || die
+		rm usr/share/man/*/ntpd.8 || die
+	else
+		systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+		if use caps ; then
+			sed -i '/ExecStart/ s|$| -u ntp:ntp|' \
+				"${D}$(systemd_get_systemunitdir)"/ntpd.service \
+				|| die
+		fi
+		systemd_enable_ntpunit 60-ntpd ntpd.service
+	fi
+
+	systemd_newunit "${FILESDIR}"/ntpdate.service-r2 ntpdate.service
+	systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+	systemd_newunit "${FILESDIR}"/sntp.service-r3 sntp.service
+	systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+	if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+		eerror "The notrust option was found in your /etc/ntp.conf!"
+		ewarn "If your ntpd starts sending out weird responses,"
+		ewarn "then make sure you have keys properly setup and see"
+		ewarn "https://bugs.gentoo.org/41827"
+	fi
+}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/
@ 2022-11-25  7:05 Sam James
  0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-11-25  7:05 UTC (permalink / raw
  To: gentoo-commits

commit:     4480ce48447af4d8b6e35ca61f494f91698d5fe6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 25 07:04:24 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 25 07:05:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4480ce48

net-misc/ntp: fix configure w/ clang 16 deux

Refresh OpenLDAP macro & use patched variant from Arsen (bug 871288).

Closes: https://bugs.gentoo.org/871372
Bug: https://bugs.gentoo.org/871288
See: 2a7bf0374fbbec07e09c5c977e994939c6b79008
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/ntp-4.2.8_p15-configure-clang16.patch    | 80 ++++++++++++----------
 ...4.2.8_p15-r2.ebuild => ntp-4.2.8_p15-r3.ebuild} |  0
 2 files changed, 45 insertions(+), 35 deletions(-)

diff --git a/net-misc/ntp/files/ntp-4.2.8_p15-configure-clang16.patch b/net-misc/ntp/files/ntp-4.2.8_p15-configure-clang16.patch
index 959050784bf6..d0dc2ad014b4 100644
--- a/net-misc/ntp/files/ntp-4.2.8_p15-configure-clang16.patch
+++ b/net-misc/ntp/files/ntp-4.2.8_p15-configure-clang16.patch
@@ -24,7 +24,15 @@ https://bugs.gentoo.org/871372
  dnl <http://www.OpenLDAP.org/license.html>.
  dnl
  dnl --------------------------------------------------------------------
-@@ -170,7 +170,7 @@ exit (0); }
+@@ -154,6 +154,7 @@ fi
+ if test $ol_cv_header_stdc = yes; then
+   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <ctype.h>
++#include <stdlib.h>
+ #ifndef HAVE_EBCDIC
+ #	define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+ #	define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+@@ -170,7 +171,7 @@ exit (0); }
  ]])],[],[ol_cv_header_stdc=no],[:])
  fi])
  if test $ol_cv_header_stdc = yes; then
@@ -33,10 +41,11 @@ https://bugs.gentoo.org/871372
  fi
  ac_cv_header_stdc=disable
  ])
-@@ -243,312 +243,39 @@ OL_RESOLVER_TRY(ol_cv_resolver_none)
+@@ -242,313 +243,40 @@ AC_DEFUN([OL_RESOLVER_LINK],
+ OL_RESOLVER_TRY(ol_cv_resolver_none)
  OL_RESOLVER_TRY(ol_cv_resolver_resolv,[-lresolv])
  OL_RESOLVER_TRY(ol_cv_resolver_bind,[-lbind])
- ])
+-])
 -dnl
 -dnl ====================================================================
 -dnl International Components for Unicode (ICU)
@@ -203,13 +212,13 @@ https://bugs.gentoo.org/871372
 -		return 1;
 -	}
 -#endif
- 
+-
 -	return 0;
 -}]])],[ol_cv_berkeley_db_version=yes],[ol_cv_berkeley_db_version=no],[ol_cv_berkeley_db_version=cross])
 -
 -	LIBS="$ol_LIBS"
--])
--
+ ])
+ 
 -	if test $ol_cv_berkeley_db_version = no ; then
 -		AC_MSG_ERROR([Berkeley DB version mismatch])
 -	fi
@@ -247,11 +256,19 @@ https://bugs.gentoo.org/871372
 -	DB_ENV *env = NULL;
 -
 -	rc = db_env_create( &env, 0 );
--
++dnl Check for version compatility with back-mdb
++AC_DEFUN([OL_MDB_COMPAT],
++[AC_CACHE_CHECK([if LMDB version supported by MDB backends], [ol_cv_mdb_compat],[
++	AC_EGREP_CPP(__mdb_version_compat,[
++#include <lmdb.h>
+ 
 -	flags |= DB_INIT_MPOOL;
 -#ifdef DB_MPOOL_PRIVATE
 -	flags |= DB_MPOOL_PRIVATE;
--#endif
++/* require 0.9.18 or later */
++#if MDB_VERSION_FULL >= 0x000000090012
++	__mdb_version_compat
+ #endif
 -
 -	if( rc ) {
 -		printf("BerkeleyDB: %s\n", db_strerror(rc) );
@@ -276,12 +293,7 @@ https://bugs.gentoo.org/871372
 -#else
 -	DB_ENV env;
 -	memset( &env, '\0', sizeof(env) );
-+dnl Check for version compatility with back-mdb
-+AC_DEFUN([OL_MDB_COMPAT],
-+[AC_CACHE_CHECK([if LMDB version supported by MDB backends], [ol_cv_mdb_compat],[
-+	AC_EGREP_CPP(__mdb_version_compat,[
-+#include <lmdb.h>
- 
+-
 -	rc = db_appinit( NULL, NULL, &env, flags );
 -
 -	if( rc == 0 ) {
@@ -290,10 +302,7 @@ https://bugs.gentoo.org/871372
 -
 -	unlink("__db_mpool.share");
 -	unlink("__db_lock.share");
-+/* require 0.9.18 or later */
-+#if MDB_VERSION_FULL >= 0x000000090012
-+	__mdb_version_compat
- #endif
+-#endif
 -
 -	return rc;
 -}]])],[ol_cv_berkeley_db_thread=yes],[ol_cv_berkeley_db_thread=no],[ol_cv_berkeley_db_thread=cross])
@@ -354,9 +363,9 @@ https://bugs.gentoo.org/871372
 -#ifndef DB_VERSION_MINOR
 -#	define DB_VERSION_MINOR 0
 -#endif
- 
--#define DB_VERSION_MM	((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR)
 -
+-#define DB_VERSION_MM	((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR)
+ 
 -/* require 4.4 or later */
 -#if DB_VERSION_MM >= 0x0404
 -	__db_version_compat
@@ -366,7 +375,7 @@ https://bugs.gentoo.org/871372
  
  dnl
  dnl ====================================================================
-@@ -664,12 +391,10 @@ AC_DEFUN([OL_PTHREAD_TEST_FUNCTION],[[
+@@ -664,12 +392,10 @@ AC_DEFUN([OL_PTHREAD_TEST_FUNCTION],[[
  	return 0;
  ]])
  
@@ -382,7 +391,7 @@ https://bugs.gentoo.org/871372
  {
  OL_PTHREAD_TEST_FUNCTION
  }
-@@ -706,7 +431,7 @@ dnl Check GNU Pth pthread Header
+@@ -706,7 +432,7 @@ dnl Check GNU Pth pthread Header
  dnl
  dnl defines ol_cv_header linux_threads to 'yes' or 'no'
  dnl		'no' implies pthreads.h is not LinuxThreads or pthreads.h
@@ -391,7 +400,7 @@ https://bugs.gentoo.org/871372
  dnl		checked.
  dnl 
  AC_DEFUN([OL_HEADER_GNU_PTH_PTHREAD_H], [
-@@ -728,7 +453,7 @@ AC_DEFUN([OL_NT_THREADS], [
+@@ -728,7 +454,7 @@ AC_DEFUN([OL_NT_THREADS], [
  	AC_CHECK_FUNC(_beginthread)
  
  	if test $ac_cv_func__beginthread = yes ; then
@@ -400,7 +409,7 @@ https://bugs.gentoo.org/871372
  		ol_cv_nt_threads=yes
  	fi
  ])
-@@ -737,7 +462,7 @@ dnl Check LinuxThreads Header
+@@ -737,7 +463,7 @@ dnl Check LinuxThreads Header
  dnl
  dnl defines ol_cv_header linux_threads to 'yes' or 'no'
  dnl		'no' implies pthreads.h is not LinuxThreads or pthreads.h
@@ -409,7 +418,7 @@ https://bugs.gentoo.org/871372
  dnl		checked.
  dnl 
  AC_DEFUN([OL_HEADER_LINUX_THREADS], [
-@@ -749,7 +474,7 @@ AC_DEFUN([OL_HEADER_LINUX_THREADS], [
+@@ -749,7 +475,7 @@ AC_DEFUN([OL_HEADER_LINUX_THREADS], [
  			[ol_cv_header_linux_threads=no])
  		])
  	if test $ol_cv_header_linux_threads = yes; then
@@ -418,7 +427,7 @@ https://bugs.gentoo.org/871372
  	fi
  ])dnl
  dnl --------------------------------------------------------------------
-@@ -791,7 +516,7 @@ AC_CACHE_CHECK([for compatible POSIX regex],ol_cv_c_posix_regex,[
+@@ -791,7 +517,7 @@ AC_CACHE_CHECK([for compatible POSIX regex],ol_cv_c_posix_regex,[
  #include <sys/types.h>
  #include <regex.h>
  static char *pattern, *string;
@@ -427,16 +436,17 @@ https://bugs.gentoo.org/871372
  {
  	int rc;
  	regex_t re;
-@@ -818,7 +543,7 @@ AC_DEFUN([OL_C_UPPER_LOWER],
+@@ -818,7 +544,8 @@ AC_DEFUN([OL_C_UPPER_LOWER],
  [AC_CACHE_CHECK([if toupper() requires islower()],ol_cv_c_upper_lower,[
  	AC_RUN_IFELSE([AC_LANG_SOURCE([[
  #include <ctype.h>
 -main()
++#include <stdlib.h>
 +int main(void)
  {
  	if ('C' == toupper('C'))
  		exit(0);
-@@ -826,7 +551,7 @@ main()
+@@ -826,7 +553,7 @@ main()
  		exit(1);
  }]])],[ol_cv_c_upper_lower=no],[ol_cv_c_upper_lower=yes],[ol_cv_c_upper_lower=safe])])
  if test $ol_cv_c_upper_lower != no ; then
@@ -445,7 +455,7 @@ https://bugs.gentoo.org/871372
  fi
  ])
  dnl
-@@ -837,29 +562,32 @@ dnl Check for declaration of sys_errlist in one of stdio.h and errno.h.
+@@ -837,29 +564,32 @@ dnl Check for declaration of sys_errlist in one of stdio.h and errno.h.
  dnl Declaration of sys_errlist on BSD4.4 interferes with our declaration.
  dnl Reported by Keith Bostic.
  AC_DEFUN([OL_SYS_ERRLIST],
@@ -493,7 +503,7 @@ https://bugs.gentoo.org/871372
  AC_DEFUN([OL_NONPOSIX_STRERROR_R],
  [AC_CACHE_CHECK([non-posix strerror_r],ol_cv_nonposix_strerror_r,[
  	AC_EGREP_CPP(strerror_r,[#include <string.h>],
-@@ -873,24 +601,23 @@ AC_DEFUN([OL_NONPOSIX_STRERROR_R],
+@@ -873,24 +603,23 @@ AC_DEFUN([OL_NONPOSIX_STRERROR_R],
  			]])],[ol_cv_nonposix_strerror_r=yes],[ol_cv_nonposix_strerror_r=no])
  	else
  		AC_RUN_IFELSE([AC_LANG_SOURCE([[
@@ -522,7 +532,7 @@ https://bugs.gentoo.org/871372
  ol_cv_func_strerror_r=no
  if test "${ac_cv_func_strerror_r}" = yes ; then
  	OL_NONPOSIX_STRERROR_R
-@@ -910,7 +637,7 @@ AC_DEFUN([OL_C_VOLATILE],
+@@ -910,7 +639,7 @@ AC_DEFUN([OL_C_VOLATILE],
    if test $ol_cv_c_volatile = yes; then
      : 
    else
@@ -531,7 +541,7 @@ https://bugs.gentoo.org/871372
    fi
   ])dnl
  dnl
-@@ -918,7 +645,7 @@ dnl ====================================================================
+@@ -918,7 +647,7 @@ dnl ====================================================================
  dnl Look for fetch(3)
  AC_DEFUN([OL_LIB_FETCH],
  [ol_LIBS=$LIBS
@@ -540,7 +550,7 @@ https://bugs.gentoo.org/871372
  AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[
  	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
  #ifdef HAVE_SYS_PARAM_H
-@@ -928,8 +655,8 @@ AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[
+@@ -928,8 +657,8 @@ AC_CACHE_CHECK([fetch(3) library],ol_cv_lib_fetch,[
  #include <fetch.h>]], [[struct url *u = fetchParseURL("file:///"); ]])],[ol_cv_lib_fetch=yes],[ol_cv_lib_fetch=no])])
  LIBS=$ol_LIBS
  if test $ol_cv_lib_fetch != no ; then
@@ -551,7 +561,7 @@ https://bugs.gentoo.org/871372
  		[define if you actually have FreeBSD fetch(3)])
  fi
  ])dnl
-@@ -1094,7 +821,7 @@ AC_DEFUN([OL_FUNC_GETHOSTBYADDR_R_NARGS],
+@@ -1094,7 +823,7 @@ AC_DEFUN([OL_FUNC_GETHOSTBYADDR_R_NARGS],
  ])dnl
  dnl
  dnl --------------------------------------------------------------------
@@ -560,7 +570,7 @@ https://bugs.gentoo.org/871372
  AC_DEFUN([OL_SASL_COMPAT],
  [AC_CACHE_CHECK([Cyrus SASL library version], [ol_cv_sasl_compat],[
  	AC_EGREP_CPP(__sasl_compat,[
-@@ -1113,19 +840,3 @@ AC_DEFUN([OL_SASL_COMPAT],
+@@ -1113,19 +842,3 @@ AC_DEFUN([OL_SASL_COMPAT],
  #endif
  	],	[ol_cv_sasl_compat=yes], [ol_cv_sasl_compat=no])])
  ])

diff --git a/net-misc/ntp/ntp-4.2.8_p15-r2.ebuild b/net-misc/ntp/ntp-4.2.8_p15-r3.ebuild
similarity index 100%
rename from net-misc/ntp/ntp-4.2.8_p15-r2.ebuild
rename to net-misc/ntp/ntp-4.2.8_p15-r3.ebuild


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-11-25  7:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-24 11:27 [gentoo-commits] repo/gentoo:master commit in: net-misc/ntp/files/, net-misc/ntp/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2022-11-25  7:05 Sam James
2022-03-17 21:31 Sam James
2021-05-03 18:46 Sam James
2021-01-06 23:23 Andreas K. Hüttel
2019-10-10 22:35 Sergei Trofimovich
2019-08-27 18:50 Craig Andrews
2017-10-20  9:05 Lars Wendler
2017-05-07  7:27 Thomas Deutschmann
2017-03-31  0:13 Patrick McLean
2017-03-22 18:52 Patrick McLean
2017-01-27 22:15 Robin H. Johnson
2016-11-28 22:44 Thomas Deutschmann
2016-04-27  8:21 Lars Wendler
2015-10-25  1:07 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox