
The pack command packs the given snap-dir as a snap and writes the result to

target-dir. If target-dir is omitted, the result is written to current

directory. If both source-dir and target-dir are omitted, the pack command packs

the current directory.

The default file name for a snap can be derived entirely from its snap.yaml, but

in some situations it's simpler for a script to feed the filename in. In those

cases, --filename can be given to override the default. If this filename is

not absolute it will be taken as relative to target-dir.

When used with --check-skeleton, pack only checks whether snap-dir contains

valid snap metadata and raises an error otherwise. Application commands listed

in snap metadata file, but appearing with incorrect permission bits result in an

error. Commands that are missing from snap-dir are listed in diagnostic

messages.

When used with --append-integrity-data, pack will append dm-verity data at the end

of the snap to be used with snapd's snap integrity verification mechanism.