Skip to main content

bpkg

bpkg is a universal package manager for BlendOS.

Installation

bpkg is not preinstalled, you must get it yourself.

Download the latest binary and setup script at the link below:

bpkg-main.tar.gz

Then, unzip it with your archive manager or run this in the directory you downloaded the file to:

tar -xzvf ./bpkg-main.tar.gz

After that, run install.sh from your host terminal (chmod u+x install.sh && ./install.sh).

Configuration

The first time you use bpkg, it will generate a config file at ~/.config/bpkg.yaml.

It will look something like this:

# bpkg config file
# Auto-generated by bpkg 0.2.0pre
# Example config file with a bunch of containers

containers:
- name: ar # User-set container name
distro: arch # Container distro
- name: ub
distro: ubuntu-22.04
- name: fe
distro: fedora-38
- name: alma
distro: almalinux-9
- name: crystal
distro: crystal-linux
- name: deb
distro: debian
- name: kali
distro: kali-linux
- name: neurodeb
distro: neurodebian-bookworm
- name: rocky
distro: rocky-linux
- name: ub23
distro: ubuntu-23.04

update_flatpak: true # Update flatpaks?
tip

You should run bpkg overwrite-config after creating or deleting a container.

Structure

The config file is structured like this:

containers:
- name: user's container name
distro: container distro as defined in container-distros.txt

Any additional options.

Every indentation is 2 spaces, do not use tabs.

To get the container list for the config file, bpkg runs the following commands:

podman ps -a --no-trunc --size --format '{{.Names}}'
podman ps -a --no-trunc --size --format '{{.Image}}'

Editing

To change the priority, change the order of the entries. In this setup, the Arch container will be checked first, followed by Ubuntu 22.04, Fedora 38, etc.

If we change the config file so it starts like this:

containers:
- name: ub
distro: ubuntu-22.04
- name: ar
distro: arch
...

then the Ubuntu 22.04 container will be checked first.

To exclude a container from bpkg, remove it from the config.

If we remove Arch so the config file looks like this:

containers:
- name: ub
distro: ubuntu-22.04
- name: fe
distro: fedora-38
...

then the arch container will not be used by bpkg.

Usage

bpkg will search through your containers for their relevant package managers.

info

[] denotes an optional parameter, <> denotes a required one. <> in [] denotes a required parameter within an optional one, it is required if you choose to add the parent optional argument.

Example: [-c <container>]. The -c argument is optional, but if you choose to use it <container> is required.

info

-c has not been implemented yet.

Install a package

bpkg install <package> [-c <container>]

This will search for the package in your installed distros and install it from the first package manager it finds by your order of preference, though you can specify a specific container.

Remove a package

bpkg remove <package> [-c <container>]

This will remove a package that you installed from a container of your choice or from the first container in your list the package is found in.

Update packages

bpkg update [-c <container>]

This will update all the packages in all your containers, or you can specify a specific one. If update_flatpak is set to true in the config, this will also update your flatpaks.

bpkg search <package> [-c <container>]

You can search for a package in all of your containers, or specify a specific one.

Container list

bpkg list-containers

Lists all containers on your system (even if they aren't in the config).

Config Regeneration

bpkg overwrite-config

This will pull all your containers and generate a new config file, overwriting your current one. It is recommended to run this after creating or deleting containers.