public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: [PATCH] Remove incorrect special handling of /usr/libexec
Date: Mon, 26 Aug 2024 09:55:47 +0200	[thread overview]
Message-ID: <20240826095547.43a050fd@elisabeth> (raw)
In-Reply-To: <20240826063901.590640-1-david@gibson.dropbear.id.au>

On Mon, 26 Aug 2024 16:39:01 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:

> 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].

I don't remember where I took that meaning of /usr/libexec from, I
guess it's from some outdated packaging guidelines (Fedora? Kata
Containers?). Sure, it makes sense to fix that.

> 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.

So, this change breaks the two cases I needed to cover with this, which
are /usr/libexec/kata-agent in general, and /usr/libexec/qemu-kvm on
RHEL 9.

What does it fix?

> [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}"
>  

-- 
Stefano


  reply	other threads:[~2024-08-26  7:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26  6:39 [PATCH] Remove incorrect special handling of /usr/libexec David Gibson
2024-08-26  7:55 ` Stefano Brivio [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240826095547.43a050fd@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).