Skip to content

Commit

Permalink
Update for 2024.08.x
Browse files Browse the repository at this point in the history
  - Changes:
    - Rework patch notes
    - Update kernel for x86_64_mender_defconfig to 6.6.50
    - Ensure built-in buildroot tests for mender work properly.
    - The mender package .mk file has been reworked to be cleaner.
    - system-online.target is no longer a requirement for mender-authd and mender-updated
  • Loading branch information
Adam Duskett committed Sep 9, 2024
1 parent 5e6d5a5 commit 07592ad
Show file tree
Hide file tree
Showing 9 changed files with 612 additions and 286 deletions.
4 changes: 2 additions & 2 deletions buildroot-external-mender/configs/x86_64_mender_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
BR2_ROOTFS_OVERLAY="buildroot-external-mender/board/x86_64/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="buildroot-external-mender/board/x86_64/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="buildroot-external-mender/board/x86_64/post-image.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="--artifact-name=2024.05-345-g39d23ce823-dirty --data-part-size=128M --generate-mender-image=true --device-type=x64"
BR2_ROOTFS_POST_SCRIPT_ARGS="--artifact-name=2024.08 --data-part-size=128M --generate-mender-image=true --device-type=x64"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.38"
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.50"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="buildroot-external-mender/board/x86_64/linux.config"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
From 609428eba86dfff358a71af508f8c16bfabf0a21 Mon Sep 17 00:00:00 2001
From: Adam Duskett <[email protected]>
Date: Wed, 4 Sep 2024 11:23:35 +0200
Subject: [PATCH v2 2/5] package/mender-grubenv: Fix per-package building

Normally, two packages should never touch the same file. However, the
mender-grubenv package is a special case, as its sole purpose is to overwrite
the grub.cfg file.

As per-package directory building has no guarantee that the grub package is
rsynced to the target directory before the mender-grubenv package, this leads
to the possiblity that mender-grubenvs grub.conf file is overwritten with the
stock grub2 packages grub.conf file.

Instead of a MENDER_GRUBENV_INSTALL_I386_CFG and MENDER_GRUBENV_INSTALL_EFI_CFG
being part if MENDER_GRUBENV_INSTALL_IMAGES_CMDS, move them to
TARGET_FINALIZE_HOOKS. This guarantees that the grub.cfg provided by the
mender-grubenv package is installed after grub.conf provided by the grub2
package.

Signed-off-by: Adam Duskett <[email protected]>
---
package/mender-grubenv/mender-grubenv.mk | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/package/mender-grubenv/mender-grubenv.mk b/package/mender-grubenv/mender-grubenv.mk
index 8679ad9236..a6d8d48d43 100644
--- a/package/mender-grubenv/mender-grubenv.mk
+++ b/package/mender-grubenv/mender-grubenv.mk
@@ -11,7 +11,6 @@ MENDER_GRUBENV_LICENSE_FILES = LICENSE
# Grub2 must be built first so this package can overwrite the config files
# provided by grub.
MENDER_GRUBENV_DEPENDENCIES = grub2
-MENDER_GRUBENV_INSTALL_IMAGES = YES

MENDER_GRUBENV_MAKE_ENV = \
$(TARGET_CONFIGURE_OPTS) \
@@ -34,12 +33,13 @@ MENDER_GRUBENV_MAKE_ENV += BOOT_DIR=/boot/grub

define MENDER_GRUBENV_INSTALL_I386_CFG
mkdir -p $(BINARIES_DIR)/boot-part/grub
- cp -dpfr $(@D)/mender_grub.cfg \
+ cp -dpfr $(MENDER_GRUBENV_BUILDDIR)/mender_grub.cfg \
$(TARGET_DIR)/boot/grub/grub.cfg
cp -dpfr $(TARGET_DIR)/boot/grub/grub.cfg \
$(TARGET_DIR)/boot/grub/grub-mender-grubenv \
$(BINARIES_DIR)/boot-part/
endef
+MENDER_GRUBENV_TARGET_FINALIZE_HOOKS += MENDER_GRUBENV_INSTALL_I386_CFG
endif # BR2_TARGET_GRUB2_HAS_LEGACY_BOOT

ifeq ($(BR2_TARGET_GRUB2_HAS_EFI_BOOT),y)
@@ -51,13 +51,14 @@ MENDER_GRUBENV_MAKE_ENV += BOOT_DIR=/boot/EFI/BOOT

define MENDER_GRUBENV_INSTALL_EFI_CFG
mkdir -p $(BINARIES_DIR)/efi-part/EFI/BOOT
- cp -dpfr $(@D)/mender_grub.cfg \
+ cp -dpfr $(MENDER_GRUBENV_BUILDDIR)/mender_grub.cfg \
$(TARGET_DIR)/boot/EFI/BOOT/grub.cfg
cp -dpfr $(TARGET_DIR)/boot/EFI/BOOT/grub.cfg \
$(BINARIES_DIR)/efi-part/EFI/BOOT
cp -dpfr $(TARGET_DIR)/boot/EFI/BOOT/grub-mender-grubenv \
$(BINARIES_DIR)/efi-part/
endef
+MENDER_GRUBENV_TARGET_FINALIZE_HOOKS += MENDER_GRUBENV_INSTALL_EFI_CFG
endif # BR2_TARGET_GRUB2_HAS_EFI_BOOT

ifeq ($(BR2_PACKAGE_MENDER_GRUBENV)$(BR_BUILDING),yy)
@@ -86,9 +87,4 @@ define MENDER_GRUBENV_INSTALL_TARGET_CMDS
echo 'ENV_DIR=/boot/grub-mender-grubenv' > $(TARGET_DIR)/etc/mender_grubenv.config
endef

-define MENDER_GRUBENV_INSTALL_IMAGES_CMDS
- $(MENDER_GRUBENV_INSTALL_I386_CFG)
- $(MENDER_GRUBENV_INSTALL_EFI_CFG)
-endef
-
$(eval $(generic-package))
--
2.46.0

Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
From 2d18a9c7d6a7f291e72b6c507435bc2fed570208 Mon Sep 17 00:00:00 2001
From ba33ca7bd96b6f836d6e2c09d5855acd0467e8c0 Mon Sep 17 00:00:00 2001
From: Adam Duskett <[email protected]>
Date: Wed, 10 Jul 2024 13:15:18 -0600
Subject: [PATCH] package/mender-grubenv: bump version to
Date: Wed, 4 Sep 2024 11:25:21 +0200
Subject: [PATCH v2 3/5] package/mender-grubenv: bump version to
38e5043a215f696d126a2d707c9db9aeb93cfb2d

Mender grubenv now expects bios installs to be in boot/grub-mender-grubenv
instead of boot/grub/grub-mender-grubenv.
Commit 174bf40fb520893a5ef69ef02c22aa232b56bd67 introduced the usage of
`flock -w` to prevent errors during concurrent access of the environment
(IE: When a process is editing an env and another is trying to restore it.)

Also, update the LICENSE hash as the year has been updated to 2023.
As such, mender-grubenv now requires util-linux and the basic binaries
set, as the busybox flock does not provide the -w argument.

Other changes:
- The boot directory is now expected to be /boot instead of /boot/grub
- License hash changed for 2023 -> 2024 year date (see commit f54ecfb)

