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:
Stefan Agner
2020-11-13 18:25:44 +01:00
committed by GitHub
parent 25a0dd3082
commit a0871be6c0
4024 changed files with 68095 additions and 47900 deletions

View File

@@ -0,0 +1,103 @@
From 73f6f8ebff678a0847e6b197b574082cc285b528 Mon Sep 17 00:00:00 2001
From: Thomas Klausner <tk@giga.or.at>
Date: Sat, 25 Jul 2020 12:03:29 +0200
Subject: [PATCH] Add FindGnuTLS.cmake from 3.17.3.
Addresses #199
[Retrieved from:
https://github.com/nih-at/libzip/commit/73f6f8ebff678a0847e6b197b574082cc285b528]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
cmake-compat/FindGnuTLS.cmake | 82 +++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 cmake-compat/FindGnuTLS.cmake
diff --git a/cmake-compat/FindGnuTLS.cmake b/cmake-compat/FindGnuTLS.cmake
new file mode 100644
index 00000000..819f0001
--- /dev/null
+++ b/cmake-compat/FindGnuTLS.cmake
@@ -0,0 +1,82 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[=======================================================================[.rst:
+FindGnuTLS
+----------
+
+Find the GNU Transport Layer Security library (gnutls)
+
+IMPORTED Targets
+^^^^^^^^^^^^^^^^
+
+This module defines :prop_tgt:`IMPORTED` target ``GnuTLS::GnuTLS``, if
+gnutls has been found.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+``GNUTLS_FOUND``
+ System has gnutls
+``GNUTLS_INCLUDE_DIR``
+ The gnutls include directory
+``GNUTLS_LIBRARIES``
+ The libraries needed to use gnutls
+``GNUTLS_DEFINITIONS``
+ Compiler switches required for using gnutls
+``GNUTLS_VERSION``
+ version of gnutls.
+#]=======================================================================]
+
+# Note that this doesn't try to find the gnutls-extra package.
+
+
+if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY)
+ # in cache already
+ set(gnutls_FIND_QUIETLY TRUE)
+endif ()
+
+if (NOT WIN32)
+ # try using pkg-config to get the directories and then use these values
+ # in the find_path() and find_library() calls
+ # also fills in GNUTLS_DEFINITIONS, although that isn't normally useful
+ find_package(PkgConfig QUIET)
+ PKG_CHECK_MODULES(PC_GNUTLS QUIET gnutls)
+ set(GNUTLS_DEFINITIONS ${PC_GNUTLS_CFLAGS_OTHER})
+ set(GNUTLS_VERSION ${PC_GNUTLS_VERSION})
+ # keep for backward compatibility
+ set(GNUTLS_VERSION_STRING ${PC_GNUTLS_VERSION})
+endif ()
+
+find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h
+ HINTS
+ ${PC_GNUTLS_INCLUDEDIR}
+ ${PC_GNUTLS_INCLUDE_DIRS}
+ )
+
+find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls
+ HINTS
+ ${PC_GNUTLS_LIBDIR}
+ ${PC_GNUTLS_LIBRARY_DIRS}
+ )
+
+mark_as_advanced(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
+
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GnuTLS
+ REQUIRED_VARS GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR
+ VERSION_VAR GNUTLS_VERSION_STRING)
+
+if(GNUTLS_FOUND)
+ set(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY})
+ set(GNUTLS_INCLUDE_DIRS ${GNUTLS_INCLUDE_DIR})
+
+ if(NOT TARGET GnuTLS::GnuTLS)
+ add_library(GnuTLS::GnuTLS UNKNOWN IMPORTED)
+ set_target_properties(GnuTLS::GnuTLS PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIRS}"
+ INTERFACE_COMPILE_DEFINITIONS "${GNUTLS_DEFINITIONS}"
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+ IMPORTED_LOCATION "${GNUTLS_LIBRARIES}")
+ endif()
+endif()

View File

