summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-11-19 16:59:41 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-11-19 16:59:41 +0100
commit08c2540cb7649b8f9eea8435551e5dc3bc11a250 (patch)
tree90181ed2e99d270e66625578eef5b70c446f906a /bin
parent007ff40bf440d72d2ca4ffed26b6b2ea752b1562 (diff)
Add a man-page section about the xattr file format
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin')
-rw-r--r--bin/gensquashfs/gensquashfs.131
1 files changed, 31 insertions, 0 deletions
diff --git a/bin/gensquashfs/gensquashfs.1 b/bin/gensquashfs/gensquashfs.1
index f0697ab..88f58c4 100644
--- a/bin/gensquashfs/gensquashfs.1
+++ b/bin/gensquashfs/gensquashfs.1
@@ -95,6 +95,10 @@ A short hand for `\-\-set\-uid 0 \-\-set\-gid 0`.
If built with SELinux support, use the given SELinux label file to add context
labels to the elements packed into the SquashFS image.
.TP
+\fB\-\-xattr-file\fR, \fB\-A\fR <file>
+Read extended attributes from a file. The format for the file is identical to
+the output generated by `\fBgetfattr \-\-dump\fR`.
+.TP
\fB\-\-exportable\fR, \fB\-e\fR
Generate an export table for NFS support.
.TP
@@ -345,6 +349,33 @@ T}
# For demonstration, a quoted filename and no flags
1337 "usr/share/my \\"special\\" file "
.fi
+.SH XATTR FILE FORMAT
+The format for xattr files tries to be identical to the output
+of \fBgetfattr\fR.
+
+Attributes are listed as key-value pairs with an \fB=\fR sign in between.
+
+If a line starts with `\fB# file: \fR`, the rest of the line is interpreted
+as an absolute path that the following xattrs are applied to.
+
+Plain text values are wrapped in quotation marks ("...") and support some
+escape sequences.
+Currently supported are \fB\\"\fR, \fB\\\\\fR and \fB\\0<octal-sequence>\fR.
+
+Raw binary values can encoded as hexadecimal or base64, by starting the
+value with a \fB0x\fR or \fB0s\fR prefix respectively.
+
+.SS Example
+.PP
+.nf
+# file: dev/
+security.selinux="system_u:object_r:device_t:s0"
+user.beverage_preference=0xCAFECAFEDECAFBAD
+
+# file: dev/rfkill
+security.selinux="system_u:object_r:wireless_device_t:s0"
+system.posix_acl_access=0sSGVsbG8gdGhlcmUgOi0pCg==
+.fi
.SH ENVIRONMENT
If the command line switch \fB\-\-defaults\fR is not used or no default mtime
is specified, the value of the environment variable \fBSOURCE\_DATE\_EPOCH\fR