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 DE92E1FF135 for ; Sun, 22 Feb 2026 12:01:33 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E983E1F627; Sun, 22 Feb 2026 12:02:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mayr-stefan.de; s=manitu-webhosting; t=1771758131; bh=xfvE1iAFZ1rk9HGkFvNWOuIoZCUvwXEU6/1QWKVAnUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=REShEero+JasaDAQ91bUxQ3v/1TNQPdTiuoM+9urAJqA+4DAxsA6o+hlACGVW8bug +q3ujFvEd4vF7a7zt0/pOjO5ya0T1lHXJBlPXURt4VXCmvz103Q/Fl1r4qn/+8Ct36 mI0/eWRAAZuUew4YWwlWjesNN12ThSSQOFqbjPymxhwG94iFzKKDcwE1cpMugmM4dt qSNwbv+JNDg5CAo3QiS2Ke10AM5UhHulp+1fj4Q9eBlIuyEuI18xnXmwT8fMiR3Yj6 foJOGfRq/y6UcWp+T1tpAvQdi8SN/8iQWZmPehsAsC88ubYoW4axVEtmkxjHYxAyf6 uee6nc1PwJgNQ== From: Stefan Mayr To: pve-devel@lists.proxmox.com Subject: [PATCH common v3 2/2] Fix #7175: replace timezone handling with systemd timedatectl Date: Sun, 22 Feb 2026 12:02:05 +0100 Message-Id: <20260222110205.582-3-stefan@mayr-stefan.de> In-Reply-To: <20260220124809.076116bb@rosa.proxmox.com> References: <20260220124809.076116bb@rosa.proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.092 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_MISSING 0.1 Missing DMARC policy 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: IHA72TAEPY7JC4G5QQ7O4ZFCKYAM525H X-Message-ID-Hash: IHA72TAEPY7JC4G5QQ7O4ZFCKYAM525H X-MailFrom: stefan@mayr-stefan.de 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 Reply-To: s.ivanov@proxmox.com List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Usage of /etc/timezone is deprecated. The tzdata maintainers recommend switching to timedatectl. This removes the deprecated handling of /etc/timezone from the INotify module. Suggested-by: Fabian Grünbichler Suggested-by: Maximiliano Sandroval Tested-by: Stoiko Ivanov Reviewed-by: Stoiko Ivanov Signed-off-by: Stefan Mayr --- src/PVE/INotify.pm | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index fdec8f1..03c871c 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -651,37 +651,6 @@ register_file( \&update_etc_resolv_conf, ); -# Deprecated: use PVE::Systemd::get_timezone() instead -sub read_etc_timezone { - my ($filename, $fd) = @_; - - my $timezone = <$fd>; - - chomp $timezone; - - return $timezone; -} - -# Deprecated: use PVE::Systemd::set_timezone($timezone) instead -sub write_etc_timezone { - my ($filename, $fh, $timezone) = @_; - - my $tzinfo = "/usr/share/zoneinfo/$timezone"; - - raise_param_exc({ 'timezone' => "No such timezone" }) - if (!-f $tzinfo); - - ($timezone) = $timezone =~ m/^(.*)$/; # untaint - - print $fh "$timezone\n"; - - unlink("/etc/localtime"); - symlink("/usr/share/zoneinfo/$timezone", "/etc/localtime"); - -} - -register_file('timezone', "/etc/timezone", \&read_etc_timezone, \&write_etc_timezone); - sub read_active_workers { my ($filename, $fh) = @_; -- 2.34.1