▸ Agent Skills
8 min read

RPM

This guide covers how to distribute and manage RPM packages, including retrieving package information, configuring scripts, setting dependencies, and signing packages.

Limitations

Core libraries such as glibc frequently break compatibility with older systems. For this reason, you must build your Tauri application using the oldest base system you intend to support that also provides Tauri v2’s required WebKitGTK 4.1 packages. Ubuntu 22.04 and Debian 12 are suitable baseline examples because they provide libwebkit2gtk-4.1-dev from their standard package repositories. Building on a newer base system can raise the minimum glibc version required by your app, so when running on an older system, you may face a runtime error like /usr/lib/libc.so.6: version 'GLIBC_2.33' not found. We recommend using a Docker container or GitHub Actions to build your Tauri application for Linux.

See the issues tauri-apps/tauri#1355 and rust-lang/rust#57497, in addition to the AppImage guide for more information.

Configuring the RPM package

Tauri allows you to configure the RPM package by adding scripts, setting dependencies, adding a license, including custom files, and more. For detailed information about configurable options, please refer to: RpmConfig.

Add post, pre-install/remove script to the package

The RPM package manager allows you to run scripts before or after the installation or removal of the package. For example, you can use these scripts to start a service after the package is installed.

Here’s an example of how to add these scripts:

  1. Create a folder named scripts in the src-tauri directory in your project.
mkdir src-tauri/scripts

Terminal window

  1. Create the script files in the folder.
touch src-tauri/scripts/postinstall.sh \touch src-tauri/scripts/preinstall.sh \touch src-tauri/scripts/preremove.sh \touch src-tauri/scripts/postremove.sh

Terminal window

Now if we look inside /src-tauri/scripts we will see:

ls src-tauri/scripts/postinstall.sh  postremove.sh  preinstall.sh  preremove.sh

Terminal window

  1. Add some content to the scripts
echo "-------------"echo "This is pre"echo "Install Value: $1"echo "Upgrade Value: $1"echo "Uninstall Value: $1"echo "-------------"

preinstall.sh

echo "-------------"echo "This is post"echo "Install Value: $1"echo "Upgrade Value: $1"echo "Uninstall Value: $1"echo "-------------"

postinstall.sh

echo "-------------"echo "This is preun"echo "Install Value: $1"echo "Upgrade Value: $1"echo "Uninstall Value: $1"echo "-------------"

preremove.sh

echo "-------------"echo "This is postun"echo "Install Value: $1"echo "Upgrade Value: $1"echo "Uninstall Value: $1"echo "-------------"

