Scroll to navigation

repopush(1) General Commands Manual repopush(1)

NAME

repopush - safely rsync a package repository to another location

SYNOPSIS

repopush [-Nv] /path/to/local/repo remote

repopush [-Nv] [-f configfile] -s section

DESCRIPTION

The repopush tool is yet another program that helps with copying the various package files and repository metadata from one OS package repository to another, taking care to copy and remove files in such a way as to never have the remote repository present an inconsistent view. This is done by first copying the new package files, then copying the new metadata files, then removing the outdated metadata files, and only then removing the outdated package files.

The repopush tool supports APT and YUM repositories and figures out which one to handle by analyzing the contents of the local repository. This is one of the reasons why the latter must indeed be a directory on a locally-mounted filesystem.

The repopush tool accepts the following command-line options:

-f configfile
If the -s option is specified, the config file to read. The default is $XDG_CONFIG_HOME/repopush.conf (with a $HOME/.config default for $XDG_CONFIG_HOME).

-N
No-operation mode; display what would have been done.

-s section
The config file section to read the local and remote variables from.

-v
Verbose mode; display diagnostic output.

There are two ways to specify the local and remote parameters: directly on the command line or in a INI-style configuration file. If the -s option is specified, repopush will use the confget tool to read the configuration file (either the one specified by the -f option or a default one in the user's home directory), look for the specified section, and use the "local" and "remote" values from that section.

As noted above, the local parameter should be a path to a directory. The remote parameter can be in any format that the rsync tool accepts.

FILES

If the local and remote parameters are specified on the command line, the operation of the repopush tool is not affected by any files.

If a configuration section is specified via the -s option, repopush will look for a configuration file (either one specified via the -f option or a default one in the user's home directory) and treat it as an INI-style file containing one or more sections. See the documentation of the confget tool for more information about the supported format of the INI-style files.

EXAMPLES

Test-run a repository update:

repopush -Nv /var/lib/repos/infra www:/var/www/repo/infra

Perform the actual update, a bit quieter:

repopush /var/lib/repos/infra www:/var/www/repo/infra

The same, but with the "to-www-infra" section specified in the $HOME/.config/repopush.conf file:

repopush -s to-www-infra

To achieve the above result, the repopush.conf file should contain a section like this:

[to-www-infra]
local=/var/lib/repos/infra
remote=www:/var/www/repo/infra

HISTORY

The repopush tool was first written by Peter Pentchev in 2020. This manual page was created in 2021.

AUTHORS

Peter Pentchev <roam@ringlet.net>

2021-04-04