Message ID | 20211209083926.938142-1-dominique.martinet@atmark-techno.com |
---|---|
State | Accepted |
Headers | show |
Series | doc: add documentation for archive handler | expand |
Hi Dominique, On 09.12.21 09:39, Dominique Martinet wrote: > the archive handler was briefly named at the start of the chapter, but > there was no explicit section for it. Urgh...this is a big bug in Documentation. > In paritcular, preserve-attributes is only documented briefly in > sw-description.rst somewhere which has nothing to do with handlers, > when the flag is actually only ever used for this handler, so it > makes sense to re-document it here to clarify. > > Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> > --- > While I'm spamming you with patches, here's one more... > preserve-attributes had eluded me for longer than it should have and it > won't hurt to bring it a bit further forward. > > Note the indentation in this file is all over the place, with tabs for > some examples and spaces for others, and some sections with a bit of > both. > Since the delta handler section used space I went for the same. It is fine. > > doc/source/handlers.rst | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/doc/source/handlers.rst b/doc/source/handlers.rst > index ca4ea5a6707c..dc52cbbe2a69 100644 > --- a/doc/source/handlers.rst > +++ b/doc/source/handlers.rst > @@ -781,6 +781,28 @@ the source - it can be a file or a partition. > } > } > > +Archive handler > +--------------- > + > +The archive handler extracts an archive to a destination path. > +It supports whatever format libarchive has been compiled to support, for example even if swupdate > +itself has no direct support for xz it can be possible to extract tar.xz files with it. > + > +The attribute `preserve-attributes` must be set to preserve timestamps. uid/gid (numeric), > +permissions (except +x, always preserved) and extended attributes. > + > +:: > + > + files: ( > + { > + filename = "examples.tar.zst"; > + type = "archive"; > + path = "/extract/here"; > + preserve-attributes = true; > + installed-directly = true; > + } > + ); > + > Disk partitioner > ---------------- > > Applied to -master, thanks ! Best regards, Stefano Babic
diff --git a/doc/source/handlers.rst b/doc/source/handlers.rst index ca4ea5a6707c..dc52cbbe2a69 100644 --- a/doc/source/handlers.rst +++ b/doc/source/handlers.rst @@ -781,6 +781,28 @@ the source - it can be a file or a partition. } } +Archive handler +--------------- + +The archive handler extracts an archive to a destination path. +It supports whatever format libarchive has been compiled to support, for example even if swupdate +itself has no direct support for xz it can be possible to extract tar.xz files with it. + +The attribute `preserve-attributes` must be set to preserve timestamps. uid/gid (numeric), +permissions (except +x, always preserved) and extended attributes. + +:: + + files: ( + { + filename = "examples.tar.zst"; + type = "archive"; + path = "/extract/here"; + preserve-attributes = true; + installed-directly = true; + } + ); + Disk partitioner ----------------
the archive handler was briefly named at the start of the chapter, but there was no explicit section for it. In paritcular, preserve-attributes is only documented briefly in sw-description.rst somewhere which has nothing to do with handlers, when the flag is actually only ever used for this handler, so it makes sense to re-document it here to clarify. Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> --- While I'm spamming you with patches, here's one more... preserve-attributes had eluded me for longer than it should have and it won't hurt to bring it a bit further forward. Note the indentation in this file is all over the place, with tabs for some examples and spaces for others, and some sections with a bit of both. Since the delta handler section used space I went for the same. doc/source/handlers.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)