Skip to content

[RPM] Fix broken symlinks when binary name differs from package name & improve asset consistency #312

@eximius313

Description

@eximius313

Bug Description
The current RPM packaging logic fails when the application's binary name (defined in linux/CMakeLists.txt) differs from the package name or the pubspec name.

  1. Inheritance Issue: MakeRPMConfig extends MakeConfig directly, bypassing the logic in MakeLinuxPackageConfig that parses CMakeLists.txt to find the real BINARY_NAME. As a result, appBinaryName defaults to pubspec.name, causing broken paths if CMake defines a different name.
  2. Symlink Issue: The %install script attempts to symlink files using incorrect names, leading to File not found errors during the build or broken symlinks after installation.
  3. Builder Inconsistency: AppPackageMakerRPM generates assets (icons, .desktop files) using the project name, but the binary is named differently
  4. Metainfo Mismatch: The metainfo logic already used appBinaryName, creating a mix of naming conventions in the BUILD directory.

Proposed Solution

  1. Change MakeRPMConfig to extend MakeLinuxPackageConfig. This inherits the correct appBinaryName getter.
  2. Update the %install section to create a symlink pointing to the real binary ($appBinaryName) but named after the package (%{name}).
  3. Update .png, .desktop, .xml to use appBinaryName

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions