From 8f6cac0f6cf931eb08243447d48a71425e5ec3d4 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 2 Dec 2019 01:01:43 +0100 Subject: Add a --root-becomes option to tar2sqfs and sqfs2tar Signed-off-by: David Oberhollenzer --- doc/sqfs2tar.1 | 10 ++++++++++ doc/tar2sqfs.1 | 12 ++++++++++++ 2 files changed, 22 insertions(+) (limited to 'doc') diff --git a/doc/sqfs2tar.1 b/doc/sqfs2tar.1 index 7d91396..f42b266 100644 --- a/doc/sqfs2tar.1 +++ b/doc/sqfs2tar.1 @@ -11,6 +11,16 @@ archives. The resulting archive is written to stdout. .PP Possible options: .TP +\fB\-\-root\-becomes\fR, \fB\-r\fR +Prefix all paths in the tarball with the given directory name and add an +entry for this directory that receives all meta data (permissions, ownership, +extended attributes, et cetera) of the root inode. + +The special value \fB.\fR can be used since many tar archivers themselves pack +the attributes of the root directory that way and naturally support this. + +If this option is not used, all meta data from the root inode IS LOST! +.TP \fB\-\-subdir\fR, \fB\-d\fR Unpack the given sub directory instead of the filesystem root. Can be specified more than once to select multiple directories. If only one is specified, it diff --git a/doc/tar2sqfs.1 b/doc/tar2sqfs.1 index c2c7f72..70f2006 100644 --- a/doc/tar2sqfs.1 +++ b/doc/tar2sqfs.1 @@ -14,6 +14,18 @@ SquashFS. .PP Possible options: .TP +\fB\-\-root\-becomes\fR, \fB\-r\fR +If set, only pack entries that are underneath the specified directory and the +prefix is stripped. The meta data for the directory itself is copied to the +root inode, i.e. the ownership, permissions, extended attributes (unless +\f\-\-no\-xattr\R is set), and modification time +(unless \fB\-\-no\-keep\-time\fR is set). + +If this option is not set, tar2sqfs implicitly treats \fB./\fR or absolute +paths this way, i.e. if the archive contains an entry for \fB./\fR, it becomes +the root node and the prefix is stripped from all paths (and similar for +absolute paths and \fB/\fR). +.TP \fB\-\-compressor\fR, \fB\-c\fR Select the compressor to use. Run \fBtar2sqfs \-\-help\fR to get a list of all available compressors -- cgit v1.2.3