[pve-devel] [PATCH common 1/1] Fix #7175: remove deprecated timezone file

Stefan Mayr stefan at mayr-stefan.de
Fri Jan 16 22:32:30 CET 2026


Am 15.01.2026 um 11:26 schrieb Fabian Grünbichler:
> On December 29, 2025 1:03 pm, Maximiliano Sandoval wrote:
>> Stefan Mayr <stefan at mayr-stefan.de> writes:
>>
>> Thanks for submitting a patch.
>>
>> A comment below.
>>
>>> Suggested-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
>>> Signed-off-by: Stefan Mayr <stefan at mayr-stefan.de>
>>> ---
>>>   src/PVE/INotify.pm | 29 -----------------------------
>>>   1 file changed, 29 deletions(-)
>>>
>>> diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
>>> index 62b3ca8..03c871c 100644
>>> --- a/src/PVE/INotify.pm
>>> +++ b/src/PVE/INotify.pm
>>> @@ -651,35 +651,6 @@ register_file(
>>>       \&update_etc_resolv_conf,
>>>   );
>>>   
>>> -sub read_etc_timezone {
>>> -    my ($filename, $fd) = @_;
>>> -
>>> -    my $timezone = <$fd>;
>>> -
>>> -    chomp $timezone;
>>> -
>>> -    return $timezone;
>>> -}
>>> -
>>> -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);
>>>
>>
>> At least pmg-api and pve-container use this. I would recommend to only
>> add a comment here instead of removing the helper since this is a shared
>> library. Alternatively, one could port all existing users to, e.g.
>> timedatectl.
> 
> porting all callers and then dropping it would probably make the most
> sense, or we could introduce new helpers in pve-common that are usable
> for all existing callers..

That's why I've already sent multiple patches ...

>>
>>> -
>>>   sub read_active_workers {
>>>       my ($filename, $fh) = @_;
>>
>> -- 
>> Maximiliano
>>
>>
>> _______________________________________________
>> pve-devel mailing list
>> pve-devel at lists.proxmox.com
>> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>>





More information about the pve-devel mailing list