Skip to content

packaging: RPM requires library sonames, so openSUSE can install it - #1247

Open
tydude001 wants to merge 5 commits into
storytold:mainfrom
tydude001:rpm-soname-requires
Open

tydude001 wants to merge 5 commits into
storytold:mainfrom
tydude001:rpm-soname-requires

Conversation

@tydude001

@tydude001 tydude001 commented Oct 14, 2026 •

Copy link
Copy Markdown

What and why

CadCraft's RPM requires Fedora package names: libxkbcommon, (vulkan-loader or libglvnd-egl).
openSUSE has no libxkbcommon, vulkan-loader or libglvnd-egl package, so zypper refuses it with
nothing provides 'libxkbcommon' (exit 4, which the ArtCraft Launcher shows as "error 4";
storytold/craft-launcher#341).

This requires the libraries' sonames instead, as PhotoCraft and VectorCraft already do, so the same RPM
resolves on Fedora/RHEL and openSUSE. It also declares the binaries' glibc floor, matching the deb's
libc6 (>= 2.35). The floor names libm, not libc: the
binaries' only GLIBC_2.35 symbols are hypot and hypotf from libm, and RHEL 9's current glibc
(2.34-283.el9_8) provides libc.so.6(GLIBC_2.35) through backports but not libm's.

How it was tested

CadCraft 0.6.2's released x86_64 binaries, repackaged with nfpm 2.47.0 and this branch's nfpm.yaml, then
installed with the distro's own package manager in a fresh x86_64 container and run with cadcraft-cli --version.
The released RPM is the same test on the release's own package.

released 0.6.2 RPM this branch
Fedora 44 installs, runs installs, runs
openSUSE Tumbleweed nothing provides 'libxkbcommon' installs, runs
openSUSE Leap 15.6 nothing provides 'libxkbcommon' installs, runs
Rocky Linux 9 (glibc 2.34) installs; cadcraft-cli: libm.so.6: version `GLIBC_2.35' not found refused: nothing provides libm.so.6(GLIBC_2.35)(64bit)

The aarch64 RPMs get the same requires. I checked that side on FilmCraft only: its 0.7.2 arm64 binaries need
GLIBC_2.35 for the same two libm symbols, and its branch RPM installs and runs on arm64 Fedora 44,
Tumbleweed and Leap 15.6 (qemu-user).

cargo xtask ci passes. This tests installation and the CLI, not the GUI. The same results for every
Crafting App: storytold/craft-launcher#341 (comment)

Summary by CodeRabbit

  • Packaging
    • Linux packages now specify system library requirements by library soname, including the GLIBC 2.35 libm requirement and runtime windowing libraries.
    • Package contents list desktop integration files, icons, documentation, command-line man pages, and shell completions individually.
    • Zsh completion files are included when available; package configuration remains valid when they are absent.

CadCraft's RPM requires Fedora package names: `libxkbcommon`, `(vulkan-loader or libglvnd-egl)`.
openSUSE has no `libxkbcommon`, `vulkan-loader` or `libglvnd-egl` package, so zypper refuses it with
`nothing provides 'libxkbcommon'` (exit 4, which the ArtCraft Launcher shows as "error 4";
storytold/craft-launcher#341).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReviewerA — source-read COMMENT (not an approval)

I read the diff: packaging: the RPM requires library sonames, so openSUSE can install it. In nfpm.yaml the package-name requirements libxkbcommon and (vulkan-loader or libglvnd-egl) are replaced with sonames, and a glibc floor expressed as libc.so.6()(64bit) and libm.so.6(GLIBC_2.35)(64bit), with a comment that explains why libm (the binaries' GLIBC_2.35 symbols hypot and hypotf are libm's, and RHEL 9's glibc 2.34 provides libc.so.6(GLIBC_2.35) through backports but not this one, so it refuses). Depending on sonames is how RPM packaging is meant to work across distributions with different package names, and the comment records the reasoning. Please also list the sonames for the libraries the old line covered (the diff I fetched shows the removals; the new soname lines for libxkbcommon.so.0, libvulkan.so.1 and libEGL.so.1 are below the cut). The change needs a test install on openSUSE and on Fedora, which I could not do. I have not run it, and no exact-head CI result exists for this head. Nothing was run.

I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.

Status: waiting_author.

@austin62jake austin62jake left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. I merged it onto current main with ten other small PRs (#1273, #1266, #1265, #1263, #1254, #1247, #1233, #1196, #1114, #1445, #1591). The whole suite passes (3170 tests), and so do fmt and the web build. Clippy stops only on #1254's test. (this one is packaging only, so the suite isn't its test)

Requiring library sonames rather than distribution package names lets the same RPM resolve on Fedora/RHEL and openSUSE. Pinning libm.so.6(GLIBC_2.35) for the hypot symbols, with the reason in a comment, explains the floor clearly.

@tydude001

Copy link
Copy Markdown
Author

Thanks. The sonames you couldn't see are there, on two lines: libxkbcommon.so.0()(64bit) and
(libvulkan.so.1()(64bit) or libEGL.so.1()(64bit)). The Fedora 44, Tumbleweed and Leap 15.6 installs are in the
description, and the floor still holds on 0.17.0 on both architectures.

… /usr/share/mime

A tree of /usr/share made the RPM own /usr/share/mime and /usr/share/mime/packages at 0755, which
openSUSE's filesystem package owns at 0555: rpm -U refuses the package, and zypper installs it but
leaves the directory at 0755. This is the layout WordCraft took in storytold/wordcraft#5369.
The man pages and completions are named too. package.sh leaves them out of a cross build without
EMULATOR, and nfpm refuses an entry whose file is missing, so they sit between cli-docs markers that
package.sh deletes when they weren't staged.
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Linux package configuration now declares RPM dependencies through library sonames and lists selected package contents individually. The packaging script removes CLI documentation entries when the staged Zsh completion file is absent.

Changes: Linux packaging

Layer / File(s) Summary
RPM dependency declarations
packaging/linux/nfpm.yaml
RPM dependencies and recommendations now use library sonames, including a GLIBC 2.35 libm requirement and runtime windowing libraries.
Package contents and conditional CLI documentation
packaging/linux/nfpm.yaml, packaging/linux/package.sh
The configuration lists desktop, MIME, metainfo, icon, documentation, and CLI files individually. When the staged Zsh completion file is absent, the script removes the marked CLI documentation block before substituting stage paths.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: echelon

Merge Risk: Minimal · up to 74f87

This change switches RPM dependencies to library sonames so the package installs on openSUSE as well as Fedora. No concrete merge-blocking risk was found. The GUI was not part of the author's testing.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: RPM dependency declarations now use library sonames, which lets openSUSE resolve and install the package. The changeset (nfpm.yaml soname requirements and recommendati…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: RPM dependency declarations now use library sonames, which lets openSUSE resolve and install the package. The changeset (nfpm.yaml soname requirements and recommendations, package.sh conditional cli-docs entries) matches this. The title is concise and specific, and it states the purpose of the change, with no vague terms or file lists.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 04ed2f1 and 74f8749.

Files selected for processing: 1

  • packaging/linux/nfpm.yaml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@tydude001

Copy link
Copy Markdown
Author

I've added a commit that names /usr/share's files one by one, as WordCraft did in #5369, after merging current
main. Packaging /usr/share as one tree makes the RPM own /usr/share/mime and /usr/share/mime/packages at
0755, while openSUSE's filesystem package owns them at 0555. On today's Tumbleweed (filesystem-84.87-21.2),
rpm -U refuses the package for that conflict, and the launcher's zypper --non-interactive install goes through
but leaves /usr/share/mime at 0755. With the files named, both install and the directory stays 0555.

The man pages and completions are named too. package.sh leaves them out of a cross build without EMULATOR, or
of a --skip-build run without the example, and nfpm refuses an entry whose file is missing. So they sit between
# cli-docs:begin and # cli-docs:end, and package.sh deletes that block when they weren't staged.

Checked against 0.17.1: I packaged its released files again with this branch's nfpm.yaml. The .rpm and .deb
hold exactly the release's 43 files. With the man pages and completions removed from the staging directory, it
still packages, with the other 31. They install, and cadcraft-cli --version runs, on Tumbleweed (zypper and
rpm -U), Fedora 44 and Debian 13. cargo xtask ci passes.

@austin62jake, these two commits came after your approval.

…resolve on openSUSE

The recommendations named Fedora's packages (libwayland-client, libX11, libXcursor, libXi, libXrandr),
which openSUSE calls libwayland-client0, libX11-6 and so on, so zypper skipped all five. As sonames,
like the requirements above them, they resolve on both: with recommendations on, as on a desktop
install, Tumbleweed and Leap 15.6 now select all five for the package itself, and Fedora 44 installs
the same five as before.
@tydude001

tydude001 commented Nov 12, 2026 •

Copy link
Copy Markdown
Author

CodeRabbit flagged this on gridcraft#1323, and it applies here too: openSUSE has no packages named
libwayland-client, libX11, libXcursor, libXi or libXrandr, so zypper skipped all five recommendations. I've
added a commit that lists them by soname, like the requirements above them.

Checked against 0.17.1, packaged again with this branch's nfpm.yaml, with recommendations turned on as on a desktop
install (the openSUSE container images turn them off): on Tumbleweed the launcher's
zypper --non-interactive install now selects all five for the package itself, where before it got three through
other packages and left out libXcursor1 and libXrandr2. On Leap 15.6 it went from none to all five. Fedora 44
installs the same five as before.

#1853 adds libX11-xcb and libxkbcommon-x11 to the same list as package names. Whichever lands second can use
libX11-xcb.so.1()(64bit) and libxkbcommon-x11.so.0()(64bit), so they resolve on openSUSE as well.

… starts on X11

The GUI opens libX11-xcb.so.1 and libxkbcommon-x11.so.0 at runtime on X11, and its binary also
names libwayland-egl.so.1, but nothing in the RPM asked for them. Fresh Fedora 44, Leap 15.6 and
Tumbleweed installs, with recommendations on, left libxkbcommon-x11 out. Started on X11 (Xvfb) in
Fedora 44 and Leap 15.6, GridCraft then panicked ("Library libxkbcommon-x11.so could not be
loaded"). With only libX11-xcb missing, winit fails to create its event loop
("libX11-xcb.so.1: cannot open shared object file"). All three are now recommended by soname.
libXrandr is dropped: no binary names it.
@tydude001

Copy link
Copy Markdown
Author

One more commit (74f87490), the same as on gridcraft#1323: the RPM now also recommends libX11-xcb.so.1()(64bit),
libxkbcommon-x11.so.0()(64bit) and libwayland-egl.so.1()(64bit), and no longer recommends libXrandr.so.2()(64bit).
This comes after @austin62jake's approval.

CadCraft 0.20.1's GUI binary names those three libraries, but nothing in the RPM asked for them. Installed on fresh
containers with recommendations on, the package from this branch's previous nfpm.yaml left libxkbcommon-x11.so.0
out on Tumbleweed, Leap 15.6 and Fedora 44, and libX11-xcb.so.1 and libwayland-egl.so.1 too on Leap. Without
libxkbcommon-x11, GridCraft's GUI panics on X11 before opening a window (Library libxkbcommon-x11.so could not be loaded.), and CadCraft's binary names the same ones. I started only GridCraft's GUI. With this commit all three are
installed on all three distros.

#1853 adds libX11-xcb and libxkbcommon-x11 to the same list as package names, which openSUSE doesn't have. If
this lands first, #1853 can drop those two lines.

No binary in the release names libXrandr. I didn't test Wayland, where libwayland-egl is used, or aarch64.

@FredApps

Copy link
Copy Markdown
Contributor

I checked the RPM follow-up at 74f8749. The three window-system sonames are added under Recommends, and the unused Xrandr recommendation is removed. The hard soname requirements and the glibc floor are unchanged. This preserves the earlier change to use dependencies that the distribution can resolve.

GitHub currently shows a passing CodeRabbit check, without a package-install job for this head. I did not repeat the author’s distribution install or launch checks on the updated RPM.

@tydude001

Copy link
Copy Markdown
Author

The CI, Packaging lint and SonarCloud runs on 74f87490 are waiting for approval, so none of them has run since the
11-18 commit (CI,
Packaging lint,
SonarCloud). Could a maintainer approve them? The
same follow-up passed all three on gridcraft#1323 and deckcraft#735.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants