Bump buildroot to 2020.11-rc1 (#985)
* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
From 8cb5708829df9eacd58e1215ce7a1c135eb912b1 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Mon, 2 Nov 2020 00:04:14 +0100
|
||||
Subject: [PATCH] src/compat.hpp: fix build with libbsd and strlcpy
|
||||
|
||||
Don't include bsd/string.h if strlcpy is also defined in string.h to
|
||||
avoid the following build failure on uclibc:
|
||||
|
||||
In file included from src/compat.hpp:41:0,
|
||||
from src/ipc_address.cpp:31:
|
||||
/tmp/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/bsd/string.h:44:54: error: declaration of 'size_t strlcpy(char*, const char*, size_t)' has a different exception specifier
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
^
|
||||
In file included from src/compat.hpp:34:0,
|
||||
from src/ipc_address.cpp:31:
|
||||
/tmp/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/string.h:424:15: error: from previous declaration 'size_t strlcpy(char*, const char*, size_t) throw ()'
|
||||
extern size_t strlcpy(char *__restrict dst, const char *__restrict src,
|
||||
^
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/51220b1b82774e8f6f6ed8593c58d2e3c31a1531
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Retrieved from:
|
||||
https://github.com/zeromq/libzmq/commit/b2a0842063aaa464ca2d182f9d3fefc6493906d0]
|
||||
---
|
||||
CMakeLists.txt | 4 +---
|
||||
configure.ac | 26 ++++++++++++--------------
|
||||
src/compat.hpp | 4 +++-
|
||||
3 files changed, 16 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 85747f626..74dd99ae0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -250,9 +250,7 @@ if(NOT MSVC)
|
||||
set(ZMQ_HAVE_LIBBSD 1)
|
||||
endif()
|
||||
endif()
|
||||
- if(NOT WITH_LIBBSD OR NOT LIBBSD_FOUND)
|
||||
- check_cxx_symbol_exists(strlcpy string.h ZMQ_HAVE_STRLCPY)
|
||||
- endif()
|
||||
+ check_cxx_symbol_exists(strlcpy string.h ZMQ_HAVE_STRLCPY)
|
||||
endif()
|
||||
|
||||
# Select curve encryption library, defaults to tweetnacl To use libsodium instead, use --with-libsodium(must be
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 58a78e75e..a7a1609af 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -812,20 +812,18 @@ if test "x$enable_libbsd" != "xno"; then
|
||||
fi
|
||||
])
|
||||
fi
|
||||
-if test "x$found_libbsd" != "xyes"; then
|
||||
- AC_MSG_CHECKING([whether strlcpy is available])
|
||||
- AC_COMPILE_IFELSE(
|
||||
- [AC_LANG_PROGRAM(
|
||||
- [[#include <string.h>]],
|
||||
- [[char buf [100]; size_t bar = strlcpy (buf, "foo", 100); (void)bar; return 0;]])
|
||||
- ],[
|
||||
- AC_MSG_RESULT([yes])
|
||||
- AC_DEFINE(ZMQ_HAVE_STRLCPY, [1],
|
||||
- [strlcpy is available])
|
||||
- ],[
|
||||
- AC_MSG_RESULT([no])
|
||||
- ])
|
||||
-fi
|
||||
+AC_MSG_CHECKING([whether strlcpy is available])
|
||||
+AC_COMPILE_IFELSE(
|
||||
+ [AC_LANG_PROGRAM(
|
||||
+ [[#include <string.h>]],
|
||||
+ [[char buf [100]; size_t bar = strlcpy (buf, "foo", 100); (void)bar; return 0;]])
|
||||
+ ],[
|
||||
+ AC_MSG_RESULT([yes])
|
||||
+ AC_DEFINE(ZMQ_HAVE_STRLCPY, [1],
|
||||
+ [strlcpy is available])
|
||||
+ ],[
|
||||
+ AC_MSG_RESULT([no])
|
||||
+])
|
||||
|
||||
# pthread_setname is non-posix, and there are at least 4 different implementations
|
||||
AC_MSG_CHECKING([whether signature of pthread_setname_np() has 1 argument])
|
||||
diff --git a/src/compat.hpp b/src/compat.hpp
|
||||
index 7c7a89275..47744b98e 100644
|
||||
--- a/src/compat.hpp
|
||||
+++ b/src/compat.hpp
|
||||
@@ -37,9 +37,10 @@
|
||||
#define strcasecmp _stricmp
|
||||
#define strtok_r strtok_s
|
||||
#else
|
||||
+#ifndef ZMQ_HAVE_STRLCPY
|
||||
#ifdef ZMQ_HAVE_LIBBSD
|
||||
#include <bsd/string.h>
|
||||
-#elif !defined(ZMQ_HAVE_STRLCPY)
|
||||
+#else
|
||||
static inline size_t
|
||||
strlcpy (char *dest_, const char *src_, const size_t dest_size_)
|
||||
{
|
||||
@@ -50,6 +51,7 @@ strlcpy (char *dest_, const char *src_, const size_t dest_size_)
|
||||
return dest_size_ - remain;
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
template <size_t size>
|
||||
static inline int strcpy_s (char (&dest_)[size], const char *const src_)
|
||||
{
|
||||
@@ -8,9 +8,11 @@ ZEROMQ_VERSION = 4.3.3
|
||||
ZEROMQ_SITE = https://github.com/zeromq/libzmq/releases/download/v$(ZEROMQ_VERSION)
|
||||
ZEROMQ_INSTALL_STAGING = YES
|
||||
ZEROMQ_DEPENDENCIES = util-linux
|
||||
ZEROMQ_CONF_OPTS = --without-documentation
|
||||
ZEROMQ_CONF_OPTS = --disable-Werror --without-documentation
|
||||
ZEROMQ_LICENSE = LGPL-3.0+ with exceptions
|
||||
ZEROMQ_LICENSE_FILES = COPYING COPYING.LESSER
|
||||
# We're patching configure.ac
|
||||
ZEROMQ_AUTORECONF = YES
|
||||
|
||||
# Assume these flags are always available. It is true, at least for
|
||||
# SOCK_CLOEXEC, since linux v2.6.27.
|
||||
@@ -53,6 +55,13 @@ else
|
||||
ZEROMQ_CONF_OPTS += --disable-drafts
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBSD),y)
|
||||
ZEROMQ_DEPENDENCIES += host-pkgconf libbsd
|
||||
ZEROMQ_CONF_OPTS += --enable-libbsd
|
||||
else
|
||||
ZEROMQ_CONF_OPTS += --disable-libbsd
|
||||
endif
|
||||
|
||||
# ZeroMQ uses libsodium if it's available.
|
||||
ifeq ($(BR2_PACKAGE_LIBSODIUM),y)
|
||||
ZEROMQ_DEPENDENCIES += libsodium
|
||||
|
||||
Reference in New Issue
Block a user