aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--doc/gensquashfs.1126
-rw-r--r--doc/rdsquashfs.176
3 files changed, 203 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index d3d48c2..642149c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,6 +5,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
noinst_LIBRARIES =
bin_PROGRAMS =
+dist_man1_MANS = doc/gensquashfs.1 doc/rdsquashfs.1
EXTRA_DIST = autogen.sh LICENSE README
diff --git a/doc/gensquashfs.1 b/doc/gensquashfs.1
new file mode 100644
index 0000000..3d95314
--- /dev/null
+++ b/doc/gensquashfs.1
@@ -0,0 +1,126 @@
+.TH GENSQUASHFS "1" "May 2019" "generate squashfs images" "User Commands"
+.SH NAME
+gensquashfs \- generate squashfs images
+.SH SYNOPSIS
+.B gensquashfs
+[\fI\,OPTIONS\/\fR] \fI\,<file-list> <squashfs-file>\/\fR
+.SH DESCRIPTION
+The first argument is a file containing a listing of all entries to include
+in the squashfs image.
+.PP
+The second argument is the file name of the SquashFS image to generate.
+.SH OPTIONS
+.TP
+\fB\-\-compressor\fR, \fB\-c\fR <name>
+Select the compressor to use (defaults to 'xz').
+Run \fBgensquashfs \-\-help\fR to get a list of all available compressors.
+.TP
+\fB\-\-block\-size\fR, \fB\-b\fR <size>
+Block size to use for Squashfs image.
+Defaults to 131072.
+.TP
+\fB\-\-dev\-block\-size\fR, \fB\-B\fR <size>
+Device block size to padd the image to.
+Defaults to 4096.
+.TP
+\fB\-\-defaults\fR, \fB\-d\fR <options>
+A comma seperated list of default values for
+implicitly created directories.
+The following values can be set:
+.TS
+tab(;) allbox;
+l l
+l l
+l l
+l l
+l l
+rd.
+\fBOption\fR;\fBDefault\fR
+uid=<value>;0
+gid=<value>;0
+mode=<value>;0755
+mtime=<value>;0
+.TE
+.TP
+.TP
+\fB\-\-force\fR, \fB\-f\fR
+Overwrite the output file if it exists.
+.TP
+\fB\-\-quiet\fR, \fB\-q\fR
+Do not print out progress reports.
+.TP
+\fB\-\-help\fR, \fB\-h\fR
+Print help text and exit.
+.TP
+\fB\-\-version\fR, \fB\-V\fR
+Print version information and exit.
+.SH INPUT FILE FORMAT
+The input file contains a simple, newline separated list that describe the
+files to be included in the squashfs image:
+.PP
+.in +4n
+.nf
+# a comment
+file <path> <mode> <uid> <gid> [<location>]
+dir <path> <mode> <uid> <gid>
+nod <path> <mode> <uid> <gid> <dev_type> <maj> <min>
+slink <path> <mode> <uid> <gid> <target>
+pipe <path> <mode> <uid> <gid>
+sock <path> <mode> <uid> <gid>
+.fi
+.in
+
+.TS
+tab(;) allbox;
+l l
+l l
+l l
+l l
+l l
+l l
+l l
+l l
+l l
+rd.
+<path>;Absolute path of the entry in the image.
+<location>;T{
+Optional location of the input file. Can be specified
+relative to the description file. If omitted, the
+image path is used, relative to the description file.
+T}
+<target>;Symlink target.
+<mode>;Mode/permissions of the entry.
+<uid>;Numeric user id.
+<gid>;Numeric group id.
+<dev_type>;Device type (b=block, c=character).
+<maj>;Major number of a device special file.
+<min>;Minor number of a device special file.
+.TE
+
+.PP
+Example:
+.PP
+.in +4n
+.nf
+# A simple squashfs image
+dir /dev 0755 0 0
+nod /dev/console 0600 0 0 c 5 1
+dir /root 0700 0 0
+dir /sbin 0755 0 0
+
+# Add a file. Input is relative to this listing.
+file /sbin/init 0755 0 0 ../init/sbin/init
+
+# Read from ./bin/bash.
+# /bin is created implicitly with default attributes.
+file /bin/bash 0755 0 0
+.fi
+.in
+.SH AUTHOR
+Written by David Oberhollenzer.
+.SH COPYRIGHT
+Copyright \(co 2019 David Oberhollenzer
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
+.br
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
diff --git a/doc/rdsquashfs.1 b/doc/rdsquashfs.1
new file mode 100644
index 0000000..a4b758a
--- /dev/null
+++ b/doc/rdsquashfs.1
@@ -0,0 +1,76 @@
+.TH RDSQUASHFS "1" "May 2019" "inspect SquashFS filesystems" "User Commands"
+.SH NAME
+rdsquashfs \- tool to examine or uncompress SquashFS filesystems
+.SH SYNOPSIS
+.B rdsquashfs
+[\fI\,OPTIONS\/\fR] \fI\,<squashfs-file>\/\fR
+.SH DESCRIPTION
+View or extract the contents of a squashfs image.
+.PP
+The following options can be used to specify what operation to perform. One
+of those has to be present:
+.TP
+\fB\-\-list\fR, \fB\-l\fR <path>
+Produce a directory listing similar to \fBls \-l\fR for a given path in
+the SquashFS image.
+.TP
+\fB\-\-cat\fR, \fB\-c\fR <path>
+If the specified path is a regular file in the image, extract it and dump
+its contents to stdout.
+.TP
+\fB\-\-unpack\-path\fR, \fB\-u\fR <path>
+Unpack the specified sub directory from the image. To unpack everything,
+simply specify /.
+.TP
+\fB\-\-describe\fR, \fB\-d\fR
+Produce a file listing from the image.
+.PP
+The following options can be used to control the behaviour of the specified
+operation:
+.TP
+\fB\-\-unpack\-root\fR, \fB\-p\fR <path>
+If used with \fB\-\-unpack\-path\fR, this is where the
+data is unpacked to. If used with \fB\-\-describe\fR, this
+is used as a prefix for the input path of
+regular files.
+.TP
+\fB\-\-no\-dev\fR, \fB\-D\fR
+Do not unpack device special files.
+.TP
+\fB\-\-no\-sock\fR, \fB\-S\fR
+Do not unpack socket files.
+.TP
+\fB\-\-no\-fifo\fR, \fB\-F\fR
+Do not unpack named pipes.
+.TP
+\fB\-\-no\-slink\fR, \fB\-L\fR
+Do not unpack symbolic links.
+.TP
+\fB\-\-no\-empty\-dir\fR, \fB\-E\fR
+Do not unpack directories that would end up
+empty after applying the above rules.
+.TP
+\fB\-\-chmod\fR, \fB\-C\fR
+Change permission flags of unpacked files to
+those store in the SquashFS image.
+.TP
+\fB\-\-chown\fR, \fB\-O\fR
+Change ownership of unpacked files to the
+UID/GID set in the SquashFS image.
+.TP
+\fB\-\-quiet\fR, \fB\-q\fR
+Do not print out progress while unpacking.
+.TP
+\fB\-\-help\fR, \fB\-h\fR
+Print help text and exit.
+.TP
+\fB\-\-version\fR, \fB\-V\fR
+Print version information and exit.
+.SH AUTHOR
+Written by David Oberhollenzer.
+.SH COPYRIGHT
+Copyright \(co 2019 David Oberhollenzer
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
+.br
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.