diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-disable-perl-scripts.patch b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-disable-perl-scripts.patch new file mode 100644 index 0000000000..4b8f93f4e1 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-disable-perl-scripts.patch @@ -0,0 +1,24 @@ +From 7c3b3f34f94146d5178adee4c5a184e9b1546e89 Mon Sep 17 00:00:00 2001 +From: Michael Marineau +Date: Mon, 22 Dec 2014 21:20:46 -0800 +Subject: [PATCH] disable perl scripts + +--- + Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index fc76719..1fd008d 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -6,7 +6,6 @@ NULL = + + SUBDIRS = \ + sntp \ +- scripts \ + include \ + libntp \ + libparse \ +-- +2.0.4 + 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 new file mode 100644 index 0000000000..bfed86c3cb --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch @@ -0,0 +1,164 @@ +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/ntp-4.2.8.ebuild b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8-r1.ebuild similarity index 79% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8.ebuild rename to sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8-r1.ebuild index 20856690da..73cbd6a1b0 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.8-r1.ebuild @@ -1,20 +1,21 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.6_p5-r10.ebuild,v 1.15 2014/11/02 09:09:15 swift Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.8-r1.ebuild,v 1.4 2014/12/22 15:04:43 hwoarang Exp $ EAPI="4" -inherit eutils toolchain-funcs flag-o-matic user systemd +inherit autotools 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" +SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz + mirror://gentoo/${MY_P}-manpages.tar.bz2" LICENSE="HPND BSD ISC" SLOT="0" KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~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 doc examples ipv6 openntpd parse-clocks samba selinux snmp ssl vim-syntax zeroconf" +IUSE="caps debug doc ipv6 openntpd parse-clocks perl samba selinux snmp ssl vim-syntax zeroconf" CDEPEND=">=sys-libs/ncurses-5.2 >=sys-libs/readline-4.1 @@ -26,7 +27,7 @@ CDEPEND=">=sys-libs/ncurses-5.2 ssl? ( dev-libs/openssl ) parse-clocks? ( net-misc/pps-tools )" DEPEND="${CDEPEND} - dev-util/pkgconfig" + virtual/pkgconfig" RDEPEND="${CDEPEND} selinux? ( sec-policy/selinux-ntp ) vim-syntax? ( app-vim/ntp-syntax )" @@ -41,7 +42,10 @@ 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 append-cppflags -D_GNU_SOURCE #264109 + eautoreconf } src_configure() { @@ -71,21 +75,11 @@ src_install() { mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin" dodoc INSTALL WHERE-TO-START + doman "${WORKDIR}"/man/*.[58] use doc && dohtml -r html/* insinto /usr/share/ntp doins "${FILESDIR}"/ntp.conf - if use examples; then - cp -r scripts/* "${ED}"/usr/share/ntp/ || die - use prefix || fperms -R go-w /usr/share/ntp - find "${ED}"/usr/share/ntp \ - '(' \ - -name '*.in' -o \ - -name 'Makefile*' -o \ - -name support \ - ')' \ - -exec rm -r {} \; - fi keepdir /var/lib/ntp use prefix || fowners ntp:ntp /var/lib/ntp @@ -98,8 +92,7 @@ src_install() { rm usr/share/man/*/ntpd.8 || die else systemd_dounit "${FILESDIR}"/ntpd.service - use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' \ - "${ED}/$(systemd_get_unitdir)/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 systemd_enable_service multi-user.target ntpd.service fi