Aggregates ALL package managers under one tool. If your package manager is not in here, I'll add it and it'll be in testing state in 24 hours.
How it works: You keep .yaml
config files for any of your package managers. They instruct the tool what packages to install/remove.
Some packages can only be installed through additional sources. They are also specified in the config file and are added on relevant actions.
Run --help
to see all actions.
Empty config files are installed automatically if not already there. You keep them synced through Dropbox/git/rclone/USB or your favourite method.
Tests for ArchLinux & Debian. This is currently a home-grown project. Will invest in continus integration and more features when it gains interest.
Version 2.04
What fits you best?
- frequent distro-hopping? Install all your favourite packages after a hop with one run of
portunus
. - determined distro-hugging? Update all your packages and get detailed information about what was updated each time with one run of
portunus
. In the latter case, it's very useful to set it up as a systemd serviceportunus-daily.service
:
[Unit]
Description=portunus-daily
[Service]
Type=simple
ExecStart=/usr/local/bin/portunus
[Install]
WantedBy=multi-user.target
Supported package managers:
apt
brew
dnf
eopkg
flatpak
go
nix
npm
pacman
along with all active AUR helperspip
snap
yay --aur -Syyu portunus-git
git clone https://github.com/andrei-pavel/portunus.git
cd portunus
./install
Installed automagically:
- yq (
2.3.4
or newer) - used for processing YAML configuration files - bash-spinner - shamelessly copied and improved in this repository
- unp - for
wgetables
(see.yaml
files)
Configuration files are one per main package manager.
After first installation, edit ~/.config/portunus/<main_package_manager>.yaml
to your own needs.
installables
are packages to be installed.wgetables
are downloadable URLs to be installed via it's specific package manager or extracted to/usr/local
.sources
keys
purgeables
are packages to be removed or purged.commands
are custom, tailored to it's package manager.
Samples:
apt
: apt.yamlbrew
: brew.yamldnf
: dnf.yamleopkg
: eopkg.yamlflatpak
: flatpak.yamlgo
: go.yamlnix
: nix.yamlnpm
: npm.yamlpacman
: pacman.yamlpip
: pip.yamlsnap
: snap.yaml
Usage: portunus {{options}} {{arguments}}
Options:
[-d|--debug] Enables debug mode, showing every executed statement.
[-h|--help] Prints usage (this text).
Arguments:
[-a|--auto] Cool continuous curation
[-i|--install $package] Installs a single package.
[-k|--add-key $key] Adds a single key.
[-p|--purge|--remove $package] Removes a single package.
[-r|--add-repository $repository] Adds a single repository.
[-s|--add-source $source] Adds a single source.
[-u|--upgrade $package] Upgrades a single package.
[-v|--verbose] Verbose output
[-V|--version] Display version and exit.
$package_manager Run only for this specific package manager.
Start by running portunus
everyday to keep all your packages up to date.
Then experiment with other options.
Terminology in the help section is based on apt
because it is more complex than most.
For changes to the package manager engine, you only need to know bash and try to respect portability best practices.
If you add a new argument, add it to the print usage function, the bash completions file and README.md.
If, however, you wish to add support for a package manager, either create an issue, or follow these steps given for pkg
as said package manager:
cp share/empty.sh share/packages-managers/pkg.sh
- Implement all functions in
share/packages-managers/pkg.sh
. - Add
pkg
to./portunus
in the main list or optional list accordingly. If it is the default package manager in any distribution it is main, else it is optional. - If
pkg
has a standalone.yaml
configuration file (e.g.pacman
does,yay
doesn't since it usespacman
's), add it in./install
script. Add yourpkg.yaml
configuration file to./share/samples
as well. - Add
pkg
toREADME.md
.
In any case, bump the version in the README.md and in the code where -V|--version
is handled by setting it to 1.$(( $(git rev-list --count master) + 1 ))
Thank you for your contribution!