All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3
@ 2017-11-08 13:04 Adam Duskett
  2017-11-08 13:04 ` [Buildroot] [PATCH 2/2] openntpd: add check for LibreSSL Adam Duskett
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Adam Duskett @ 2017-11-08 13:04 UTC (permalink / raw)
  To: buildroot

Other changes:
  - Remove upstream patch.
  - change locally computed hash to hash from the SHA256 URL.
  - Add sha256sum for license file.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 ...-Revert-use-__dead-macro-from-sys-cdefs.h.patch | 91 ----------------------
 .../{0002-fix-musl.patch => 0001-fix-musl.patch}   |  0
 package/openntpd/openntpd.hash                     |  5 +-
 package/openntpd/openntpd.mk                       |  2 +-
 4 files changed, 5 insertions(+), 93 deletions(-)
 delete mode 100644 package/openntpd/0001-Revert-use-__dead-macro-from-sys-cdefs.h.patch
 rename package/openntpd/{0002-fix-musl.patch => 0001-fix-musl.patch} (100%)

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 <baruch@tkos.co.il>
-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 <baruch@tkos.co.il>
----
-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 <sys/cdefs.h>
--
--#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/0002-fix-musl.patch b/package/openntpd/0001-fix-musl.patch
similarity index 100%
rename from package/openntpd/0002-fix-musl.patch
rename to package/openntpd/0001-fix-musl.patch
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..b5a2559008 100644
--- a/package/openntpd/openntpd.mk
+++ b/package/openntpd/openntpd.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-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
-- 
2.13.6

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

* [Buildroot] [PATCH 2/2] openntpd: add check for LibreSSL.
  2017-11-08 13:04 [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3 Adam Duskett
@ 2017-11-08 13:04 ` Adam Duskett
  2017-11-22 22:10   ` Thomas Petazzoni
  2017-11-08 13:31 ` [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3 Baruch Siach
  2017-11-22 21:55 ` Thomas Petazzoni
  2 siblings, 1 reply; 8+ messages in thread
From: Adam Duskett @ 2017-11-08 13:04 UTC (permalink / raw)
  To: buildroot

Openntp looks for a crypto library with tls_config_set_ca_mem, which is
available in LibreSSL but not OpenSSL. If tls_config_set_ca_mem is found,
crypto support is added to the build.

Because this is not currently checked, crypto support might not be added
due to the order of the build. Add a small check to see if
BR2_PACKAGE_LIBRESSL is selected, and if so, add a dependency for it.

Also add a note about this in the Config.in help section.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 package/openntpd/Config.in   | 3 +++
 package/openntpd/openntpd.mk | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/package/openntpd/Config.in b/package/openntpd/Config.in
index 1b856c03b8..5f8c9e8549 100644
--- a/package/openntpd/Config.in
+++ b/package/openntpd/Config.in
@@ -9,6 +9,9 @@ config BR2_PACKAGE_OPENNTPD
 	  to remote NTP servers and can act as NTP server itself,
 	  redistributing the local clock. It just works.
 
+	  Note: Cryto support is only available with the LibreSSL ssl
+	  library.
+
 	  http://www.openntpd.org/
 
 comment "openntpd needs a toolchain w/ NPTL"
diff --git a/package/openntpd/openntpd.mk b/package/openntpd/openntpd.mk
index b5a2559008..d53eed29de 100644
--- a/package/openntpd/openntpd.mk
+++ b/package/openntpd/openntpd.mk
@@ -11,6 +11,12 @@ OPENNTPD_LICENSE_FILES = COPYING
 # Patching include/Makefile.am
 OPENNTPD_AUTORECONF = YES
 
+# Openntpd searches for tls_config_set_ca_mem which is only available
+# in LibreSSL
+ifeq ($(BR2_PACKAGE_LIBRESSL),y)
+OPENNTPD_DEPENDENCIES += openssl
+endif
+
 # openntpd uses pthread functions for arc4random emulation but forgets
 # to use -pthread
 OPENNTPD_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -pthread"
-- 
2.13.6

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

* [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3
  2017-11-08 13:04 [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3 Adam Duskett
  2017-11-08 13:04 ` [Buildroot] [PATCH 2/2] openntpd: add check for LibreSSL Adam Duskett
@ 2017-11-08 13:31 ` Baruch Siach
  2017-11-19 21:50   ` Adam Duskett
  2017-11-22 21:55 ` Thomas Petazzoni
  2 siblings, 1 reply; 8+ messages in thread
From: Baruch Siach @ 2017-11-08 13:31 UTC (permalink / raw)
  To: buildroot

Hi Adam,

On Wed, Nov 08, 2017 at 08:04:58AM -0500, Adam Duskett wrote:
> Other changes:
>   - Remove upstream patch.

I think you can drop the AUTORECONF as well.

>   - change locally computed hash to hash from the SHA256 URL.
>   - Add sha256sum for license file.
> 
> Signed-off-by: Adam Duskett <aduskett@gmail.com>
> ---
>  ...-Revert-use-__dead-macro-from-sys-cdefs.h.patch | 91 ----------------------
>  .../{0002-fix-musl.patch => 0001-fix-musl.patch}   |  0
>  package/openntpd/openntpd.hash                     |  5 +-
>  package/openntpd/openntpd.mk                       |  2 +-
>  4 files changed, 5 insertions(+), 93 deletions(-)
>  delete mode 100644 package/openntpd/0001-Revert-use-__dead-macro-from-sys-cdefs.h.patch
>  rename package/openntpd/{0002-fix-musl.patch => 0001-fix-musl.patch} (100%)

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3
  2017-11-08 13:31 ` [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3 Baruch Siach
@ 2017-11-19 21:50   ` Adam Duskett
  2017-11-20  5:11     ` Baruch Siach
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Duskett @ 2017-11-19 21:50 UTC (permalink / raw)
  To: buildroot

Hi Baruch

On Wed, Nov 8, 2017 at 8:31 AM, Baruch Siach <baruch@tkos.co.il> wrote:
> Hi Adam,
>
> On Wed, Nov 08, 2017 at 08:04:58AM -0500, Adam Duskett wrote:
>> Other changes:
>>   - Remove upstream patch.
>
> I think you can drop the AUTORECONF as well.
>
Still broken :\
>>   - change locally computed hash to hash from the SHA256 URL.
>>   - Add sha256sum for license file.
>>
>> Signed-off-by: Adam Duskett <aduskett@gmail.com>
>> ---
>>  ...-Revert-use-__dead-macro-from-sys-cdefs.h.patch | 91 ----------------------
>>  .../{0002-fix-musl.patch => 0001-fix-musl.patch}   |  0
>>  package/openntpd/openntpd.hash                     |  5 +-
>>  package/openntpd/openntpd.mk                       |  2 +-
>>  4 files changed, 5 insertions(+), 93 deletions(-)
>>  delete mode 100644 package/openntpd/0001-Revert-use-__dead-macro-from-sys-cdefs.h.patch
>>  rename package/openntpd/{0002-fix-musl.patch => 0001-fix-musl.patch} (100%)
>
> baruch
>
> --
>      http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>    - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3
  2017-11-19 21:50   ` Adam Duskett
@ 2017-11-20  5:11     ` Baruch Siach
  2017-11-22 21:54       ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Baruch Siach @ 2017-11-20  5:11 UTC (permalink / raw)
  To: buildroot

Hi Adam,

On Sun, Nov 19, 2017 at 04:50:47PM -0500, Adam Duskett wrote:
> On Wed, Nov 8, 2017 at 8:31 AM, Baruch Siach <baruch@tkos.co.il> wrote:
> > On Wed, Nov 08, 2017 at 08:04:58AM -0500, Adam Duskett wrote:
> >> Other changes:
> >>   - Remove upstream patch.
> >
> > I think you can drop the AUTORECONF as well.
>
> Still broken :\

What is broken?

I case AUTORECONF is still necessary even after the Makefile.am patch removal, 
the comment needs update.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3
  2017-11-20  5:11     ` Baruch Siach
@ 2017-11-22 21:54       ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2017-11-22 21:54 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 20 Nov 2017 07:11:47 +0200, Baruch Siach wrote:

> > Still broken :\  
> 
> What is broken?
> 
> I case AUTORECONF is still necessary even after the Makefile.am patch removal, 
> the comment needs update.

Because our libtool patch doesn't apply to openntpd's ltmain.sh. So
I've kept the AUTORECONF = YES (after updating the comment, of course).

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3
  2017-11-08 13:04 [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3 Adam Duskett
  2017-11-08 13:04 ` [Buildroot] [PATCH 2/2] openntpd: add check for LibreSSL Adam Duskett
  2017-11-08 13:31 ` [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3 Baruch Siach
@ 2017-11-22 21:55 ` Thomas Petazzoni
  2 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2017-11-22 21:55 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed,  8 Nov 2017 08:04:58 -0500, Adam Duskett wrote:
> Other changes:
>   - Remove upstream patch.
>   - change locally computed hash to hash from the SHA256 URL.
>   - Add sha256sum for license file.
> 
> Signed-off-by: Adam Duskett <aduskett@gmail.com>
> ---
>  ...-Revert-use-__dead-macro-from-sys-cdefs.h.patch | 91 ----------------------
>  .../{0002-fix-musl.patch => 0001-fix-musl.patch}   |  0
>  package/openntpd/openntpd.hash                     |  5 +-
>  package/openntpd/openntpd.mk                       |  2 +-
>  4 files changed, 5 insertions(+), 93 deletions(-)
>  delete mode 100644 package/openntpd/0001-Revert-use-__dead-macro-from-sys-cdefs.h.patch
>  rename package/openntpd/{0002-fix-musl.patch => 0001-fix-musl.patch} (100%)

Applied to next, after updating the comment that explains why
AUTORECONF = YES is needed.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 2/2] openntpd: add check for LibreSSL.
  2017-11-08 13:04 ` [Buildroot] [PATCH 2/2] openntpd: add check for LibreSSL Adam Duskett
@ 2017-11-22 22:10   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2017-11-22 22:10 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed,  8 Nov 2017 08:04:59 -0500, Adam Duskett wrote:

> +	  Note: Cryto support is only available with the LibreSSL ssl

Cryto -> Crypto.

> +	  library.
> +
>  	  http://www.openntpd.org/

I've reworded a bit the Config.in help text and applied to next. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-11-22 22:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08 13:04 [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3 Adam Duskett
2017-11-08 13:04 ` [Buildroot] [PATCH 2/2] openntpd: add check for LibreSSL Adam Duskett
2017-11-22 22:10   ` Thomas Petazzoni
2017-11-08 13:31 ` [Buildroot] [PATCH 1/2] openntpd: update to 6.2p3 Baruch Siach
2017-11-19 21:50   ` Adam Duskett
2017-11-20  5:11     ` Baruch Siach
2017-11-22 21:54       ` Thomas Petazzoni
2017-11-22 21:55 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.