From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id 1744D1FF162
	for <inbox@lore.proxmox.com>; Sat, 22 Mar 2025 16:26:11 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 71A313C013;
	Sat, 22 Mar 2025 16:26:05 +0100 (CET)
To: pve-devel@lists.proxmox.com
Date: Sun, 23 Mar 2025 00:17:12 +0900
In-Reply-To: <20250322152004.1646886-1-jing@jing.rocks>
References: <20250322152004.1646886-1-jing@jing.rocks>
MIME-Version: 1.0
Message-ID: <mailman.81.1742657164.359.pve-devel@lists.proxmox.com>
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Post: <mailto:pve-devel@lists.proxmox.com>
From: Jing Luo via pve-devel <pve-devel@lists.proxmox.com>
Precedence: list
Cc: Jing Luo <jing@jing.rocks>
X-Mailman-Version: 2.1.29
X-BeenThere: pve-devel@lists.proxmox.com
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
Subject: [pve-devel] [PATCH] rust-proxmox-backup: change /var/lock to
 /run/lock
Content-Type: multipart/mixed; boundary="===============7663378760164858289=="
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

--===============7663378760164858289==
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <jing@jing.rocks>
X-Original-To: pve-devel@lists.proxmox.com
Delivered-To: pve-devel@lists.proxmox.com
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by lists.proxmox.com (Postfix) with ESMTPS id 40124C93B2
	for <pve-devel@lists.proxmox.com>; Sat, 22 Mar 2025 16:26:03 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 263003BD57
	for <pve-devel@lists.proxmox.com>; Sat, 22 Mar 2025 16:25:33 +0100 (CET)
Received: from mail-gw3.jing.rocks (mail-gw3.jing.rocks [219.117.250.209])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by firstgate.proxmox.com (Proxmox) with ESMTPS
	for <pve-devel@lists.proxmox.com>; Sat, 22 Mar 2025 16:25:28 +0100 (CET)
