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

@@ -1,39 +0,0 @@
From 5bb4432b8c194620c28a45a069de1b3dad692ac9 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sat, 28 Dec 2019 11:24:12 +0100
Subject: [PATCH] meson.build: fix static build with libidn2
libidn2 can optionnaly depends on libunistring so use dependency
function instead of cc.find_library ro retrieve this dependency and
avoid the following build failure when building statically:
FAILED: ping
/home/buildroot/autobuild/run/instance-1/output-1/host/bin/arm-linux-gcc -o ping 'ping@exe/ping.c.o' 'ping@exe/ping_common.c.o' 'ping@exe/ping6_common.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -static -Wl,--start-group libcommon.a -lm -lcap -lidn2 /home/buildroot/autobuild/run/instance-1/output-1/host/usr/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libssl.a /home/buildroot/autobuild/run/instance-1/output-1/host/usr/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libz.a /home/buildroot/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/7.4.0/../../../../arm-buildroot-linux-uclibcgnueabi/lib/libatomic.a -lpthread /home/buildroot/autobuild/run/instance-1/output-1/host/usr/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libcrypto.a -lresolv -Wl,--end-group '-Wl,-rpath,$ORIGIN/' -Wl,-rpath-link,/home/buildroot/autobuild/run/instance-1/output-1/build/iputils-20190709/build/
/home/buildroot/autobuild/run/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/7.4.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/run/instance-1/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libidn2.a(lookup.o): in function `idn2_lookup_u8':
lookup.c:(.text+0x7c): undefined reference to `u8_strlen'
Fixes:
- http://autobuild.buildroot.org/results/82d4738711a009959436fa419bd78c7a9540d33e
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/iputils/iputils/pull/245]
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 53c65b2..905cb96 100644
--- a/meson.build
+++ b/meson.build
@@ -130,7 +130,7 @@ endif
opt = get_option('USE_IDN')
if opt == true
- idn_dep = cc.find_library('idn2', required : false)
+ idn_dep = dependency('libidn2', required : false)
if idn_dep.found()
add_project_arguments('-DUSE_IDN', language : 'c')
conf.set('USE_IDN', 1,
--
2.24.0

View File

@@ -7,3 +7,70 @@ config BR2_PACKAGE_IPUTILS
etc.
https://github.com/iputils/iputils
if BR2_PACKAGE_IPUTILS
config BR2_PACKAGE_IPUTILS_ARPING
bool "arping"
default y
help
Installs arping.
config BR2_PACKAGE_IPUTILS_CLOCKDIFF
bool "clockdiff"
default y
help
Installs clockdiff.
config BR2_PACKAGE_IPUTILS_PING
bool "ping"
default y
help
Installs ping.
config BR2_PACKAGE_IPUTILS_RARPD
bool "rarpd"
help
Installs rarpd.
config BR2_PACKAGE_IPUTILS_RDISC
bool "rdisc"
default y
help
Installs rdisc.
config BR2_PACKAGE_IPUTILS_RDISC_SERVER
bool "rdisc (server code)"
default y
depends on BR2_PACKAGE_IPUTILS_RDISC
help
Builds rdisc with server code.
config BR2_PACKAGE_IPUTILS_TFTPD
bool "tftpd"
help
Installs tftpd.
config BR2_PACKAGE_IPUTILS_TRACEPATH
bool "tracepath"
default y
help
Installs tracepath.
config BR2_PACKAGE_IPUTILS_TRACEROUTE6
bool "traceroute6"
default y
help
Installs traceroute6.
config BR2_PACKAGE_IPUTILS_NINFOD
bool "ninfod"
default y
depends on BR2_TOOLCHAIN_HAS_THREADS # ninfod requires <pthread.h>
help
Installs ninfod.
comment "ninfod needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
endif

View File

@@ -1,5 +1,5 @@
# https://github.com/iputils/iputils/releases/download/s20190709/sha256sum.asc
sha256 a15720dd741d7538dd2645f9f516d193636ae4300ff7dbc8bfca757bf166490a iputils-20190709.tar.gz
# https://github.com/iputils/iputils/releases/download/s20200821/sha256sum.asc
sha256 f265da0d02dd2259efd8c57a9c2e0c8bb3361abb14639fcffb26707be5783a5b iputils-20200821.tar.gz
# Locally computed
sha256 b8ea785d12fa6a44916601104dd746216957e93f13a26d3eb858b3b5a4ad66ab LICENSE
sha256 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 Documentation/LICENSE.BSD3

View File

@@ -11,12 +11,80 @@
# and IPv6 updates.
# http://www.spinics.net/lists/netdev/msg279881.html
IPUTILS_VERSION = 20190709
IPUTILS_VERSION = 20200821
IPUTILS_SITE = $(call github,iputils,iputils,s$(IPUTILS_VERSION))
IPUTILS_LICENSE = GPL-2.0+, BSD-3-Clause
IPUTILS_LICENSE_FILES = LICENSE Documentation/LICENSE.BSD3 Documentation/LICENSE.GPL2
IPUTILS_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
# Selectively build binaries
IPUTILS_CONF_OPTS += \
-DBUILD_CLOCKDIFF=$(if $(BR2_PACKAGE_IPUTILS_CLOCKDIFF),true,false) \
-DBUILD_RARPD=$(if $(BR2_PACKAGE_IPUTILS_RARPD),true,false) \
-DBUILD_RDISC=$(if $(BR2_PACKAGE_IPUTILS_RDISC),true,false) \
-DBUILD_RDISC_SERVER=$(if $(BR2_PACKAGE_IPUTILS_RDISC_SERVER),true,false) \
-DBUILD_TRACEPATH=$(if $(BR2_PACKAGE_IPUTILS_TRACEPATH),true,false) \
-DBUILD_TRACEROUTE6=$(if $(BR2_PACKAGE_IPUTILS_TRACEROUTE6),true,false) \
-DBUILD_NINFOD=$(if $(BR2_PACKAGE_IPUTILS_NINFOD),true,false)
#
# arping
#
ifeq ($(BR2_PACKAGE_IPUTILS_ARPING),y)
IPUTILS_CONF_OPTS += -DBUILD_ARPING=true
# move some binaries to the same location as where Busybox installs
# the corresponding applets, so that we have a single version of the
# tools (from iputils)
define IPUTILS_MOVE_ARPING_BINARY
mv $(TARGET_DIR)/usr/bin/arping $(TARGET_DIR)/usr/sbin/arping
endef
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_ARPING_BINARY
else
IPUTILS_CONF_OPTS += -DBUILD_ARPING=false
endif
#
# ping
#
ifeq ($(BR2_PACKAGE_IPUTILS_PING),y)
IPUTILS_CONF_OPTS += -DBUILD_PING=true
# same reason to move the ping binary as for arping
ifeq ($(BR2_ROOTFS_MERGED_USR),)
define IPUTILS_MOVE_PING_BINARY
mv $(TARGET_DIR)/usr/bin/ping $(TARGET_DIR)/bin/ping
endef
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_PING_BINARY
endif
# upstream requires distros to create symlink
define IPUTILS_CREATE_PING6_SYMLINK
ln -sf ping $(TARGET_DIR)/bin/ping6
endef
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_CREATE_PING6_SYMLINK
else
IPUTILS_CONF_OPTS += -DBUILD_PING=false
endif
#
# tftpd
#
ifeq ($(BR2_PACKAGE_IPUTILS_TFTPD),y)
IPUTILS_CONF_OPTS += -DBUILD_TFTPD=true
define IPUTILS_MOVE_TFTPD_BINARY
mv $(TARGET_DIR)/usr/bin/tftpd $(TARGET_DIR)/usr/sbin/tftpd
endef
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_TFTPD_BINARY
else
IPUTILS_CONF_OPTS += -DBUILD_TFTPD=false
endif
# Handle libraries
ifeq ($(BR2_PACKAGE_LIBCAP),y)
IPUTILS_CONF_OPTS += -DUSE_CAP=true
IPUTILS_DEPENDENCIES += libcap
@@ -31,80 +99,45 @@ else
IPUTILS_CONF_OPTS += -DUSE_IDN=false
endif
ifeq ($(BR2_PACKAGE_NETTLE),y)
IPUTILS_CONF_OPTS += -DUSE_CRYPTO=nettle
IPUTILS_DEPENDENCIES += nettle
else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
IPUTILS_CONF_OPTS += -DUSE_CRYPTO=gcrypt
IPUTILS_DEPENDENCIES += libgcrypt
else ifeq ($(BR2_PACKAGE_OPENSSL),y)
IPUTILS_CONF_OPTS += -DUSE_CRYPTO=openssl
IPUTILS_DEPENDENCIES += openssl
else
IPUTILS_CONF_OPTS += -DUSE_CRYPTO=kernel
endif
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
IPUTILS_DEPENDENCIES += systemd
endif
# ninfod requires <pthread.h>
ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
IPUTILS_NINFOD = n
endif
ifeq ($(IPUTILS_NINFOD),n)
IPUTILS_CONF_OPTS += -DBUILD_NINFOD=false
else
IPUTILS_CONF_OPTS += -DBUILD_NINFOD=true
endif
ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
IPUTILS_CONF_OPTS += -DUSE_GETTEXT=true
else
IPUTILS_CONF_OPTS += -DUSE_GETTEXT=false
endif
IPUTILS_CONF_OPTS += -DBUILD_TRACEROUTE6=true
# XSL Stylesheets for DocBook 5 not packaged for buildroot
IPUTILS_CONF_OPTS += -DBUILD_MANS=false -DBUILD_HTML_MANS=false
# move iputils binaries to the same location as where Busybox installs
# the corresponding applets, so that we have a single version of the
# tools (from iputils)
define IPUTILS_MOVE_BINARIES
mv $(TARGET_DIR)/usr/bin/arping $(TARGET_DIR)/usr/sbin/arping
$(if $(BR2_ROOTFS_MERGED_USR),,\
mv $(TARGET_DIR)/usr/bin/ping $(TARGET_DIR)/bin/ping)
mv $(TARGET_DIR)/usr/bin/tftpd $(TARGET_DIR)/usr/sbin/tftpd
endef
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_BINARIES
# upstream requires distros to create symlink
define IPUTILS_CREATE_PING6_SYMLINK
ln -sf ping $(TARGET_DIR)/bin/ping6
endef
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_CREATE_PING6_SYMLINK
# handle permissions ourselves
IPUTILS_CONF_OPTS += -DNO_SETCAP_OR_SUID=true
ifeq ($(BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES),y)
define IPUTILS_PERMISSIONS
/usr/sbin/arping f 755 0 0 - - - - -
/usr/bin/clockdiff f 755 0 0 - - - - -
|xattr cap_net_raw+p
/bin/ping f 755 0 0 - - - - -
|xattr cap_net_raw+p
/usr/bin/traceroute6 f 755 0 0 - - - - -
|xattr cap_net_raw+p
$(if $(BR2_PACKAGE_IPUTILS_ARPING),\
/usr/sbin/arping f 755 0 0 - - - - -,)
$(if $(BR2_PACKAGE_IPUTILS_CLOCKDIFF),\
/usr/bin/clockdiff f 755 0 0 - - - - -
|xattr cap_net_raw+p,)
$(if $(BR2_PACKAGE_IPUTILS_PING),\
/bin/ping f 755 0 0 - - - - -
|xattr cap_net_raw+p,)
$(if $(BR2_PACKAGE_IPUTILS_TRACEROUTE6),\
/usr/bin/traceroute6 f 755 0 0 - - - - -
|xattr cap_net_raw+p,)
endef
else
define IPUTILS_PERMISSIONS
/usr/sbin/arping f 755 0 0 - - - - -
/usr/bin/clockdiff f 4755 0 0 - - - - -
/bin/ping f 4755 0 0 - - - - -
/usr/bin/traceroute6 f 4755 0 0 - - - - -
$(if $(BR2_PACKAGE_IPUTILS_ARPING),\
/usr/sbin/arping f 755 0 0 - - - - -,)
$(if $(BR2_PACKAGE_IPUTILS_CLOCKDIFF),\
/usr/bin/clockdiff f 4755 0 0 - - - - -,)
$(if $(BR2_PACKAGE_IPUTILS_PING),\
/bin/ping f 4755 0 0 - - - - -,)
$(if $(BR2_PACKAGE_IPUTILS_TRACEROUTE6),\
/usr/bin/traceroute6 f 4755 0 0 - - - - -,)
endef
endif