* [PATCH] dpkg: Prevent early expansion of shell command
@ 2024-01-02 7:56 Jan Kiszka
2024-01-12 6:15 ` Uladzimir Bely
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2024-01-02 7:56 UTC (permalink / raw)
To: isar-users; +Cc: Uladzimir Bely
From: Jan Kiszka <jan.kiszka@siemens.com>
So far, the 'find' command in the sub-shell is already executed before
the sbuild call, rather than after it. Fix this by escaping the $ as
well as the quotes.
Reported-by: Uladzimir Bely <ubely@ilbers.de>
Fixes: b382dbf434d9 ("dpkg: Account for empty local apt cache after package build")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/dpkg.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 0cdb5792..d1666f78 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -122,7 +122,7 @@ dpkg_runbuild() {
--chroot-setup-commands="ln -sf ${ext_deb_dir}/*.deb -t ${deb_dir}/" \
--chroot-setup-commands="apt-get update -o Dir::Etc::SourceList=\"sources.list.d/isar-apt.list\" -o Dir::Etc::SourceParts=\"-\" -o APT::Get::List-Cleanup=\"0\"" \
--finished-build-commands="rm -f ${deb_dir}/sbuild-build-depends-main-dummy_*.deb" \
- --finished-build-commands="[ -z "$(find ${deb_dir} -maxdepth 1 -name '*.deb' -print -quit)" ] || cp ${CP_FLAGS} ${deb_dir}/*.deb -t ${ext_deb_dir}/" \
+ --finished-build-commands="[ -z \"\$(find ${deb_dir} -maxdepth 1 -name '*.deb' -print -quit)\" ] || cp ${CP_FLAGS} ${deb_dir}/*.deb -t ${ext_deb_dir}/" \
--finished-build-commands="cp /var/log/dpkg.log ${ext_root}/dpkg_partial.log" \
--debbuildopts="--source-option=-I" \
--build-dir=${WORKDIR} --dist="isar" ${DSC_FILE}
--
2.35.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dpkg: Prevent early expansion of shell command
2024-01-02 7:56 [PATCH] dpkg: Prevent early expansion of shell command Jan Kiszka
@ 2024-01-12 6:15 ` Uladzimir Bely
0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2024-01-12 6:15 UTC (permalink / raw)
To: Jan Kiszka, isar-users
On Tue, 2024-01-02 at 08:56 +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> So far, the 'find' command in the sub-shell is already executed
> before
> the sbuild call, rather than after it. Fix this by escaping the $ as
> well as the quotes.
>
> Reported-by: Uladzimir Bely <ubely@ilbers.de>
> Fixes: b382dbf434d9 ("dpkg: Account for empty local apt cache after
> package build")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> meta/classes/dpkg.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to next, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-12 6:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-02 7:56 [PATCH] dpkg: Prevent early expansion of shell command Jan Kiszka
2024-01-12 6:15 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox