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,41 @@
From 0d9e004d324cc030c173de04c40db51a0f22bb5c Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Thu, 15 Oct 2020 07:58:05 +0200
Subject: [PATCH] Makefile: fix static linking with pcre
Static build with pcre is broken since version 1.19b and
https://github.com/yrutschle/sslh/commit/cb90cc97ae64a445242e517847c6e44b7003eda4
because -lpcre has been replaced by -lpcreposix which will result in
the following static build failure:
/srv/storage/autobuild/run/instance-1/output-1/host/bin/mipsel-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -static -o echosrv echosrv.o probe.o common.o tls.o -lpcreposix -lconfig -lcap
/srv/storage/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/8.3.0/../../../../mipsel-buildroot-linux-uclibc/bin/ld: /srv/storage/autobuild/run/instance-1/output-1/host/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libpcreposix.a(libpcreposix_la-pcreposix.o): in function `regfree':
pcreposix.c:(.text+0x120): undefined reference to `pcre_free'
So append -lpcre after -lpcreposix
Fixes:
- http://autobuild.buildroot.org/results/a601824fc0c205a6a940e0f9f079ce2c39840605
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/yrutschle/sslh/pull/280]
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 986cf1c..ecadc22 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ endif
ifneq ($(strip $(USELIBPCRE)),)
CPPFLAGS+=-DLIBPCRE
- LIBS:=$(LIBS) -lpcreposix
+ LIBS:=$(LIBS) -lpcreposix -lpcre
endif
ifneq ($(strip $(USELIBCONFIG)),)
--
2.28.0

View File

@@ -1,45 +0,0 @@
From 0c39699da9a3d6534b6d26e7c9686ee76d81b64a Mon Sep 17 00:00:00 2001
From: David Bachelart <david.bachelart@bbright.com>
Date: Thu, 26 Jan 2017 10:07:47 +0100
Subject: [PATCH] fix version extraction when building in a larger git tree
sslh uses host git to extract its own version number. In buildroot, this
is an issue since extracted information is conflicting with buildroot git
status if we use git as VCS for buildroot.
Since these git calls are legitimate only if git is used for the sslh
subtree only, this patch adds a check : a .git directory has to exist at
the root of the project to enable git-extracted version string.
Signed-off-by: David Bachelart <david.bachelart@bbright.com>
[yann.morin.1998@free.fr: fix troll character U+c2a0]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
genver.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/genver.sh b/genver.sh
index 79fd0a0..051e57b 100755
--- a/genver.sh
+++ b/genver.sh
@@ -7,7 +7,7 @@ else
QUIET=0
fi
-if ! `(git status | grep -q "On branch") 2> /dev/null`; then
+if [ ! -d .git ] || ! `(git status | grep -q "On branch") 2> /dev/null`; then
# If we don't have git, we can't work out what
# version this is. It must have been downloaded as a
# zip file.
@@ -25,7 +25,7 @@ if ! `(git status | grep -q "On branch") 2> /dev/null`; then
fi
fi
-if head=`git rev-parse --verify HEAD 2>/dev/null`; then
+if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
# generate the version info based on the tag
release=`(git describe --tags || git --describe || git describe --all --long) \
2>/dev/null | tr -d '\n'`
--
2.1.4

View File

@@ -1,14 +1,8 @@
config BR2_PACKAGE_SSLH
bool "sslh"
depends on BR2_INSTALL_LIBSTDCPP
# uses fork()
depends on BR2_USE_MMU
select BR2_PACKAGE_LIBCONFIG
help
Applicative protocol multiplexer
http://www.rutschle.net/tech/sslh.shtml
comment "sslh needs a toolchain w/ C++"
depends on BR2_USE_MMU
depends on !BR2_INSTALL_LIBSTDCPP

View File

@@ -1,3 +1,3 @@
# Locally calculated
sha256 a7f49b0a1cfcb7bb9d97f5ffa932bff11c5f65d9a9bd8fe1812481dee5855116 sslh-v1.20.tar.gz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
sha256 3bfe783726f82c1f5a4be630ddc494ebb08dbb69980662cd7ffdeb7bc9e1e706 sslh-v1.21c.tar.gz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING

View File

@@ -4,16 +4,21 @@
#
################################################################################
SSLH_VERSION = 1.20
SSLH_VERSION = 1.21c
SSLH_SOURCE = sslh-v$(SSLH_VERSION).tar.gz
SSLH_SITE = http://www.rutschle.net/tech/sslh
SSLH_LICENSE = GPL-2.0+
SSLH_LICENSE_FILES = COPYING
SSLH_DEPENDENCIES = libconfig
SSLH_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS)
ifeq ($(BR2_PACKAGE_LIBBSD),y)
SSLH_DEPENDENCIES += libbsd
SSLH_MAKE_OPTS += USELIBBSD=1
else
SSLH_MAKE_OPTS += USELIBBSD=
endif
ifeq ($(BR2_PACKAGE_LIBCAP),y)
SSLH_DEPENDENCIES += libcap
SSLH_MAKE_OPTS += USELIBCAP=1
@@ -21,6 +26,13 @@ else
SSLH_MAKE_OPTS += USELIBCAP=
endif
ifeq ($(BR2_PACKAGE_LIBCONFIG),y)
SSLH_DEPENDENCIES += libconfig
SSLH_MAKE_OPTS += USELIBCONFIG=1
else
SSLH_MAKE_OPTS += USELIBCONFIG=
endif
ifeq ($(BR2_PACKAGE_PCRE),y)
SSLH_DEPENDENCIES += pcre
SSLH_MAKE_OPTS += USELIBPCRE=1