From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202408 header.b=KmNuTCsB; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 81BB25A0275 for ; Mon, 23 Sep 2024 05:54:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202408; t=1727063686; bh=xPOKHyV1VowS302jh+FeLwWaL3h33mZjJTf0ObJbOXI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KmNuTCsBBZPMqSDnwp8QywQu3swPJfY7RGftDAS8awGBbln+aigOn0e9lmpfZfykf RipeolVUd+W0FoOYivD2FVlKUB5V7DgD3/huqwj3isI1Pd3n1zs5lQdqsgXfPHglPj fANMKAugxBhs2/gjWK+lozabI7b0eFNPi2ucnaCZSuVZWDPNgVkCy1VF10p4WAIwZl rR9MeenkekZsZr3O2YvDc8OPVU+3cTtvZUAuNiFvcuMM5KeKmVup0ANWOr85Yc9C63 FybruNEdJo6zp9SyGaus4wzChl6LLIruSQ+zyy9GsnHRnLOyuDgi5B6+lOwZMEzckN 4XNPg/EOEdVXw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XBpzB4DHSz4x42; Mon, 23 Sep 2024 13:54:46 +1000 (AEST) Date: Mon, 23 Sep 2024 13:53:02 +1000 From: David Gibson To: Lukasz Gut Subject: Re: [PATCH v2 2/4] mbuto: Use realpath to copy ld Message-ID: References: <20240918101532.85299-1-lgut@lgut.eu> <20240918101532.85299-4-lgut@lgut.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="QghpQSimQ3bfLZ1M" Content-Disposition: inline In-Reply-To: <20240918101532.85299-4-lgut@lgut.eu> Message-ID-Hash: RM4FBJQYIM6HOKVQZ7PKD36GJRMN7KL4 X-Message-ID-Hash: RM4FBJQYIM6HOKVQZ7PKD36GJRMN7KL4 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: sbrivio@redhat.com, sevinj.aghayeva@gmail.com, passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --QghpQSimQ3bfLZ1M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 18, 2024 at 12:12:57PM +0200, Lukasz Gut wrote: > Place ld in exact physical location as on host, not being confused by > links. Use realpath, that was already on the list of default PROGS. It's not clear to me why this change is necessary. >=20 > Signed-off-by: Lukasz Gut > --- > mbuto | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) >=20 > diff --git a/mbuto b/mbuto > index 1c3b347..1f92bd9 100755 > --- a/mbuto > +++ b/mbuto > @@ -644,12 +644,13 @@ libs_path_add() { > # libs_copy_ld_so() - Copy run-time linker program, mimic location from = host > # $1: Path to run-time linker > libs_copy_ld_so() { > - [ -f "${wd}/${1}" ] && return > + __srcfile=3D"$("${REALPATH}" "${1}")" > + __destfile=3D"${wd}""${__srcfile}" > + [ -f "${__destfile}" ] && return > =20 > - __destdir=3D"$("${DIRNAME}" "${wd}/${1}")" > + __destdir=3D"$("${DIRNAME}" "${__destfile}")" > "${MKDIR}" -p "${__destdir}" > - > - "${CP}" --parents --preserve=3Dall "${1}" "${wd}" > + "${CP}" --parents --preserve=3Dall "${__srcfile}" "${wd}" > } > =20 > # libs_dlopen_copy() - Recursively copy matching libraries from LIBS_DLO= PEN --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --QghpQSimQ3bfLZ1M Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmbw5h4ACgkQzQJF27ox 2GdqRQ//S8lLU6Ky21J9/Ph4O0D0SYahZXF3lCiSG1EaY+luuuIwwQq5JkzvaPAu XknaqflQ/4JCAQw/YKizJKjOmFX9Py1x8+hS2jKV7Iqbi8lTzfNLn1YvzhYzZnPw kWXDQPwIcBOqFGkVFKdvnuEW+PfOKxqdv4NU7VPXjaHOzoOBEzLaocV0ym1LZu/U 0smL20soO1gkJ2SHzJiflV5LG8K4O14DBNj1bDy2o1QOZBFCgxn7DpE4qiuZoTZu rlaXyqN3VAizxDh2fm91NXPiiBwFwsuh1NydeSm/maI5s6wp5mEKt5KB3n6h5Fbh o8Z/VbpH1bNoPXkY7fbgUJi7AiUg4gntMmh+ecZ1+yibIp5QHmkgO4m4oFq3TuDa 7JBl65TgQvhQmvSrOxu+Mqd8HpKAFgQGu6UfwxvOKD/pYVq/HGTpxI4w6jVk/DyY bQy+uWBXNyJ4uqljodAN1W41H4iVNrZP1sAmziLf2rYjPdOum0LjEgBzFTThZTJZ N4yPipBJ9GPizu4U76g0un+sjEdgMgHSq9OZDNZTwBuF4am4nt3EXNKEBxRL5fM5 OnQodPu4qbwIIcKQKkJJISzmxaIAWWM5+SmJj4lzXLFaBnVcPzIk1Gjt2SLcNAdk UWhWDzdraNrCCzJhmJnxlkZkO9PIVLVNvfSraE6Is90QktcpETE= =7VtX -----END PGP SIGNATURE----- --QghpQSimQ3bfLZ1M--