REPOD-FILE(1)

File actions for packages, management repository and sync databases.

    usage: repod-file [-h] [-c CONFIG] [-d] [-s] [-v] {package,repo,schema} ...

POSITIONAL ARGUMENTS

subcommand
    Possible choices: package, repo, schema

NAMED ARGUMENTS

-c, --config
    configuration file

-d, --debug
    debug output

    Default: False

-s, --system
    system mode

    Default: False

-v, --verbose
    verbose output

    Default: False

SUB-COMMANDS

  package

interact with package files

    repod-file package [-h] {inspect} ...

  Positional Arguments

package
    Possible choices: inspect

  Sub-commands

  inspect

inspect package files

    repod-file package inspect [-h] [-B | -M | -P] [-p] [-s] file [file ...]

  Positional Arguments

file
    package files

  Named Arguments

-B, --buildinfo
    only inspect .BUILDINFO

    Default: False

-M, --mtree
    only inspect .MTREE

    Default: False

-P, --pkginfo
    only inspect .PKGINFO

    Default: False

-p, --pretty
    pretty print output

    Default: False

-s, --with-signature
    locate and use a signature file for each provided package file

    Default: False

  repo

interact with repositories

    repod-file repo [-h] {importdb,importpkg,writedb} ...

  Positional Arguments

repo
    Possible choices: importdb, importpkg, writedb

  Sub-commands

  importdb

import state from a repository sync database

    repod-file repo importdb [-h] [-a ARCHITECTURE] [-D | -S | -T] file name

  Positional Arguments

file
    repository sync database

name
    name of repository to import to

  Named Arguments

-a, --architecture
    target a repository with a specific architecture (if multiple of the same name but differing architecture exist)

-D, --debug
    import to debug repository

    Default: False

-S, --staging
    import to staging repository

    Default: False

-T, --testing
    import to testing repository

    Default: False

  importpkg

import packages to a repo

    repod-file repo importpkg [-h] [-a ARCHITECTURE] [-d] [-p] [-s]
                              [-u SOURCE_URL [SOURCE_URL ...]] [-D | -S | -T]
                              file [file ...] name

  Positional Arguments

file
    package files

name
    name of repository to import to

  Named Arguments

-a, --architecture
    target a repository with a specific architecture (if multiple of the same name but differing architecture exist)

-d, --dry-run
    only show output, but do not write output to file

    Default: False

-p, --pretty
    pretty print output (only applies to dry-run mode)

    Default: False

-s, --with-signature
    locate and use a signature file for each provided package file

    Default: False

-u, --source-url
    list of source URLs for added pkgbases (provided as one or more pkgbase=url strings)

    Default: []

-D, --debug
    import to debug repository

    Default: False

-S, --staging
    import to staging repository

    Default: False

-T, --testing
    import to testing repository

    Default: False

  writedb

export state to repository sync database

    repod-file repo writedb [-h] [-a ARCHITECTURE] [-D | -S | -T] name

  Positional Arguments

name
    name of repository to write to

  Named Arguments

-a, --architecture
    target a repository with a specific architecture (if multiple of the same name but differing architecture exist)

-D, --debug
    export from debug repository

    Default: False

-S, --staging
    export from staging repository

    Default: False

-T, --testing
    export from testing repository

    Default: False

  schema

JSON schema commands

    repod-file schema [-h] {export} ...

  Positional Arguments

schema
    Possible choices: export

  Sub-commands

  export

export JSON schemas to directory

    repod-file schema export [-h] dir

  Positional Arguments

dir directory to which to write JSON files to

EXAMPLES

  TRANSFORM REPOSITORY SYNC DATABASE TO MANAGEMENT REPOSITORY

Sync Database files can be transformed to representations used in the context of a Management Repository.

NOTE: Files Database files are required to create Management Repository files, that contain information on files contained in the respective packages they represent! This data is not contained in the Default Database files!

For testing purposes, the system's sync databases in /var/lib/pacman/sync/ can be used (this assumes a system that makes use of pacman as package manager).

To import Default Database files and output them to the management repository directory of a configured repository, use:

    repod-file repo importdb /var/lib/pacman/sync/core.db default

To be able to use Files Database files, make sure to update them first.

    pacman -Fy

Afterwards it is possible to import those files analogous to how it is done with Default Database files:

    repod-file repo importdb /var/lib/pacman/sync/core.files default

The above assumes the repository named default is present (e.g. when no configuration file for repod is present).

  TRANSFORM MANAGEMENT REPOSITORY TO REPOSITORY SYNC DATABASE

The JSON files contained in a Management Repository can be transformed into a Sync Database (both Default Database and Files Database files are created).

After following the examples in TRANSFORM REPOSITORY SYNC DATABASE TO MANAGEMENT REPOSITORY, it is possible to use the created files and turn them back into Sync Database files.

    repod-file repo writedb default

The above creates default.db as well as default.files in the binary repository location of the repository named default.

SEE ALSO

repod.conf(5) <https://man.archlinux.org/man/repod.conf.5>, BUILDINFO(5) <https://man.archlinux.org/man/BUILDINFO.5>, mtree(5) <https://man.archlinux.org/man/mtree.5>, pacman(8) <https://man.archlinux.org/man/pacman.8>

AUTHOR
David Runge

COPYRIGHT
2022, David Runge