diff --git a/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch b/meta/recipes-devtools/dpkg/dpkg/0001-script.c-avoid-use-of-chroot.patch similarity index 79% rename from meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch rename to meta/recipes-devtools/dpkg/dpkg/0001-script.c-avoid-use-of-chroot.patch index 916c7dfb00..7d4dc97e94 100644 --- a/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch +++ b/meta/recipes-devtools/dpkg/dpkg/0001-script.c-avoid-use-of-chroot.patch @@ -1,9 +1,11 @@ -From b6c28222276704a1e1a544983e38dfa2f3fb481a Mon Sep 17 00:00:00 2001 +From cf135f2b3395e54dc1adfe51c1a25922e01c167e Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 26 Aug 2015 16:25:45 +0300 -Subject: [PATCH] Our pre/postinsts expect $D to be set when running in a - sysroot and don't expect a chroot. This matches up our system expectations - with what dpkg does. +Subject: [PATCH] script.c: avoid use of chroot + +Our pre/postinsts expect $D to be set when running in a sysroot and +don't expect a chroot. This matches up our system expectations with what +dpkg does. Upstream-Status: Inappropriate [OE Specific] @@ -11,15 +13,19 @@ RP 2011/12/07 ALIMON 2016/05/26 ALIMON 2017/02/21 KKang 2019/02/20 + +Refresh to apply on top of v1.22.10. + +Signed-off-by: Trevor Gamblin --- - src/main/script.c | 53 +++-------------------------------------------- - 1 file changed, 3 insertions(+), 50 deletions(-) + src/main/script.c | 52 +++-------------------------------------------- + 1 file changed, 3 insertions(+), 49 deletions(-) diff --git a/src/main/script.c b/src/main/script.c -index 017d92efe..181e7c710 100644 +index e9aee0bf9..181e7c710 100644 --- a/src/main/script.c +++ b/src/main/script.c -@@ -97,58 +97,11 @@ static const char * +@@ -97,57 +97,11 @@ static const char * maintscript_pre_exec(struct command *cmd) { const char *instdir = dpkg_fsys_get_dir(); @@ -62,9 +68,8 @@ index 017d92efe..181e7c710 100644 - varbuf_add_char(&args, ' '); - varbuf_add_str(&args, *argv); - } -- varbuf_end_str(&args); - debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, -- args.buf); +- varbuf_str(&args)); - varbuf_destroy(&args); + if (*instdir) { + setenv("D", instdir, 1); @@ -81,3 +86,6 @@ index 017d92efe..181e7c710 100644 } /** +-- +2.39.2 + diff --git a/meta/recipes-devtools/dpkg/dpkg_1.22.6.bb b/meta/recipes-devtools/dpkg/dpkg_1.22.10.bb similarity index 86% rename from meta/recipes-devtools/dpkg/dpkg_1.22.6.bb rename to meta/recipes-devtools/dpkg/dpkg_1.22.10.bb index 3f5f7395e0..b247404855 100644 --- a/meta/recipes-devtools/dpkg/dpkg_1.22.6.bb +++ b/meta/recipes-devtools/dpkg/dpkg_1.22.10.bb @@ -7,7 +7,7 @@ SRC_URI = "git://salsa.debian.org/dpkg-team/dpkg.git;protocol=https;branch=main file://arch_pm.patch \ file://add_armeb_triplet_entry.patch \ file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \ - file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \ + file://0001-script.c-avoid-use-of-chroot.patch \ file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \ file://0006-add-musleabi-to-known-target-tripets.patch \ file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \ @@ -17,6 +17,6 @@ SRC_URI = "git://salsa.debian.org/dpkg-team/dpkg.git;protocol=https;branch=main SRC_URI:append:class-native = " file://0001-build.c-ignore-return-of-1-from-tar-cf.patch" -SRCREV = "b2f9600ead232a2dd3c27f8b52807a9ca5854d17" +SRCREV = "ef5536cfe24e4c41c6fdc56e4530161fade3887c" S = "${WORKDIR}/git"