Option | Default |
uid=<value> | 0 |
gid=<value> | 0 |
mode=<value> | 0755 |
mtime=<value> | $SOURCE_DATE_EPOCH if set, 0 otherwise |
# 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> link <path> <dummy> <dummy> <dummy> <target> pipe <path> <mode> <uid> <gid> sock <path> <mode> <uid> <gid> glob <path> <mode|*> <uid|*> <gid|*> [OPTIONS...] <location>
<path> |
Absolute path of the entry in the image. Can be put in quotes
if some components contain spaces.
|
<location> |
Optional location of the input file. Can be specified relative to either the
description file or the pack directory. If omitted, the image path is used
as a relative path.
|
<target> | Symlink or hardlink 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. |
The specified mode, uid and gid are applied to all new entries added by the glob. They can alternatively be set to the special value * to use the value from the input directory.
In front of the source location, several additional options can be specified to control the behavior of the glob command:
Option | Description |
-type |
Followed by a single space and a single, lowercase character describing
the inode type to accept. Works similar to the -type option of the
find command.
Possible values are b (block devices), c (character devices), d (directories), p (named pipes), f (regular files), l (symlinks) and s (sockets).
If -type is not used, all are accepted. The first use clamps the
selection down to a single type and subsequent uses allow additional
types.
|
-xdev | Do not cross mount points during a recursive glob. |
-mount | An alias for -xdev |
-keeptime | Use the time stamps from the scanned files. |
-nonrecursive |
Do not descend into directories.
Even if the type argument does not include directories, it is still possible to recursively scan a hierarchy. In that case, the scanning will not add new directory nodes, but still recurse into a directory if a coresponding node already exist in the virtual filesystem tree.
So a typicall use case might be to first scan only the
directories, and then do several narrower globs to fill them.
|
-name <pattern> |
Only add entries if their name matches a shell glob pattern.
If the pattern is supposed to contain spaces, it can be wrapped in
quotation marks ("..." or '...').
|
-path <pattern> |
Only add entries if their full resulting path in the SquashFS image
matches a shell glob pattern. Slashes in the path are only matched
against slashes in the pattern and will never match a wild card
character or a bracket expression containing a slash.
The path is normalized, so it won't have a leading or trailing slash.
|
Any other, unknown string starting with - will be rejected as unknown option. If the input path starts with -, the sequence -- can be used to stop argument parsing, similar to many command line tools.
# 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 pack dir or listing path file /sbin/init 0755 0 0 ../init/sbin/init # Read from ./bin/bash relative to pack dir or listing path # /bin is created implicitly with default attributes. file /bin/bash 0755 0 0 # file name with a space in it and a "special" name file "/opt/my app/\"special\"/data" 0600 0 0 # collect the contents of ./lib and put it under /usr/lib # mode and uid/gid are explictly set. First we collect the directory tree, # then all so files, then all symlinks that don't end in ".so" glob /usr/lib 0755 0 0 -type d ./lib glob /usr/lib 0755 0 0 -type f -name "*.so.*" ./lib glob /usr/lib 0777 0 0 -type l -name "*.so.*" ./lib
If SOURCE_DATE_EPOCH is not set, not a parsable number or it is out of range, the timestamps default to 0.
Environment variables are only used if no explicit command line switches are set. Explicit command line switches are always preferred over the environment variables.