public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock
       [not found] <20250322152004.1646886-1-jing@jing.rocks>
@ 2025-03-22 15:17 ` Jing Luo via pve-devel
  2025-03-22 15:17 ` [pve-devel] [PATCH] rust-proxmox-network-api: change /var/lock to /run/lock Jing Luo via pve-devel
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-22 15:17 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 6103 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock
Date: Sun, 23 Mar 2025 00:17:09 +0900
Message-ID: <20250322152004.1646886-2-jing@jing.rocks>

It's more appropriate under Debian, and vzdump.lock doesn't seem to
be used by any other package.

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 PVE/API2/Nodes.pm | 2 +-
 PVE/VZDump.pm     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 3708eb26..637479ea 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -1978,7 +1978,7 @@ __PACKAGE__->register_method ({
 	    }
 
 	    eval { # remove backup locks, but avoid running into a scheduled backup job
-		PVE::Tools::lock_file('/run/vzdump.lock', 10, $remove_locks_on_startup, $nodename);
+		PVE::Tools::lock_file('/run/lock/vzdump.lock', 10, $remove_locks_on_startup, $nodename);
 	    };
 	    warn $@ if $@;
 
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 5178ce9d..dce1bcc4 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -40,7 +40,7 @@ PVE::JSONSchema::register_standard_option('pve-backup-jobid', {
 
 my @posix_filesystems = qw(ext3 ext4 nfs nfs4 reiserfs xfs);
 
-my $lockfile = '/run/vzdump.lock';
+my $lockfile = '/run/lock/vzdump.lock';
 my $pidfile = '/run/vzdump.pid';
 my $logdir = '/var/log/vzdump';
 
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [pve-devel] [PATCH] rust-proxmox-network-api: change /var/lock to /run/lock
       [not found] <20250322152004.1646886-1-jing@jing.rocks>
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock Jing Luo via pve-devel
@ 2025-03-22 15:17 ` Jing Luo via pve-devel
  2025-03-22 15:17 ` [pve-devel] [PATCH pmg-api] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-22 15:17 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 5790 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH] rust-proxmox-network-api: change /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:10 +0900
Message-ID: <20250322152004.1646886-3-jing@jing.rocks>

"/var/lock" is deprecated.

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 proxmox-network-api/src/config/mod.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxmox-network-api/src/config/mod.rs b/proxmox-network-api/src/config/mod.rs
index 054f53c8..5e361e55 100644
--- a/proxmox-network-api/src/config/mod.rs
+++ b/proxmox-network-api/src/config/mod.rs
@@ -487,7 +487,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<ApiLockGuard, Error> {
     open_api_lockfile(NETWORK_LOCKFILE, None, true)
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [pve-devel] [PATCH pmg-api] tree-wide: change /var/run to /run and /var/lock to /run/lock
       [not found] <20250322152004.1646886-1-jing@jing.rocks>
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock Jing Luo via pve-devel
  2025-03-22 15:17 ` [pve-devel] [PATCH] rust-proxmox-network-api: change /var/lock to /run/lock Jing Luo via pve-devel
@ 2025-03-22 15:17 ` Jing Luo via pve-devel
  2025-03-22 15:17 ` [pve-devel] [PATCH] rust-proxmox-backup: change " Jing Luo via pve-devel
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-22 15:17 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 15638 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH pmg-api] tree-wide: change /var/run to /run and /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:11 +0900
Message-ID: <20250322152004.1646886-4-jing@jing.rocks>

"/var/run" and "/var/lock" are deprecated.

This is to comply with Debian Policy 9.1.4 "/run and /run/lock".
(https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock)

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 src/PMG/API2/ACMEPlugin.pm       | 2 +-
 src/PMG/API2/SACustom.pm         | 6 +++---
 src/PMG/Auth/Plugin.pm           | 2 +-
 src/PMG/CertHelpers.pm           | 4 ++--
 src/PMG/ClusterConfig.pm         | 2 +-
 src/PMG/Config.pm                | 2 +-
 src/PMG/DBTools.pm               | 2 +-
 src/PMG/LDAPConfig.pm            | 2 +-
 src/PMG/NodeConfig.pm            | 2 +-
 src/PMG/PBSConfig.pm             | 2 +-
 src/PMG/Service/pmgdaemon.pm     | 2 +-
 src/PMG/Service/pmgproxy.pm      | 2 +-
 src/PMG/Service/pmgtunnel.pm     | 2 +-
 src/PMG/UserConfig.pm            | 4 ++--
 src/PMG/Utils.pm                 | 2 +-
 src/templates/clamd.conf.in      | 4 ++--
 src/templates/freshclam.conf.in  | 2 +-
 src/templates/postgresql.conf.in | 4 ++--
 18 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/src/PMG/API2/ACMEPlugin.pm b/src/PMG/API2/ACMEPlugin.pm
index 25d3a04..056bf88 100644
--- a/src/PMG/API2/ACMEPlugin.pm
+++ b/src/PMG/API2/ACMEPlugin.pm
@@ -16,7 +16,7 @@ use base qw(PVE::RESTHandler);
 
 my $inotify_file_id = 'pmg-acme-plugins-config.conf';
 my $config_filename = '/etc/pmg/acme/plugins.conf';
-my $lockfile = "/var/lock/pmg-acme-plugins-config.lck";
+my $lockfile = "/run/lock/pmg-acme-plugins-config.lck";
 
 PVE::ACME::DNSChallenge->register();
 PVE::ACME::StandAlone->register();
diff --git a/src/PMG/API2/SACustom.pm b/src/PMG/API2/SACustom.pm
index ac75402..813d93d 100644
--- a/src/PMG/API2/SACustom.pm
+++ b/src/PMG/API2/SACustom.pm
@@ -210,7 +210,7 @@ __PACKAGE__->register_method({
 	    PVE::INotify::write_file('pmg-scores.cf', $config);
 	};
 
-	PVE::Tools::lock_file("/var/lock/pmg-scores.cf.lck", 10, $code);
+	PVE::Tools::lock_file("/run/lock/pmg-scores.cf.lck", 10, $code);
 	die $@ if $@;
 
 	return undef;
@@ -286,7 +286,7 @@ __PACKAGE__->register_method({
 	    PVE::INotify::write_file('pmg-scores.cf', $config);
 	};
 
-	PVE::Tools::lock_file("/var/lock/pmg-scores.cf.lck", 10, $code);
+	PVE::Tools::lock_file("/run/lock/pmg-scores.cf.lck", 10, $code);
 	die $@ if $@;
 
 	return undef;
@@ -328,7 +328,7 @@ __PACKAGE__->register_method({
 	    PVE::INotify::write_file('pmg-scores.cf', $config);
 	};
 
-	PVE::Tools::lock_file("/var/lock/pmg-scores.cf.lck", 10, $code);
+	PVE::Tools::lock_file("/run/lock/pmg-scores.cf.lck", 10, $code);
 	die $@ if $@;
 
 	return undef;
diff --git a/src/PMG/Auth/Plugin.pm b/src/PMG/Auth/Plugin.pm
index 9268a49..dcfeb43 100755
--- a/src/PMG/Auth/Plugin.pm
+++ b/src/PMG/Auth/Plugin.pm
@@ -15,7 +15,7 @@ use base qw(PVE::SectionConfig);
 
 my $realm_conf_id = "realms.conf";
 my $realm_conf_filename = "/etc/pmg/$realm_conf_id";
-my $lockfile = "/var/lock/pmg-realms.lck";
+my $lockfile = "/run/lock/pmg-realms.lck";
 
 sub realm_conf_id {
     return $realm_conf_id;
diff --git a/src/PMG/CertHelpers.pm b/src/PMG/CertHelpers.pm
index b7e79b7..b0a97e9 100644
--- a/src/PMG/CertHelpers.pm
+++ b/src/PMG/CertHelpers.pm
@@ -72,8 +72,8 @@ PVE::JSONSchema::register_format('pmg-acme-alias', sub {
     die "value '$alias' does not look like a valid alias name!\n";
 });
 
-my $local_cert_lock = '/var/lock/pmg-certs.lock';
-my $local_acme_lock = '/var/lock/pmg-acme.lock';
+my $local_cert_lock = '/run/lock/pmg-certs.lock';
+my $local_acme_lock = '/run/lock/pmg-acme.lock';
 
 sub cert_path : prototype($) {
     my ($type) = @_;
diff --git a/src/PMG/ClusterConfig.pm b/src/PMG/ClusterConfig.pm
index c52508d..43ad28c 100644
--- a/src/PMG/ClusterConfig.pm
+++ b/src/PMG/ClusterConfig.pm
@@ -155,7 +155,7 @@ sub write {
     PVE::INotify::write_file("cluster.conf", $self);
 }
 
-my $lockfile = "/var/lock/pmgcluster.lck";
+my $lockfile = "/run/lock/pmgcluster.lck";
 
 sub lock_config {
     my ($code, $errmsg) = @_;
diff --git a/src/PMG/Config.pm b/src/PMG/Config.pm
index 82bd42e..541601b 100644
--- a/src/PMG/Config.pm
+++ b/src/PMG/Config.pm
@@ -878,7 +878,7 @@ sub write {
     PVE::INotify::write_file("pmg.conf", $self);
 }
 
-my $lockfile = "/var/lock/pmgconfig.lck";
+my $lockfile = "/run/lock/pmgconfig.lck";
 
 sub lock_config {
     my ($code, $errmsg) = @_;
diff --git a/src/PMG/DBTools.pm b/src/PMG/DBTools.pm
index 1acc0cb..6e1ac1c 100644
--- a/src/PMG/DBTools.pm
+++ b/src/PMG/DBTools.pm
@@ -73,7 +73,7 @@ sub open_ruledb {
 
 	return $rdb;
     } else {
-	my $dsn = "DBI:Pg:dbname=$database;host=/var/run/postgresql;port=$port";
+	my $dsn = "DBI:Pg:dbname=$database;host=/run/postgresql;port=$port";
 	my $user = $> == 0 ? 'root' : 'www-data';
 	my $dbh = DBI->connect($dsn, $user, undef, { PrintError => 0, RaiseError => 1 });
 
diff --git a/src/PMG/LDAPConfig.pm b/src/PMG/LDAPConfig.pm
index e5b3388..77a1dca 100644
--- a/src/PMG/LDAPConfig.pm
+++ b/src/PMG/LDAPConfig.pm
@@ -203,7 +203,7 @@ sub write {
     PVE::INotify::write_file($inotify_file_id, $self);
 }
 
-my $lockfile = "/var/lock/pmgldapconfig.lck";
+my $lockfile = "/run/lock/pmgldapconfig.lck";
 
 sub lock_config {
     my ($code, $errmsg) = @_;
diff --git a/src/PMG/NodeConfig.pm b/src/PMG/NodeConfig.pm
index 6303979..590b499 100644
--- a/src/PMG/NodeConfig.pm
+++ b/src/PMG/NodeConfig.pm
@@ -17,7 +17,7 @@ my $MAXDOMAINS = 5;
 
 my $inotify_file_id = 'pmg-node-config.conf';
 my $config_filename = '/etc/pmg/node.conf';
-my $lockfile = "/var/lock/pmg-node-config.lck";
+my $lockfile = "/run/lock/pmg-node-config.lck";
 
 my $acme_domain_desc = {
     domain => {
diff --git a/src/PMG/PBSConfig.pm b/src/PMG/PBSConfig.pm
index 998e960..293ffdd 100644
--- a/src/PMG/PBSConfig.pm
+++ b/src/PMG/PBSConfig.pm
@@ -189,7 +189,7 @@ sub write {
 sub lock_config {
     my ($code, $errmsg) = @_;
 
-    my $lockfile = "/var/lock/pmgpbsconfig.lck";
+    my $lockfile = "/run/lock/pmgpbsconfig.lck";
 
     my $p = PVE::Tools::lock_file($lockfile, undef, $code);
     if (my $err = $@) {
diff --git a/src/PMG/Service/pmgdaemon.pm b/src/PMG/Service/pmgdaemon.pm
index 8e3d9b6..af66eb1 100644
--- a/src/PMG/Service/pmgdaemon.pm
+++ b/src/PMG/Service/pmgdaemon.pm
@@ -26,7 +26,7 @@ my $daemon = __PACKAGE__->new('pmgdaemon', $cmdline, %daemon_options);
 sub init {
     my ($self) = @_;
 
-    my $accept_lock_fn = "/var/lock/pmgdaemon.lck";
+    my $accept_lock_fn = "/run/lock/pmgdaemon.lck";
 
     my $lockfh = IO::File->new(">>${accept_lock_fn}") ||
 	die "unable to open lock file '${accept_lock_fn}' - $!\n";
diff --git a/src/PMG/Service/pmgproxy.pm b/src/PMG/Service/pmgproxy.pm
index 5bd9de2..ae666fe 100644
--- a/src/PMG/Service/pmgproxy.pm
+++ b/src/PMG/Service/pmgproxy.pm
@@ -59,7 +59,7 @@ sub init {
 
     my $proxyconf = PVE::APIServer::Utils::read_proxy_config($self->{name});
 
-    my $accept_lock_fn = "/var/lock/pmgproxy.lck";
+    my $accept_lock_fn = "/run/lock/pmgproxy.lck";
 
     my $lockfh = IO::File->new(">>${accept_lock_fn}") ||
 	die "unable to open lock file '${accept_lock_fn}' - $!\n";
diff --git a/src/PMG/Service/pmgtunnel.pm b/src/PMG/Service/pmgtunnel.pm
index a556028..3d5531c 100644
--- a/src/PMG/Service/pmgtunnel.pm
+++ b/src/PMG/Service/pmgtunnel.pm
@@ -103,7 +103,7 @@ sub start_tunnels {
 	    unlink $sock;
 	    exec('/usr/bin/ssh', '-N', '-o', 'BatchMode=yes',
 		 '-o', "HostKeyAlias=$ni->{name}",
-		 '-L', "$sock:/var/run/postgresql/.s.PGSQL.5432",
+		 '-L', "$sock:/run/postgresql/.s.PGSQL.5432",
 		 $ni->{ip});
 	    exit (0);
 	}
diff --git a/src/PMG/UserConfig.pm b/src/PMG/UserConfig.pm
index 121733e..ff4c683 100644
--- a/src/PMG/UserConfig.pm
+++ b/src/PMG/UserConfig.pm
@@ -36,8 +36,8 @@ sub write {
     PVE::INotify::write_file($inotify_file_id, $self);
 }
 
-my $lockfile = "/var/lock/pmguser.lck";
-my $tfa_lockfile = "/var/lock/pmgtfa.lck";
+my $lockfile = "/run/lock/pmguser.lck";
+my $tfa_lockfile = "/run/lock/pmgtfa.lck";
 
 # Locking both config files together is only ever allowed in one order:
 #  1) tfa config
diff --git a/src/PMG/Utils.pm b/src/PMG/Utils.pm
index 3e7adbb..2e623d7 100644
--- a/src/PMG/Utils.pm
+++ b/src/PMG/Utils.pm
@@ -952,7 +952,7 @@ sub clamav_dbstat {
 
 # RRD related code
 my $rrd_dir = "/var/lib/rrdcached/db";
-my $rrdcached_socket = "/var/run/rrdcached.sock";
+my $rrdcached_socket = "/run/rrdcached.sock";
 
 my $rrd_def_node = [
     "DS:loadavg:GAUGE:120:0:U",
diff --git a/src/templates/clamd.conf.in b/src/templates/clamd.conf.in
index e165e4c..f8625ba 100644
--- a/src/templates/clamd.conf.in
+++ b/src/templates/clamd.conf.in
@@ -1,5 +1,5 @@
 #Automatically Generated by proxmox
-LocalSocket /var/run/clamav/clamd.ctl
+LocalSocket /run/clamav/clamd.ctl
 FixStaleSocket true
 User clamav
 ScanMail true
@@ -24,7 +24,7 @@ LogSyslog true
 LogFacility LOG_LOCAL6
 LogClean false
 LogVerbose false
-PidFile /var/run/clamav/clamd.pid
+PidFile /run/clamav/clamd.pid
 DatabaseDirectory /var/lib/clamav/
 TemporaryDirectory /tmp
 SelfCheck 3600
diff --git a/src/templates/freshclam.conf.in b/src/templates/freshclam.conf.in
index 03a19d4..8186992 100644
--- a/src/templates/freshclam.conf.in
+++ b/src/templates/freshclam.conf.in
@@ -8,7 +8,7 @@ Debug false
 MaxAttempts 5
 Checks 24
 DatabaseDirectory /var/lib/clamav/
-PidFile /var/run/clamav/freshclam.pid
+PidFile /run/clamav/freshclam.pid
 DatabaseMirror [% pmg.clamav.dbmirror %]
 ConnectTimeout 30
 ScriptedUpdates [% IF pmg.clamav.scriptedupdates %]true[% ELSE %]false[% END %]
diff --git a/src/templates/postgresql.conf.in b/src/templates/postgresql.conf.in
index 2ffc29f..107455a 100644
--- a/src/templates/postgresql.conf.in
+++ b/src/templates/postgresql.conf.in
@@ -47,7 +47,7 @@ ident_file = '/etc/postgresql/<* postgres.version *>/main/pg_ident.conf'	# ident
 					# (change requires restart)
 
 # If external_pid_file is not explicitly set, no extra PID file is written.
-external_pid_file = '/var/run/postgresql/<* postgres.version *>-main.pid'			# write an extra PID file
+external_pid_file = '/run/postgresql/<* postgres.version *>-main.pid'			# write an extra PID file
 					# (change requires restart)
 
 
@@ -64,7 +64,7 @@ external_pid_file = '/var/run/postgresql/<* postgres.version *>-main.pid'			# wr
 port = 5432				# (change requires restart)
 max_connections = 100			# (change requires restart)
 #superuser_reserved_connections = 3	# (change requires restart)
-unix_socket_directories = '/var/run/postgresql'	# comma-separated list of directories
+unix_socket_directories = '/run/postgresql'	# comma-separated list of directories
 					# (change requires restart)
 #unix_socket_group = ''			# (change requires restart)
 #unix_socket_permissions = 0777		# begin with 0 to use octal notation
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [pve-devel] [PATCH] rust-proxmox-backup: change /var/lock to /run/lock
       [not found] <20250322152004.1646886-1-jing@jing.rocks>
                   ` (2 preceding siblings ...)
  2025-03-22 15:17 ` [pve-devel] [PATCH pmg-api] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
@ 2025-03-22 15:17 ` Jing Luo via pve-devel
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-cluster] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-22 15:17 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 6924 bytes --]

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>

"/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




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [pve-devel] [PATCH pve-cluster] tree-wide: change /var/run to /run and /var/lock to /run/lock
       [not found] <20250322152004.1646886-1-jing@jing.rocks>
                   ` (3 preceding siblings ...)
  2025-03-22 15:17 ` [pve-devel] [PATCH] rust-proxmox-backup: change " Jing Luo via pve-devel
@ 2025-03-22 15:17 ` Jing Luo via pve-devel
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-common] " Jing Luo via pve-devel
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-22 15:17 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 7664 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH pve-cluster] tree-wide: change /var/run to /run and /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:13 +0900
Message-ID: <20250322152004.1646886-6-jing@jing.rocks>

"/var/run" and "/var/lock" are deprecated.

This is to comply with Debian Policy 9.1.4 "/run and /run/lock".
(https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock)

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 src/PVE/API2/ClusterConfig.pm | 4 ++--
 src/PVE/CLI/pvecm.pm          | 2 +-
 src/PVE/RRD.pm                | 4 ++--
 src/pmxcfs/cfs-utils.h        | 2 +-
 src/pmxcfs/status.c           | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/PVE/API2/ClusterConfig.pm b/src/PVE/API2/ClusterConfig.pm
index e7efe37..327e34d 100644
--- a/src/PVE/API2/ClusterConfig.pm
+++ b/src/PVE/API2/ClusterConfig.pm
@@ -20,7 +20,7 @@ use base qw(PVE::RESTHandler);
 
 my $clusterconf = "/etc/pve/corosync.conf";
 my $authfile = "/etc/corosync/authkey";
-my $local_cluster_lock = "/var/lock/pvecm.lock";
+my $local_cluster_lock = "/run/lock/pvecm.lock";
 
 my $nodeid_desc = {
     type => 'integer',
@@ -677,7 +677,7 @@ __PACKAGE__->register_method ({
 	my ($param) = @_;
 
 	my $result = {};
-	my $socket_path = "/var/run/corosync-qdevice/corosync-qdevice.sock";
+	my $socket_path = "/run/corosync-qdevice/corosync-qdevice.sock";
 	return $result if !-S $socket_path;
 
 	my $qdevice_socket = IO::Socket::UNIX->new(
diff --git a/src/PVE/CLI/pvecm.pm b/src/PVE/CLI/pvecm.pm
index cc8b3d3..09e6a3f 100755
--- a/src/PVE/CLI/pvecm.pm
+++ b/src/PVE/CLI/pvecm.pm
@@ -377,7 +377,7 @@ __PACKAGE__->register_method ({
 		delete $param->{use_ssh};
 		$param->{password} = $password;
 
-		my $local_cluster_lock = "/var/lock/pvecm.lock";
+		my $local_cluster_lock = "/run/lock/pvecm.lock";
 		PVE::Tools::lock_file($local_cluster_lock, 10, \&PVE::Cluster::Setup::join, $param);
 
 		if (my $err = $@) {
diff --git a/src/PVE/RRD.pm b/src/PVE/RRD.pm
index 5d4abc9..d98d219 100644
--- a/src/PVE/RRD.pm
+++ b/src/PVE/RRD.pm
@@ -33,7 +33,7 @@ sub create_rrd_data {
 	"-r" => $reso,
 	);
 
-    my $socket = "/var/run/rrdcached.sock";
+    my $socket = "/run/rrdcached.sock";
     push @args, "--daemon" => "unix:$socket" if -S $socket;
 
     my ($start, $step, $names, $data) = RRDs::fetch($rrd, $cf, @args);
@@ -101,7 +101,7 @@ sub create_rrd_graph {
 	"--lower-limit" => 0,
 	);
 
-    my $socket = "/var/run/rrdcached.sock";
+    my $socket = "/run/rrdcached.sock";
     push @args, "--daemon" => "unix:$socket" if -S $socket;
 
     my @coldef = ('#00ddff', '#ff0000');
diff --git a/src/pmxcfs/cfs-utils.h b/src/pmxcfs/cfs-utils.h
index eb86379..6cf5013 100644
--- a/src/pmxcfs/cfs-utils.h
+++ b/src/pmxcfs/cfs-utils.h
@@ -30,7 +30,7 @@
 #include <fcntl.h>
 
 #define HOST_CLUSTER_CONF_FN "/etc/corosync/corosync.conf"
-#define CFS_PID_FN "/var/run/pve-cluster.pid"
+#define CFS_PID_FN "/run/pve-cluster.pid"
 #define VARLIBDIR "/var/lib/pve-cluster"
 #define RUNDIR "/run/pve-cluster"
 
diff --git a/src/pmxcfs/status.c b/src/pmxcfs/status.c
index ff5fcc4..b9c202a 100644
--- a/src/pmxcfs/status.c
+++ b/src/pmxcfs/status.c
@@ -1244,7 +1244,7 @@ update_rrd_data(
 	g_return_if_fail(len > 0);
 	g_return_if_fail(len < 4096);
 
-	static const char *rrdcsock = "unix:/var/run/rrdcached.sock";
+	static const char *rrdcsock = "unix:/run/rrdcached.sock";
 
 	int use_daemon = 1;
         if (rrdc_connect(rrdcsock) != 0)
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [pve-devel] [PATCH pve-common] tree-wide: change /var/run to /run and /var/lock to /run/lock
       [not found] <20250322152004.1646886-1-jing@jing.rocks>
                   ` (4 preceding siblings ...)
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-cluster] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
@ 2025-03-22 15:17 ` Jing Luo via pve-devel
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-container] tree-wide: change /var/run to /run Jing Luo via pve-devel
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-22 15:17 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 6293 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH pve-common] tree-wide: change /var/run to /run and /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:14 +0900
Message-ID: <20250322152004.1646886-7-jing@jing.rocks>

"/var/run" and "/var/lock" are deprecated.

This is to comply with Debian Policy 9.1.4 "/run and /run/lock".
(https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock)

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 src/PVE/Daemon.pm  | 4 ++--
 src/PVE/Network.pm | 2 +-
 src/PVE/Tools.pm   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/PVE/Daemon.pm b/src/PVE/Daemon.pm
index 63fd5ee..e2dc0a7 100644
--- a/src/PVE/Daemon.pm
+++ b/src/PVE/Daemon.pm
@@ -3,7 +3,7 @@ package PVE::Daemon;
 # Abstract class to implement Daemons
 #
 # Features:
-# * lock and write PID file /var/run/$name.pid to make sure only
+# * lock and write PID file /run/$name.pid to make sure only
 #   one instance is running.
 # * keep lock open during restart
 # * correctly daemonize (redirect STDIN/STDOUT)
@@ -431,7 +431,7 @@ sub new {
 
 	$self = bless {
 	    name => $name,
-	    pidfile => "/var/run/${name}.pid",
+	    pidfile => "/run/${name}.pid",
 	    workers => {},
 	    old_workers => {},
 	}, $class;
diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm
index a004c04..35325c8 100644
--- a/src/PVE/Network.pm
+++ b/src/PVE/Network.pm
@@ -858,7 +858,7 @@ sub get_ip_from_hostname {
 
 sub lock_network {
     my ($code, @param) = @_;
-    my $res = lock_file('/var/lock/pve-network.lck', 10, $code, @param);
+    my $res = lock_file('/run/lock/pve-network.lck', 10, $code, @param);
     die $@ if $@;
     return $res;
 }
diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index df481ab..fe6c699 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -989,7 +989,7 @@ sub next_unused_port {
 	return $newport;
     };
 
-    my $p = lock_file('/var/lock/pve-ports.lck', 10, $code);
+    my $p = lock_file('/run/lock/pve-ports.lck', 10, $code);
     die $@ if $@;
 
     die "unable to find free port (${range_start}-${range_end})\n" if !$p;
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [pve-devel] [PATCH pve-container] tree-wide: change /var/run to /run
       [not found] <20250322152004.1646886-1-jing@jing.rocks>
                   ` (5 preceding siblings ...)
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-common] " Jing Luo via pve-devel
@ 2025-03-22 15:17 ` Jing Luo via pve-devel
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-firewall] tree-wide: change /var/run to /run and /var/lock to /run/lock Jing Luo via pve-devel
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-22 15:17 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 10821 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH pve-container] tree-wide: change /var/run to /run
Date: Sun, 23 Mar 2025 00:17:15 +0900
Message-ID: <20250322152004.1646886-8-jing@jing.rocks>

"/var/run" is deprecated.

This is to comply with Debian Policy 9.1.4 "/run and /run/lock".
(https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock)

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 src/PVE/API2/LXC.pm                     | 6 +++---
 src/test/test-debian-009/etc/passwd     | 4 ++--
 src/test/test-debian-009/etc/passwd.exp | 4 ++--
 src/test/test-debian-014/etc/passwd     | 4 ++--
 src/test/test-debian-014/etc/passwd.exp | 4 ++--
 src/test/test-debian-015/etc/passwd     | 4 ++--
 src/test/test-debian-015/etc/passwd.exp | 4 ++--
 7 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 7cb5122..f0b5909 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -885,7 +885,7 @@ __PACKAGE__->register_method ({
 	my $concmd = PVE::LXC::get_console_command($vmid, $conf, -1);
 
 	my $shcmd = [ '/usr/bin/dtach', '-A',
-		      "/var/run/dtach/vzctlconsole$vmid",
+		      "/run/dtach/vzctlconsole$vmid",
 		      '-r', 'winch', '-z', @$concmd];
 
 	my $realcmd = sub {
@@ -988,7 +988,7 @@ __PACKAGE__->register_method ({
 	my $concmd = PVE::LXC::get_console_command($vmid, $conf, -1);
 
 	my $shcmd = [ '/usr/bin/dtach', '-A',
-		      "/var/run/dtach/vzctlconsole$vmid",
+		      "/run/dtach/vzctlconsole$vmid",
 		      '-r', 'winch', '-z', @$concmd];
 
 	my $realcmd = sub {
@@ -1100,7 +1100,7 @@ __PACKAGE__->register_method ({
 	my $concmd = PVE::LXC::get_console_command($vmid, $conf);
 
 	my $shcmd = ['/usr/bin/dtach', '-A',
-		     "/var/run/dtach/vzctlconsole$vmid",
+		     "/run/dtach/vzctlconsole$vmid",
 		     '-r', 'winch', '-z', @$concmd];
 
 	my $title = "CT $vmid";
diff --git a/src/test/test-debian-009/etc/passwd b/src/test/test-debian-009/etc/passwd
index e505613..fa32363 100644
--- a/src/test/test-debian-009/etc/passwd
+++ b/src/test/test-debian-009/etc/passwd
@@ -13,9 +13,9 @@ proxy:x:13:13:proxy:/bin:/bin/sh
 www-data:x:33:33:www-data:/var/www:/bin/sh
 backup:x:34:34:backup:/var/backups:/bin/sh
 list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+irc:x:39:39:ircd:/run/ircd:/bin/sh
 gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
 nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
 libuuid:x:100:101::/var/lib/libuuid:/bin/sh
 postfix:x:101:104::/var/spool/postfix:/bin/false
-sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
+sshd:x:102:65534::/run/sshd:/usr/sbin/nologin
diff --git a/src/test/test-debian-009/etc/passwd.exp b/src/test/test-debian-009/etc/passwd.exp
index e505613..fa32363 100644
--- a/src/test/test-debian-009/etc/passwd.exp
+++ b/src/test/test-debian-009/etc/passwd.exp
@@ -13,9 +13,9 @@ proxy:x:13:13:proxy:/bin:/bin/sh
 www-data:x:33:33:www-data:/var/www:/bin/sh
 backup:x:34:34:backup:/var/backups:/bin/sh
 list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+irc:x:39:39:ircd:/run/ircd:/bin/sh
 gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
 nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
 libuuid:x:100:101::/var/lib/libuuid:/bin/sh
 postfix:x:101:104::/var/spool/postfix:/bin/false
-sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
+sshd:x:102:65534::/run/sshd:/usr/sbin/nologin
diff --git a/src/test/test-debian-014/etc/passwd b/src/test/test-debian-014/etc/passwd
index 9fc110f..dd7ed07 100644
--- a/src/test/test-debian-014/etc/passwd
+++ b/src/test/test-debian-014/etc/passwd
@@ -13,9 +13,9 @@ proxy:x:13:13:proxy:/bin:/bin/sh
 www-data:x:33:33:www-data:/var/www:/bin/sh
 backup:x:34:34:backup:/var/backups:/bin/sh
 list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+irc:x:39:39:ircd:/run/ircd:/bin/sh
 gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
 nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
 libuuid:x:100:101::/var/lib/libuuid:/bin/sh
 postfix:x:101:104::/var/spool/postfix:/bin/false
-sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
+sshd:x:102:65534::/run/sshd:/usr/sbin/nologin
diff --git a/src/test/test-debian-014/etc/passwd.exp b/src/test/test-debian-014/etc/passwd.exp
index 9fc110f..dd7ed07 100644
--- a/src/test/test-debian-014/etc/passwd.exp
+++ b/src/test/test-debian-014/etc/passwd.exp
@@ -13,9 +13,9 @@ proxy:x:13:13:proxy:/bin:/bin/sh
 www-data:x:33:33:www-data:/var/www:/bin/sh
 backup:x:34:34:backup:/var/backups:/bin/sh
 list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+irc:x:39:39:ircd:/run/ircd:/bin/sh
 gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
 nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
 libuuid:x:100:101::/var/lib/libuuid:/bin/sh
 postfix:x:101:104::/var/spool/postfix:/bin/false
-sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
+sshd:x:102:65534::/run/sshd:/usr/sbin/nologin
diff --git a/src/test/test-debian-015/etc/passwd b/src/test/test-debian-015/etc/passwd
index 9fc110f..dd7ed07 100644
--- a/src/test/test-debian-015/etc/passwd
+++ b/src/test/test-debian-015/etc/passwd
@@ -13,9 +13,9 @@ proxy:x:13:13:proxy:/bin:/bin/sh
 www-data:x:33:33:www-data:/var/www:/bin/sh
 backup:x:34:34:backup:/var/backups:/bin/sh
 list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+irc:x:39:39:ircd:/run/ircd:/bin/sh
 gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
 nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
 libuuid:x:100:101::/var/lib/libuuid:/bin/sh
 postfix:x:101:104::/var/spool/postfix:/bin/false
-sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
+sshd:x:102:65534::/run/sshd:/usr/sbin/nologin
diff --git a/src/test/test-debian-015/etc/passwd.exp b/src/test/test-debian-015/etc/passwd.exp
index 9fc110f..dd7ed07 100644
--- a/src/test/test-debian-015/etc/passwd.exp
+++ b/src/test/test-debian-015/etc/passwd.exp
@@ -13,9 +13,9 @@ proxy:x:13:13:proxy:/bin:/bin/sh
 www-data:x:33:33:www-data:/var/www:/bin/sh
 backup:x:34:34:backup:/var/backups:/bin/sh
 list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+irc:x:39:39:ircd:/run/ircd:/bin/sh
 gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
 nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
 libuuid:x:100:101::/var/lib/libuuid:/bin/sh
 postfix:x:101:104::/var/spool/postfix:/bin/false
-sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
+sshd:x:102:65534::/run/sshd:/usr/sbin/nologin
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [pve-devel] [PATCH pve-firewall] tree-wide: change /var/run to /run and /var/lock to /run/lock
       [not found] <20250322152004.1646886-1-jing@jing.rocks>
                   ` (6 preceding siblings ...)
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-container] tree-wide: change /var/run to /run Jing Luo via pve-devel
@ 2025-03-22 15:17 ` Jing Luo via pve-devel
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-guest-common] tree-wide: change " Jing Luo via pve-devel
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-22 15:17 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 5708 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH pve-firewall] tree-wide: change /var/run to /run and /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:16 +0900
Message-ID: <20250322152004.1646886-9-jing@jing.rocks>

"/var/run" and "/var/lock" are deprecated.

This is to comply with Debian Policy 9.1.4 "/run and /run/lock".
(https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock)

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 src/PVE/Firewall.pm | 2 +-
 src/pvefw-logger.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm
index 533f2a2..1445cbd 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -150,7 +150,7 @@ eval  {
 my $nodename = PVE::INotify::nodename();
 my $hostfw_conf_filename = "/etc/pve/nodes/$nodename/host.fw";
 
-my $pve_fw_lock_filename = "/var/lock/pvefw.lck";
+my $pve_fw_lock_filename = "/run/lock/pvefw.lck";
 
 my $default_log_level = 'nolog'; # avoid logs by default
 my $global_log_ratelimit = '--limit 1/sec';
diff --git a/src/pvefw-logger.c b/src/pvefw-logger.c
index f762505..b005046 100644
--- a/src/pvefw-logger.c
+++ b/src/pvefw-logger.c
@@ -77,8 +77,8 @@ Example:
 
 #define LOGFILE "/var/log/pve-firewall.log"
 
-#define LOCKFILE "/var/lock/pvefw-logger.lck"
-#define PIDFILE "/var/run/pvefw-logger.pid"
+#define LOCKFILE "/run/lock/pvefw-logger.lck"
+#define PIDFILE "/run/pvefw-logger.pid"
 #define LOG_CONNTRACK_FILE "/var/lib/pve-firewall/log_nf_conntrack"
 
 #define LQ_LEN 512
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [pve-devel] [PATCH pve-guest-common] tree-wide: change /var/lock to /run/lock
       [not found] <20250322152004.1646886-1-jing@jing.rocks>
                   ` (7 preceding siblings ...)
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-firewall] tree-wide: change /var/run to /run and /var/lock to /run/lock Jing Luo via pve-devel
@ 2025-03-22 15:17 ` Jing Luo via pve-devel
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-storage] " Jing Luo via pve-devel
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-22 15:17 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 5096 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH pve-guest-common] tree-wide: change /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:17 +0900
Message-ID: <20250322152004.1646886-10-jing@jing.rocks>

"/var/run" and "/var/lock" are deprecated.

This is to comply with Debian Policy 9.1.4 "/run and /run/lock".
(https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock)

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 src/PVE/GuestHelpers.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/GuestHelpers.pm b/src/PVE/GuestHelpers.pm
index 592b4a8..5dc4498 100644
--- a/src/PVE/GuestHelpers.pm
+++ b/src/PVE/GuestHelpers.pm
@@ -31,7 +31,7 @@ typesafe_ne
 # We use a separate lock to block migration while a replication job
 # is running.
 
-our $lockdir = '/var/lock/pve-manager';
+our $lockdir = '/run/lock/pve-manager';
 
 # safe variable comparison functions
 
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [pve-devel] [PATCH pve-storage] tree-wide: change /var/lock to /run/lock
       [not found] <20250322152004.1646886-1-jing@jing.rocks>
                   ` (8 preceding siblings ...)
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-guest-common] tree-wide: change " Jing Luo via pve-devel
@ 2025-03-22 15:17 ` Jing Luo via pve-devel
  2025-03-22 15:17 ` [pve-devel] [PATCH qemu-server] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
       [not found] ` <20250322152004.1646886-2-jing@jing.rocks>
  11 siblings, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-22 15:17 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 5674 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH pve-storage] tree-wide: change /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:18 +0900
Message-ID: <20250322152004.1646886-11-jing@jing.rocks>

Let's use /run/lock for lock files. Also, pve-iscsi-rescan.lock doesn't
seem to be used by any other package. "/var/lock" is deprecated.

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 src/PVE/Storage/ISCSIPlugin.pm | 2 +-
 src/PVE/Storage/Plugin.pm      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm
index eb70453..49114a8 100644
--- a/src/PVE/Storage/ISCSIPlugin.pm
+++ b/src/PVE/Storage/ISCSIPlugin.pm
@@ -159,7 +159,7 @@ sub iscsi_logout {
     run_command([$ISCSIADM, '--mode', 'node', '--targetname', $target, '--logout']);
 }
 
-my $rescan_filename = "/var/run/pve-iscsi-rescan.lock";
+my $rescan_filename = "/run/lock/pve-iscsi-rescan.lock";
 
 sub iscsi_session_rescan {
     my $session_list = shift;
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 65cf43f..0c8f7d0 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -617,7 +617,7 @@ sub cluster_lock_storage {
     my $res;
     if (!$shared) {
 	my $lockid = "pve-storage-$storeid";
-	my $lockdir = "/var/lock/pve-manager";
+	my $lockdir = "/run/lock/pve-manager";
 	mkdir $lockdir;
 	$res = PVE::Tools::lock_file("$lockdir/$lockid", $timeout, $func, @param);
 	die $@ if $@;
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [pve-devel] [PATCH qemu-server] tree-wide: change /var/run to /run and /var/lock to /run/lock
       [not found] <20250322152004.1646886-1-jing@jing.rocks>
                   ` (9 preceding siblings ...)
  2025-03-22 15:17 ` [pve-devel] [PATCH pve-storage] " Jing Luo via pve-devel
@ 2025-03-22 15:17 ` Jing Luo via pve-devel
       [not found] ` <20250322152004.1646886-2-jing@jing.rocks>
  11 siblings, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-22 15:17 UTC (permalink / raw)
  To: pve-devel; +Cc: Jing Luo

[-- Attachment #1: Type: message/rfc822, Size: 9254 bytes --]

From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH qemu-server] tree-wide: change /var/run to /run and /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:19 +0900
Message-ID: <20250322152004.1646886-12-jing@jing.rocks>

"/var/run" and "/var/lock" are deprecated.

This is to comply with Debian Policy 9.1.4 "/run and /run/lock".
(https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock)

Signed-off-by: Jing Luo <jing@jing.rocks>
---
 PVE/CLI/qm.pm             |  2 +-
 PVE/QemuConfig.pm         |  2 +-
 PVE/QemuServer.pm         | 14 +++++++-------
 PVE/QemuServer/Helpers.pm |  2 +-
 PVE/QemuServer/Memory.pm  |  2 +-
 qmeventd/qmeventd.service |  4 ++--
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
index 4214a7ca..5e1321c6 100755
--- a/PVE/CLI/qm.pm
+++ b/PVE/CLI/qm.pm
@@ -703,7 +703,7 @@ __PACKAGE__->register_method ({
 
 	die "VM $vmid not running\n" if !PVE::QemuServer::check_running($vmid);
 
-	my $socket = "/var/run/qemu-server/${vmid}.$iface";
+	my $socket = "/run/qemu-server/${vmid}.$iface";
 
 	my $cmd = "socat UNIX-CONNECT:$socket STDIO,raw,echo=0$escape";
 
diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm
index ffdf9f03..b414db99 100644
--- a/PVE/QemuConfig.pm
+++ b/PVE/QemuConfig.pm
@@ -24,7 +24,7 @@ my $nodename = PVE::INotify::nodename();
 mkdir "/etc/pve/nodes/$nodename";
 mkdir "/etc/pve/nodes/$nodename/qemu-server";
 
-my $lock_dir = "/var/lock/qemu-server";
+my $lock_dir = "/run/lock/qemu-server";
 mkdir $lock_dir;
 
 sub assert_config_exists_on_node {
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 5bb86f7a..268140ce 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3204,8 +3204,8 @@ sub audio_devs {
 sub get_tpm_paths {
     my ($vmid) = @_;
     return {
-	socket => "/var/run/qemu-server/$vmid.swtpm",
-	pid => "/var/run/qemu-server/$vmid.swtpm.pid",
+	socket => "/run/qemu-server/$vmid.swtpm",
+	pid => "/run/qemu-server/$vmid.swtpm.pid",
     };
 }
 
@@ -3461,7 +3461,7 @@ sub query_supported_cpu_flags {
 	    $qemu_cmd,
 	    '-machine', $default_machine,
 	    '-display', 'none',
-	    '-chardev', "socket,id=qmp,path=/var/run/qemu-server/$fakevmid.qmp,server=on,wait=off",
+	    '-chardev', "socket,id=qmp,path=/run/qemu-server/$fakevmid.qmp,server=on,wait=off",
 	    '-mon', 'chardev=qmp,mode=control',
 	    '-pidfile', $pidfile,
 	    '-S', '-daemonize'
@@ -3710,7 +3710,7 @@ sub config_to_command {
     push @$cmd, '-mon', "chardev=qmp,mode=control";
 
     if (min_version($machine_version, 2, 12)) {
-	push @$cmd, '-chardev', "socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5";
+	push @$cmd, '-chardev', "socket,id=qmp-event,path=/run/qmeventd.sock,reconnect=5";
 	push @$cmd, '-mon', "chardev=qmp-event,mode=control";
     }
 
@@ -3812,7 +3812,7 @@ sub config_to_command {
     for (my $i = 0; $i < $MAX_SERIAL_PORTS; $i++)  {
 	my $path = $conf->{"serial$i"} or next;
 	if ($path eq 'socket') {
-	    my $socket = "/var/run/qemu-server/${vmid}.serial$i";
+	    my $socket = "/run/qemu-server/${vmid}.serial$i";
 	    push @$devices, '-chardev', "socket,id=serial$i,path=$socket,server=on,wait=off";
 	    # On aarch64, serial0 is the UART device. QEMU only allows
 	    # connecting UART devices via the '-serial' command line, as
@@ -6330,7 +6330,7 @@ sub vm_stop_cleanup {
 	}
 
 	foreach my $ext (qw(mon qmp pid vnc qga)) {
-	    unlink "/var/run/qemu-server/${vmid}.$ext";
+	    unlink "/run/qemu-server/${vmid}.$ext";
 	}
 
 	if ($conf->{ivshmem}) {
@@ -8789,7 +8789,7 @@ sub register_qmeventd_handle {
     my ($vmid) = @_;
 
     my $fh;
-    my $peer = "/var/run/qmeventd.sock";
+    my $peer = "/run/qmeventd.sock";
     my $count = 0;
 
     for (;;) {
diff --git a/PVE/QemuServer/Helpers.pm b/PVE/QemuServer/Helpers.pm
index 72a46a0a..a27fcfdd 100644
--- a/PVE/QemuServer/Helpers.pm
+++ b/PVE/QemuServer/Helpers.pm
@@ -21,7 +21,7 @@ my $nodename = PVE::INotify::nodename();
 
 # Paths and directories
 
-our $var_run_tmpdir = "/var/run/qemu-server";
+our $var_run_tmpdir = "/run/qemu-server";
 mkdir $var_run_tmpdir;
 
 sub qmp_socket {
diff --git a/PVE/QemuServer/Memory.pm b/PVE/QemuServer/Memory.pm
index e5024cd2..d87b3a06 100644
--- a/PVE/QemuServer/Memory.pm
+++ b/PVE/QemuServer/Memory.pm
@@ -726,7 +726,7 @@ sub hugepages_update_locked {
 
     my $timeout = 60; #could be long if a lot of hugepages need to be allocated
 
-    my $lock_filename = "/var/lock/hugepages.lck";
+    my $lock_filename = "/run/lock/hugepages.lck";
 
     my $res = lock_file($lock_filename, $timeout, $code, @param);
     die $@ if $@;
diff --git a/qmeventd/qmeventd.service b/qmeventd/qmeventd.service
index 1e2465be..d692d1a0 100644
--- a/qmeventd/qmeventd.service
+++ b/qmeventd/qmeventd.service
@@ -1,11 +1,11 @@
 [Unit]
 Description=PVE Qemu Event Daemon
-RequiresMountsFor=/var/run
+RequiresMountsFor=/run
 Before=pve-ha-lrm.service
 Before=pve-guests.service
 
 [Service]
-ExecStart=/usr/sbin/qmeventd /var/run/qmeventd.sock
+ExecStart=/usr/sbin/qmeventd /run/qmeventd.sock
 Type=forking
 
 [Install]
-- 
2.49.0




[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock
       [not found] ` <20250322152004.1646886-2-jing@jing.rocks>