Signed-off-by: Adam Duskett <[email protected]>
---
package/mender-grubenv/Config.in | 4 ++++
package/mender-grubenv/mender-grubenv.hash | 4 ++--
package/mender-grubenv/mender-grubenv.mk | 20 ++++++++------------
3 files changed, 14 insertions(+), 14 deletions(-)
package/mender-grubenv/Config.in | 2 ++
package/mender-grubenv/mender-grubenv.hash | 4 ++--
package/mender-grubenv/mender-grubenv.mk | 8 ++++----
3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/package/mender-grubenv/Config.in b/package/mender-grubenv/Config.in
index f27eb09e34..f35562f69e 100644
index f27eb09e34..8505458793 100644
--- a/package/mender-grubenv/Config.in
+++ b/package/mender-grubenv/Config.in
@@ -1,9 +1,13 @@
config BR2_PACKAGE_MENDER_GRUBENV
bool "mender-grubenv"
depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
+ depends on BR2_USE_WCHAR # coreutils
+ depends on BR2_USE_MMU # coreutils
+ depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # coreutils
@@ -4,6 +4,8 @@ config BR2_PACKAGE_MENDER_GRUBENV
depends on BR2_PACKAGE_MENDER # runtime
depends on BR2_TARGET_GRUB2
depends on !(BR2_TARGET_GRUB2_HAS_LEGACY_BOOT && BR2_TARGET_GRUB2_HAS_EFI_BOOT)
+ select BR2_PACKAGE_COREUTILS # sync
+ select BR2_PACKAGE_UTIL_LINUX
+ select BR2_PACKAGE_UTIL_LINUX_BINARIES # flock -w
help
Contains the boot scripts and tools used by Mender to
integrate with the GRUB bootloader.
Expand All @@ -45,10 +46,10 @@ index 193bff073b..d7f784493c 100644
+sha256 0bac59698165a8dafdd282610246addd7bebf41612efa88c77b779f8ffb5ed9d mender-grubenv-38e5043a215f696d126a2d707c9db9aeb93cfb2d.tar.gz
+sha256 d0f406b04e7901e6b4076bdf5fd20f9d7f04fc41681069fd8954413ac6295688 LICENSE
diff --git a/package/mender-grubenv/mender-grubenv.mk b/package/mender-grubenv/mender-grubenv.mk
index 8679ad9236..44af2ee417 100644
index a6d8d48d43..a47531fe58 100644
--- a/package/mender-grubenv/mender-grubenv.mk
+++ b/package/mender-grubenv/mender-grubenv.mk
@@ -4,14 +4,13 @@
@@ -4,13 +4,13 @@
#
################################################################################

Expand All @@ -60,12 +61,11 @@ index 8679ad9236..44af2ee417 100644
# Grub2 must be built first so this package can overwrite the config files
# provided by grub.
-MENDER_GRUBENV_DEPENDENCIES = grub2
-MENDER_GRUBENV_INSTALL_IMAGES = YES
+MENDER_GRUBENV_DEPENDENCIES = coreutils grub2
+MENDER_GRUBENV_DEPENDENCIES = grub2 util-linux

MENDER_GRUBENV_MAKE_ENV = \
$(TARGET_CONFIGURE_OPTS) \
@@ -30,16 +29,17 @@ MENDER_GRUBENV_MODULES_MISSING_PC = \
@@ -29,14 +29,14 @@ MENDER_GRUBENV_MODULES_MISSING_PC = \
$(filter-out $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES_PC)),\
$(MENDER_GRUBENV_MANDATORY_MODULES))

Expand All @@ -74,44 +74,14 @@ index 8679ad9236..44af2ee417 100644

define MENDER_GRUBENV_INSTALL_I386_CFG
mkdir -p $(BINARIES_DIR)/boot-part/grub
- cp -dpfr $(@D)/mender_grub.cfg \
+ cp -dpfr $(MENDER_GRUBENV_BUILDDIR)/mender_grub.cfg \
cp -dpfr $(MENDER_GRUBENV_BUILDDIR)/mender_grub.cfg \
$(TARGET_DIR)/boot/grub/grub.cfg
cp -dpfr $(TARGET_DIR)/boot/grub/grub.cfg \
- $(TARGET_DIR)/boot/grub/grub-mender-grubenv \
+ $(TARGET_DIR)/boot/grub-mender-grubenv \
$(BINARIES_DIR)/boot-part/
endef
+MENDER_GRUBENV_TARGET_FINALIZE_HOOKS += MENDER_GRUBENV_INSTALL_I386_CFG
endif # BR2_TARGET_GRUB2_HAS_LEGACY_BOOT

