Files
ansible_role_package/CONTRIBUTING.md
Matthew Stobbs 275f5df722 change layout for better management
- instead of just `syspkgs` and `srcpkgs` add more lists
  - `appimages`, `flatpkgs` and others as they come up
2025-02-11 17:51:10 -07:00

2.0 KiB

Contributing

Package definition

Package defintions are just yaml tasks in the directory tasks/pkgs, which handle how a package is installed.

Most can be installed using the syspkgs list, and are simply appending the package name to said list based on the system.

If a package can be installed via an entry to syspkgs for some, but not all platforms, handling is done to either inform the user that the package is not available, or to append the package name to another installation method such as:

  • appimages to install the appimage of a package
  • cargopkgs to install via the rust cargo package manager
  • cargoversioned to install version lockec cargo packages
  • caskpkgs to install a homebrew cask
  • flatpkgs to install flatpaks
  • gopkgs to install using the go install command
  • npmpkgs to install packages from npm
  • pipxpkgs to install packages from Python pip
  • srcpkgs to build packages from source
  • tappkgs to install packages from home brew taps

Alternative sources of packages can be defined with entries to:

  • fpremotes to add a flatpak remote
  • brewtaps to add a homebrew tap

Adding system level repositories

Many packages exist in their own external repository for the given system, such as /etc/yum.repos.d for RedHat based linux distros, /etc/apt/sources.list.d for Debian based distros and others. Since you an add the package to syspkgs by enabling a repo, the coresponding task in tasks/pkgs should take the steps needed to enable the repository.

Packages with multiple instllation methods

Many packages can be installed in different ways, like the bitwarden package. bitwarden can be installed as a syspkg on some machines, a caskpkg on macOS, an appimage, a flatpak or even a snap.

For such packages, a default is chosen to install, in the following order of precedence: syspkgs, flatpkgs, snappkgs, appimages.

In that order, syspkgs and caskpkgs have equal weight, as it applies to macOS.