[pbs-devel] [PATCH v8 pxar 14/69] format/encoder/decoder: new pxar entry type `Version`

Christian Ebner c.ebner at proxmox.com
Mon Jun 3 13:54:46 CEST 2024


On 6/3/24 13:25, Fabian Grünbichler wrote:
> On May 28, 2024 11:42 am, Christian Ebner wrote:
>> Introduces a new pxar format entry type `Version` and the associated
>> encoder and decoder methods. The format version entry is only allowed
>> once, as the first entry of the pxar archive, marked with a
>> `PXAR_FORMAT_VERSION` header followed by the encoded version number.
>> If not present, the default format version 1 is assumed as encoding
>> format for the archive.
>>
>> The entry allows to early detect incompatibility with an encoded
>> archive and bail or switch mode based on the encountered version.
>>
>> The format version entry is not backwards compatible to pxar format
>> version 1.
>>
>> Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
> 
> it seems there are still some checks missing for this, if I build
> patched PBS versions with an added Version 3 but lacking decode support,
> I get the expected error in a lot of places, but can for example use the
> `pxar-file-download` endpoint to download files from the archive, even
> though the server should choke on the archive since it's using an
> unknown value in the version header/entry..
> 
> ideally they'd be added here in pxar (since who knows, the next format
> break might be entirely transparent to PBS :))
> 

Okay, agreed! I will add an additional check to the decoder which fails 
if the encoded variant is not known.





More information about the pbs-devel mailing list