From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9FF8EC5478C for ; Fri, 1 Mar 2024 18:23:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 121E541CAD; Fri, 1 Mar 2024 18:23:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6CknAL9cIyE8; Fri, 1 Mar 2024 18:23:54 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org C689041CA6 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id C689041CA6; Fri, 1 Mar 2024 18:23:54 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 6D1741BF354 for ; Fri, 1 Mar 2024 18:23:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8FE9941CA6 for ; Fri, 1 Mar 2024 18:23:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lNH0atGMJ3lM for ; Fri, 1 Mar 2024 18:23:51 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=217.70.183.196; helo=relay4-d.mail.gandi.net; envelope-from=peter@korsgaard.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 54B0E400D0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 54B0E400D0 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by smtp2.osuosl.org (Postfix) with ESMTPS id 54B0E400D0 for ; Fri, 1 Mar 2024 18:23:50 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id E44C9E0005; Fri, 1 Mar 2024 18:23:47 +0000 (UTC) Received: from peko by dell.be.48ers.dk with local (Exim 4.96) (envelope-from ) id 1rg7Xv-0071Ck-0h; Fri, 01 Mar 2024 19:23:47 +0100 From: Peter Korsgaard To: Romain Naour References: <20240225225728.2949216-1-romain.naour@smile.fr> Date: Fri, 01 Mar 2024 19:23:47 +0100 In-Reply-To: <20240225225728.2949216-1-romain.naour@smile.fr> (Romain Naour's message of "Sun, 25 Feb 2024 23:57:28 +0100") Message-ID: <87plwd7qvg.fsf@48ers.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-GND-Sasl: peter@korsgaard.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=none (p=none dis=none) header.from=korsgaard.com Subject: Re: [Buildroot] [PATCH] package/dracut: fix dracut_wrapper X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thierry Bultel , buildroot@buildroot.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" >>>>> "Romain" == Romain Naour writes: > As reported by Thierry Bultel [1], dracut doesn't work since the > version bump to version 059. > Further investigation by Andreas Naumann [2] reported that the issue > come from this commit d010fa0 refactor(dracut-install): fork() instead > of popen(), sanitise line reading [3]. > The issue come from our dracut_wrapper and how DRACUT_LDD is defined. > Indeed dracut expect DRACUT_LDD=ldd or a single binary (without > arguments) but we are using "prelink-rtld --root='${sysroot}'". > With the change introduced by [3], our DRACUT_LDD is used > directly by execlp() leading to an error: > execlp(ldd, ldd, fullsrcpath, (char *)NULL); > Use mktemp to generate a temporary dracut-ldd script using > prelink-rtld --root='${sysroot}' ${1} > execute dracut.real in a subshell to cleanup the temporary file > at the end of the dracut wrapper script. > Fixes: > https://gitlab.com/buildroot.org/buildroot/-/jobs/6224243423 [tests.fs.test_cpio.TestCpioDracutGlibcMergedUsr] > https://gitlab.com/buildroot.org/buildroot/-/jobs/6224243434 [tests.fs.test_cpio.TestCpioDracutMuslMergedUsr] > https://gitlab.com/buildroot.org/buildroot/-/jobs/6224243567 [tests.fs.test_cpio.TestCpioDracutUclibcMergedUsr] > https://gitlab.com/buildroot.org/buildroot/-/jobs/6224243559 [tests.fs.test_cpio.TestCpioDracutGlibc] > https://gitlab.com/buildroot.org/buildroot/-/jobs/6224243504 [tests.fs.test_cpio.TestCpioDracutUclibc] > https://gitlab.com/buildroot.org/buildroot/-/jobs/6224243498 [tests.fs.test_cpio.TestCpioDracutMusl] > [1] http://lists.busybox.net/pipermail/buildroot/2024-February/684145.html > [2] http://lists.busybox.net/pipermail/buildroot/2024-February/684503.html > [3] https://github.com/dracutdevs/dracut/commit/d010fa0d7f8ef42ad31729d027d2e4be6dd6e588 > Fixes: 145f01ded5 ("package/dracut: bump to version 059") > Reported-by: Thierry Bultel > Signed-off-by: Romain Naour > --- > package/dracut/dracut_wrapper | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > diff --git a/package/dracut/dracut_wrapper b/package/dracut/dracut_wrapper > index 0464db17fe..889322d1c6 100644 > --- a/package/dracut/dracut_wrapper > +++ b/package/dracut/dracut_wrapper > @@ -31,8 +31,18 @@ if [ -z "${sysroot}" ]; then > fi > topdir="$(dirname "$(realpath "$(dirname "${0}")")")" > -export DRACUT_LDD="${topdir}/sbin/prelink-rtld --root='${sysroot}'" > +DRACUT_LDD="$(mktemp /tmp/dracut-ldd.XXXXXX)" > +cat >"${DRACUT_LDD}" < +#!/bin/bash > +${topdir}/sbin/prelink-rtld --root='${sysroot}' \${1} > +EOL > +chmod +x ${DRACUT_LDD} Here shellcheck complains: In package/dracut/dracut_wrapper line 39: chmod +x ${DRACUT_LDD} ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. So I've quoted it and committed, thanks. -- Bye, Peter Korsgaard _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot