Skip to content

Commit

Permalink
Merge branch 'buildroot:master' into downstream-5.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nedokaka committed Apr 1, 2024
2 parents 4994b20 + 6748b4d commit 59f8269
Show file tree
Hide file tree
Showing 47 changed files with 747 additions and 529 deletions.
5 changes: 1 addition & 4 deletions .checkpackageignore
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,7 @@ package/libedit/0001-check-bsd-functions-in-libbsd.patch Upstream
package/libevent/0001-Don-t-define-BIO_get_init-for-LibreSSL-3-5.patch Upstream
package/libfcgi/0001-link-against-math.patch Upstream
package/libfcgi/0002-disable-examples.patch Sob Upstream
package/libffi/0001-Fix-installation-location-of-libffi.patch Upstream
package/libffi/0002-Fix-use-of-compact-eh-frames-on-MIPS.patch Upstream
package/libffi/0003-libffi-enable-hardfloat-in-the-MIPS-assembly-code.patch Upstream
package/libffi/0001-Fix-use-of-compact-eh-frames-on-MIPS.patch Upstream
package/libfm/0001-modules-fix-cross-compilation.patch Upstream
package/libfreeimage/0001-no-root-install.patch Upstream
package/libfreeimage/0002-fix-cpuid-x86.patch Upstream
Expand Down Expand Up @@ -1464,4 +1462,3 @@ support/scripts/setlocalversion Shellcheck
support/testing/tests/core/post-build.sh Shellcheck
support/testing/tests/package/test_opkg/post-build.sh Shellcheck
support/testing/tests/utils/test_get_developers/0001-package-binutils-change-.mk.patch NumberedSubject Upstream
utils/checkpackagelib/lib_patch.py Flake8
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,10 @@ $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
prepare: $(BUILD_DIR)/buildroot-config/auto.conf
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_PRE_BUILD_SCRIPT)), \
$(call MESSAGE,"Executing pre-build script $(s)"); \
$(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
$(EXTRA_ENV) $(s) \
$(TARGET_DIR) \
$(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS)) \
$(call qstrip,$(BR2_ROOTFS_PRE_BUILD_SCRIPT_ARGS))$(sep))

.PHONY: world
world: target-post-image
Expand Down Expand Up @@ -801,7 +804,10 @@ endif # merged /usr

$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
@$(call MESSAGE,"Executing post-build script $(s)")$(sep) \
$(Q)$(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
$(Q)$(EXTRA_ENV) $(s) \
$(TARGET_DIR) \
$(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS)) \
$(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT_ARGS))$(sep))

touch $(TARGET_DIR)/usr

Expand All @@ -819,7 +825,10 @@ target-post-image: $(TARGETS_ROOTFS) target-finalize staging-finalize
$(Q)mkdir -p $(BINARIES_DIR)
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
$(call MESSAGE,"Executing post-image script $(s)"); \
$(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
$(EXTRA_ENV) $(s) \
$(BINARIES_DIR) \
$(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS)) \
$(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS))$(sep))

.PHONY: source
source: $(foreach p,$(PACKAGES),$(p)-all-source)
Expand Down
5 changes: 5 additions & 0 deletions docs/manual/customize-post-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ arguments will be passed to the script too. All the scripts will be
passed the exact same set of arguments, it is not possible to pass
different sets of arguments to each script.

Note that the arguments from +BR2_ROOTFS_POST_SCRIPT_ARGS+ will also be
passed to post-build and post-fakeroot scripts. If you want to use
arguments that are only used for the post-image scripts you can use
+BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS+.

Again just like for the post-build scripts, the scripts have access to
the environment variables +BR2_CONFIG+, +HOST_DIR+, +STAGING_DIR+,
+TARGET_DIR+, +BUILD_DIR+, +BINARIES_DIR+, +CONFIG_DIR+ and
Expand Down
6 changes: 6 additions & 0 deletions docs/manual/customize-rootfs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ The post-build scripts are run with the main Buildroot tree as current
passed to the script too. All the scripts will be passed the exact
same set of arguments, it is not possible to pass different sets of
arguments to each script.

Note that the arguments from +BR2_ROOTFS_POST_SCRIPT_ARGS+ will also be
passed to post-image and post-fakeroot scripts. If you want to use
arguments that are only used for the post-build scripts you can use
+BR2_ROOTFS_POST_BUILD_SCRIPT_ARGS+.

+
In addition, you may also use these environment variables:

