Skip to content

Run bpfman From RPM

This section describes how to deploy bpfman from an RPM. RPMs are generated each time a Pull Request is merged in github for Fedora 38, 39 and Rawhide (see Install Prebuilt RPM). RPMs can also be built locally from a Fedora server (see Build RPM Locally).

Install Prebuilt RPM

This section describes how to install an RPM built autmatically by the Packit Service. The Packit Service builds RPMs for each Pull Request merged.

Packit Service Prerequisites

To install an RPM generated by the Packit Service, the following packages need to be installed:

dnf based OS:

sudo dnf install -y dnf-plugins-core
sudo dnf copr enable @ebpf-sig/bpfman-next

Install RPM From Packit Service

To load an RPM from a specific commit, find the commit from bpfman commits, and click on the green check showing a given Pull Request was verified. At the bottom of the list of checks are the RPM builds, click on the details, and follow the Packit Dashboard link to the Copr Build Results. Then install the given RPM:

sudo dnf install -y bpfman-0.4.0~dev-1.20240117143006587102.main.191.gda44a71.fc38.x86_64

bpfman is now installed but not running. To start bpfman:

sudo systemctl daemon-reload
sudo systemctl enable bpfman.socket
sudo systemctl start bpfman.socket

Verify bpfman is installed and running:

$ sudo systemctl status bpfman.socket
● bpfman.socket - bpfman API Socket
     Loaded: loaded (/usr/lib/systemd/system/bpfman.socket; enabled; preset: disabled)
     Active: active (listening) since Thu 2024-01-18 21:19:29 EST; 5s ago
   Triggers: ● bpfman.service
     Listen: /run/bpfman-sock/bpfman.sock (Stream)
     CGroup: /system.slice/bpfman.socket
:

$ sudo systemctl status bpfman.service
○ bpfman.service - Run bpfman as a service
     Loaded: loaded (/usr/lib/systemd/system/bpfman.service; static)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)
TriggeredBy: ● bpfman.socket
:

$ sudo bpfman list
 Program ID  Name  Type  Load Time

Uninstall Given RPM

To determine the RPM that is currently loaded:

$ sudo rpm -qa | grep bpfman
bpfman-0.4.0~dev-1.20240117143006587102.main.191.gda44a71.fc39.x86_64

To uninstall the RPM:

sudo dnf erase -y bpfman-0.4.0~dev-1.20240117143006587102.main.191.gda44a71.fc39.x86_64

sudo systemctl daemon-reload

Build RPM Locally

This section describes how to build and install an RPM locally.

Local Build Prerequisites

To build locally, the following packages need to be installed:

dnf based OS:

sudo dnf install packit
sudo dnf install cargo-rpm-macros

NOTE: cargo-rpm-macros needs to be version 25 or higher. It appears this is only available on Fedora 37, 38, 39 and Rawhide at the moment.

Build Locally

To build locally, run the following command:

packit build locally

This will generate several RPMs in a x86_64/ directory:

$ ls x86_64/
bpfman-0.4.0~dev-1.20240118212420167308.<USERNAME>.rpm.socket.192.gb2ea1b9.fc39.x86_64.rpm
bpfman-debuginfo-0.4.0~dev-1.20240118212420167308.<USERNAME>.rpm.socket.192.gb2ea1b9.fc39.x86_64.rpm
bpfman-debugsource-0.4.0~dev-1.20240118212420167308.<USERNAME>.rpm.socket.192.gb2ea1b9.fc39.x86_64.rpm

Install Local Build

Install the RPM:

sudo rpm -i x86_64/bpfman-0.4.0~dev-1.20240118212420167308.<USERNAME>.rpm.socket.192.gb2ea1b9.fc39.x86_64.rpm

bpfman is now installed but not running. To start bpfman:

sudo systemctl daemon-reload
sudo systemctl enable bpfman.socket
sudo systemctl start bpfman.socket

Verify bpfman is installed and running:

$ sudo systemctl status bpfman.socket
● bpfman.socket - bpfman API Socket
     Loaded: loaded (/usr/lib/systemd/system/bpfman.socket; enabled; preset: disabled)
     Active: active (listening) since Thu 2024-01-18 21:19:29 EST; 5s ago
   Triggers: ● bpfman.service
     Listen: /run/bpfman-sock/bpfman.sock (Stream)
     CGroup: /system.slice/bpfman.socket
:

$ sudo systemctl status bpfman.service
○ bpfman.service - Run bpfman as a service
     Loaded: loaded (/usr/lib/systemd/system/bpfman.service; static)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)
TriggeredBy: ● bpfman.socket
:

$ sudo bpfman list
 Program ID  Name  Type  Load Time

Uninstall Local Build

To determine the RPM that is currently loaded:

$ sudo rpm -qa | grep bpfman
bpfman-0.4.0~dev-1.20240118212420167308.<USERNAME>.rpm.socket.192.gb2ea1b9.fc39.x86_64

To uninstall the RPM:

sudo rpm -e bpfman-0.4.0~dev-1.20240118212420167308.<USERNAME>.rpm.socket.192.gb2ea1b9.fc39.x86_64

sudo systemctl daemon-reload