qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, Michael Tokarev <mjt@tls.msk.ru>
Subject: Re: [PATCH 03/17] meson, cutils: allow non-relocatable installs
Date: Mon, 16 Oct 2023 23:29:56 +0200	[thread overview]
Message-ID: <CABgObfZqosmqTG=OY4u6RY3u8jShid3ML_7qhWEW+wnwuPVLMQ@mail.gmail.com> (raw)
In-Reply-To: <87edhuixx5.fsf@pond.sub.org>

On Mon, Oct 16, 2023 at 1:55 PM Markus Armbruster <armbru@redhat.com> wrote:
> Out of curiosity: what's a non-relocatable install, and why should I
> care?

In a relocatable install if you move qemu-system-x86_64 from /usr/bin
to /home/armbru/bin, it will start looking for firmware in
/home/armbru/share/qemu.

In a non-relocatable install, it will keep looking for firmware in
/usr/share/qemu.

Whether that's something desirable or not... it depends.

On POSIX systems you almost never notice. Non-relocatability can help
if you want to do experiments with old firmware and new QEMU or vice
versa (because you can just upgrade/downgrade the firmware package,
and use rpm2cpio to extract the QEMU binaries outside /usr).

On the other hand Windows almost always wants relocatable installs,
which is why the whole idea was introduced in QEMU in fact. Newfangled
distribution mechanisms such as AppImage
(https://docs.appimage.org/reference/best-practices.html) and I think
NixOS (which installs each package in its own prefix, so you can
install multiple versions and switch at will the one that is symlinked
to /usr) also dislike using at runtime the absolute paths that were
established at build time.

Finally, the same code that handles relocation also lets you run QEMU
from the build tree and pick e.g. firmware files from the source tree
transparently. Even with this patch, that part of the code remains
active even if you configure with --disable-relocatable.

IOW: you probably have relied on the code, but if you have never
noticed in the past 3 years, it means that you probably need not care.

Paolo



  reply	other threads:[~2023-10-16 21:30 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16  6:31 [PATCH 00/17] More build system cleanups, optional non-relocatable installs Paolo Bonzini
2023-10-16  6:31 ` [PATCH 01/17] meson: do not build shaders by default Paolo Bonzini
2023-10-16  9:04   ` Manos Pitsidianakis
2023-10-16  6:31 ` [PATCH 02/17] meson: do not use set10 Paolo Bonzini
2023-10-19  0:06   ` Richard Henderson
2023-10-16  6:31 ` [PATCH 03/17] meson, cutils: allow non-relocatable installs Paolo Bonzini
2023-10-16  7:12   ` Markus Armbruster
2023-10-16 21:29     ` Paolo Bonzini [this message]
2023-10-17  5:46       ` Markus Armbruster
2023-10-16  9:08   ` Manos Pitsidianakis
2023-10-16  9:48     ` Paolo Bonzini
2023-10-16  6:31 ` [PATCH 04/17] configure: clean up handling of CFI option Paolo Bonzini
2023-10-16  9:22   ` Philippe Mathieu-Daudé
2023-10-16  9:44     ` Paolo Bonzini
2023-10-16 13:33       ` Philippe Mathieu-Daudé
2023-10-16  6:31 ` [PATCH 05/17] hw/xen: cleanup sourcesets Paolo Bonzini
2023-10-16  6:31 ` [PATCH 06/17] hw/remote: move stub vfu_object_set_bus_irq out of stubs/ Paolo Bonzini
2023-10-16  6:31 ` [PATCH 07/17] tests/tcg/arm: move non-SVE tests out of conditional Paolo Bonzini
2023-10-16  6:31 ` [PATCH 08/17] configure, tests/tcg: simplify GDB conditionals Paolo Bonzini
2023-10-16  9:12   ` Manos Pitsidianakis
2023-10-16  6:31 ` [PATCH 09/17] configure: clean up plugin option handling Paolo Bonzini
2023-10-16  6:31 ` [PATCH 10/17] configure: clean up PIE " Paolo Bonzini
2023-10-16  6:31 ` [PATCH 11/17] configure: remove some dead cruft Paolo Bonzini
2023-10-16  9:32   ` Thomas Huth
2023-10-16  6:31 ` [PATCH 12/17] configure: move target-specific defaults to an external machine file Paolo Bonzini
2023-10-16  6:31 ` [PATCH 13/17] configure: move environment-specific defaults to config-meson.cross Paolo Bonzini
2023-10-16  6:31 ` [PATCH 14/17] configure: unify handling of several Debian cross containers Paolo Bonzini
2023-10-16  6:31 ` [PATCH 15/17] configure, meson: use command line options to configure qemu-ga Paolo Bonzini
2023-10-16  6:31 ` [PATCH 16/17] meson-buildoptions: document the data at the top Paolo Bonzini
2023-10-16  6:31 ` [PATCH 17/17] meson: add a note on why we use config_host for program paths Paolo Bonzini

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='CABgObfZqosmqTG=OY4u6RY3u8jShid3ML_7qhWEW+wnwuPVLMQ@mail.gmail.com' \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    /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.
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 NNTP newsgroup(s).