Expand Down
2 changes: 1 addition & 1 deletion fs/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
$$(foreach s,$$(call qstrip,$$(BR2_ROOTFS_POST_FAKEROOT_SCRIPT)),\
echo "echo '$$(TERM_BOLD)>>> Executing fakeroot script $$(s)$$(TERM_RESET)'" >> $$(FAKEROOT_SCRIPT); \
echo $$(EXTRA_ENV) $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep))
echo $$(EXTRA_ENV) $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) $$(BR2_ROOTFS_POST_FAKEROOT_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep))

$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),\
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
Expand Down
2 changes: 1 addition & 1 deletion package/containerd/containerd.hash
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Computed locally
sha256 ae2b914bff0ddbb9b29d5fc689a51e1ce89ea4edfc4df9ae10517c6f5d2d5aaf containerd-1.7.13.tar.gz
sha256 ae55b25fb04b45dfbbde8280b034783a48ae7c40350d17fd272be5cbf0284cf1 containerd-1.7.14.tar.gz
sha256 4bbe3b885e8cd1907ab4cf9a41e862e74e24b5422297a4f2fe524e6a30ada2b4 LICENSE
2 changes: 1 addition & 1 deletion package/containerd/containerd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

CONTAINERD_VERSION = 1.7.13
CONTAINERD_VERSION = 1.7.14
CONTAINERD_SITE = $(call github,containerd,containerd,v$(CONTAINERD_VERSION))
CONTAINERD_LICENSE = Apache-2.0
CONTAINERD_LICENSE_FILES = LICENSE
Expand Down
27 changes: 27 additions & 0 deletions package/davfs2/0002-configure.ac-add-neon-version-0.33.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 1c539d158ae73e867d0d30b8c3d27f48d742ed06 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sat, 30 Mar 2024 09:18:15 +0100
Subject: [PATCH] configure.ac: add neon version 0.33

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Upstream: https://savannah.nongnu.org/bugs/?65247
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 4f86cde..ede9b1e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,7 @@ AC_PROG_LN_S
# Checks for libraries.
AM_GNU_GETTEXT_VERSION(0.19.8)
AM_GNU_GETTEXT([external])
-NE_REQUIRE_VERSIONS([0], [27 28 29 30 31 32])
+NE_REQUIRE_VERSIONS([0], [27 28 29 30 31 32 33])
DAV_CHECK_NEON

# Checks for header files.
--
2.43.0

2 changes: 2 additions & 0 deletions package/davfs2/davfs2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ DAVFS2_SITE = http://download.savannah.nongnu.org/releases/davfs2
DAVFS2_LICENSE = GPL-3.0+
DAVFS2_LICENSE_FILES = COPYING
DAVFS2_CPE_ID_VENDOR = werner_baumann
# 0002-configure.ac-add-neon-version-0.33.patch
DAVFS2_AUTORECONF = YES

DAVFS2_DEPENDENCIES = \
neon \
Expand Down
2 changes: 1 addition & 1 deletion package/delve/delve.hash
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Locally calculated
sha256 58ad7a7fb42ae2ddd33e7d52dad688b249ca8a358eb73b9e48f91eda79e862a8 delve-1.20.2.tar.gz
sha256 fe6f0d97c233d4f0f1ed422c11508cc57c14e9e0915f9a258f1912c46824cbfb delve-1.22.1.tar.gz
sha256 778864b990007e8cef6633f8c372dd05bac1fada6cf67b008afb1483f83b38f5 LICENSE
2 changes: 1 addition & 1 deletion package/delve/delve.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

DELVE_VERSION = 1.20.2
DELVE_VERSION = 1.22.1
DELVE_SITE = $(call github,go-delve,delve,v$(DELVE_VERSION))
DELVE_LICENSE = MIT
DELVE_LICENSE_FILES = LICENSE
Expand Down
2 changes: 1 addition & 1 deletion package/docker-cli/docker-cli.hash
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Locally calculated
sha256 72a54d131c28938221c81bd08364459fed9c71c093d4d615d324aaf31de6db1d docker-cli-24.0.7.tar.gz
sha256 96ed5d7c33a12f505d13fa03fa48f94cb41cf871178df0df84aa0b76839ad321 docker-cli-26.0.0.tar.gz
sha256 2d81ea060825006fc8f3fe28aa5dc0ffeb80faf325b612c955229157b8c10dc0 LICENSE
2 changes: 1 addition & 1 deletion package/docker-cli/docker-cli.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

