srpm-cleanup(1)

SRPM-CLEANUP(1) SRPM-CLEANUP(1)

NAME

srpm-cleanup - truncate files in SRPM packages

SYNOPSIS

srpm-cleanup [options] [skiplist | skipdir | NVR ...]

srpm-cleanup main options -H HOST [cleaner options] [-H HOST [cleaner options] ...] skiplist | skipdir ...

DESCRIPTION

srpm-cleanup removes specified source files from SRPM packages. The list of unused files can be obtained with hsh-separate-sources(1).

Main options

  • -T TDIR, --tardir=TDIR: Output the intermediate TAR archives to directory TDIR.
  • -t, --tar-only: Do not generate SRPM from TAR.
  • -O OUTDIR, --outdir=OUTDIR: Output the resulting SRPM files to directory OUTDIR.
  • -l LDIR, --logdir=LOGDIR: Save logs into LOGDIR.
  • -x XLIST, --exceptions=XLIST: Don´t truncate files that match patterns listed in the XLIST.
  • -N NVR, --nvr=NVR: Name-version-release of the SRPM package. Useable with input from stdin or a single skiplist on the command line, when NVR can not be deduced from the name of the skiplist file.
  • -s SKIPDIR, --skipdir=SKIPDIR: Search SKIPDIR for skiplists of the packages given on the command line. If specified then each positional argument is expected to be a name-version-release string.
  • --translate=TSCRIPTDIR: Lookup TSCRIPTDIR directory for list translation scripts. A list translation script should be named after the package NVR and be eigher a executable or a sed(1) script file (having the suffix .sed).
  • -E, --abort-on-error: Abort execution on first error. In parallel mode (see -n|--nums, -H|--host) it waits for the running clean-ups to complete.
  • -f, --force: Oerwrite existing results (force clean-up packages).
  • -q, --quiet: Do not print any info while running.
  • -v, --verbose: Print more info while running.
  • --dry-run[-run]: Calculate the number of packages to clean and exit. In parallel mode (see -n|--nums and -H|--host) the GNU Parallel´s preview is output on --dry-run and parallel execution of --dry-run instances is started with --dry-run-run.
  • --check-args: Exit after checking the arguments.
  • -V, --version: Print program version and exit.
  • -h, --help: Output brief help and exit.
  • --with-srpms[=FROM]: Transfer SRPMs (from directory FROM) to remote cleaners.
  • --with-tars: Transfer package tarballs from directory TDIR to remote cleaners. The tarballs arn´t re(created) in this mode even with -f | --force.
  • --selfie: Copy this script to remote cleaners.
  • --remote-dir=DIR: GNU Parallel´s working home on the remote cleaners. See --workdir option of parallel(1).
  • --cleanup: Clean-up SRPMs, self and resulting lists on remote cleaners after transferring them back to the master. Use with caution! This option is known to make a race!
  • --joblog=JOBLOG: Keep job log JOBLOG in order to --retry and --resume.
  • --resume: Resume from the last unfinished job (requires --joblog, implies -f).
  • --resume-failed: Retry all failed and resume from the last unfinished job (requires --joblog, implies -f).
  • --retry-failed: Retry all failed jobs (requires --joblog).
  • --retries=N: Try each failing job N times.
  • --controlmaster: Use ssh´s ControlMaster option.
  • --sshdelay=SECS: Delay starting next remote job by SECS seconds (which can be a fraction of 1 s).
  • --parallel-opts=OPTS: Pass the specified options to GNU Parallel.

Cleaner configuration options

  • -C CONF, --apt-config=CONF: Pass --apt-config=CONF to hsh(1). In order to use this option with more than one architecture (see -a|--arches) the path should contain %s which is substituted with the name of the architecture.
  • -R ADDR, --repo=ADDR: Alternatively, configure Hasher to use the repository at ADDR. The sources configuration for APT is generated on the fly. This option can be used multiple times for the same host. Addresses without a protocol prefix are translated into file addresses (i.e. file://).
  • -B DIR, --base=DIR: Prepend paths of SRPMs with DIR. The option can be used multiple times for the same host.
  • -n NUMS, --nums=NUMS: Allowed Hasher slot (subconfig) numbers (as in hsh --number). It also defines the number of gear(1) processes for preparing TAR files.
NUMS can be a single number, a number sequence (space or comma-separated), a N-M number range or a sequence of ranges. If this option is specified then the working directory path has to be also explicitly specified using -d|--dir. If path doesn´t contain %d the actual slot number is appended to the path after /. The resulting directory path is created on-demand.
If more than one slot is allowed using this option, the slots are run in parallel with the help of parallel(1) --- the GNU Parallel. This option can be used multiple times for the same host.
The special value :N is used internally in parallel execution to select a slot number by its ordinal number.
  • -a ARCHES, --arches=ARCHES: List of architectures this host supports (comma and space serarated). This option can be used multiple times for the same host.
  • -d DIR, --dir=DIR: Sets the working directory path to be used with hsh(1) command. If DIR contains %d template and -n|--nums opition is given the template is substituted with the actual slot number. The directory is created on-demand.
  • --debug: Do not delete temporary directory and print its path on exit.
  • --id=NAME: Cleaner name to print in the log.
  • -e SSH, --ssh=SSH: Use SSH remote shell to reach remote cleaners (default is ssh).
  • -u USER, --user=USER: Name of a remote user to login with.
  • -H REMOTES, --host=REMOTES: Add given remote cleaner(s) and make any of the above cleaner configuration options specified after it specific to that remote(s). REMOTES is a comma or space-seprated sequence of ssh-like specifications: [username@]host. Alternatively, a single user name for all given remotes can be specified using -u|--user option. Use -e|--ssh to override the default remote shell command (ssh). And use : to refer to the local machine.

SEE ALSO

hsh-separate-sources(1), hasher(1), gear(1), hsh(1).

COPYRIGHT

Copyright (C) 2020 BaseALT /basealt.ru/. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

AUTHOR

  • Anton V. Boyarshinov boyarsh@altlinux.org
  • Michael Shigorin mike@altlinux.org
  • Paul Wolneykien manowar@altlinux.org

REPORTING BUGS

Report bugs to https://bugzilla.altlinux.org/.

May 2021