From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 972951FF136 for ; Mon, 04 May 2026 15:08:10 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 063EF21B0B; Mon, 4 May 2026 15:08:07 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server 1/3] d/tmpfiles: add configuration to auto-create /run/qemu-server directory Date: Mon, 4 May 2026 15:03:46 +0200 Message-ID: <20260504130751.226845-2-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260504130751.226845-1-f.ebner@proxmox.com> References: <20260504130751.226845-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1777899977781 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.009 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: CX2KIXJ7FBDDP63RCCHIQ22Q6QBDJLLE X-Message-ID-Hash: CX2KIXJ7FBDDP63RCCHIQ22Q6QBDJLLE X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Some code paths use /run/qemu-server, some code paths use /var/run/qemu-server. Nothing currently ensures that the former directory exists, but usually, /var/run is a symlink to /run, so it does work in practice. The latter directory is created in the Helpers.pm module. Usage of these paths should be aligned for the next major release. If /var/run is a symlink to /run like usual, then this change makes the permissions tighter, because the directory /var/run/qemu-server was created with 0755 permissions by the Helpers.pm module and is now created via the tmpfiles configuration. The permissions chosen are 0750 with user root and group www-data. This is in line with what /run/pve-cluster and /run/pve have. Signed-off-by: Fiona Ebner --- debian/tmpfiles | 2 ++ src/PVE/QemuServer/Helpers.pm | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 debian/tmpfiles diff --git a/debian/tmpfiles b/debian/tmpfiles new file mode 100644 index 00000000..3bbe100c --- /dev/null +++ b/debian/tmpfiles @@ -0,0 +1,2 @@ +#Type Path Mode User Group Age Argument +d /run/qemu-server 0750 root www-data - - diff --git a/src/PVE/QemuServer/Helpers.pm b/src/PVE/QemuServer/Helpers.pm index 65f4ce5f..dd17eef5 100644 --- a/src/PVE/QemuServer/Helpers.pm +++ b/src/PVE/QemuServer/Helpers.pm @@ -81,6 +81,8 @@ sub kvm_user_version { # Paths and directories +# FIXME: MAJOR VERSION: use /run/qemu-server everywhere instead of mixing /run and /var/run and rely +# on debian/tmpfiles config to create the directory. our $var_run_tmpdir = "/var/run/qemu-server"; mkdir $var_run_tmpdir; -- 2.47.3