ifeq ($(BR2_TARGET_GRUB2_HAS_EFI_BOOT),y)
@@ -51,13 +51,14 @@ MENDER_GRUBENV_MAKE_ENV += BOOT_DIR=/boot/EFI/BOOT

define MENDER_GRUBENV_INSTALL_EFI_CFG
mkdir -p $(BINARIES_DIR)/efi-part/EFI/BOOT
- cp -dpfr $(@D)/mender_grub.cfg \
+ cp -dpfr $(MENDER_GRUBENV_BUILDDIR)/mender_grub.cfg \
$(TARGET_DIR)/boot/EFI/BOOT/grub.cfg
cp -dpfr $(TARGET_DIR)/boot/EFI/BOOT/grub.cfg \
$(BINARIES_DIR)/efi-part/EFI/BOOT
cp -dpfr $(TARGET_DIR)/boot/EFI/BOOT/grub-mender-grubenv \
$(BINARIES_DIR)/efi-part/
endef
+MENDER_GRUBENV_TARGET_FINALIZE_HOOKS += MENDER_GRUBENV_INSTALL_EFI_CFG
endif # BR2_TARGET_GRUB2_HAS_EFI_BOOT

ifeq ($(BR2_PACKAGE_MENDER_GRUBENV)$(BR_BUILDING),yy)
@@ -86,9 +87,4 @@ define MENDER_GRUBENV_INSTALL_TARGET_CMDS
echo 'ENV_DIR=/boot/grub-mender-grubenv' > $(TARGET_DIR)/etc/mender_grubenv.config
endef

-define MENDER_GRUBENV_INSTALL_IMAGES_CMDS
- $(MENDER_GRUBENV_INSTALL_I386_CFG)
- $(MENDER_GRUBENV_INSTALL_EFI_CFG)
-endef
-
$(eval $(generic-package))
MENDER_GRUBENV_TARGET_FINALIZE_HOOKS += MENDER_GRUBENV_INSTALL_I386_CFG
--
2.45.2
2.46.0

Original file line number Diff line number Diff line change
@@ -1,57 +1,75 @@
From b1bb0dddf2dd898a6ff9771faaf76de67177f1fc Mon Sep 17 00:00:00 2001
From 0030a43256736c4d741b40f60f7da9a1e9d98f4b Mon Sep 17 00:00:00 2001
From: Adam Duskett <[email protected]>
Date: Wed, 10 Jul 2024 13:13:55 -0600
Subject: [PATCH] package/mender-artifact: bump version to 3.11.2
Date: Wed, 4 Sep 2024 11:46:37 +0200
Subject: [PATCH v2 4/5] package/mender-artifact: bump version to 3.11.2

mender-artifact now explicitly depends on host-openssl and uses host-pkgconf
to find the correct libraries.

As suggested by Thomas in this previous patcch:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Use the same variables as defined in HOST_MAKE_ENV (in package/Makefile.in) for
HOST_MENDER_ARTIFACT_GO_ENV.

The updated mender-artifact package introduces the write bootstrap-artifact
argument which is needed for 3.5.1.
argument which is needed for mender versions >= 3.5.1.

License changes:
New:
Apache 2.0
vendor/github.com/mendersoftware/openssl/LICENSE
vendor/github.com/googleapis/enterprise-certificate-proxy/LICENSE
Apache 2.0:
vendor/google.golang.org/genproto/googleapis/api/LICENSE
vendor/google.golang.org/genproto/googleapis/rpc/LICENSE
vendor/cloud.google.com/go/compute/metadata/LICENSE

BSD-3:
vendor/golang.org/x/crypto/LICENSE
vendor/golang.org/x/time/LICENSE
vendor/github.com/klauspost/compress/internal/snapref/LICENSE
Removed:
Apache 2.0:
vendor/cloud.google.com/go/LICENSE

MIT:
vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt
vendor/github.com/shurcooL/sanitized_anchor_name/LICENSE
vendor/go.uber.org/atomic/LICENSE.txt
vendor/github.com/mitchellh/go-testing-interface/LICENSE
vendor/github.com/mitchellh/copystructure/LICENSE
vendor/github.com/mitchellh/reflectwalk/LICENSE
vendor/github.com/mattn/go-colorable/LICENSE
vendor/github.com/fatih/color/LICENSE.md
vendor/github.com/armon/go-radix/LICENSE
vendor/github.com/armon/go-metrics/LICENSE

