SLACKREPO(8)

NAME
slackrepo - automated SlackBuild package building and repository maintenance

SYNOPSIS
slackrepo build [OPTIONS] [ITEM ...]

slackrepo rebuild [OPTIONS] [ITEM ...]

slackrepo update [OPTIONS] [ITEM] ...

slackrepo remove [OPTIONS] ITEM ...

slackrepo revert [OPTIONS] ITEM ...

slackrepo lint [OPTIONS] [ITEM ...]

slackrepo install [OPTIONS] [ITEM ...]

slackrepo info [OPTIONS]

DESCRIPTION

Slackrepo is a highly automated tool for Slackware users to manage their own package repositories. It builds packages from a repository of SlackBuilds (for example, a clone of SlackBuilds.org), and then outputs the packages to a package repository.

slackrepo build
    Builds packages from an input repository of SlackBuilds (for example, a git clone of SlackBuilds.org), and then stores them in a package repository. add is accepted as a synonym of build.

slackrepo rebuild
    Rebuilds packages that are already in the package repository.

slackrepo update
    Builds, rebuilds and removes packages in the package repository, according to changes in the SlackBuild repository.

slackrepo remove
    Removes packages from the package repository.

slackrepo revert
    Moves packages from the backup repository into the package repository, and packages from the package repository into the backup repository. restore is accepted as a synonym of revert.

slackrepo lint
    Performs quality checks without performing a build. See the --lint control argument for a brief description of the checks that can be performed.

slackrepo install
    Installs a package on the host system, building first if necessary. This command is equivalent to build --install.

slackrepo info
    Prints information about the system and specified repository, configuration and options.

ITEM
    An item specifies a directory or a SlackBuild file in the SlackBuild repository, and/or (in the update, remove and revert commands only) formerly in the SlackBuild repository. Shell-style globs (wildcards) are allowed. If no items are specified, all directories in the SlackBuild repository are processed (except in the remove and revert commands, where it is mandatory to specify the items to be removed).

OPTIONS

--chroot[=path]
    Construct and use a temporary chroot environment for each build process. (Requires a Linux 3.18+ kernel with overlayfs.) The specified path will be used to create the chroot (default '/'). This option has no effect with the remove, revert and lint commands.

--color=always|auto|no
    Pass coloured output from cmake, clang, git, gcc, mono, waf etc. to standard output if standard output is a terminal console (--color=auto), or pass colour unconditionally (--color=always), or do not pass colour (--color=no). The default is --color=auto. The --color option is effective only if --verbose is specified. --colour is accepted as a synonym of --color.

--debug
    Equivalent to --very-verbose --lint --dry-run --keep-tmp.

--dry-run
    Builds and rebuilds will be performed, and removes and reverts will be checked, but no changes will be made to the package repository. This option conflicts with --preview and --install. This option has no effect with the lint command.

--install
    Built, rebuilt and updated packages will be installed on the host system. This results in a "queue" style build, and packages may not be 100% clean of unexpected dependencies. The default is for packages not to be installed. This option conflicts with --dry-run and --preview. This option has no effect with the remove, revert and lint commands.

--keep-tmp
    Keep all temporary files in $TMP and $TMPDIR, for debugging purposes.

--lint[=sb,dl,x,net,pkg,inst]
    Specifies quality checks to be performed: sb checks the SlackBuild files, dl checks the download URLs, x prevents access to the X GUI during the build, net prevents access to the network during the build, pkg checks the package and its contents, and inst temporarily installs the package. With the remove, revert and info commands, this option has no effect.

--nice=N
    Adjust the niceness of the build process by integer N. The default is 5 (like distcc).

--nowarning=EREGEX
    Suppress warnings that match the GNU grep extended regular expression EREGEX. Multiple warnings can be suppressed with an extended regular expression of the form '(textone|texttwo|...)'.

--preview
    Print what would be added, updated, rebuilt or removed, and an estimate of the total build time, but do not build or remove anything. This option conflicts with --dry-run and --install. This option has no effect with the lint command.

--repo=ID
    Use the SlackBuild and package repository identified by ID. The filestore locations of the SlackBuild and package repositories are defined in the configuration file /etc/slackrepo/slackrepo_ID.conf, where ID is an identifier for the repositories. The default repository ID is SBo. For details, see slackrepo.conf(5).

-v, --verbose
    Display the output of each build process on the console during execution. If --verbose or -v is specified multiple times, it is equivalent to --very-verbose.

-vv, --very-verbose
    Forces make and cmake to produce more verbose compilation output when it is called by a SlackBuild. This option implies --verbose.

EXIT STATUS

0 - all operations completed

1 - execution was interrupted

2 - invocation usage error

3 - the configuration file was not found

4 - initialisation error

