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

@@ -4,7 +4,7 @@
#
################################################################################
SYSTEMD_VERSION = 244.5
SYSTEMD_VERSION = 246.5
SYSTEMD_SITE = $(call github,systemd,systemd-stable,v$(SYSTEMD_VERSION))
SYSTEMD_LICENSE = LGPL-2.1+, GPL-2.0+ (udev), Public Domain (few source files, see README), BSD-3-Clause (tools/chromiumos)
SYSTEMD_LICENSE_FILES = LICENSE.GPL2 LICENSE.LGPL2.1 README tools/chromiumos/LICENSE
@@ -15,33 +15,40 @@ SYSTEMD_DEPENDENCIES = \
host-gperf \
kmod \
libcap \
util-linux \
util-linux-libs \
$(TARGET_NLS_DEPENDENCIES)
SYSTEMD_SELINUX_MODULES = systemd udev
SYSTEMD_PROVIDES = udev
SYSTEMD_CONF_OPTS += \
-Drootlibdir='/usr/lib' \
-Dblkid=true \
-Dman=false \
-Dima=false \
-Dldconfig=false \
-Ddefault-dnssec=no \
-Ddefault-hierarchy=hybrid \
-Dtests=false \
-Didn=true \
-Dima=false \
-Dkexec-path=/usr/sbin/kexec \
-Dkmod-path=/usr/bin/kmod \
-Dldconfig=false \
-Dloadkeys-path=/usr/bin/loadkeys \
-Dman=false \
-Dmount-path=/usr/bin/mount \
-Dnss-systemd=true \
-Dportabled=false \
-Dquotacheck-path=/usr/sbin/quotacheck \
-Dquotaon-path=/usr/sbin/quotaon \
-Drootlibdir='/usr/lib' \
-Dsetfont-path=/usr/bin/setfont \
-Dsplit-bin=true \
-Dsplit-usr=false \
-Dsystem-uid-max=999 \
-Dsystem-gid-max=999 \
-Dtelinit-path=$(TARGET_DIR)/sbin/telinit \
-Dkmod-path=/usr/bin/kmod \
-Dkexec-path=/usr/sbin/kexec \
-Dsulogin-path=/usr/sbin/sulogin \
-Dmount-path=/usr/bin/mount \
-Dsystem-gid-max=999 \
-Dsystem-uid-max=999 \
-Dsysvinit-path= \
-Dsysvrcnd-path= \
-Dtelinit-path= \
-Dtests=false \
-Dumount-path=/usr/bin/umount \
-Dnobody-group=nogroup \
-Didn=true \
-Dnss-systemd=true
-Dutmp=false
ifeq ($(BR2_PACKAGE_ACL),y)
SYSTEMD_DEPENDENCIES += acl
@@ -50,6 +57,13 @@ else
SYSTEMD_CONF_OPTS += -Dacl=false
endif
ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y)
SYSTEMD_DEPENDENCIES += libapparmor
SYSTEMD_CONF_OPTS += -Dapparmor=true
else
SYSTEMD_CONF_OPTS += -Dapparmor=false
endif
ifeq ($(BR2_PACKAGE_AUDIT),y)
SYSTEMD_DEPENDENCIES += audit
SYSTEMD_CONF_OPTS += -Daudit=true
@@ -71,6 +85,13 @@ else
SYSTEMD_CONF_OPTS += -Delfutils=false
endif
ifeq ($(BR2_PACKAGE_GNUTLS),y)
SYSTEMD_DEPENDENCIES += gnutls
SYSTEMD_CONF_OPTS += -Dgnutls=true
else
SYSTEMD_CONF_OPTS += -Dgnutls=false
endif
ifeq ($(BR2_PACKAGE_IPTABLES),y)
SYSTEMD_DEPENDENCIES += iptables
SYSTEMD_CONF_OPTS += -Dlibiptc=true
@@ -110,6 +131,13 @@ else
SYSTEMD_CONF_OPTS += -Dbzip2=false
endif
ifeq ($(BR2_PACKAGE_ZSTD),y)
SYSTEMD_DEPENDENCIES += zstd
SYSTEMD_CONF_OPTS += -Dzstd=true
else
SYSTEMD_CONF_OPTS += -Dzstd=false
endif
ifeq ($(BR2_PACKAGE_LZ4),y)
SYSTEMD_DEPENDENCIES += lz4
SYSTEMD_CONF_OPTS += -Dlz4=true
@@ -124,6 +152,12 @@ else
SYSTEMD_CONF_OPTS += -Dpam=false
endif
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),y)
SYSTEMD_CONF_OPTS += -Dfdisk=true
else
SYSTEMD_CONF_OPTS += -Dfdisk=false
endif
ifeq ($(BR2_PACKAGE_VALGRIND),y)
SYSTEMD_DEPENDENCIES += valgrind
SYSTEMD_CONF_OPTS += -Dvalgrind=true
@@ -154,9 +188,23 @@ endif
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
SYSTEMD_DEPENDENCIES += libgcrypt
SYSTEMD_CONF_OPTS += -Dgcrypt=true
SYSTEMD_CONF_OPTS += -Ddefault-dnssec=allow-downgrade -Dgcrypt=true
else
SYSTEMD_CONF_OPTS += -Dgcrypt=false
SYSTEMD_CONF_OPTS += -Ddefault-dnssec=no -Dgcrypt=false
endif
ifeq ($(BR2_PACKAGE_P11_KIT),y)
SYSTEMD_DEPENDENCIES += p11-kit
SYSTEMD_CONF_OPTS += -Dp11kit=true
else
SYSTEMD_CONF_OPTS += -Dp11kit=false
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
SYSTEMD_DEPENDENCIES += openssl
SYSTEMD_CONF_OPTS += -Dopenssl=true
else
SYSTEMD_CONF_OPTS += -Dopenssl=false
endif
ifeq ($(BR2_PACKAGE_PCRE2),y)
@@ -166,23 +214,50 @@ else
SYSTEMD_CONF_OPTS += -Dpcre2=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y)
SYSTEMD_DEPENDENCIES += libmicrohttpd
SYSTEMD_CONF_OPTS += -Dmicrohttpd=true
ifeq ($(BR2_PACKAGE_LIBQRENCODE),y)
SYSTEMD_CONF_OPTS += -Dqrencode=true
SYSTEMD_DEPENDENCIES += libqrencode
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),y)
SYSTEMD_CONF_OPTS += -Dblkid=true
else
SYSTEMD_CONF_OPTS += -Dqrencode=false
SYSTEMD_CONF_OPTS += -Dblkid=false
endif
ifeq ($(BR2_PACKAGE_UTIL_LINUX_NOLOGIN),y)
SYSTEMD_CONF_OPTS += -Dnologin-path=/sbin/nologin
else
SYSTEMD_CONF_OPTS += -Dmicrohttpd=false -Dqrencode=false
SYSTEMD_CONF_OPTS += -Dnologin-path=/bin/false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_INITRD),y)
SYSTEMD_CONF_OPTS += -Dinitrd=true
else
SYSTEMD_CONF_OPTS += -Dinitrd=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_KERNELINSTALL),y)
SYSTEMD_CONF_OPTS += -Dkernel-install=true
else
SYSTEMD_CONF_OPTS += -Dkernel-install=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_ANALYZE),y)
SYSTEMD_CONF_OPTS += -Danalyze=true
else
SYSTEMD_CONF_OPTS += -Danalyze=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE),y)
SYSTEMD_CONF_OPTS += -Dremote=true
# remote also depends on libcurl, this is already added above.
SYSTEMD_DEPENDENCIES += libmicrohttpd
SYSTEMD_CONF_OPTS += -Dremote=true -Dmicrohttpd=true
SYSTEMD_REMOTE_USER = systemd-journal-remote -1 systemd-journal-remote -1 * - - - systemd Journal Remote
else
SYSTEMD_CONF_OPTS += -Dremote=false
SYSTEMD_CONF_OPTS += -Dremote=false -Dmicrohttpd=false
endif
ifeq ($(BR2_PACKAGE_LIBQRENCODE),y)
SYSTEMD_DEPENDENCIES += libqrencode
SYSTEMD_CONF_OPTS += -Dqrencode=true
else
SYSTEMD_CONF_OPTS += -Dqrencode=false
endif
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
@@ -267,9 +342,9 @@ SYSTEMD_CONF_OPTS += -Dlogind=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_MACHINED),y)
SYSTEMD_CONF_OPTS += -Dmachined=true
SYSTEMD_CONF_OPTS += -Dmachined=true -Dnss-mymachines=true
else
SYSTEMD_CONF_OPTS += -Dmachined=false
SYSTEMD_CONF_OPTS += -Dmachined=false -Dnss-mymachines=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_IMPORTD),y)
@@ -278,6 +353,13 @@ else
SYSTEMD_CONF_OPTS += -Dimportd=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_HOMED),y)
SYSTEMD_CONF_OPTS += -Dhomed=true
SYSTEMD_DEPENDENCIES += cryptsetup openssl
else
SYSTEMD_CONF_OPTS += -Dhomed=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED),y)
SYSTEMD_CONF_OPTS += -Dhostnamed=true
else
@@ -302,9 +384,22 @@ else
SYSTEMD_CONF_OPTS += -Dlocaled=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_REPART),y)
SYSTEMD_CONF_OPTS += -Drepart=true
SYSTEMD_DEPENDENCIES += openssl
else
SYSTEMD_CONF_OPTS += -Drepart=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_USERDB),y)
SYSTEMD_CONF_OPTS += -Duserdb=true
else
SYSTEMD_CONF_OPTS += -Duserdb=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP),y)
SYSTEMD_CONF_OPTS += -Dcoredump=true
SYSTEMD_COREDUMP_USER = systemd-coredump -1 systemd-coredump -1 * /var/lib/systemd/coredump - - Core Dumper
SYSTEMD_COREDUMP_USER = systemd-coredump -1 systemd-coredump -1 * - - - systemd core dump processing
else
SYSTEMD_CONF_OPTS += -Dcoredump=false
endif
@@ -324,7 +419,7 @@ endif
ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y)
SYSTEMD_CONF_OPTS += -Dnetworkd=true
SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * - - - Network Manager
SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * - - - systemd Network Management
SYSTEMD_NETWORKD_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP))
ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE),)
define SYSTEMD_INSTALL_NETWORK_CONFS
@@ -342,15 +437,25 @@ define SYSTEMD_INSTALL_RESOLVCONF_HOOK
ln -sf ../run/systemd/resolve/resolv.conf \
$(TARGET_DIR)/etc/resolv.conf
endef
SYSTEMD_CONF_OPTS += -Dresolve=true
SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager
SYSTEMD_CONF_OPTS += -Dnss-resolve=true -Dresolve=true
SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - systemd Resolver
else
SYSTEMD_CONF_OPTS += -Dresolve=false
SYSTEMD_CONF_OPTS += -Dnss-resolve=false -Dresolve=false
endif
ifeq ($(BR2_PACKAGE_GNUTLS),y)
SYSTEMD_CONF_OPTS += -Ddns-over-tls=gnutls -Ddefault-dns-over-tls=opportunistic
SYSTEMD_DEPENDENCIES += gnutls
else ifeq ($(BR2_PACKAGE_OPENSSL),y)
SYSTEMD_CONF_OPTS += -Ddns-over-tls=openssl -Ddefault-dns-over-tls=opportunistic
SYSTEMD_DEPENDENCIES += openssl
else
SYSTEMD_CONF_OPTS += -Ddns-over-tls=false -Ddefault-dns-over-tls=no
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y)
SYSTEMD_CONF_OPTS += -Dtimesyncd=true
SYSTEMD_TIMESYNCD_USER = systemd-timesync -1 systemd-timesync -1 * - - - Network Time Synchronization
SYSTEMD_TIMESYNCD_USER = systemd-timesync -1 systemd-timesync -1 * - - - systemd Time Synchronization
else
SYSTEMD_CONF_OPTS += -Dtimesyncd=false
endif
@@ -419,20 +524,33 @@ define SYSTEMD_INSTALL_IMAGES_CMDS
endef
define SYSTEMD_USERS
- - input -1 * - - - Input device group
# udev user groups
# systemd user groups
- - systemd-journal -1 * - - - Journal
- - render -1 * - - - DRI rendering nodes
- - kvm -1 * - - - kvm nodes
systemd-bus-proxy -1 systemd-bus-proxy -1 * - - - Proxy D-Bus messages to/from a bus
systemd-journal-gateway -1 systemd-journal-gateway -1 * /var/log/journal - - Journal Gateway
systemd-journal-remote -1 systemd-journal-remote -1 * /var/log/journal/remote - - Journal Remote
systemd-journal-upload -1 systemd-journal-upload -1 * - - - Journal Upload
$(SYSTEMD_REMOTE_USER)
$(SYSTEMD_COREDUMP_USER)
$(SYSTEMD_NETWORKD_USER)
$(SYSTEMD_RESOLVED_USER)
$(SYSTEMD_TIMESYNCD_USER)
endef
define SYSTEMD_INSTALL_NSSCONFIG_HOOK
$(SED) '/^passwd:/ {/systemd/! s/$$/ systemd/}' \
-e '/^group:/ {/systemd/! s/$$/ [SUCCESS=merge] systemd/}' \
$(if $(BR2_PACKAGE_SYSTEMD_RESOLVED), \
-e '/^hosts:/ s/[[:space:]]*mymachines//' \
-e '/^hosts:/ {/resolve/! s/files/files resolve [!UNAVAIL=return]/}' ) \
$(if $(BR2_PACKAGE_SYSTEMD_MYHOSTNAME), \
-e '/^hosts:/ {/myhostname/! s/$$/ myhostname/}' ) \
$(if $(BR2_PACKAGE_SYSTEMD_MACHINED), \
-e '/^passwd:/ {/mymachines/! s/files/files mymachines/}' \
-e '/^group:/ {/mymachines/! s/files/files [SUCCESS=merge] mymachines/}' \
-e '/^hosts:/ {/mymachines/! s/files/files mymachines/}' ) \
$(TARGET_DIR)/etc/nsswitch.conf
endef
SYSTEMD_TARGET_FINALIZE_HOOKS += SYSTEMD_INSTALL_NSSCONFIG_HOOK
ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),)
# systemd provides multiple units to autospawn getty as neede
# * getty@.service to start a getty on normal TTY
@@ -503,6 +621,20 @@ SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_PRESET_ALL
SYSTEMD_CONF_ENV = $(HOST_UTF8_LOCALE_ENV)
SYSTEMD_NINJA_ENV = $(HOST_UTF8_LOCALE_ENV)
define SYSTEMD_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
$(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE)
$(call KCONFIG_ENABLE_OPT,CONFIG_EPOLL)
$(call KCONFIG_ENABLE_OPT,CONFIG_SIGNALFD)
$(call KCONFIG_ENABLE_OPT,CONFIG_TIMERFD)
$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER)
$(call KCONFIG_ENABLE_OPT,CONFIG_PROC_FS)
$(call KCONFIG_ENABLE_OPT,CONFIG_SYSFS)
$(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS)
$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL)
$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_XATTR)
endef
# We need a very minimal host variant, so we disable as much as possible.
HOST_SYSTEMD_CONF_OPTS = \
-Dsplit-bin=true \
@@ -519,6 +651,7 @@ HOST_SYSTEMD_CONF_OPTS = \
-Dtpm=false \
-Denvironment-d=false \
-Dbinfmt=false \
-Drepart=false \
-Dcoredump=false \
-Dpstore=false \
-Dlogind=false \
@@ -526,6 +659,8 @@ HOST_SYSTEMD_CONF_OPTS = \
-Dlocaled=false \
-Dmachined=false \
-Dportabled=false \
-Duserdb=false \
-Dhomed=false \
-Dnetworkd=false \
-Dtimedated=false \
-Dtimesyncd=false \
@@ -559,7 +694,14 @@ HOST_SYSTEMD_CONF_OPTS = \
-Dtests=false \
-Dglib=false \
-Dacl=false \
-Dsysvinit-path=''
-Dsysvinit-path='' \
-Dinitrd=false \
-Dxdg-autostart=false \
-Dkernel-install=false \
-Dsystemd-analyze=false \
-Dlibcryptsetup=false \
-Daudit=false \
-Dzstd=false
HOST_SYSTEMD_DEPENDENCIES = \
$(BR2_COREUTILS_HOST_DEPENDENCY) \