@@ -0,0 +1,27 @@
From fd89e242d16128dedef08f47d99ae56aa19b0591 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=98rjan=20Malde?= <red@foxi.me>
Date: Wed, 15 Jul 2020 12:16:16 +0200
Subject: [PATCH] Include limits.h for INT_MAX
[Retrieved from:
https://github.com/nih-at/libzip/commit/fd89e242d16128dedef08f47d99ae56aa19b0591]
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
lib/zip_crypto_openssl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/zip_crypto_openssl.c b/lib/zip_crypto_openssl.c
index 1cb00479..60f92758 100644
--- a/lib/zip_crypto_openssl.c
+++ b/lib/zip_crypto_openssl.c
@@ -38,6 +38,7 @@
#include "zip_crypto.h"
#include <openssl/rand.h>
+#include <limits.h>
#if OPENSSL_VERSION_NUMBER < 0x1010000fL || defined(LIBRESSL_VERSION_NUMBER)
#define USE_OPENSSL_1_0_API
--
2.28.0

View File

@@ -8,7 +8,7 @@ config BR2_PACKAGE_LIBZIP
This package also contains zipcmp, ziptorrent and zipmerge
utilities.
http://www.nih.at/libzip/
https://libzip.org/
comment "libzip needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS

View File

@@ -1,3 +1,3 @@
# Locally calculated
sha256 b3de4d4bd49a01e0cab3507fc163f88e1651695b6b9cb25ad174dbe319d4a3b4 libzip-1.5.2.tar.xz
sha256 04464e729973cf58189051e7a3e8bca2acce9a1058c735e9e2eb1fdbe0fbbf50 LICENSE
sha256 a60473ffdb7b4260c08bfa19c2ccea0438edac11193c3afbbb1f17fbcf6c6132 libzip-1.7.3.tar.xz
sha256 deae392de70503672793ee784d603bfa8069dcd5974a325dfbf91160f3a147d6 LICENSE

View File

@@ -4,8 +4,8 @@
#
################################################################################
LIBZIP_VERSION = 1.5.2
LIBZIP_SITE = http://www.nih.at/libzip
LIBZIP_VERSION = 1.7.3
LIBZIP_SITE = https://libzip.org/download
LIBZIP_SOURCE = libzip-$(LIBZIP_VERSION).tar.xz
LIBZIP_LICENSE = BSD-3-Clause
LIBZIP_LICENSE_FILES = LICENSE
@@ -15,8 +15,9 @@ HOST_LIBZIP_DEPENDENCIES = host-zlib
ifeq ($(BR2_PACKAGE_BZIP2),y)
LIBZIP_DEPENDENCIES += bzip2
LIBZIP_CONF_OPTS += -DENABLE_BZIP2=ON
else
LIBZIP_CONF_OPTS += -DCMAKE_DISABLE_FIND_PACKAGE_BZIP2=TRUE
LIBZIP_CONF_OPTS += -DENABLE_BZIP2=OFF
endif
ifeq ($(BR2_PACKAGE_GNUTLS),y)
@@ -26,6 +27,13 @@ else
LIBZIP_CONF_OPTS += -DENABLE_GNUTLS=OFF
endif
ifeq ($(BR2_PACKAGE_MBEDTLS),y)
LIBZIP_DEPENDENCIES += mbedtls
LIBZIP_CONF_OPTS += -DENABLE_MBEDTLS=ON
else
LIBZIP_CONF_OPTS += -DENABLE_MBEDTLS=OFF
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
LIBZIP_DEPENDENCIES += openssl
LIBZIP_CONF_OPTS += -DENABLE_OPENSSL=ON
@@ -38,5 +46,12 @@ LIBZIP_DEPENDENCIES += musl-fts
LIBZIP_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-lfts
endif
ifeq ($(BR2_PACKAGE_XZ),y)
LIBZIP_DEPENDENCIES += xz
LIBZIP_CONF_OPTS += -DENABLE_LZMA=ON
else
LIBZIP_CONF_OPTS += -DENABLE_LZMA=OFF
endif
$(eval $(cmake-package))
$(eval $(host-cmake-package))