@ 2025-03-24  8:02   ` Thomas Lamprecht
  2025-03-24 11:41     ` Jing Luo via pve-devel
       [not found]     ` <d8306d3000f15b2dc4dad5f0be32db4f@jing.rocks>
  0 siblings, 2 replies; 16+ messages in thread
From: Thomas Lamprecht @ 2025-03-24  8:02 UTC (permalink / raw)
  To: Jing Luo, pve-devel

Am 22.03.25 um 16:17 schrieb Jing Luo:
> It's more appropriate under Debian, and vzdump.lock doesn't seem to
> be used by any other package.

This is very dangerous and needs a ton of work to be done right.

As any vzdump job that started before a package update got installed that
includes this (and the others) patches and any job started afterwards will
not be protected at all.

Same for all other patches and the respective things they use the lock
to protect against mutual access.

If this was done we would need to:
- keep the old lock path for one major release around and always acquire
  the lock over the old path first for as long as we can safely say that
  no old job is running. For a lot of things this means until the next
  reboot, as /run is tmpfs backed and thus will be cleared then anyway.

- need some actual good reason instead of "it's more appropriate" which
  can be a fine argument for adding new lock paths but definitively not
  enough to justify moving existing ones.

The same holds for all patches of this series.


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock
  2025-03-24  8:02   ` [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock Thomas Lamprecht
@ 2025-03-24 11:41     ` Jing Luo via pve-devel
       [not found]     ` <d8306d3000f15b2dc4dad5f0be32db4f@jing.rocks>
  1 sibling, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-24 11:41 UTC (permalink / raw)
  To: Thomas Lamprecht; +Cc: Jing Luo, pve-devel

[-- Attachment #1: Type: message/rfc822, Size: 7475 bytes --]

[-- Attachment #1.1.1: Type: text/plain, Size: 1624 bytes --]

On 2025-03-24 17:02, Thomas Lamprecht wrote:
> Am 22.03.25 um 16:17 schrieb Jing Luo:
>> It's more appropriate under Debian, and vzdump.lock doesn't seem to
>> be used by any other package.
> 
> This is very dangerous and needs a ton of work to be done right.
> 
> As any vzdump job that started before a package update got installed 
> that
> includes this (and the others) patches and any job started afterwards 
> will
> not be protected at all.

My bad, for this patch I didn't think it through what the result could 
be. For
now let's drop this patch.

> Same for all other patches and the respective things they use the lock
> to protect against mutual access.
> 
> If this was done we would need to:
> - keep the old lock path for one major release around and always 
> acquire
>   the lock over the old path first for as long as we can safely say 
> that
>   no old job is running. For a lot of things this means until the next
>   reboot, as /run is tmpfs backed and thus will be cleared then anyway.
> 
> - need some actual good reason instead of "it's more appropriate" which
>   can be a fine argument for adding new lock paths but definitively not
>   enough to justify moving existing ones.
> 
> The same holds for all patches of this series.

What's wrong with other patches in the series? No lock file path is 
moved, b/c
/var/run is a symlink to /run and /var/lock is a symlink to /run/lock, 
unless
we have to account for non-Debian systems where /var/run and /var/lock 
are not
symlinks?

-- 
Jing Luo
About me: https://jing.rocks/about/
GPG Fingerprint: 4E09 8D19 00AA 3F72 1899 2614 09B3 316E 13A1 1EFC

[-- Attachment #1.1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock
       [not found]     ` <d8306d3000f15b2dc4dad5f0be32db4f@jing.rocks>
@ 2025-03-24 11:56       ` Thomas Lamprecht
  2025-03-24 13:04         ` Jing Luo via pve-devel
       [not found]         ` <39e9a7cd767a4de295ab573fa71c7722@jing.rocks>
  0 siblings, 2 replies; 16+ messages in thread
From: Thomas Lamprecht @ 2025-03-24 11:56 UTC (permalink / raw)
  To: Jing Luo; +Cc: pve-devel

Am 24.03.25 um 12:41 schrieb Jing Luo:
> On 2025-03-24 17:02, Thomas Lamprecht wrote:
>> The same holds for all patches of this series.
> 
> What's wrong with other patches in the series? No lock file path is 
> moved, b/c
> /var/run is a symlink to /run and /var/lock is a symlink to /run/lock, 
> unless
> we have to account for non-Debian systems where /var/run and /var/lock 
> are not
> symlinks?
> 

Yeah, that I noticed later too, but it would be indeed good to check if
this is a guarantee (i.e., by Debian policy) for all systems now, even
if they got created with a very ancient PVE/Debian version.

I only did a quick check, and found [0]:

> Packages must not include files or directories under /run, or under
> the older /var/run and /var/lock paths. The latter paths will normally
> be symlinks or other redirections to /run for backwards compatibility.

[0]: https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock

So does not seem like a hard guarantee that /var/lock is always a symlink
to /run/lock and that /var/run is always a symlink to /run, so if the
careful approach would be to switch to the new paths for our Trixie based
builds and add a check for the case where /var/lock and /var/run are not
symlinks in the future pve8to9 checker script and output a warning/error
in that case; that said I'm not sure if it's worth it, would be maybe good
to see since which Debian/PVE version the symlink exists to be able to
better judge that though.


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock
  2025-03-24 11:56       ` Thomas Lamprecht
@ 2025-03-24 13:04         ` Jing Luo via pve-devel
       [not found]         ` <39e9a7cd767a4de295ab573fa71c7722@jing.rocks>
  1 sibling, 0 replies; 16+ messages in thread
From: Jing Luo via pve-devel @ 2025-03-24 13:04 UTC (permalink / raw)
  To: Thomas Lamprecht; +Cc: Jing Luo, pve-devel

[-- Attachment #1: Type: message/rfc822, Size: 7169 bytes --]

[-- Attachment #1.1.1: Type: text/plain, Size: 1769 bytes --]

On 2025-03-24 20:56, Thomas Lamprecht wrote:
> [...]
> Yeah, that I noticed later too, but it would be indeed good to check if
> this is a guarantee (i.e., by Debian policy) for all systems now, even
> if they got created with a very ancient PVE/Debian version.
> 
> I only did a quick check, and found [0]:
> 
>> Packages must not include files or directories under /run, or under
>> the older /var/run and /var/lock paths. The latter paths will normally
>> be symlinks or other redirections to /run for backwards compatibility.
> 
> [0]: 
> https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock
> 
> So does not seem like a hard guarantee that /var/lock is always a 
> symlink
> to /run/lock and that /var/run is always a symlink to /run, so if the
> careful approach would be to switch to the new paths for our Trixie 
> based
> builds and add a check for the case where /var/lock and /var/run are 
> not
> symlinks in the future pve8to9 checker script and output a 
> warning/error
> in that case; that said I'm not sure if it's worth it, would be maybe 
> good
> to see since which Debian/PVE version the symlink exists to be able to
> better judge that though.

I just found that this is technically a systemd thing: at boot time,
systemd creates the symlinks /var/run -> /run and /var/lock -> 
/run/lock, this
is written in /usr/lib/tmpfiles.d/var.conf and 
/usr/lib/tmpfiles.d/legacy.conf,
which has been true at least since Debian switched to systemd in 2015.

So these two have always been symlinks (unless the machine has not been 
restarted
in the past 10+ years).

[1] https://wiki.debian.org/ReleaseGoals/RunDirectory

-- 
Jing Luo
About me: https://jing.rocks/about/
GPG Fingerprint: 4E09 8D19 00AA 3F72 1899 2614 09B3 316E 13A1 1EFC

[-- Attachment #1.1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock
       [not found]         ` <39e9a7cd767a4de295ab573fa71c7722@jing.rocks>
@ 2025-03-24 13:11           ` Thomas Lamprecht
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Lamprecht @ 2025-03-24 13:11 UTC (permalink / raw)
  To: Jing Luo; +Cc: pve-devel

Am 24.03.25 um 14:04 schrieb Jing Luo:
> I just found that this is technically a systemd thing: at boot time,
> systemd creates the symlinks /var/run -> /run and /var/lock -> 
> /run/lock, this
> is written in /usr/lib/tmpfiles.d/var.conf and 
> /usr/lib/tmpfiles.d/legacy.conf,
> which has been true at least since Debian switched to systemd in 2015.
> 
> So these two have always been symlinks (unless the machine has not been 
> restarted
> in the past 10+ years).
> 
> [1] https://wiki.debian.org/ReleaseGoals/RunDirectory
> 

Thanks for checking, then it indeed seems fine to just do those two
specific path moves without any extra coordination or backward compat
code required.

So for moving file paths from /var/run/ to /run/ and /var/lock/ to
/run/lock, i.e. where the actual location of the file does not change
at all due the respective pairs pointing to the exact same directory,
this series is:

Acked-by: Thomas Lamprecht <t.lamprecht@proxmox.com>

Anything where the underlying directory changes is still NAK'd if it
does not come with some backward compat handling code, FWICT this is
really just the single vzdump.lock patch though.


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-03-24 13:11 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20250322152004.1646886-1-jing@jing.rocks>
2025-03-22 15:17 ` [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH] rust-proxmox-network-api: change /var/lock to /run/lock Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pmg-api] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH] rust-proxmox-backup: change " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-cluster] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-common] " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-container] tree-wide: change /var/run to /run Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-firewall] tree-wide: change /var/run to /run and /var/lock to /run/lock Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-guest-common] tree-wide: change " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-storage] " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH qemu-server] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
     [not found] ` <20250322152004.1646886-2-jing@jing.rocks>
2025-03-24  8:02   ` [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock Thomas Lamprecht
2025-03-24 11:41     ` Jing Luo via pve-devel
     [not found]     ` <d8306d3000f15b2dc4dad5f0be32db4f@jing.rocks>
2025-03-24 11:56       ` Thomas Lamprecht
2025-03-24 13:04         ` Jing Luo via pve-devel
     [not found]         ` <39e9a7cd767a4de295ab573fa71c7722@jing.rocks>
2025-03-24 13:11           ` Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal