Make QEMU installation relocatable
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest13 patches 22 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | fuzz: use qemu_get_exec_dirtests/ | +2 | 2 replies | |
| 2/13 | oslib: do not call g_strdup from qemu_get_exec_dirinclude/ os-posix.c os-win32.c +4 more | +20 | 1 reply | |
| 3/13 | oslib-posix: default exec_dir to bindirmeson.build util/ util/ | +11 | 2 replies | |
| 4/13 | cutils: introduce get_relocated_pathinclude/ meson.build util/ | +75 | 0 replies | |
| 5/13 | oslib-posix: relocate path to /varutil/ | +4 | 1 reply | |
| 6/13 | module: relocate path to modulesutil/ | +2 | 0 replies | |
| 7/13 | net: relocate paths to helpers and scriptsinclude/ net/ | +23 | 2 replies | |
| 8/13 | vl: relocate paths to data directoriesinclude/ include/ os-posix.c +3 more | +32 | 3 replies | |
| 9/13 | vl: relocate path to configuration filesoftmmu/ | +2 | 1 reply | |
| 10/13 | qemu-bridge-helper: relocate path to default ACLqemu-bridge-helper.c | +7 | 0 replies | |
| 11/13 | qga: relocate path to default configuration and hookqga/ | +5 | 0 replies | |
| 12/13 | ui: relocate paths to icons and translationsui/ ui/ | +15 | 1 reply | |
| 13/13 | configure: use a platform-neutral prefixconfigure | +11 | 0 replies |
Reviews trailers per patch
7 of 13 patches have a Reviewed-by or Acked-by.
| Patch | Thomas Huth | Alexander Bulekov | Philippe Mathieu-Daudé |
|---|---|---|---|
| 1/13 | R-b | R-b | |
| 2/13 | R-b | ||
| 3/13 | |||
| 4/13 | |||
| 5/13 | R-b | ||
| 6/13 | |||
| 7/13 | R-b | ||
| 8/13 | R-b | ||
| 9/13 | R-b | ||
| 10/13 | |||
| 11/13 | |||
| 12/13 | R-b | ||
| 13/13 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 00/13] Make QEMU installation relocatable
Right now, the installation of QEMU is not relocatable; there is a local hack in os_find_datadir() so that Windows binaries look for ROMs in the executable directory, but that has several limitations:
- it does not extend to configuration files, icons, etc.
- it does not allow changing the data directory in any way
- it does not apply to POSIX platforms
This series fixes that by making all paths within the installation prefix relative to the executable. This in practice means all paths will be relocatable, except for /etc and /var if they're moved outside the prefix.
Here is an example of relocatability; before:
$ make DESTDIR=$PWD/test install $ cd test/usr/local/bin $ ./qemu-system-ppc -L help /usr/local/share/qemu-firmware /usr/local/share/qemu
After:
$ make DESTDIR=$PWD/test install $ cd test/usr/local/bin $ ./qemu-system-ppc -L help /home/pbonzini/work/upstream/qemu/+build/test/usr/local/bin/../share/qemu-firmware /home/pbonzini/work/upstream/qemu/+build/test/usr/local/bin/../share/qemu
The main benefit of this is on Windows, as mentioned above; but it also makes behavior more consistent across platforms and allows the removal of the hack that hides the "c:/Program Files/QEMU" prefix from Meson during cross compilation.
Paolo
Paolo Bonzini (13):
fuzz: use qemu_get_exec_dir
oslib: do not call g_strdup from qemu_get_exec_dir
oslib-posix: default exec_dir to bindir
cutils: introduce get_relocated_path
oslib-posix: relocate path to /var
module: relocate path to modules
net: relocate paths to helpers and scripts
vl: relocate paths to data directories
vl: relocate path to configuration file
qemu-bridge-helper: relocate path to default ACL
qga: relocate path to default configuration and hook
ui: relocate paths to icons and translations
configure: use a platform-neutral prefix
configure | 30 ++++++++------------ include/net/net.h | 4 +-- include/qemu-common.h | 1 - include/qemu/cutils.h | 12 ++++++++ include/qemu/osdep.h | 8 ++---- include/sysemu/sysemu.h | 2 +- meson.build | 4 +-- net/tap.c | 28 ++++++++++++++----- os-posix.c | 24 ---------------- os-win32.c | 11 -------- qemu-bridge-helper.c | 9 ++++-- qga/main.c | 8 ++++-- softmmu/vl.c | 43 ++++++++++++++++++++--------- tests/qtest/fuzz/fuzz.c | 12 ++++---- ui/gtk.c | 10 +++++-- ui/sdl2.c | 9 ++++-- util/cutils.c | 61 +++++++++++++++++++++++++++++++++++++++++ util/module.c | 10 ++----- util/oslib-posix.c | 35 +++++++++++------------ util/oslib-win32.c | 14 +++++++--- 20 files changed, 205 insertions(+), 130 deletions(-)
Signature · 1 line
2.26.2