public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH container] config: allow empty environment variables
Date: Mon, 17 Nov 2025 15:05:06 +0100	[thread overview]
Message-ID: <1763388127.1dwkro8h4v.astroid@yuna.none> (raw)
In-Reply-To: <1763387948.vnr0y6nj1p.astroid@yuna.none>

On November 17, 2025 2:59 pm, Fabian Grünbichler wrote:
> On November 17, 2025 1:49 pm, Filip Schauer wrote:
>> This fixes a problem with the docker.io/httpd OCI image which specifies
>> an empty environment variable. This violated the pattern of the `env`
>> property, causing `pct config <vmid>` to fail with:
> 
> shouldn't we handle this and drop that environment variable entry
> instead?

hmm, thinking about this some more - I guess an empty string and not
being set are worth disambiguating?

> 
>> ```
>> env: value does not match the regex pattern
>> ```
>> 
>> Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
>> ---
>>  src/PVE/LXC/Config.pm | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
>> index cd3a172..b6fc9a8 100644
>> --- a/src/PVE/LXC/Config.pm
>> +++ b/src/PVE/LXC/Config.pm
>> @@ -671,7 +671,7 @@ my $confdesc = {
>>          description => 'The container runtime environment as NUL-separated list.'
>>              . ' Replaces any lxc.environment.runtime entries in the config.',
>>          optional => 1,
>> -        pattern => qr/(?:\w+=[^\x00-\x1F\x7F]+)(?:\0\w+=[^\x00-\x1F\x7F]+)*/,
>> +        pattern => qr/(?:\w+=[^\x00-\x1F\x7F]*)(?:\0\w+=[^\x00-\x1F\x7F]*)*/,
>>      },
>>      hookscript => {
>>          optional => 1,
>> -- 
>> 2.47.3
>> 
>> 
>> 
>> _______________________________________________
>> pve-devel mailing list
>> pve-devel@lists.proxmox.com
>> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>> 
>> 
>> 
> 


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

  reply	other threads:[~2025-11-17 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17 12:49 Filip Schauer
2025-11-17 13:59 ` Fabian Grünbichler
2025-11-17 14:05   ` Fabian Grünbichler [this message]
2025-11-17 14:08   ` Filip Schauer
2025-11-17 14:15 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1763388127.1dwkro8h4v.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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