Patch review
cover Patch review
Please review this set of changes for kirkstone and have comments back by end of day Tuesday, May 28
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6956
The following changes since commit f85d5dfc91d536a00669ca3148d8c3b2727b183d:
libpciaccess: Remove duplicated license entry (2024-05-10 05:05:54 -0700)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/kirkstone-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/kirkstone-nut
Bob Henz (1):
systemd-systemctl: Fix WantedBy processing
Colin McAllister (1):
initscripts: Add custom mount args for /var/lib
Dmitry Baryshkov (1):
go.bbclass: fix path to linker in native Go builds
Joerg Vehlow (1):
go: Always pass interpreter to linker
Peter Marko (1):
openssl: patch CVE-2024-4603
Stefan Herbrechtsmeier (1):
classes: go-mod: do not pack go mod cache
Vijay Anusuri (1):
binutils: Rename CVE-2022-38126 patch to CVE-2022-35205
Yogita Urade (1):
libarchive: fix CVE-2024-26256
meta/classes/go-mod.bbclass | 4 +
meta/classes/go.bbclass | 6 +-
.../openssl/openssl/CVE-2024-4603.patch | 180 ++++++++++++++++++
.../openssl/openssl_3.0.13.bb | 1 +
.../initscripts-1.0/read-only-rootfs-hook.sh | 4 +-
.../initscripts/initscripts_1.0.bb | 2 +
.../systemd/systemd-systemctl/systemctl | 11 ++
.../binutils/binutils-2.38.inc | 2 +-
...-38126.patch => 0016-CVE-2022-35205.patch} | 3 +-
.../libarchive/CVE-2024-26256.patch | 29 +++
.../libarchive/libarchive_3.6.2.bb | 5 +-
11 files changed, 240 insertions(+), 7 deletions(-)
create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2024-4603.patch
rename meta/recipes-devtools/binutils/binutils/{0016-CVE-2022-38126.patch => 0016-CVE-2022-35205.patch} (94%)
create mode 100644 meta/recipes-extended/libarchive/libarchive/CVE-2024-26256.patchSignature · 1 line
2.34.1
PATCH 1/8 libarchive: fix CVE-2024-26256
From: Yogita Urade <[email protected]>
libarchive Remote Code Execution Vulnerability
References:
https://nvd.nist.gov/vuln/detail/CVE-2024-26256
https://bugzilla.suse.com/show_bug.cgi?id=CVE-2024-26256
--- .../libarchive/CVE-2024-26256.patch | 29 +++++++++++++++++++ .../libarchive/libarchive_3.6.2.bb | 5 ++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/libarchive/libarchive/CVE-2024-26256.patch
meta/recipes-extended/libarchive/libarchive/CVE-2024-26256.patch new file +29 -0
@@ -0,0 +1,29 @@ +From eb7939b24a681a04648a59cdebd386b1e9dc9237 Mon Sep 17 00:00:00 2001 +From: Wei-Cheng Pan <[email protected]> +Date: Tue, 14 May 2024 08:50:44 +0000 +Subject: [PATCH] fix: OOB in rar e8 filter (#2135) This patch fixes an + out-of-bound error in rar e8 filter. + +CVE: CVE-2024-26256 +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/eb7939b24a681a04648a59cdebd386b1e9dc9237] + +Signed-off-by: Yogita Urade <[email protected]> +--- + libarchive/archive_read_support_format_rar.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c +index 793e8e9..b8397d0 100644 +--- a/libarchive/archive_read_support_format_rar.c ++++ b/libarchive/archive_read_support_format_rar.c +@@ -3624,7 +3624,7 @@ execute_filter_e8(struct rar_filter *filter, struct rar_virtual_machine *vm, siz + uint32_t filesize = 0x1000000; + uint32_t i; + +- if (length > PROGRAM_WORK_SIZE || length < 4) ++ if (length > PROGRAM_WORK_SIZE || length <= 4) + return 0; + + for (i = 0; i <= length - 5; i++) +-- +2.40.0
meta/recipes-extended/libarchive/libarchive_3.6.2.bb +3 -2
@@ -29,8 +29,9 @@ PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd," EXTRA_OECONF += "--enable-largefile --without-iconv" SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ - file://0001-pax-writer-fix-multiple-security-vulnerabilities.patch \ -" + file://0001-pax-writer-fix-multiple-security-vulnerabilities.patch \ + file://CVE-2024-26256.patch \ + " UPSTREAM_CHECK_URI = "http://libarchive.org/" SRC_URI[sha256sum] = "ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3"
Signature · 1 line
2.34.1
PATCH 2/8 openssl: patch CVE-2024-4603
In reply to Steve SakomanFrom: Peter Marko <[email protected]>
Advisory: https://github.com/advisories/GHSA-85xr-ghj6-6m46
--- .../openssl/openssl/CVE-2024-4603.patch | 180 ++++++++++++++++++ .../openssl/openssl_3.0.13.bb | 1 + 2 files changed, 181 insertions(+) create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2024-4603.patch
meta/recipes-connectivity/openssl/openssl/CVE-2024-4603.patch new file +180 -0
@@ -0,0 +1,180 @@ +From 3559e868e58005d15c6013a0c1fd832e51c73397 Mon Sep 17 00:00:00 2001 +From: Tomas Mraz <[email protected]> +Date: Wed, 8 May 2024 15:23:45 +0200 +Subject: [PATCH] Check DSA parameters for excessive sizes before validating + +This avoids overly long computation of various validation +checks. + +Fixes CVE-2024-4603 + +Reviewed-by: Paul Dale <[email protected]> +Reviewed-by: Matt Caswell <[email protected]> +Reviewed-by: Neil Horman <[email protected]> +Reviewed-by: Shane Lontis <[email protected]> +(Merged from https://github.com/openssl/openssl/pull/24346) + +(cherry picked from commit 85ccbab216da245cf9a6503dd327072f21950d9b) + +<dropped CHANGES.md modifications as it would need backport of all previous changes> + +CVE: CVE-2024-4603 +Upstream-Status: Backport [https://github.com/openssl/openssl/commit/3559e868e58005d15c6013a0c1fd832e51c73397] +Signed-off-by: Peter Marko <[email protected]> +--- + crypto/dsa/dsa_check.c | 44 ++++++++++++-- + .../invalid/p10240_q256_too_big.pem | 57 +++++++++++++++++++ + 2 files changed, 97 insertions(+), 4 deletions(-) + create mode 100644 test/recipes/15-test_dsaparam_data/invalid/p10240_q256_too_big.pem + +diff --git a/crypto/dsa/dsa_check.c b/crypto/dsa/dsa_check.c +index fb0e9129a2..122449a7bf 100644 +--- a/crypto/dsa/dsa_check.c ++++ b/crypto/dsa/dsa_check.c +@@ -19,8 +19,34 @@ + #include "dsa_local.h" + #include "crypto/dsa.h" + ++static int dsa_precheck_params(const DSA *dsa, int *ret) ++{ ++ if (dsa->params.p == NULL || dsa->params.q == NULL) { ++ ERR_raise(ERR_LIB_DSA, DSA_R_BAD_FFC_PARAMETERS); ++ *ret = FFC_CHECK_INVALID_PQ; ++ return 0; ++ } ++ ++ if (BN_num_bits(dsa->params.p) > OPENSSL_DSA_MAX_MODULUS_BITS) { ++ ERR_raise(ERR_LIB_DSA, DSA_R_MODULUS_TOO_LARGE); ++ *ret = FFC_CHECK_INVALID_PQ; ++ return 0; ++ } ++ ++ if (BN_num_bits(dsa->params.q) >= BN_num_bits(dsa->params.p)) { ++ ERR_raise(ERR_LIB_DSA, DSA_R_BAD_Q_VALUE); ++ *ret = FFC_CHECK_INVALID_PQ; ++ return 0; ++ } ++ ++ return 1; ++} ++ + int ossl_dsa_check_params(const DSA *dsa, int checktype, int *ret) + { ++ if (!dsa_precheck_params(dsa, ret)) ++ return 0; ++ + if (checktype == OSSL_KEYMGMT_VALIDATE_QUICK_CHECK) + return ossl_ffc_params_simple_validate(dsa->libctx, &dsa->params, + FFC_PARAM_TYPE_DSA, ret); +@@ -39,6 +65,9 @@ int ossl_dsa_check_params(const DSA *dsa, int checktype, int *ret) + */ + int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret) + { ++ if (!dsa_precheck_params(dsa, ret)) ++ return 0; ++ + return ossl_ffc_validate_public_key(&dsa->params, pub_key, ret) + && *ret == 0; + } +@@ -50,6 +79,9 @@ int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret) + */ + int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key, int *ret) + { ++ if (!dsa_precheck_params(dsa, ret)) ++ return 0; ++ + return ossl_ffc_validate_public_key_partial(&dsa->params, pub_key, ret) + && *ret == 0; + } +@@ -58,8 +90,10 @@ int ossl_dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret) + { + *ret = 0; + +- return (dsa->params.q != NULL +- && ossl_ffc_validate_private_key(dsa->params.q, priv_key, ret)); ++ if (!dsa_precheck_params(dsa, ret)) ++ return 0; ++ ++ return ossl_ffc_validate_private_key(dsa->params.q, priv_key, ret); + } + + /* +@@ -72,8 +106,10 @@ int ossl_dsa_check_pairwise(const DSA *dsa) + BN_CTX *ctx = NULL; + BIGNUM *pub_key = NULL; + +- if (dsa->params.p == NULL +- || dsa->params.g == NULL ++ if (!dsa_precheck_params(dsa, &ret)) ++ return 0; ++ ++ if (dsa->params.g == NULL + || dsa->priv_key == NULL + || dsa->pub_key == NULL) + return 0; +diff --git a/test/recipes/15-test_dsaparam_data/invalid/p10240_q256_too_big.pem b/test/recipes/15-test_dsaparam_data/invalid/p10240_q256_too_big.pem +new file mode 100644 +index 0000000000..e85e2953b7 +--- /dev/null ++++ b/test/recipes/15-test_dsaparam_data/invalid/p10240_q256_too_big.pem +@@ -0,0 +1,57 @@ ++-----BEGIN DSA PARAMETERS----- ++MIIKLAKCBQEAym47LzPFZdbz16WvjczLKuzLtsP8yRk/exxL4bBthJhP1qOwctja ++p1586SF7gDxCMn7yWVEYdfRbFefGoq0gj1XOE917XqlbnkmZhMgxut2KbNJo/xil ++XNFUjGvKs3F413U9rAodC8f07cWHP1iTcWL+vPe6u2yilKWYYfnLWHQH+Z6aPrrF ++x/R08LI6DZ6nEsIo+hxaQnEtx+iqNTJC6Q1RIjWDqxQkFVTkJ0Y7miRDXmRdneWk ++oLrMZRpaXr5l5tSjEghh1pBgJcdyOv0lh4dlDy/alAiqE2Qlb667yHl6A9dDPlpW ++dAntpffy4LwOxfbuEhISvKjjQoBwIvYE4TBPqL0Q6bC6HgQ4+tqd9b44pQjdIQjb ++Xcjc6azheITSnPEex3OdKtKoQeRq01qCeLBpMXu1c+CTf4ApK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FBeBxuYNcRTsu3qMdIBsEb8URQdsTtjoIja2fK ++hreVgjK36GW70KXEl8V/vq5qjQulmqkBEjmilcDuiREKqQuyeagUOnhQaBplqVco ++4xznh5DMBMRbpGb5lHxKv4cPNi+uNAJ5i98zWUM1JRt6aXnRCuWcll1z8fRZ+5kD ++vK9FaZU3VRMK/eknEG49cGr8OuJ6ZRSaC+tKwV1y+amkSZpKPWnk2bUnQI3ApJv3 ++k1e1EToeECpMUkLMDgNbpKBoz4nqMEvAAlYgw9xKNbLlQlahqTVEAmaJHh4yDMDy ++i7IZ9Wrn47IGoR7s3cvhDHUpRPeW4nsmgzj+tf5EAxemI61STZJTTWo0iaPGJxct ++9nhOOhw1I38Mvm4vkAbFH7YJ0B6QrjjYL2MbOTp5JiIh4vdOeWwNo9/y4ffyaN5+ ++ADpxuuIAmcbdr6GPOhkOFFixRJa0B2eP1i032HESlLs8RB9oYtdTXdXQotnIgJGd ++Y8tSKOa1zjzeLHn3AVpRZTUW++/BxmApV3GKIeG8fsUjg/df0QRrBcdC/1uccdaG ++KKlAOwlywVn5jUlwHkTmDiTM9w5AqVVGHZ2b+4ZgQW8jnPKN0SrKf6U555D+zp7E ++x4uXoE8ojN9y8m8UKf0cTLnujH2XgZorjPfuMOt5VZEhQFMS2QaljSeni5CJJ8gk ++XtztNqfBlAtWR4V5iAHeQOfIB2YaOy8GESda89tyKraKeaez41VblpTVHTeq9IIF ++YB4cQA2PfuNaGVRGLMAgT3Dvl+mxxxeJyxnGAiUcETU/jJJt9QombiuszBlYGQ5d ++ELOSm/eQSRARV9zNSt5jaQlMSjMBqenIEM09BzYqa7jDwqoztFxNdO8bcuQPuKwa ++4z3bBZ1yYm63WFdNbQqqGEwc0OYmqg1raJ0zltgHyjFyw8IGu4g/wETs+nVQcH7D ++vKuje86bePD6kD/LH3wmkA== ++-----END DSA PARAMETERS----- +-- +2.30.2 +
meta/recipes-connectivity/openssl/openssl_3.0.13.bb +1 -0
@@ -13,6 +13,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ file://afalg.patch \ file://0001-Configure-do-not-tweak-mips-cflags.patch \ file://CVE-2024-2511.patch \ + file://CVE-2024-4603.patch \ " SRC_URI:append:class-nativesdk = " \
Signature · 1 line
2.34.1
PATCH 3/8 binutils: Rename CVE-2022-38126 patch to CVE-2022-35205
In reply to Steve SakomanFrom: Vijay Anusuri <[email protected]>
CVE-2022-38126 has been marked "REJECT" in the CVE List by NVD.
Reference: https://nvd.nist.gov/vuln/detail/CVE-2022-38126
As commit changes in 0016-CVE-2022-38126.patch fixes CVE-2022-35205. Hence renamed the patch.
---
meta/recipes-devtools/binutils/binutils-2.38.inc | 2 +-
.../{0016-CVE-2022-38126.patch => 0016-CVE-2022-35205.patch} | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
rename meta/recipes-devtools/binutils/binutils/{0016-CVE-2022-38126.patch => 0016-CVE-2022-35205.patch} (94%)meta/recipes-devtools/binutils/binutils-2.38.inc +1 -1
@@ -34,7 +34,7 @@ SRC_URI = "\ file://0013-Avoid-as-info-race-condition.patch \ file://0014-CVE-2019-1010204.patch \ file://0015-CVE-2022-38533.patch \ - file://0016-CVE-2022-38126.patch \ + file://0016-CVE-2022-35205.patch \ file://0017-CVE-2022-38127-1.patch \ file://0017-CVE-2022-38127-2.patch \ file://0017-CVE-2022-38127-3.patch \
meta/recipes-devtools/binutils/binutils/0016-CVE-2022-35205.patch renamed from meta/recipes-devtools/binutils/binutils/0016-CVE-2022-38126.patch +2 -1
@@ -9,8 +9,9 @@ Subject: [PATCH] Replace a run-time assertion failure with a warning message message. Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e3e5ae049371a27fd1737aba946fe26d06e029b5] - +CVE: CVE-2022-35205 Signed-off-by: Pgowda <[email protected]> +Signed-off-by: Vijay Anusuri <[email protected]> --- binutils/dwarf.c | 7 ++++++-
Signature · 1 line
2.34.1
PATCH 4/8 go: Always pass interpreter to linker
In reply to Steve SakomanFrom: Joerg Vehlow <[email protected]>
When gos internal linker is used, it uses hardcoded paths to the interpreter (dynamic linker). For x86_64 this hardcoded path is /lib64/ld-linux-x86-64.so.2, but yocto's default dynamic linker path is /lib64/ld-linux-x86-64.so.2.
Most of the time, the internal linker is not used and binutils linker sets the correct path, but sometimes the internal linker is used and the resulting binary will not work on x86_64.
To ensure the path is always correct, pass it to the linker.
--- meta/classes/go.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/go.bbclass +2 -1
@@ -1,4 +1,5 @@ inherit goarch +inherit linuxloader GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}"
@@ -44,7 +45,7 @@ GO_LINKMODE ?= "" GO_LINKMODE:class-nativesdk = "--linkmode=external" GO_LINKMODE:class-native = "--linkmode=external" GO_EXTRA_LDFLAGS ?= "" -GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} ${GO_EXTRA_LDFLAGS} -extldflags '${GO_EXTLDFLAGS}'"' +GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -I ${@get_linuxloader(d)} ${GO_EXTRA_LDFLAGS} -extldflags '${GO_EXTLDFLAGS}'"' export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath" export GOPATH_OMIT_IN_ACTIONID ?= "1" export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
Signature · 1 line
2.34.1
PATCH 5/8 go.bbclass: fix path to linker in native Go builds
In reply to Steve SakomanFrom: Dmitry Baryshkov <[email protected]>
Building native Go tools results in the tool pointing to the wrong location of dynamic linker (see below). The linker is looked up in the temporary dir, which can be removed if rm_work is inherited. This results in being unable to execute the program with the 'No such file or directory' error. Override linker specificiation for native recipes (and let Go build environment to pick up a correct one on it's own).
The error is observed in case the distro doesn't use uninative.bbclass.
If uninative.bbclass is used, the binary will be patched automatically to use the uninative loader instead of the system one.
Without this patch:
$ ldd tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man linux-vdso.so.1 (0x00007ffe945ec000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3a7490e000) /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/x86_64-linux/go-md2man-native/1.0.10+gitAUTOINC+f79a8a8ca6-r0/recipe-sysroot-native/usr/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f3a74d13000) $ tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man --help -bash: tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man: No such file or directory
With the patch
$ ldd tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man linux-vdso.so.1 (0x00007ffd19dbf000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2d44181000) /lib64/ld-linux-x86-64.so.2 (0x00007f2d44586000) $ tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man --help Usage of tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man: -in string Path to file to be processed (default: stdin) -out string Path to output processed file (default: stdout)
--- meta/classes/go.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta/classes/go.bbclass +4 -1
@@ -45,7 +45,10 @@ GO_LINKMODE ?= "" GO_LINKMODE:class-nativesdk = "--linkmode=external" GO_LINKMODE:class-native = "--linkmode=external" GO_EXTRA_LDFLAGS ?= "" -GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -I ${@get_linuxloader(d)} ${GO_EXTRA_LDFLAGS} -extldflags '${GO_EXTLDFLAGS}'"' +GO_LINUXLOADER ?= "-I ${@get_linuxloader(d)}" +# Use system loader. If uninative is used, the uninative loader will be patched automatically +GO_LINUXLOADER:class-native = "" +GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} ${GO_LINUXLOADER} ${GO_EXTRA_LDFLAGS} -extldflags '${GO_EXTLDFLAGS}'"' export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath" export GOPATH_OMIT_IN_ACTIONID ?= "1" export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
Signature · 1 line
2.34.1
PATCH 6/8 classes: go-mod: do not pack go mod cache
In reply to Steve SakomanFrom: Stefan Herbrechtsmeier <[email protected]>
Clean go module cache from builddir to prevent it of beeing packed.
--- meta/classes/go-mod.bbclass | 4 ++++ 1 file changed, 4 insertions(+)
meta/classes/go-mod.bbclass +4 -0
@@ -18,3 +18,7 @@ inherit go GO_WORKDIR ?= "${GO_IMPORT}" do_compile[dirs] += "${B}/src/${GO_WORKDIR}" + +export GOMODCACHE = "${B}/.mod" + +do_compile[cleandirs] += "${B}/.mod"
Signature · 1 line
2.34.1
PATCH 7/8 systemd-systemctl: Fix WantedBy processing
In reply to Steve SakomanFrom: Bob Henz <[email protected]>
An empty string assignment to WantedBy should clear all prior WantedBy settings. This matches behavior of the current systemd implementation.
(From OE-Core rev: 8ede0083c28fadf1e83c9256618190b931edd306)
--- meta/recipes-core/systemd/systemd-systemctl/systemctl | 11 +++++++++++ 1 file changed, 11 insertions(+)
meta/recipes-core/systemd/systemd-systemctl/systemctl +11 -0
@@ -26,6 +26,9 @@ locations = list() class SystemdFile(): """Class representing a single systemd configuration file""" + + _clearable_keys = ['WantedBy'] + def __init__(self, root, path, instance_unit_name): self.sections = dict() self._parse(root, path)
@@ -80,6 +83,14 @@ class SystemdFile(): v = m.group('value') if k not in section: section[k] = list() + + # If we come across a "key=" line for a "clearable key", then + # forget all preceding assignments. This works because we are + # processing files in correct parse order. + if k in self._clearable_keys and not v: + del section[k] + continue + section[k].extend(v.split()) def get(self, section, prop):
Signature · 1 line
2.34.1
PATCH 8/8 initscripts: Add custom mount args for /var/lib
In reply to Steve SakomanFrom: Colin McAllister <[email protected]>
Adds bitbake variable to set additional mount flags for the /var/lib overlayfs or bind mount when using a read-only root filesystem. This can be used to set additional options like "-o nodev".
(From OE-Core rev: c3109e40e2c2c881996dd3fcc95fca74f098646d)
--- .../initscripts/initscripts-1.0/read-only-rootfs-hook.sh | 4 ++-- meta/recipes-core/initscripts/initscripts_1.0.bb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh +2 -2
@@ -37,9 +37,9 @@ if [ "$1" = "start" ] ; then mkdir -p /var/volatile/.lib-work # Try to mount using overlay, which is much faster than copying # files. If that fails, fallback to the slower copy - if ! mount -t overlay overlay -olowerdir=/var/lib,upperdir=/var/volatile/lib,workdir=/var/volatile/.lib-work /var/lib > /dev/null 2>&1; then + if ! mount -t overlay overlay SED_VARLIBMOUNTARGS -olowerdir=/var/lib,upperdir=/var/volatile/lib,workdir=/var/volatile/.lib-work /var/lib > /dev/null 2>&1; then cp -a /var/lib/* /var/volatile/lib - mount --bind /var/volatile/lib /var/lib + mount SED_VARLIBMOUNTARGS --bind /var/volatile/lib /var/lib fi fi fi
meta/recipes-core/initscripts/initscripts_1.0.bb +2 -0
@@ -59,10 +59,12 @@ FILES:${PN}-functions = "${sysconfdir}/init.d/functions*" FILES:${PN}-sushell = "${base_sbindir}/sushell" HALTARGS ?= "-d -f" +VARLIBMOUNTARGS ?= "" do_configure() { sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/halt sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/reboot + sed -i -e "s:SED_VARLIBMOUNTARGS:${VARLIBMOUNTARGS}:g" ${WORKDIR}/read-only-rootfs-hook.sh } do_install () {
Signature · 1 line
2.34.1