# `repack` command

Repacks the downloaded files into a uniform source archive, merging the referenced source packages into a single archive and optionally applying patches. The layout of the source archive is controlled by the ‘format’ argument. If an input SBOM is provided and data is passed via stdin, only the packages passed via stdin are resolved and updated in the final SBOM.

Note: The files have to be downloaded first and need to be in the directory specified by ‘dldir’.

    usage: debsbom repack [-h] [-t {cdx,spdx}]
                          [--compress {no,bzip2,gzip,xz,zstd,lz4}]
                          [--apply-patches] [--mtime MTIME] [--dldir DLDIR]
                          [--outdir OUTDIR]
                          [--format {standard-bom,standard-bom-package}] [--copy]
                          [--validate] [--sources] [--binaries]
                          bomin bomout

## Positional Arguments

`bomin`

  sbom file(s) to process for ‘bomin’. Use ‘-’ to read from stdin

`bomout`

  sbom output file. Use ‘-’ to write to stdout

## Named Arguments

`-t, --sbom-type`

  Possible choices: cdx, spdx

  SBOM type to process (default: auto-detect), required when reading from stdin

`--compress`

  Possible choices: no, bzip2, gzip, xz, zstd, lz4

  compress merged tarballs (default: gzip)

  Default: `'gzip'`

`--apply-patches`

  apply debian patches

  Default: `False`

`--mtime`

  set mtime for creating tar archives in ISO 8601 format. If this option is not set, the timestamp from the most recent changelog entry is used for reproducible builds.

`--dldir`

  download directory from ‘download’

  Default: `'downloads'`

`--outdir`

  directory to repack into (default: ‘packed’)

  Default: `'packed'`

`--format`

  Possible choices: standard-bom, standard-bom-package

  Default: `'standard-bom-package'`

`--copy`

  copy artifacts into deploy tree instead of symlinking

  Default: `False`

`--validate`

  validate generated SBOM (only for SPDX)

  Default: `False`

`--sources`

  operate only on source packages (skip binaries)

  Default: `False`

`--binaries`

  operate only on binary packages (skip sources)

  Default: `False`