DOCKER_CLI_VERSION = 24.0.7
DOCKER_CLI_VERSION = 26.0.0
DOCKER_CLI_SITE = $(call github,docker,cli,v$(DOCKER_CLI_VERSION))

DOCKER_CLI_LICENSE = Apache-2.0
Expand Down
2 changes: 1 addition & 1 deletion package/docker-engine/docker-engine.hash
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Locally calculated
sha256 16a2cb4cf4d314a070085e0df06e3a6bd9ec678d28715b64060af694fc9051d5 docker-engine-24.0.7.tar.gz
sha256 fae1aabb63ed5cf6d302a5f4266ed092716b1cea9a974a9d61154ef31b03c302 docker-engine-26.0.0.tar.gz
sha256 7c87873291f289713ac5df48b1f2010eb6963752bbd6b530416ab99fc37914a8 LICENSE
2 changes: 1 addition & 1 deletion package/docker-engine/docker-engine.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

DOCKER_ENGINE_VERSION = 24.0.7
DOCKER_ENGINE_VERSION = 26.0.0
DOCKER_ENGINE_SITE = $(call github,moby,moby,v$(DOCKER_ENGINE_VERSION))

DOCKER_ENGINE_LICENSE = Apache-2.0
Expand Down
4 changes: 2 additions & 2 deletions package/fuse-overlayfs/fuse-overlayfs.hash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Locally computed
sha256 320a411425414679736dcb7f3b05146430ca4af20ded0096c69ac3c7540ebca2 fuse-overlayfs-1.11.tar.gz
sha256 96d10344921d5796bcba7a38580ae14a53c4e60399bb90b238ac5a10b3bb65b2 fuse-overlayfs-1.13.tar.gz
# Locally computed
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
4 changes: 2 additions & 2 deletions package/fuse-overlayfs/fuse-overlayfs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#
################################################################################

FUSE_OVERLAYFS_VERSION = 1.11
FUSE_OVERLAYFS_VERSION = 1.13
FUSE_OVERLAYFS_SITE = $(call github,containers,fuse-overlayfs,v$(FUSE_OVERLAYFS_VERSION))
FUSE_OVERLAYFS_LICENSE = GPL-3.0
FUSE_OVERLAYFS_LICENSE = GPL-2.0+
FUSE_OVERLAYFS_LICENSE_FILES = COPYING

FUSE_OVERLAYFS_AUTORECONF = YES
Expand Down
140 changes: 140 additions & 0 deletions package/gcc/11.4.0/0008-Remove-crypt-and-crypt_r-interceptors.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
From 0ef972d11dda9051941656e5797889b8fbf2dca6 Mon Sep 17 00:00:00 2001
From: Fangrui Song <i@maskray.me>
Date: Fri, 28 Apr 2023 09:59:17 -0700
Subject: [PATCH] Remove crypt and crypt_r interceptors

From Florian Weimer's D144073

> On GNU/Linux (glibc), the crypt and crypt_r functions are not part of the main shared object (libc.so.6), but libcrypt (with multiple possible sonames). The sanitizer libraries do not depend on libcrypt, so it can happen that during sanitizer library initialization, no real implementation will be found because the crypt, crypt_r functions are not present in the process image (yet). If its interceptors are called nevertheless, this results in a call through a null pointer when the sanitizer library attempts to forward the call to the real implementation.
>
> Many distributions have already switched to libxcrypt, a library that is separate from glibc and that can be build with sanitizers directly (avoiding the need for interceptors). This patch disables building the interceptor for glibc targets.

Let's remove crypt and crypt_r interceptors (D68431) to fix issues with
newer glibc.

For older glibc, msan will not know that an uninstrumented crypt_r call
initializes `data`, so there is a risk for false positives. However, with some
codebase survey, I think crypt_r uses are very few and the call sites typically
have a `memset(&data, 0, sizeof(data));` anyway.

Fix https://github.com/google/sanitizers/issues/1365
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2169432

Reviewed By: #sanitizers, fweimer, thesamesam, vitalybuka

Differential Revision: https://reviews.llvm.org/D149403

[Thomas: taken from Crosstool-NG]
Upstream: (llvm) https://github.com/llvm/llvm-project/commit/d7bead833631486e337e541e692d9b4a1ca14edd
Upstream: (gcc) https://github.com/gcc-mirror/gcc/commit/d96e14ceb9475f9bccbbc0325d5b11419fad9246
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
.../sanitizer_common_interceptors.inc | 37 -------------------
.../sanitizer_platform_interceptors.h | 2 -
.../sanitizer_platform_limits_posix.cpp | 2 -
.../sanitizer_platform_limits_posix.h | 1 -
4 files changed, 42 deletions(-)

