public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] Remove incorrect special handling of /usr/libexec
@ 2024-08-26  6:39 David Gibson
  2024-08-26  7:55 ` Stefano Brivio
  0 siblings, 1 reply; 7+ messages in thread
From: David Gibson @ 2024-08-26  6:39 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: passt-dev, David Gibson

The statement in the comment about /usr/libexec being only for running on
other hosts simply isn't true, neither in practice nor according to the
FHS spec[0].  Furthermore this logic didn't even handle it correctly, since
it would only handle binaries _directly_ in /usr/libexec, not those in
(explicitly FHS permitted) subdirectories under /usr/libexec.

[0] https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 mbuto | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/mbuto b/mbuto
index a2a8147..5e8ea9c 100755
--- a/mbuto
+++ b/mbuto
@@ -752,14 +752,6 @@ prog_add() {
 	unset IFS
 	[ -z "${__bin}" ] && err "Can't source ${1}"
 
-	# Binaries in /usr/libexec are meant to run on other hosts only, so they
-	# can't reside in /usr/libexec on the target image. Move to /usr/bin.
-	if [ "$("${DIRNAME}" "${__bin}")" = "/usr/libexec" ]; then
-		__bindir="${wd}/usr/bin"
-	else
-		__bindir="${wd}$("${DIRNAME}" "${__bin}")"
-	fi
-
 	"${MKDIR}" -p "${__bindir}"
 	"${CP}" --preserve=all "${__bin}" "${__bindir}"
 
-- 
@@ -752,14 +752,6 @@ prog_add() {
 	unset IFS
 	[ -z "${__bin}" ] && err "Can't source ${1}"
 
-	# Binaries in /usr/libexec are meant to run on other hosts only, so they
-	# can't reside in /usr/libexec on the target image. Move to /usr/bin.
-	if [ "$("${DIRNAME}" "${__bin}")" = "/usr/libexec" ]; then
-		__bindir="${wd}/usr/bin"
-	else
-		__bindir="${wd}$("${DIRNAME}" "${__bin}")"
-	fi
-
 	"${MKDIR}" -p "${__bindir}"
 	"${CP}" --preserve=all "${__bin}" "${__bindir}"
 
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-08-26  9:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-26  6:39 [PATCH] Remove incorrect special handling of /usr/libexec David Gibson
2024-08-26  7:55 ` Stefano Brivio
2024-08-26  8:20   ` David Gibson
2024-08-26  8:37     ` Stefano Brivio
2024-08-26  8:47       ` David Gibson
2024-08-26  8:57         ` Stefano Brivio
2024-08-26  9:43           ` David Gibson

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).