From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Maximiliano Sandoval <m.sandoval@proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu 1/2] vm-network-scripts: move scripts to /usr/libexec
Date: Thu, 24 Oct 2024 13:32:37 +0200 [thread overview]
Message-ID: <f678525a-b116-4783-a071-6cf596920633@proxmox.com> (raw)
In-Reply-To: <20241009125600.240441-1-m.sandoval@proxmox.com>
It's the "qemu-server" repository, not "qemu".
Am 09.10.24 um 14:55 schrieb Maximiliano Sandoval:
> Moves the network scripts from /var/lib/qemu-server into
> /usr/libexec/qemu-server.
>
> /usr/libexec is described as binaries run by programs which are not
> intended to be directly executed by the user on [FHS 4.7]. On the other
> hand /var/lib corresponds to variable state information, which does not
> fit the use case here, see [FHS 5.8].
>
> [FHS 4.7]: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html
> [FHS 5.8]: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s08.html
>
Can this cause issues for a brief time during upgrade/unpacking, i.e.
A) if the old QemuServer.pm is still loaded while the scripts get
removed from its old location (or to be more precise, a QEMU process
with the old parameter is started at that time)
B) if the new QemuServer.pm gets loaded before the scripts are extracted
to their new location (or to be more precise, a QEMU process with the
new parameter is started at that time)
?
Is there something preventing those from happening? Otherwise, we might
need to ship the scripts to both locations until the next major release
and drop them from the old location only then.
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> PVE/QemuServer.pm | 4 ++--
> vm-network-scripts/Makefile | 10 +++++-----
> vm-network-scripts/pve-bridge-hotplug | 2 +-
> 3 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index b26da505..88100638 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -1759,8 +1759,8 @@ sub print_netdev_full {
> my $script = $hotplug ? "pve-bridge-hotplug" : "pve-bridge";
>
> if ($net->{bridge}) {
> - $netdev = "type=tap,id=$netid,ifname=${ifname},script=/var/lib/qemu-server/$script"
> - .",downscript=/var/lib/qemu-server/pve-bridgedown$vhostparam";
> + $netdev = "type=tap,id=$netid,ifname=${ifname},script=/usr/libexec/qemu-server/$script"
> + .",downscript=/usr/libexec/qemu-server/pve-bridgedown$vhostparam";
> } else {
> $netdev = "type=user,id=$netid,hostname=$vmname";
> }
> diff --git a/vm-network-scripts/Makefile b/vm-network-scripts/Makefile
> index 5ba537d0..dc2c85ff 100644
> --- a/vm-network-scripts/Makefile
> +++ b/vm-network-scripts/Makefile
> @@ -1,12 +1,12 @@
> DESTDIR=
> -VARLIBDIR=$(DESTDIR)/var/lib/qemu-server
> +LIBEXECDIR=$(DESTDIR)/usr/libexec/qemu-server
>
> .PHONY: install
> install: pve-bridge pve-bridge-hotplug pve-bridgedown
> - install -d ${VARLIBDIR}
> - install -m 0755 pve-bridge ${VARLIBDIR}/pve-bridge
> - install -m 0755 pve-bridge-hotplug ${VARLIBDIR}/pve-bridge-hotplug
> - install -m 0755 pve-bridgedown ${VARLIBDIR}/pve-bridgedown
> + install -d ${LIBEXECDIR}
> + install -m 0755 pve-bridge ${LIBEXECDIR}/pve-bridge
> + install -m 0755 pve-bridge-hotplug ${LIBEXECDIR}/pve-bridge-hotplug
> + install -m 0755 pve-bridgedown ${LIBEXECDIR}/pve-bridgedown
>
> .PHONY: clean
> clean:
> diff --git a/vm-network-scripts/pve-bridge-hotplug b/vm-network-scripts/pve-bridge-hotplug
> index f36ed408..3ae01ea5 100755
> --- a/vm-network-scripts/pve-bridge-hotplug
> +++ b/vm-network-scripts/pve-bridge-hotplug
> @@ -1,3 +1,3 @@
> #!/bin/sh
>
> -exec /var/lib/qemu-server/pve-bridge --hotplug "$@"
> +exec /usr/libexec/qemu-server/pve-bridge --hotplug "$@"
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2024-10-24 11:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 12:55 Maximiliano Sandoval
2024-10-09 12:56 ` [pve-devel] [PATCH qemu 2/2] test: Adapt to changes in network scripts location Maximiliano Sandoval
2024-10-24 11:32 ` Fiona Ebner [this message]
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=f678525a-b116-4783-a071-6cf596920633@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=m.sandoval@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/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