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,52 +0,0 @@
From 22ed98efe3d5198e4141948af7569cfa10d9d25f Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Wed, 20 Nov 2019 13:06:51 +0000
Subject: [PATCH] configure.ac: prefer pkg-config to find libgcrypt
libgcrypt from 1.8.5 provides a pkg-config file as well as the traditional
libgcrypt-config script. As pkg-config is more resiliant in the face of
complicated build environments (for example cross-compilation and sysroots)
prefer the pkg-config file, falling back to libgcrypt-config if that doesn't
exist.
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Retrieved from:
https://github.com/rpm-software-management/rpm/commit/22ed98efe3d5198e4141948af7569cfa10d9d25f]
---
configure.ac | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0a3a9bbf4..6a3ea3615 100644
--- a/configure.ac
+++ b/configure.ac
@@ -395,14 +395,21 @@ AC_SUBST(WITH_OPENSSL_LIB)
WITH_LIBGCRYPT_INCLUDE=
WITH_LIBGCRYPT_LIB=
if test "$with_crypto" = libgcrypt ; then
-AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, notfound)
-if test notfound != "$LIBGCRYPT_CONFIG" ; then
-WITH_LIBGCRYPT_INCLUDE=`$LIBGCRYPT_CONFIG --cflags`
-WITH_LIBGCRYPT_LIB=`$LIBGCRYPT_CONFIG --libs`
-fi
-if test -z "$WITH_LIBGCRYPT_LIB" ; then
-AC_MSG_ERROR([libgcrypt not found])
-fi
+ # libgcrypt 1.8.5 onwards ships a pkg-config file so prefer that
+ PKG_CHECK_MODULES([LIBGCRYPT], [libgcrypt], [have_libgcrypt=yes], [have_libgcrypt=no])
+ if test "$have_libgcrypt" = "yes"; then
+ WITH_LIBGCRYPT_INCLUDE="$LIBGCRYPT_CFLAGS"
+ WITH_LIBGCRYPT_LIB="$LIBGCRYPT_LIBS"
+ else
+ AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, notfound)
+ if test notfound != "$LIBGCRYPT_CONFIG" ; then
+ WITH_LIBGCRYPT_INCLUDE=`$LIBGCRYPT_CONFIG --cflags`
+ WITH_LIBGCRYPT_LIB=`$LIBGCRYPT_CONFIG --libs`
+ fi
+ if test -z "$WITH_LIBGCRYPT_LIB" ; then
+ AC_MSG_ERROR([libgcrypt not found])
+ fi
+ fi
fi
AM_CONDITIONAL([WITH_LIBGCRYPT],[test "$with_crypto" = libgcrypt])

View File

@@ -0,0 +1,29 @@
From 9395bdc64459357631111842e7a28304b4d76301 Mon Sep 17 00:00:00 2001
From: Leo <thinkabit.ukim@gmail.com>
Date: Wed, 30 Sep 2020 08:36:03 -0300
Subject: [PATCH] lib/rpmdb.c: include fcntl.h for O_*
Fixes compilation on musl, otherwise it fails with undefined references
to various O_* symbols as mentioned here:
https://www.man7.org/linux/man-pages/man0/fcntl.h.0p.html
[Retrieved from:
https://github.com/rpm-software-management/rpm/commit/9395bdc64459357631111842e7a28304b4d76301]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
lib/rpmdb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index 4c101569f..73187630b 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -8,6 +8,7 @@
#include <utime.h>
#include <errno.h>
#include <dirent.h>
+#include <fcntl.h>
#ifndef DYING /* XXX already in "system.h" */
#include <fnmatch.h>

View File

@@ -0,0 +1,31 @@
From 8d446d33a705cb37420e1fda18379d7439ee841f Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 25 Oct 2020 15:04:56 +0100
Subject: [PATCH 2/2] lib/rpmrc.c: include fcntl.h for O_*
Fixes compilation on musl, otherwise it fails with undefined references
to various O_* symbols as mentioned here:
https://www.man7.org/linux/man-pages/man0/fcntl.h.0p.html
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status:
https://github.com/rpm-software-management/rpm/pull/1413]
---
lib/rpmrc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 78c4a6d42..8bfe7a0ab 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -1,5 +1,6 @@
#include "system.h"
+#include <fcntl.h>
#include <stdarg.h>
#include <pthread.h>
--
2.28.0

View File

@@ -10,7 +10,6 @@ config BR2_PACKAGE_RPM
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_BEECRYPT if !BR2_PACKAGE_LIBGCRYPT && !BR2_PACKAGE_LIBNSS && !BR2_PACKAGE_OPENSSL
select BR2_PACKAGE_BERKELEYDB
select BR2_PACKAGE_FILE
select BR2_PACKAGE_POPT
select BR2_PACKAGE_ZLIB

View File

@@ -1,5 +1,5 @@
# From https://rpm.org/wiki/Releases/4.15.1.html
sha256 ddef45f9601cd12042edfc9b6e37efcca32814e1e0f4bb8682d08144a3e2d230 rpm-4.15.1.tar.bz2
# From https://rpm.org/wiki/Releases/4.16.0.html
sha256 ca5974e9da2939afb422598818ef187385061889ba766166c4a3829c5ef8d411 rpm-4.16.0.tar.bz2
# Hash for license file
sha256 d56f4f1f290f6920cb053aef0dbcd0b853cda289e2568b364ddbfce220a6f3e0 COPYING
sha256 171d94d9f1641316bff7f157a903237dc69cdb5fca405fed8c832c76ed8370f9 COPYING

View File

@@ -4,13 +4,12 @@
#
################################################################################
RPM_VERSION_MAJOR = 4.15
RPM_VERSION = $(RPM_VERSION_MAJOR).1
RPM_VERSION_MAJOR = 4.16
RPM_VERSION = $(RPM_VERSION_MAJOR).0
RPM_SOURCE = rpm-$(RPM_VERSION).tar.bz2
RPM_SITE = http://ftp.rpm.org/releases/rpm-$(RPM_VERSION_MAJOR).x
RPM_DEPENDENCIES = \
host-pkgconf \
berkeleydb \
$(if $(BR2_PACKAGE_BZIP2),bzip2) \
$(if $(BR2_PACKAGE_ELFUTILS),elfutils) \
file \
@@ -20,8 +19,6 @@ RPM_DEPENDENCIES = \
$(TARGET_NLS_DEPENDENCIES)
RPM_LICENSE = GPL-2.0 or LGPL-2.0 (library only)
RPM_LICENSE_FILES = COPYING
# We're patching configure.ac
RPM_AUTORECONF = YES
RPM_CONF_OPTS = \
--disable-python \
@@ -38,6 +35,13 @@ else
RPM_CONF_OPTS += --without-acl
endif
ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
RPM_DEPENDENCIES += berkeleydb
RPM_CONF_OPTS += --enable-bdb
else
RPM_CONF_OPTS += --disable-bdb
endif
ifeq ($(BR2_PACKAGE_DBUS),y)
RPM_DEPENDENCIES += dbus
RPM_CONF_OPTS += --enable-plugins
@@ -88,6 +92,13 @@ else
RPM_CONF_OPTS += --without-selinux
endif
ifeq ($(BR2_PACKAGE_SQLITE),y)
RPM_DEPENDENCIES += sqlite
RPM_CONF_OPTS += --enable-sqlite
else
RPM_CONF_OPTS += --disable-sqlite
endif
ifeq ($(BR2_PACKAGE_ZSTD),y)
RPM_DEPENDENCIES += zstd
RPM_CONF_OPTS += --enable-zstd