#4343 schemas: support `.raw.zst` file suffixes
Opened 2 months ago by supakeen. Modified 2 months ago
supakeen/koji zst-archives  into  master

schemas: support `.raw.zst` file suffixes
Simon de Vlieger • 2 months ago  
@@ -0,0 +1,6 @@ 

+ -- upgrade script to migrate the Koji database schema

+ -- from version 1.35 to 1.36

+ 

+ BEGIN;

+     INSERT INTO archivetypes (name, description, extensions) VALUES ('raw-zst', 'zst compressed raw disk image', 'raw.zst') ON CONFLICT DO NOTHING;

+ COMMIT;

file modified
+1
@@ -939,6 +939,7 @@ 

  INSERT INTO archivetypes (name, description, extensions) VALUES ('wsf', 'Windows script file', 'wsf');

  INSERT INTO archivetypes (name, description, extensions) VALUES ('box', 'Vagrant Box Image', 'box');

  INSERT INTO archivetypes (name, description, extensions) VALUES ('raw-xz', 'xz compressed raw disk image', 'raw.xz');

+ INSERT INTO archivetypes (name, description, extensions) VALUES ('raw-zst', 'zst compressed raw disk image', 'raw.zst');

  INSERT INTO archivetypes (name, description, extensions) VALUES ('json', 'JSON data', 'json');

  INSERT INTO archivetypes (name, description, extensions) VALUES ('key', 'Key file', 'key');

  INSERT INTO archivetypes (name, description, extensions) VALUES ('dot', 'DOT graph description', 'dot gv');

While working on the image-builder out-of-tree plugin I noticed that
koji currently does not support .raw.zst disk image outputs. Let's
add them to the schema(s).

Signed-off-by: Simon de Vlieger supakeen@redhat.com

Note, I'm unsure if the version-differential schema should be generated, it's handwritten for now.

@mikem what do you think about adding another archivetype? I'm 60% plus here as we've already those other raw variants.

As some additional information, it won't exactly be common to use zstd since the time/space tradeoff for it favors local builds more than build systems.

However, there are (one) Fedora spins that would like to also provide this archive format aside from xz. The reasoning is that it seems to perform much better for unpacking on resource constrained devices.

Yes, the question is if it should be part of basic installation. It is easy to add it via API to running instance (koji call addArchiveType raw-zst 'zst compressed raw disk image' 'raw.zst') Sadly, we're historically not consistent what is part of initial data and what should be defined per running instance.