Skip to content

[v3] Build dependencies for different distribution #4339

@leaanthony

Description

@leaanthony

Look to double check nfpm config in v3 + doctor.


Discussed in #4335

Originally posted by jidckii June 5, 2025
I’ve created a table but couldn’t find the proper way to contribute it to the documentation, so I’ll leave it here.


Build Dependencies for Different Distributions

Distribution GTK3 WebKit2GTK ABI Example Installation
Debian 12 / Ubuntu 22.04 (and newer) libgtk-3-0 libwebkit2gtk-4.1-0 4.1 apt install libgtk-3-0 libwebkit2gtk-4.1-0
Debian 11 / Ubuntu 20.04 (and older) libgtk-3-0 libwebkit2gtk-4.0-37 4.0 apt install libgtk-3-0 libwebkit2gtk-4.0-37
openSUSE Leap / Tumbleweed libgtk-3-0 libwebkit2gtk-4_1-0 4.1 zypper install libgtk-3-0 libwebkit2gtk-4_1-0
RHEL / CentOS / AlmaLinux / Rocky (up to 9) gtk3 webkit2gtk3 4.0 dnf install gtk3 webkit2gtk3
Fedora 40+ gtk3 webkit2gtk4.1 4.1 dnf install gtk3 webkit2gtk4.1
Arch Linux / Manjaro gtk3 webkit2gtk-4.1 4.1 pacman -S gtk3 webkit2gtk-4.1

Notes:

  • openSUSE Leap provides both WebKitGTK 4.0 and 4.1, but we use libwebkit2gtk-4_1-0.

  • Fedora had only webkit2gtk4.0 up to version 39; starting from Fedora 40, webkit2gtk4.1 is available.

  • On RHEL / AlmaLinux / Rocky / CentOS (8 and 9), webkit2gtk3 corresponds to ABI 4.0; 4.1 is not yet available.

  • Arch Linux offers both webkit2gtk and webkit2gtk-4.1, but for the new ABI we use the latter.

Build Tags:

As a result, use the -tags webkit2_40 build tag only for RHEL-based systems.
All other distributions already support the modern version, so use -tags webkit2_41 for them.


This table reflects the current state of repositories and packages as of May 2025.


nfpm config examles

For RHEL and older other
# RHEL/CentOS/AlmaLinux/Rocky Linux 8/9
depends:
  - gtk3
  - webkit2gtk3
overrides:
  # Debian 11 / Ubuntu 20.04 (and older)
  deb:
    depends:
      - libgtk-3-0
      - libwebkit2gtk-4.0-37
  archlinux:
    depends:
      - gtk3
      - webkit2gtk
For Debian 12 / Ubuntu 22.04 (and newer) , SUSE , Arch Linux :
# Debian 12/Ubuntu 22.04 (and newer)  / SUSE / Arch Linux :
depends:
  - libgtk-3-0
  - libwebkit2gtk-4.1-0
overrides:
  # SUSE
  rpm:
    depends:
      - libgtk-3-0
      - libwebkit2gtk-4_1-0
  archlinux:
    depends:
      - gtk3
      - webkit2gtk-4.1
For Fedora 40+
depends:
  - gtk3
  - webkit2gtk4.1

Summary, your need 3 different files for different distro

$ tree build/linux/nfpm/                                                                                                                                                 
build/linux/nfpm/
├── nfpm_40-rhel-amd64.yaml
├── nfpm_40-rhel-arm64.yaml
├── nfpm_40-rhel.yaml.tpl
├── nfpm_41-deb_suse_arch-amd64.yaml
├── nfpm_41-deb_suse_arch-arm64.yaml
├── nfpm_41-deb_suse_arch.yaml.tpl
├── nfpm_41-fedora-amd64.yaml
├── nfpm_41-fedora-arm64.yaml
├── nfpm_41-fedora.yaml.tpl
```</div>

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions