From 7b6add8913e4d74e6a64afee8603affb1b443ef9 Mon Sep 17 00:00:00 2001 From: Nick Owens Date: Wed, 20 Jan 2016 22:42:05 -0800 Subject: [PATCH] net-misc/ntp: sync with upstream to 4.2.8p6 --- .../ntp/files/ntp-4.2.4_p7-nano.patch | 20 --- .../ntp/files/ntp-4.2.8-ipc-caps.patch | 16 ++ .../ntp-4.2.8-ntp-keygen-no-openssl.patch | 164 ------------------ .../ntp/files/ntp-4.2.8-ntpd-test-signd.patch | 21 +++ .../files/ntp-4.2.8-sntp-test-pthreads.patch | 13 ++ ...tp-4.2.8-r3.ebuild => ntp-4.2.8_p6.ebuild} | 11 +- 6 files changed, 58 insertions(+), 187 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.4_p7-nano.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ntpd-test-signd.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-sntp-test-pthreads.patch rename sdk_container/src/third_party/coreos-overlay/net-misc/ntp/{ntp-4.2.8-r3.ebuild => ntp-4.2.8_p6.ebuild} (86%) diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.4_p7-nano.patch b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.4_p7-nano.patch deleted file mode 100644 index b31ea0adcb..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.4_p7-nano.patch +++ /dev/null @@ -1,20 +0,0 @@ -http://bugs.gentoo.org/270483 - -ripped from fedora - ---- ntp-4.2.4p7/include/ntp_syscall.h -+++ ntp-4.2.4p7/include/ntp_syscall.h -@@ -14,5 +14,13 @@ - # include - #endif - -+#if defined(ADJ_NANO) && !defined(MOD_NANO) -+#define MOD_NANO ADJ_NANO -+#endif -+ -+#if defined(ADJ_TAI) && !defined(MOD_TAI) -+#define MOD_TAI ADJ_TAI -+#endif -+ - #ifndef NTP_SYSCALLS_LIBC - #ifdef NTP_SYSCALLS_STD diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch new file mode 100644 index 0000000000..a1e558052d --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch @@ -0,0 +1,16 @@ +http://bugs.ntp.org/show_bug.cgi?id=2646 +https://bugs.gentoo.org/533966 + +--- a/ntpd/ntpd.c ++++ a/ntpd/ntpd.c +@@ -971,8 +971,8 @@ getgroup: + char *captext; + + captext = (0 != interface_interval) +- ? "cap_sys_time,cap_net_bind_service=pe" +- : "cap_sys_time=pe"; ++ ? "cap_ipc_lock,cap_sys_time,cap_net_bind_service=pe" ++ : "cap_ipc_lock,cap_sys_time=pe"; + caps = cap_from_text(captext); + if (!caps) { + msyslog(LOG_ERR, diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch deleted file mode 100644 index bfed86c3cb..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch +++ /dev/null @@ -1,164 +0,0 @@ -Fix ntp-keygen build without OpenSSL - -Upstream commit: -http://bk1.ntp.org/ntp-stable/?PAGE=patch&REV=5497b345z5MNTuNvJWuqPSje25NQTg -Gentoo bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=533238 - -Signed-off-by: Markos Chandras -Index: ntp-4.2.8/Makefile.am -=================================================================== ---- ntp-4.2.8.orig/Makefile.am -+++ ntp-4.2.8/Makefile.am -@@ -2,7 +2,10 @@ ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/lib - - NULL = - -+# moved sntp first to get libtool and libevent built. -+ - SUBDIRS = \ -+ sntp \ - scripts \ - include \ - libntp \ -@@ -17,7 +20,6 @@ SUBDIRS = \ - clockstuff \ - kernel \ - util \ -- sntp \ - tests \ - $(NULL) - -@@ -64,7 +66,6 @@ BUILT_SOURCES = \ - .gcc-warning \ - libtool \ - html/.datecheck \ -- sntp/built-sources-only \ - $(srcdir)/COPYRIGHT \ - $(srcdir)/.checkChangeLog \ - $(NULL) -Index: ntp-4.2.8/configure.ac -=================================================================== ---- ntp-4.2.8.orig/configure.ac -+++ ntp-4.2.8/configure.ac -@@ -102,7 +102,7 @@ esac - enable_nls=no - LIBOPTS_CHECK_NOBUILD([sntp/libopts]) - --NTP_ENABLE_LOCAL_LIBEVENT -+NTP_LIBEVENT_CHECK_NOBUILD([2], [sntp/libevent]) - - NTP_LIBNTP - -@@ -771,6 +771,10 @@ esac - - #### - -+AC_CHECK_FUNCS([arc4random_buf]) -+ -+#### -+ - saved_LIBS="$LIBS" - LIBS="$LIBS $LDADD_LIBNTP" - AC_CHECK_FUNCS([daemon]) -Index: ntp-4.2.8/libntp/ntp_crypto_rnd.c -=================================================================== ---- ntp-4.2.8.orig/libntp/ntp_crypto_rnd.c -+++ ntp-4.2.8/libntp/ntp_crypto_rnd.c -@@ -24,6 +24,21 @@ - int crypto_rand_init = 0; - #endif - -+#ifndef HAVE_ARC4RANDOM_BUF -+static void -+arc4random_buf(void *buf, size_t nbytes); -+ -+void -+evutil_secure_rng_get_bytes(void *buf, size_t nbytes); -+ -+static void -+arc4random_buf(void *buf, size_t nbytes) -+{ -+ evutil_secure_rng_get_bytes(buf, nbytes); -+ return; -+} -+#endif -+ - /* - * As of late 2014, here's how we plan to provide cryptographic-quality - * random numbers: -Index: ntp-4.2.8/sntp/configure.ac -=================================================================== ---- ntp-4.2.8.orig/sntp/configure.ac -+++ ntp-4.2.8/sntp/configure.ac -@@ -97,11 +97,14 @@ esac - enable_nls=no - LIBOPTS_CHECK - --AM_COND_IF( -- [BUILD_SNTP], -- [NTP_LIBEVENT_CHECK], -- [NTP_LIBEVENT_CHECK_NOBUILD] --) -+# From when we only used libevent for sntp: -+#AM_COND_IF( -+# [BUILD_SNTP], -+# [NTP_LIBEVENT_CHECK], -+# [NTP_LIBEVENT_CHECK_NOBUILD] -+#) -+ -+NTP_LIBEVENT_CHECK([2]) - - # Checks for libraries. - -Index: ntp-4.2.8/sntp/m4/ntp_libevent.m4 -=================================================================== ---- ntp-4.2.8.orig/sntp/m4/ntp_libevent.m4 -+++ ntp-4.2.8/sntp/m4/ntp_libevent.m4 -@@ -1,4 +1,25 @@ --dnl NTP_ENABLE_LOCAL_LIBEVENT -*- Autoconf -*- -+# SYNOPSIS -*- Autoconf -*- -+# -+# NTP_ENABLE_LOCAL_LIBEVENT -+# NTP_LIBEVENT_CHECK([MINVERSION [, DIR]]) -+# NTP_LIBEVENT_CHECK_NOBUILD([MINVERSION [, DIR]]) -+# -+# DESCRIPTION -+# -+# AUTHOR -+# -+# Harlan Stenn -+# -+# LICENSE -+# -+# This file is Copyright (c) 2014 Network Time Foundation -+# -+# Copying and distribution of this file, with or without modification, are -+# permitted in any medium without royalty provided the copyright notice, -+# author attribution and this notice are preserved. This file is offered -+# as-is, without any warranty. -+ -+dnl NTP_ENABLE_LOCAL_LIBEVENT - dnl - dnl Provide only the --enable-local-libevent command-line option. - dnl -@@ -29,7 +50,7 @@ dnl If NOBUILD is provided as the 3rd ar - dnl but DO NOT invoke DIR/configure if we are going to use our bundled - dnl version. This may be the case for nested packages. - dnl --dnl provide --enable-local-libevent . -+dnl provides --enable-local-libevent . - dnl - dnl Examples: - dnl -Index: ntp-4.2.8/util/Makefile.am -=================================================================== ---- ntp-4.2.8.orig/util/Makefile.am -+++ ntp-4.2.8/util/Makefile.am -@@ -19,6 +19,7 @@ AM_LDFLAGS = $(LDFLAGS_NTP) - LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS) - tg2_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) - ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a -+ntp_keygen_LDADD += $(LDADD_LIBEVENT) - ntp_keygen_LDADD += $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM) - ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h - diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ntpd-test-signd.patch b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ntpd-test-signd.patch new file mode 100644 index 0000000000..403b2d589b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ntpd-test-signd.patch @@ -0,0 +1,21 @@ +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/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-sntp-test-pthreads.patch b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-sntp-test-pthreads.patch new file mode 100644 index 0000000000..4f8d15ff85 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/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/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8-r3.ebuild b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8_p6.ebuild similarity index 86% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8-r3.ebuild rename to sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8_p6.ebuild index 77558008e0..fbb435f5cc 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8-r3.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8_p6.ebuild @@ -41,10 +41,15 @@ pkg_setup() { } src_prepare() { - epatch "${FILESDIR}"/${PN}-4.2.4_p7-nano.patch #270483 - epatch "${FILESDIR}"/${P}-ntp-keygen-no-openssl.patch #533238 - use perl || epatch "${FILESDIR}"/${P}-disable-perl-scripts.patch + epatch "${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966 + epatch "${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922 + epatch "${FILESDIR}"/${PN}-4.2.8-ntpd-test-signd.patch + use perl || epatch "${FILESDIR}"/${PN}-4.2.8-disable-perl-scripts.patch 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 eautoreconf }