Skip to content

andrei-pavel/portunus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

portunus

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 Build status 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

Table of Contents

Introduction

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 service portunus-daily.service:
[Unit]
Description=portunus-daily

[Service]
Type=simple
ExecStart=/usr/local/bin/portunus

[Install]
WantedBy=multi-user.target

Supported package managers:

Request yours today!

Installation

Using the AUR

yay --aur -Syyu portunus-git

Manual

git clone https://github.com/andrei-pavel/portunus.git
cd portunus
./install

Dependencies

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

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:

Usage

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.

Contributing

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:

  1. cp share/empty.sh share/packages-managers/pkg.sh
  2. Implement all functions in share/packages-managers/pkg.sh.
  3. 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.
  4. If pkg has a standalone .yaml configuration file (e.g. pacman does, yay doesn't since it uses pacman's), add it in ./install script. Add your pkg.yaml configuration file to ./share/samples as well.
  5. Add pkg to README.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!