5 - another instance is running

6 - internal error, please report a bug

ENVIRONMENT

The behaviour of slackrepo is affected by the following environment variables:

REPO, CONFIGDIR, SBREPO, SRCREPO, PKGREPO, PKGBACKUP, HINTDIR, DEFAULT_HINTDIR, LOGDIR, DATABASE, TMP, SUBSTITUTE, NUMJOBS, ARCH, TAG, PKGTYPE, USE_GENREPOS

Each of these environment variables overrides the corresponding configuration variable in the file /etc/slackrepo/slackrepo_ID.conf or ~/.slackreporc. For details, see slackrepo.conf(5).

MAKEFLAGS

The MAKEFLAGS variable is passed to each SlackBuild. Its value will be augmented by the value of NUMJOBS, so '-j' should not be specified in MAKEFLAGS.

TMPDIR

slackrepo uses the directory specified by TMPDIR (default /tmp) for its own temporary files. (However, SlackBuilds conventionally use the directory specified by TMP, not TMPDIR.)

VERBOSE, VERY_VERBOSE, CHROOT, DRY_RUN, INSTALL, LINT, KEEP_TMP, COLOR, NICE, NOWARNING

Each of these environment variables can be used to set the default for the corresponding control argument. They override the corresponding configuration variables in the file /etc/slackrepo/slackrepo_ID.conf or ~/.slackreporc. For details, see slackrepo.conf(5).

SLACKREPO_COLORS

This environment variable can be used to customise slackrepo's colour palette. The value is a string similar to LS_COLORS or GCC_COLORS. The default palette is
    SLACKREPO_COLORS="error=01;31:warning=01;35:success=01;32:important=01:normal=00:\
    info=22;36:ok=00:build=22;32:skip=22;35:fail=22;31:updated=22;36"

FILES

/etc/slackrepo/slackrepo_SBo.conf
    This file defines the configuration variables for the SBo repository; see slackrepo.conf(5).

~/.slackreporc
    This file can optionally be created to define the default repository ID and override configuration variables set in /etc/slackrepo/slackrepo_ID.conf; see slackrepo.conf(5).

/etc/slackrepo/SBo/hintfiles
    This directory contains the local hintfiles for the SBo repository; see slackrepo.hint(5).

NOTES

For best results, slackrepo is intended to be run on a "clean" standard Slackware environment (like a "build box" or a virtual machine), with a full installation of Slackware and no additional packages (or very few). You can then use the package repository to install the packages on other hosts (e.g. with slackpkg+).

Packages are updated or rebuilt if required; for example, if a package is being built, its dependencies will be updated and/or rebuilt if they are out-of-date. A package is out-of-date if:

    •   the git revision in the directory containing the SlackBuild has changed since the package was built

    •   the directory containing the SlackBuilds has untracked/uncommited files (i.e., "git is dirty") and they are newer than the package

    •   the hintfile has changed since the package was built

    •   any of its direct dependencies has been updated since the package was built

    •   for kernel-dependent packages, the kernel version has changed since the package was built

    •   the version of Slackware has changed since the package was built

Changes in the SlackBuilds directory are classified as "updates", which will cause directly depending items to be rebuilt. Other changes are classified as "rebuilds" and do not cause depending items to be rebuilt if/when they are processed. For example, ffmpeg depends on x264, and transcode depends on ffmpeg. If x264 is updated, ffmpeg will be rebuilt, but transcode will not be rebuilt. If x264 is rebuilt, ffmpeg will not be rebuilt. If ffmpeg is updated, transcode will be rebuilt.

When a package is rebuilt, and when a package is updated but its version is unchanged, the BUILD number in the package repository is always incremented (and the BUILD number in the SlackBuild file is ignored).

EXAMPLES
Build the whole SBo repository (you will need at least four days and 80Gb of disk space):
    # slackrepo build

Build shotwell, with all its dependencies:
    # slackrepo build shotwell

Build and install shotwell and all its dependencies (this will NOT be a clean build):
    # slackrepo build --install shotwell

Remove grass (note, its dependencies and dependers will not be removed):
    # slackpkg remove grass

Restore the backed-up grass packages (note, you can use this to 'undelete' packages that were removed in error):
    # slackpkg revert grass

Update all the academic/ packages in your package repository for SBo's latest changes:
    # slackrepo update academic

Do a "dry run" update of all your SBo packages, with verbose messages:
    # slackrepo update --dry-run -v

Build colord (in the csb repo) with lint checks, do not store the built package, and keep all the temporary files so you can investigate them:
    # slackrepo build --repo=csb --debug colord

SEE ALSO
slackrepo.conf(5), slackrepo.hint(5), installpkg(8), upgradepkg(8), removepkg(8), pkgtool(8), slackpkg(8).