Received: from mail-gw3.jing.rocks (localhost [127.0.0.1])
	by mail-gw3.jing.rocks (Proxmox) with ESMTP id C96E116410
	for <pve-devel@lists.proxmox.com>; Sun, 23 Mar 2025 00:20:18 +0900 (JST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jing.rocks; h=cc
	:cc:content-transfer-encoding:date:from:from:in-reply-to
	:message-id:mime-version:references:reply-to:subject:subject:to
	:to; s=mail-gw; bh=kMpAywT/YaAFOWZws4lchGSFqoc/ZSWefiGB0JI3rS0=; b=
	UhPA3EXVaKRYdmO7GpYNcAbNeM1Syc9wfOolfeL2pQiM8m1bvArGAd1oYTpjRYlQ
	A5uO7TJOX/n+SKtaqFkrIIasNwLJ88nsKcBXwpi9xSFUcqzbUm0oxzFNbIV64930
	LcEElikabmrDvhf2xR1CMB5JKVAdKUIQkH3BvJQRTjkuN/L/5LwG05/qmEdx/5m3
	PGnBKa8kBlHsBabel8okixwBXaWiFJGXhunkVks45SJsLTyz9tMy3LSneJwpMoUN
	MHRj2FQeoEFROGak7rBYNLqC9LL8TYihXqjZ3WtbjrfJw8gV61uzBzGUpGYJImQw
	+DCqDBgnJXddIrLZdHRw+Q==
Received: from mail.jing.rocks (mail.jing.rocks [192.168.0.222])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mail-gw3.jing.rocks (Proxmox) with ESMTPS id 48E41164E1
	for <pve-devel@lists.proxmox.com>; Sun, 23 Mar 2025 00:20:18 +0900 (JST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=jing.rocks;
	s=default; t=1742656818;
	bh=KHlslYyDBC/l918bYADTjUp89Ms3WLRqyBcNePEWi7E=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=cil3frA+Je2lkPU+cELOieOUrzXOZVUhzHwUQCSx2qasKEYKqhniN2Kl9cavIjt7T
	 hBWebpreXdW+ssZ9gDtJyUW9ELQ+Yl22K48m+AiVFHwHrqKH4WvCwg0YDioDBSIgt3
	 weaxKf837xDVQ8oFTEsKYfNta6R0GRUFbynvNAwfq+o7CZbmE3kusGDfApdOE+I9Ef
	 73ueiLzwIxDXqCe0yZD1/t+FSurn/TLKZHeV8gPALFjGL0uJ0hWv4tnTnwLOXAyaqA
	 /38CwZge1DKfQ+SaKpPnGFOM5vH9Z4I0cEqMvmuavXRllVoRAWlumw1XXDTd2mjjh1
	 G8ZbuCQd/DOdA==
Received: from X570AM.jing.rocks (X570AM.lan [IPv6:240b:10:f00:1b00::7e82])
	(Authenticated sender: jing@jing.rocks)
	by mail.jing.rocks (Postfix) with ESMTPSA id 4276537F3F;
	Sun, 23 Mar 2025 00:20:18 +0900 (JST)
From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH] rust-proxmox-backup: change /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:12 +0900
Message-ID: <20250322152004.1646886-5-jing@jing.rocks>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250322152004.1646886-1-jing@jing.rocks>
References: <20250322152004.1646886-1-jing@jing.rocks>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
	AWL                    -0.001 Adjusted score from AWL reputation of From: address
	BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
	DKIM_SIGNED               0.1 Message has a DKIM or DK signature, not necessarily valid
	DKIM_VALID               -0.1 Message has at least one valid DKIM or DK signature
	DKIM_VALID_AU            -0.1 Message has a valid DKIM or DK signature from author's domain
	DKIM_VALID_EF            -0.1 Message has a valid DKIM or DK signature from envelope-from domain
	DMARC_PASS               -0.1 DMARC pass policy
	KAM_INFOUSMEBIZ          0.75 Prevalent use of .info|.us|.me|.me.uk|.biz|xyz|id|rocks|life domains in spam/malware
	KAM_OTHER_BAD_TLD        0.75 Other untrustworthy TLDs
	RCVD_IN_VALIDITY_CERTIFIED_BLOCKED  0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked.  See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information.
	RCVD_IN_VALIDITY_RPBL_BLOCKED  0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked.  See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information.
	RCVD_IN_VALIDITY_SAFE_BLOCKED  0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked.  See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information.
	SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
	SPF_PASS               -0.001 SPF: sender matches SPF record

"/var/lock" is deprecated.

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 pbs-config/src/network/mod.rs    | 2 +-
 src/tape/drive/mod.rs            | 2 +-
 src/tools/shared_rate_limiter.rs | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pbs-config/src/network/mod.rs b/pbs-config/src/network/mod.rs
index 21ad9943..55d4e556 100644
--- a/pbs-config/src/network/mod.rs
+++ b/pbs-config/src/network/mod.rs
@@ -444,7 +444,7 @@ impl NetworkConfig {
 
 pub const NETWORK_INTERFACES_FILENAME: &str = "/etc/network/interfaces";
 pub const NETWORK_INTERFACES_NEW_FILENAME: &str = "/etc/network/interfaces.new";
-pub const NETWORK_LOCKFILE: &str = "/var/lock/pve-network.lck";
+pub const NETWORK_LOCKFILE: &str = "/run/lock/pve-network.lck";
 
 pub fn lock_config() -> Result<BackupLockGuard, Error> {
     open_backup_lockfile(NETWORK_LOCKFILE, None, true)
diff --git a/src/tape/drive/mod.rs b/src/tape/drive/mod.rs
index 36c8627a..ecc038f3 100644
--- a/src/tape/drive/mod.rs
+++ b/src/tape/drive/mod.rs
@@ -596,7 +596,7 @@ pub struct DeviceLockGuard {
 }
 
 // Uses systemd escape_unit to compute a file name from `device_path`, the try
-// to lock `/var/lock/<name>`.
+// to lock `/run/lock/<name>`.
 fn open_device_lock(device_path: &str) -> Result<std::fs::File, Error> {
     let lock_name = proxmox_systemd::escape_unit(device_path, true);
 
diff --git a/src/tools/shared_rate_limiter.rs b/src/tools/shared_rate_limiter.rs
index 8c9e6086..5cda02b7 100644
--- a/src/tools/shared_rate_limiter.rs
+++ b/src/tools/shared_rate_limiter.rs
@@ -68,7 +68,7 @@ pub struct SharedRateLimiter {
 impl SharedRateLimiter {
     /// Creates a new mmap'ed instance.
     ///
-    /// Data is mapped in `/var/run/proxmox-backup/shmem/tbf/<name>` using
+    /// Data is mapped in `/run/proxmox-backup/shmem/tbf/<name>` using
     /// `TMPFS`.
     pub fn mmap_shmem(name: &str, rate: u64, burst: u64) -> Result<Self, Error> {
         let mut path = PathBuf::from(BASE_PATH);
-- 
2.49.0




--===============7663378760164858289==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

--===============7663378760164858289==--