repopush(1)

✨ repopush(1) β€” safely rsync a package repository to another location ✨

okay bestie, this is repopush, from the General Commands Manual section, and it's genuinely one of the good ones 🫢


🌸 SYNOPSIS 🌸

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

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

πŸ’– DESCRIPTION πŸ’–

so like. repopush is yet another program that helps you copy all the package files and repository metadata from one OS package repository to another πŸŽ€ and the whole point, the entire main character energy of it, is that it copies and removes files in a very specific order so the remote repo never ever shows an inconsistent view. no cap.

the order is iconic and you need to know it:

  1. copy the new package files
  2. copy the new metadata files
  3. remove the outdated metadata files
  4. and only then remove the outdated package files

periodt. πŸ’…

repopush handles APT and YUM repositories, and it figures out which one you've got by analyzing the contents of the local repository πŸ‘‘ which is one of the reasons the local repo has to be a directory on a locally-mounted filesystem. it's giving "must be local, bestie, no exceptions".

the repopush tool accepts the following command-line options:

  • -f configfile β€” if the -s option is specified, this is the config file to read. the default is $XDG_CONFIG_HOME/repopush.conf (and $XDG_CONFIG_HOME defaults to $HOME/.config).
  • -N β€” no-operation mode; just displays what would have been done πŸ™ˆ
  • -s section β€” the config file section to read the local and remote variables from.
  • -v β€” verbose mode; displays diagnostic output πŸ”₯

now, there are two ways to specify the local and remote parameters: directly on the command line, or in an 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 -f or a default one in your home directory), look for the specified section, and use the "local" and "remote" values from that section.

and as noted up there ^^ the local parameter should be a path to a directory. the remote parameter can be in any format that the rsync tool accepts. any. format. rsync. takes. πŸ’œ


πŸŽ€ 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. nothing. zero. nada. ✨

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

slay πŸ“


πŸ’€ HISTORY πŸ’€

the repopush tool was first written by Peter Pentchev in 2020. this manual page was created in 2021. a little origin story, as a treat 😭


πŸ‘‘ AUTHORS πŸ‘‘

Peter Pentchev <roam@ringlet.net>


ok that's the whole page bestie, every flag, every path, every example, nothing skipped πŸ’–

and a lil sign-off from me to you: this was repopush(1) from the General Commands Manual, dated 2021-04-04 🌸 go forth and rsync responsibly 🧚