diff --git a/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc b/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
index ff2acfc7c010..6d802bc7159f 100644
--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc
@@ -9814,41 +9814,6 @@ INTERCEPTOR(SSIZE_T, getrandom, void *buf, SIZE_T buflen, unsigned int flags) {
#define INIT_GETRANDOM
#endif

-#if SANITIZER_INTERCEPT_CRYPT
-INTERCEPTOR(char *, crypt, char *key, char *salt) {
- void *ctx;
- COMMON_INTERCEPTOR_ENTER(ctx, crypt, key, salt);
- COMMON_INTERCEPTOR_READ_RANGE(ctx, key, internal_strlen(key) + 1);
- COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1);
- char *res = REAL(crypt)(key, salt);
- if (res != nullptr)
- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, internal_strlen(res) + 1);
- return res;
-}
-#define INIT_CRYPT COMMON_INTERCEPT_FUNCTION(crypt);
-#else
-#define INIT_CRYPT
-#endif
-
-#if SANITIZER_INTERCEPT_CRYPT_R
-INTERCEPTOR(char *, crypt_r, char *key, char *salt, void *data) {
- void *ctx;
- COMMON_INTERCEPTOR_ENTER(ctx, crypt_r, key, salt, data);
- COMMON_INTERCEPTOR_READ_RANGE(ctx, key, internal_strlen(key) + 1);
- COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1);
- char *res = REAL(crypt_r)(key, salt, data);
- if (res != nullptr) {
- COMMON_INTERCEPTOR_WRITE_RANGE(ctx, data,
- __sanitizer::struct_crypt_data_sz);
- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, internal_strlen(res) + 1);
- }
- return res;
-}
-#define INIT_CRYPT_R COMMON_INTERCEPT_FUNCTION(crypt_r);
-#else
-#define INIT_CRYPT_R
-#endif
-
#if SANITIZER_INTERCEPT_GETENTROPY
INTERCEPTOR(int, getentropy, void *buf, SIZE_T buflen) {
void *ctx;
@@ -10337,8 +10302,6 @@ static void InitializeCommonInterceptors() {
INIT_GETUSERSHELL;
INIT_SL_INIT;
INIT_GETRANDOM;
- INIT_CRYPT;
- INIT_CRYPT_R;
INIT_GETENTROPY;
INIT_QSORT;
INIT_QSORT_R;
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h b/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h
index 18bab346ce6e..cf329b76836e 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h
@@ -572,8 +572,6 @@
#define SANITIZER_INTERCEPT_FDEVNAME SI_FREEBSD
#define SANITIZER_INTERCEPT_GETUSERSHELL (SI_POSIX && !SI_ANDROID)
#define SANITIZER_INTERCEPT_SL_INIT (SI_FREEBSD || SI_NETBSD)
-#define SANITIZER_INTERCEPT_CRYPT (SI_POSIX && !SI_ANDROID)
-#define SANITIZER_INTERCEPT_CRYPT_R (SI_LINUX && !SI_ANDROID)

#define SANITIZER_INTERCEPT_GETRANDOM \
((SI_LINUX && __GLIBC_PREREQ(2, 25)) || SI_FREEBSD)
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
index 5743516c0460..980776fc7d78 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
@@ -142,7 +142,6 @@ typedef struct user_fpregs elf_fpregset_t;
#include <linux/serial.h>
#include <sys/msg.h>
#include <sys/ipc.h>
-#include <crypt.h>
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID

#if SANITIZER_ANDROID
@@ -244,7 +243,6 @@ namespace __sanitizer {
unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
- unsigned struct_crypt_data_sz = sizeof(struct crypt_data);
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID

#if SANITIZER_LINUX && !SANITIZER_ANDROID
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
index 83861105a509..7ad11b943157 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -295,7 +295,6 @@ extern unsigned struct_msqid_ds_sz;
extern unsigned struct_mq_attr_sz;
extern unsigned struct_timex_sz;
extern unsigned struct_statvfs_sz;
-extern unsigned struct_crypt_data_sz;
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID

struct __sanitizer_iovec {
--
2.43.0

Loading

0 comments on commit 59f8269

Please sign in to comment.