MPL-2.0:
vendor/github.com/hashicorp/go-secure-stdlib/mlock/LICENSE

Removed:
vendor/cloud.google.com/go/LICENSE
vendor/github.com/shurcooL/sanitized_anchor_name/LICENSE
vendor/github.com/hashicorp/go-version/LICENSE
vendor/github.com/hashicorp/go-uuid/LICENSE
vendor/github.com/hashicorp/go-plugin/LICENSE
vendor/github.com/hashicorp/golang-lru/LICENSE

Modified:
LIC_FILES_CHKSUM.sha256: Sum of all licenses changed
LICENSE: Update year from 2022 to 2023
vendor/github.com/urfave/cli/LICENSE: Update year from 2016 to 2023
vendor/github.com/hashicorp/vault/sdk/LICENSE
- Add missing Copyright (c) 2015 HashiCorp, Inc.
vendor/github.com/hashicorp/vault/api/LICENSE
- Add missing Copyright (c) 2015 HashiCorp, Inc.

Apache 2.0:
vendor/gopkg.in/square/go-jose.v2/LICENSE
vendor/github.com/oklog/run/LICENSE

BSD 3 Clause:
vendor/github.com/golang/snappy/LICENSE
vendor/gopkg.in/square/go-jose.v2/json/LICENSE
vendor/github.com/pierrec/lz4/LICENSE

MIT:
vendor/github.com/urfave/cli/LICENSE
vendor/github.com/klauspost/pgzip/LICENSE
vendor/github.com/hashicorp/go-hclog/LICENSE

MPL-2.0:
vendor/github.com/hashicorp/vault/sdk/LICENSE
vendor/github.com/hashicorp/vault/api/LICENSE
vendor/github.com/hashicorp/yamux/LICENSE
vendor/github.com/hashicorp/go-immutable-radix/LICENSE

Signed-off-by: Adam Duskett <[email protected]>
---
package/mender-artifact/mender-artifact.hash | 48 +++++++----------
package/mender-artifact/mender-artifact.mk | 54 ++++++++++----------
2 files changed, 46 insertions(+), 56 deletions(-)

diff --git a/package/mender-artifact/mender-artifact.hash b/package/mender-artifact/mender-artifact.hash
index 8262e26bf0..84e733d897 100644
index 9d77f068e2..e87d52fa72 100644
--- a/package/mender-artifact/mender-artifact.hash
+++ b/package/mender-artifact/mender-artifact.hash
@@ -1,6 +1,6 @@
Expand Down Expand Up @@ -155,7 +173,7 @@ index 8262e26bf0..84e733d897 100644
sha256 a830016911a348a54e89bd54f2f8b0d8fffdeac20aecfba8e36ebbf38a03f5ff vendor/github.com/hashicorp/go-multierror/LICENSE
-sha256 af175b9d96ee93c21a036152e1b905b0b95304d4ae8c2c921c7609100ba8df7e vendor/github.com/hashicorp/golang-lru/LICENSE
diff --git a/package/mender-artifact/mender-artifact.mk b/package/mender-artifact/mender-artifact.mk
index 6ade624a23..68e3ca3f1a 100644
index 6ade624a23..399c194c99 100644
--- a/package/mender-artifact/mender-artifact.mk
+++ b/package/mender-artifact/mender-artifact.mk
@@ -4,7 +4,7 @@
Expand Down Expand Up @@ -264,5 +282,5 @@ index 6ade624a23..68e3ca3f1a 100644
HOST_MENDER_ARTIFACT_LDFLAGS = -X github.com/mendersoftware/mender-artifact/cli.Version=$(HOST_MENDER_ARTIFACT_VERSION)

--
2.45.2
2.46.0

Loading

0 comments on commit 07592ad

Please sign in to comment.