From: Adam Duskett Date: Wed, 8 Nov 2017 13:04:58 +0000 (-0500) Subject: openntpd: update to 6.2p3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e22ed19e1a0e8367f15b10c7727cce5363fe236;p=buildroot.git openntpd: update to 6.2p3 Other changes: - Remove upstream patch. - Change locally computed hash to hash from the SHA256 URL. - Add sha256sum for license file. Note that we need to keep _AUTORECONF = YES even though the patch touching the Makefile.am has been removed, because our libtool patch doesn't apply on the bundled ltmain.sh. Signed-off-by: Adam Duskett Signed-off-by: Thomas Petazzoni --- diff --git a/package/openntpd/0001-Revert-use-__dead-macro-from-sys-cdefs.h.patch b/package/openntpd/0001-Revert-use-__dead-macro-from-sys-cdefs.h.patch deleted file mode 100644 index 418f7a2098..0000000000 --- a/package/openntpd/0001-Revert-use-__dead-macro-from-sys-cdefs.h.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 17aa5d98191c4dc85d0645443fc97a12601ae8da Mon Sep 17 00:00:00 2001 -From: Baruch Siach -Date: Tue, 26 Sep 2017 14:55:31 +0300 -Subject: [PATCH] Revert "use __dead macro from sys/cdefs.h" -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This partially reverts commit a7577667d673f49800e15461fe384817a1572eae. - -The musl C library does not use an internal cdefs.h header. As a result, -the definitions in sys/cdefs.h have no effect. This breads the build as -follows: - -In file included from adjfreq_linux.c:23:0: -../src/ntpd.h:448:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ - __dead void fatal(const char *, ...) - ^~~~ -../src/ntpd.h:450:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ - __dead void fatalx(const char *, ...) - ^~~~ - -Refer the related musl FAQ about cdefs.h: - - http://wiki.musl-libc.org/wiki/FAQ#Q:_I.27m_trying_to_compile_something_against_musl_and_I_get_error_messages_about_sys.2Fcdefs.h - -Keep the compiler attribute definition. - -Remove also from noinst_HEADERS. - -Signed-off-by: Baruch Siach ---- -Upstream status: https://github.com/openntpd-portable/openntpd-portable/pull/45 - - include/Makefile.am | 1 - - include/sys/cdefs.h | 16 ---------------- - include/sys/types.h | 4 ++++ - 3 files changed, 4 insertions(+), 17 deletions(-) - delete mode 100644 include/sys/cdefs.h - -diff --git a/include/Makefile.am b/include/Makefile.am -index a552026e8f25..3a5a01620d82 100644 ---- a/include/Makefile.am -+++ b/include/Makefile.am -@@ -1,6 +1,5 @@ - noinst_HEADERS = - noinst_HEADERS += machine/endian.h --noinst_HEADERS += sys/cdefs.h - noinst_HEADERS += sys/queue.h - noinst_HEADERS += sys/socket.h - noinst_HEADERS += sys/types.h -diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h -deleted file mode 100644 -index 3dec43deec28..000000000000 ---- a/include/sys/cdefs.h -+++ /dev/null -@@ -1,16 +0,0 @@ --/* -- * Public domain -- * sys/cdefs.h compatibility shim -- */ -- --#include_next -- --#ifndef LIBCOMPAT_SYS_CDEFS_H --#define LIBCOMPAT_SYS_CDEFS_H -- --#if !defined(HAVE_ATTRIBUTE__DEAD) && !defined(__dead) --#define __dead __attribute__((__noreturn__)) --#define __pure __attribute__((__const__)) --#endif -- --#endif -diff --git a/include/sys/types.h b/include/sys/types.h -index 56aef0b61af8..86821c732ec3 100644 ---- a/include/sys/types.h -+++ b/include/sys/types.h -@@ -14,6 +14,10 @@ - #include <_bsd_types.h> - #endif - -+#if !defined(HAVE_ATTRIBUTE__DEAD) && !defined(__dead) -+#define __dead __attribute__((__noreturn__)) -+#endif -+ - #if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__bounded__) - # define __bounded__(x, y, z) - #endif --- -2.14.1 - diff --git a/package/openntpd/0001-fix-musl.patch b/package/openntpd/0001-fix-musl.patch new file mode 100644 index 0000000000..e369d5a8ae --- /dev/null +++ b/package/openntpd/0001-fix-musl.patch @@ -0,0 +1,38 @@ +From: Baruch Siach +Date: Fri, 29 Sep 2017 10:06:52 +0300 +Subject: [PATCH] Fix build with musl and older Linux kernel + +The musl libc carries its own copy of Linux system calls. When building +with Linux headers older than v3.17, musl provides SYS_getrandom +definition, but not GRND_NONBLOCK. This causes build failure for +libressl and openntpd: + +getentropy_linux.c: In function 'getentropy_getrandom': +getentropy_linux.c:205:42: error: 'GRND_NONBLOCK' undeclared (first use in this function) + ret = syscall(SYS_getrandom, buf, len, GRND_NONBLOCK); + ^~~~~~~~~~~~~ + +Define GRND_NONBLOCK locally when its definition is missing to fix the +build. There should be no run-time effect. Older kernels return ENOSYS +for unsupported syscall(). + +[ from upstream pull request with file location changed ] +Signed-off-by: Baruch Siach +--- +Upstream status: https://github.com/libressl-portable/openbsd/pull/82 + +diff -Nuar openntpd-6.2p2-orig/compat/getentropy_linux.c openntpd-6.2p2/compat/getentropy_linux.c +--- openntpd-6.2p2-orig/compat/getentropy_linux.c 2017-09-07 22:12:02.000000000 +0300 ++++ openntpd-6.2p2/compat/getentropy_linux.c 2017-09-29 11:54:54.856245770 +0300 +@@ -194,6 +194,11 @@ + } + + #ifdef SYS_getrandom ++ ++#ifndef GRND_NONBLOCK ++#define GRND_NONBLOCK 0x0001 ++#endif ++ + static int + getentropy_getrandom(void *buf, size_t len) + { diff --git a/package/openntpd/0002-fix-musl.patch b/package/openntpd/0002-fix-musl.patch deleted file mode 100644 index e369d5a8ae..0000000000 --- a/package/openntpd/0002-fix-musl.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Baruch Siach -Date: Fri, 29 Sep 2017 10:06:52 +0300 -Subject: [PATCH] Fix build with musl and older Linux kernel - -The musl libc carries its own copy of Linux system calls. When building -with Linux headers older than v3.17, musl provides SYS_getrandom -definition, but not GRND_NONBLOCK. This causes build failure for -libressl and openntpd: - -getentropy_linux.c: In function 'getentropy_getrandom': -getentropy_linux.c:205:42: error: 'GRND_NONBLOCK' undeclared (first use in this function) - ret = syscall(SYS_getrandom, buf, len, GRND_NONBLOCK); - ^~~~~~~~~~~~~ - -Define GRND_NONBLOCK locally when its definition is missing to fix the -build. There should be no run-time effect. Older kernels return ENOSYS -for unsupported syscall(). - -[ from upstream pull request with file location changed ] -Signed-off-by: Baruch Siach ---- -Upstream status: https://github.com/libressl-portable/openbsd/pull/82 - -diff -Nuar openntpd-6.2p2-orig/compat/getentropy_linux.c openntpd-6.2p2/compat/getentropy_linux.c ---- openntpd-6.2p2-orig/compat/getentropy_linux.c 2017-09-07 22:12:02.000000000 +0300 -+++ openntpd-6.2p2/compat/getentropy_linux.c 2017-09-29 11:54:54.856245770 +0300 -@@ -194,6 +194,11 @@ - } - - #ifdef SYS_getrandom -+ -+#ifndef GRND_NONBLOCK -+#define GRND_NONBLOCK 0x0001 -+#endif -+ - static int - getentropy_getrandom(void *buf, size_t len) - { diff --git a/package/openntpd/openntpd.hash b/package/openntpd/openntpd.hash index 1a73e8dc0b..4d00b7bb9d 100644 --- a/package/openntpd/openntpd.hash +++ b/package/openntpd/openntpd.hash @@ -1,2 +1,5 @@ +# from http://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/SHA256 +sha256 7b02691524197e01ba6b1b4b7595b33956e657ba6d5c4cf2fc20ea3f4914c13a openntpd-6.2p3.tar.gz + # Locally computed -sha256 5808a4137b008a4db20907e1a482f474734b120f254e3c5feb90db15e0820fb2 openntpd-6.2p2.tar.gz +sha256 6c1822ee950652c12bb3773849db18794f62c63452a70d018edf23e8cba71839 COPYING diff --git a/package/openntpd/openntpd.mk b/package/openntpd/openntpd.mk index 308a1b1258..96d3881d21 100644 --- a/package/openntpd/openntpd.mk +++ b/package/openntpd/openntpd.mk @@ -4,11 +4,11 @@ # ################################################################################ -OPENNTPD_VERSION = 6.2p2 +OPENNTPD_VERSION = 6.2p3 OPENNTPD_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenNTPD OPENNTPD_LICENSE = MIT-like, BSD-2-Clause, BSD-3-Clause OPENNTPD_LICENSE_FILES = COPYING -# Patching include/Makefile.am +# Need to autoreconf for our libtool patch to apply properly OPENNTPD_AUTORECONF = YES # openntpd uses pthread functions for arc4random emulation but forgets