postremove.sh

  1. Add the scripts to thetauri.conf.json file
{  "bundle": {    "linux": {      "rpm": {        "epoch": 0,        "files": {},        "release": "1",        // add the script here        "preInstallScript": "/path/to/your/project/src-tauri/scripts/prescript.sh",        "postInstallScript": "/path/to/your/project/src-tauri/scripts/postscript.sh",        "preRemoveScript": "/path/to/your/project/src-tauri/scripts/prescript.sh",        "postRemoveScript": "/path/to/your/project/src-tauri/scripts/postscript.sh"      }    }  }}

tauri.conf.json

Setting the Conflict, Provides, Depends, Files, Obsoletes, DesktopTemplate, and Epoch

  • conflict: Prevents the installation of the package if it conflicts with another package. For example, if you update an RPM package that your app depends on and the new version is incompatible with your app.

  • provides: Lists the RPM dependencies that your application provides.

  • depends: Lists the RPM dependencies that your application needs to run.

  • files: Specifies which files to include in the package.

  • obsoletes: Lists the RPM dependencies that your application obsoletes.

  • desktopTemplate: Adds a custom desktop file to the package.

  • epoch: Defines weighted dependencies based on version numbers.

To use these options, add the following to your tauri.conf.json :

{  "bundle": {    "linux": {      "rpm": {        "postRemoveScript": "/path/to/your/project/src-tauri/scripts/postscript.sh",        "conflicts": ["oldLib.rpm"],        "depends": ["newLib.rpm"],        "obsoletes": ["veryoldLib.rpm"],        "provides": ["coolLib.rpm"],        "desktopTemplate": "/path/to/your/project/src-tauri/desktop-template.desktop"      }    }  }}

tauri.conf.json

Add a license to the package

To add a license to the package, add the following to the src-tauri/cargo.toml or in the src-tauri/tauri.conf.json file:

[package]name = "tauri-app"version = "0.0.0"description = "A Tauri App"authors = ["you"]edition = "2021"license = "MIT" # add the license here# ...  rest of the file

src-tauri/cargo.toml

And for src-tauri/tauri.conf.json

{  "bundle": {    "licenseFile": "../LICENSE", // put the path to the license file here    "license": "MIT" // add the license here  }}

src-tauri/tauri.conf.json

Building the RPM package

To build the RPM package, you can use the following command:

npm run tauri build
yarn tauri build
pnpm tauri build
deno task tauri build
bun tauri build
cargo tauri build

This command will build the RPM package in the src-tauri/target/release/bundle/rpm directory.

Signing the RPM package

Tauri allows you to sign the package with the key you have in your system during the build process. To do this, you will need to generate a GPG key.

Generate a GPG key

To generate a GPG key you can use the following command:

gpg --gen-key

Terminal window

Follow the instruction to generate the key.

Once the key is generated, you will need to add it to your environment variable. You can do this by adding the following to your .bashrc or .zshrc file or just export it in the terminal:

export TAURI_SIGNING_RPM_KEY=$(cat /home/johndoe/my_super_private.key)

Terminal window

If you have a passphrase for the key, you can add it to the environment variable:

export TAURI_SIGNING_RPM_KEY_PASSPHRASE=password

Terminal window

Now you can build the package with the following command:

npm run tauri build
yarn tauri build
pnpm tauri build
deno task tauri build
bun tauri build
cargo tauri build

Verify the signature

Before verifying the signature, you will need to create and import the public key to the RPM database:

gpg --export -a 'Tauri-App' > RPM-GPG-KEY-Tauri-App

Terminal window

sudo rpm --import RPM-GPG-KEY-Tauri-App

Terminal window

Now that the key is imported, we have to edit the ~/.rpmmacros file to utilize the key.

%_signature gpg%_gpg_path /home/johndoe/.gnupg%_gpg_name Tauri-App%_gpgbin /usr/bin/gpg2%__gpg_sign_cmd %{__gpg} \    gpg --force-v3-sigs --digest-algo=sha1 --batch --no-verbose --no-armor \    --passphrase-fd 3 --no-secmem-warning -u "%{_gpg_name}" \    -sbo %{__signature_filename} %{__plaintext_filename}

~/.rpmmacros

Finally, you can verify the package using the following command:

rpm  -v --checksig tauri-app-0.0.0-1.x86_64.rpm

Terminal window

Debugging the RPM package

In this section, we will see how to debug the RPM package by checking the content of the package and getting information about the package.

Getting information about the package

To get information about your package, such as the version, release, and architecture, use the following command:

rpm -qip package_name.rpm

Terminal window

Query specific information about the package

For example, if you want to get the name, version, release, architecture, and size of the package, use the following command:

rpm  -qp --queryformat '[%{NAME} %{VERSION} %{RELEASE} %{ARCH} %{SIZE}\n]' package_name.rpm

Terminal window

Checking the content of the package

To check the content of the package, use the following command:

rpm -qlp package_name.rpm

Terminal window

This command will list all the files that are included in the package.

Debugging scripts

To debug post/pre-install/remove scripts, use the following command:

rpm -qp --scripts package_name.rpm

Terminal window

This command will print the content of the scripts.

Checking dependencies

To check the dependencies of the package, use the following command:

rpm -qp --requires package_name.rpm

Terminal window

List packages that depend on a specific package

To list the packages that depend on a specific package, use the following command:

rpm -q --whatrequires package_name.rpm

Terminal window

Debugging Installation Issues

If you encounter issues during the installation of an RPM package, you can use the -vv (very verbose) option to get detailed output:

rpm -ivvh package_name.rpm

Terminal window

Or for an already installed package:

rpm -Uvvh package_name.rpm

Terminal window

Cross-Compiling for ARM-based Devices

This guide covers manual compilation. Check out our GitHub Action guide for an example workflow that leverages QEMU to build the app. This will be much slower but will also be able to build AppImages.

Manual compilation is suitable when you don’t need to compile your application frequently and prefer a one-time setup. The following steps expect you to use a Linux distribution based on Debian/Ubuntu.

  1. Install Rust targets for your desired architecture

    • For ARMv7 (32-bit): rustup target add armv7-unknown-linux-gnueabihf
    • For ARMv8 (ARM64, 64-bit): rustup target add aarch64-unknown-linux-gnu
  2. Install the corresponding linker for your chosen architecture

    • For ARMv7: sudo apt install gcc-arm-linux-gnueabihf
    • For ARMv8 (ARM64): sudo apt install gcc-aarch64-linux-gnu
  3. Open or create the file <project-root>/.cargo/config.toml and add the following configurations accordingly

    [target.armv7-unknown-linux-gnueabihf]linker = "arm-linux-gnueabihf-gcc"
    [target.aarch64-unknown-linux-gnu]linker = "aarch64-linux-gnu-gcc"
  4. Enable the respective architecture in the package manager

    • For ARMv7: sudo dpkg --add-architecture armhf
    • For ARMv8 (ARM64): sudo dpkg --add-architecture arm64
  5. Adjusting Package Sources

    On Debian, this step should not be necessary, but on other distributions, you might need to edit /etc/apt/sources.list to include the ARM architecture variant. For example on Ubuntu 22.04 add these lines to the bottom of the file (Remember to replace jammy with the codename of your Ubuntu version):

    deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricteddeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricteddeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy universedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates universedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy multiversedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates multiversedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiversedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricteddeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security universedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security multiverse

    Then, to prevent issues with the main packages, you have to add the correct main architecture to all other lines the file contained beforehand. For standard 64-bit systems you need to add [arch=amd64], the full file on Ubuntu 22.04 then looks similar to this:

    Show solution

    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to# newer versions of the distribution.deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted
    ## Major bug fix updates produced after the final release of the## distribution.deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu## team. Also, please note that software in universe WILL NOT receive any## review or updates from the Ubuntu security team.deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy universe# deb-src http://archive.ubuntu.com/ubuntu/ jammy universedeb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates universe# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates universe
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu## team, and may not be under a free licence. Please satisfy yourself as to## your rights to use the software. Also, please note that software in## multiverse WILL NOT receive any review or updates from the Ubuntu## security team.deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy multiverse# deb-src http://archive.ubuntu.com/ubuntu/ jammy multiversedeb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse
    ## N.B. software from this repository may not have been tested as## extensively as that contained in the main release, although it includes## newer versions of some applications which may provide useful features.## Also, please note that software in backports WILL NOT receive any review## or updates from the Ubuntu security team.deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse# deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
    deb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security main restricted# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricteddeb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security universe# deb-src http://security.ubuntu.com/ubuntu/ jammy-security universedeb [arch=amd64] http://security.ubuntu.com/ubuntu/ jammy-security multiverse# deb-src http://security.ubuntu.com/ubuntu/ jammy-security multiverse
    deb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricteddeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricteddeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy universedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates universedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy multiversedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates multiversedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiversedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricteddeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security universedeb [arch=armhf,arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security multiverse
  6. Update the package information: sudo apt-get update && sudo apt-get upgrade -y

  7. Install the required webkitgtk library for your chosen architecture

    • For ARMv7: sudo apt install libwebkit2gtk-4.1-dev:armhf
    • For ARMv8 (ARM64): sudo apt install libwebkit2gtk-4.1-dev:arm64
  8. Install OpenSSL or use a vendored version

    This is not always required so you may want to proceed first and check if you see errors like Failed to find OpenSSL development headers.

    • Either install the development headers system-wide:
      • For ARMv7: sudo apt install libssl-dev:armhf
      • For ARMv8 (ARM64): sudo apt install libssl-dev:arm64
    • Or enable the vendor feature for the OpenSSL Rust crate which will affect all other Rust dependencies using the same minor version. You can do so by adding this to the dependencies section in your Cargo.toml file:
    openssl-sys = {version = "0.9", features = ["vendored"]}
  9. Set the PKG_CONFIG_SYSROOT_DIR to the appropriate directory based on your chosen architecture

    • For ARMv7: export PKG_CONFIG_SYSROOT_DIR=/usr/arm-linux-gnueabihf/
    • For ARMv8 (ARM64): export PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu/
  10. Build the app for your desired ARM version

    • For ARMv7: cargo tauri build –target armv7-unknown-linux-gnueabihf
    • For ARMv8 (ARM64): cargo tauri build –target aarch64-unknown-linux-gnu

    Choose the appropriate set of instructions based on whether you want to cross-compile your Tauri application for ARMv7 or ARMv8 (ARM64). Please note that the specific steps may vary depending on your Linux distribution and setup.


Support on Open CollectiveSponsor on GitHub

© 2026 Tauri Contributors. CC-BY / MIT


Last updated Oct 08, 2026