From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=lgut.eu Authentication-Results: passt.top; dkim=pass (2048-bit key; unprotected) header.d=lgut-eu.20230601.gappssmtp.com header.i=@lgut-eu.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=1fFLAL6W; dkim-atps=neutral Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by passt.top (Postfix) with ESMTPS id 947B95A004E for ; Wed, 18 Sep 2024 12:17:04 +0200 (CEST) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-42cb58d810eso3748005e9.0 for ; Wed, 18 Sep 2024 03:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lgut-eu.20230601.gappssmtp.com; s=20230601; t=1726654624; x=1727259424; darn=passt.top; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YL7RXw1dkii+gSWg3B9fmGcT4Q19rMpn8bWxV/7nm/8=; b=1fFLAL6WUrUE2H/I7loeaJvAdCWlHBoHReDjiAU72Nx+73WIPOHHi+rb7yDyE/vPl3 LWaBi6aLsDzNxn4FczKdbrbeIeCVaABW5B7DWA/TRDmTLWje1/fUSdpZNkeamZptZ/Ur eyB9ZuQxRtZ3fPqolMHpvniyOoxPl5L6m7TStNQREV02yXZ9oyhJY4vXXQfb+jEsNP4a ZTzcKQllgLFZl/JaSAFrSyyR4I6A5bYcmgimEXrKKBPFrpP0iAcx5+NfeE6HvNTJgihj mYHer0m5XWhlg4qoFOxriUz7ffPn3YrC31JCBsp7v6gziP0QKmZvQW17sNd1JzQcxF4L P32A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726654624; x=1727259424; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YL7RXw1dkii+gSWg3B9fmGcT4Q19rMpn8bWxV/7nm/8=; b=gBv0Lnli8u4qeAa1vIm+n7Zz5EGPYwU1sRSTwt0HHutriQalZ+C5EDP8lSvxKQEzND Ea2s3/j3di09Hn6tEtH98TlqQOpSx+6wstDQkEENKuYxPnN0nFppZHi92KYODU7mhuGC AckNQKbL+wBKdndxoYPqsO8+pBRHle4U42fwlyHehWrr3QmgCJYa4fmZP+P5ofgeWYEf BgJgJw/zFyNxyrxqNIeuTuG4ZUt/PyMrXRZyEfWnHism8x3JnFJ40IIBMBD31jgfGVft 6QyWG1kx87KGu0Hx366jMjS4Hh5AAcisbO/8Jv13LUQeSPu3B0HeV50WzvtDEddO4Yea EpJA== X-Forwarded-Encrypted: i=1; AJvYcCVHu74F2eEf6aC1Qky4gep0qxdwWAyelNOIBZVEXuyzJ2mhZx+h2NcOnxJVw8YEkCMxsmziNkU8pTM=@passt.top X-Gm-Message-State: AOJu0Yx3IaL00NTg6IY1ELcMAgedhOVlLsUhH5l/Wx1V+4GIx+X29Iye q6GdfO25idRfszlrcO7DnSoqPja42H7UmC6ate4NHaZJxf0x9CmY3fu/NDCC7fg= X-Google-Smtp-Source: AGHT+IFTKKaZiQblaC+Rg1c5kvJvYB7D+5X5xV6lbxss25hf/SAZCrreDic472wQCjQdEepBJFDfUA== X-Received: by 2002:a5d:4107:0:b0:378:8b56:4665 with SMTP id ffacd0b85a97d-378c27f952emr13526625f8f.24.1726654623939; Wed, 18 Sep 2024 03:17:03 -0700 (PDT) Received: from localhost.localdomain (ip-046-005-002-171.um12.pools.vodafone-ip.de. [46.5.2.171]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378e73f99a4sm11863660f8f.57.2024.09.18.03.17.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2024 03:17:03 -0700 (PDT) From: Lukasz Gut To: sbrivio@redhat.com Subject: [PATCH v2 2/4] mbuto: Use realpath to copy ld Date: Wed, 18 Sep 2024 12:12:57 +0200 Message-ID: <20240918101532.85299-4-lgut@lgut.eu> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240918101532.85299-1-lgut@lgut.eu> References: <20240918101532.85299-1-lgut@lgut.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 7HF3FTNZDG7WXE3YYKUNPYHFZZWE4JDI X-Message-ID-Hash: 7HF3FTNZDG7WXE3YYKUNPYHFZZWE4JDI X-MailFrom: lgut@lgut.eu 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: sevinj.aghayeva@gmail.com, passt-dev@passt.top, Lukasz Gut 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: 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. Signed-off-by: Lukasz Gut --- mbuto | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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="$("${REALPATH}" "${1}")" + __destfile="${wd}""${__srcfile}" + [ -f "${__destfile}" ] && return - __destdir="$("${DIRNAME}" "${wd}/${1}")" + __destdir="$("${DIRNAME}" "${__destfile}")" "${MKDIR}" -p "${__destdir}" - - "${CP}" --parents --preserve=all "${1}" "${wd}" + "${CP}" --parents --preserve=all "${__srcfile}" "${wd}" } # libs_dlopen_copy() - Recursively copy matching libraries from LIBS_DLOPEN -- 2.46.1