On Sun, Jul 08, 2018 at 07:45:36PM +0100, Jonathan Dieter wrote:
> On Fri, 2018-07-06 at 11:48 +0000, Michael Schroeder wrote:
> > On Thu, Jul 05, 2018 at 08:07:58PM +0300, Jonathan Dieter wrote:
> > > My proposal is here:
> > > https://www.jdieter.net/downloads/zchunk/repomd.dtd
> > > 
> > > In summary, I'm just adding extra zchunk attributes to the main file
> > > element:
> > > zck-location
> > > header-checksum
> > > header-size
> > > zck-timestamp
> > > 
> > > librepo first downloads header-size of the file and then verifies that
> > > the header checksum matches and is valid.
> > 
> > Please use zck-header-checksum and zck-header-size instead.
> 
> Ok, will do.

I tought about this a bit more over the weekend, and maybe we
should do this in a bit more general way. Basically zchunk is
just another compression format, like "xz" or "zstd". If we
want to support yet another compression format, we proably wouldn't
want to add new attributes to the existing elements, but instead
add new elements. E.g.

<data type="primary">
  <location href="...primary.gz" />
  <checksum type="sha256">...</checksum>
</data>
<data type="primary" compression="xz">
  <location href="...primary.xz" />
  <checksum type="sha256">...</checksum>
</data>

We might also want to add a "format" attribute in case we want
to get switch from "xml" to something that can be parsed faster,
like "json".

The zchunk compression format would be the same, but with added
"header-size" and "header-checksum" elements (so back to what
you had earier):

<data type="primary" compression="zchunk">
  <location href="...primary.zck" />
  <checksum type="sha256">...</checksum>
  <timestamp>...</timestamp>
  <size>...</size>
  <open-size>...</open-size>
  <open-checksum type="sha256">...</open-checksum>
  <header-size>...</header-size>
  <header-checksum type="sha256">...</header-checksum>
</data>

The problem with all this is that we don't know how all the
repomd.xml parsers behave when there are multiple <data> elements
with the same type, so we might need to annotate the "type" with
the compression/format, e.g. "primary@zchunk".

Cheers,
  Michael.

-- 
Michael Schroeder                                   m...@suse.de
SUSE LINUX GmbH,           GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
_______________________________________________
Rpm-ecosystem mailing list
Rpm-ecosystem@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-ecosystem

Reply via email to