fix: ensure file type bit is set for rpm bundle#5459
Merged
jkelleyrtp merged 1 commit intoDioxusLabs:mainfrom Apr 7, 2026
Merged
fix: ensure file type bit is set for rpm bundle#5459jkelleyrtp merged 1 commit intoDioxusLabs:mainfrom
jkelleyrtp merged 1 commit intoDioxusLabs:mainfrom
Conversation
By using the `permissions()` method of `FileOptionsBuilder`, which was added in version 0.20.0 of the `rpm` crate, we fix a bug where newer versions of `rpm` (the package, not the crate) would fail when installing the bundle.
cb40678 to
94d4814
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR: By using the
permissions()method ofFileOptionsBuilder(which was added in version 0.20.0 of therpmcrate) instead of themode()method, we fix a bug where newer versions ofrpm(the package, not the crate) would fail when installing the bundle.The generated rpm files failed to install in fedora 43:
The issue seems to stem from lines of code that call
rpm::FileOptionsBuilder::mode(), e.g.:Which causes the files inside the bundle to lack the file type bit, for instance these are the files inside my rpm package:
Assuming that this code was added to dioxus by copying code from tauri, I wondered why would tauri have that incorrect code. Turns out older versions of rpm (like version 4.18 which is in the ubuntu 24.04 packages repo) do not enforce this specific bit, and do not fail when it's not set. Fedora provides a much newer version (6.0.1 on my system) which must have added a check for that.
Conveniently enough, the rpm crate just added a
rpm::FileOptionsBuilder::permissions()method which does exactly what mode should be doing according to our syntax. From docs.rs:So basically the issue is fixed if we bump the
rpmcrate version and replace all lines like:with: