From: Akihiko Odaki <akihiko.odaki@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: get_relocated_path: the configured paths are not looked for?
Date: Mon, 24 Apr 2023 02:39:40 +0900 [thread overview]
Message-ID: <c5568089-d8e4-36da-4a77-92ccc350f003@gmail.com> (raw)
In-Reply-To: <bccc8256-30f9-95e4-68a2-793ba4bceb0a@msgid.tls.msk.ru>
On 2023/04/23 22:22, Michael Tokarev wrote:
> 23.04.2023 14:47, Akihiko Odaki пишет:
>
> https://salsa.debian.org/qemu-team/qemu/-/commit/e017f53a8550d0bcaaca81c6dacac8ec34295cf0
> fwiw.
I seriously think you better consult GCC and other package maintainers
to have consensus on handling this kind of scenario. Otherwise you don't
get the behavior you expect from other packages.
>
>> Also, that works only if the version changed. For example, consider
>> the case where you patched a module downstream. To compare the
>> behaviors of the patched and unpatched ones, you'll need to copy the
>> modules somewhere else.
>>
>> Let's focus on modules in this discussion. There should be no problem
>> with data files here. You can pick data files from a different QEMU
>> version and it should just work fine. And even if it unfortunately
>> does not work, you can still use -L option to fix it.
>>
>> That's not the case for modules. Modules are coupled with the
>> executable so you need to copy them along with the executable and the
>> executable should be able to find them.
>
> The modules case is actually trivial. For this one, we have
> $QEMU_MODULE_DIR which, if set, will be searched first.
>
> There's no need to make tricks and turn --libdir or --datadir
> specified at configure time as absolute paths, into something
> entirely unpredictable.
>
> /mjt
It is more preferable to use modules which are bundled with the
executable by default since they are coupled with the executable and you
should never want to use alternative modules unless you are debugging
QEMU. The current logic can reliably find the modules if either relative
paths or absolute paths of the executable and modules are preserved.
That said, it's very reasonable to specify absolute paths to --libdir
when you want to relocate only the executable (e.g. moving
bin/qemu-system-i386 into libexec/xen/qemu-system-i386) but keep other
files in the configured path, and the current QEMU build scripts do not
allow that. If you explain a convincing reason for doing that, I think
there is a good chance to get a patch to cover such a case merged.
But of course that is something a maintainer decides and I'm not
responsible here. util/cutils.c has no maintainer listed and the last
change made for get_relocated_path() was merged by Paolo Bonzini. He is
also a maintainer of the build infrastructure.
Regards,
Akihiko Odaki
next prev parent reply other threads:[~2023-04-23 17:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-19 7:32 get_relocated_path: the configured paths are not looked for? Michael Tokarev
2023-04-20 5:29 ` Akihiko Odaki
2023-04-23 10:28 ` Michael Tokarev
2023-04-23 11:22 ` Akihiko Odaki
2023-04-23 11:31 ` Michael Tokarev
2023-04-23 11:47 ` Akihiko Odaki
2023-04-23 13:22 ` Michael Tokarev
2023-04-23 17:39 ` Akihiko Odaki [this message]
2023-04-23 18:10 ` Michael Tokarev
2023-04-23 18:24 ` Akihiko Odaki
2023-04-23 18:33 ` Michael Tokarev
2023-04-23 18:37 ` Michael Tokarev
2023-04-23 18:39 ` Akihiko Odaki
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=c5568089-d8e4-36da-4a77-92ccc350f003@gmail.com \
--to=akihiko.odaki@gmail.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).