fix(bundler): bundle resources to correct path during RPM bundling when resources are specified as a map#12759
Merged
FabianLars merged 2 commits intotauri-apps:devfrom Mar 9, 2025
nekename:dev
Merged
fix(bundler): bundle resources to correct path during RPM bundling when resources are specified as a map#12759FabianLars merged 2 commits intotauri-apps:devfrom nekename:dev
FabianLars merged 2 commits intotauri-apps:devfrom
nekename:dev
Conversation
…en resources are specified as a map
Contributor
Author
|
Thanks for forcing me to sign my commits, I would never have gotten around to setting that up otherwise |
Contributor
Package Changes Through ad9e475There are 6 changes which include tauri with minor, @tauri-apps/api with minor, tauri-runtime-wry with minor, tauri-bundler with patch, tauri-cli with patch, @tauri-apps/cli with patch Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Contributor
Author
|
The failing lint check is not in my code. |
Contributor
Author
Member
|
that's me |
FabianLars
approved these changes
Mar 9, 2025
Contributor
Author
|
Yay |
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.
My app's resources were specified as
"resources": { "target/plugins/": "plugins/" }. However, a user on Fedora reported some functionality working incorrectly, and I was able to reproduce it immediately on openSUSE Tumbleweed, which left me confused as this had been working for many other users, so why could I reproduce it with no steps? I realised it was an issue with the bundled .rpm file, which a quick look at the archives confirmed.RPM left, DEB right

Looking at the code that produces these bundles, the debian bundler called Settings::copy_resources, which iterated over Resource structs, instead of Strings like the RPM bundler was doing. I modified the RPM bundler to also iterate over Resources in the same fashion. It seems safe to remove the call to resource_relpath as it appears the appropriate logic is already being done in tauri-utils here.
Some tests in other parts of the project were failing, but
cargo test --package tauri-bundlerseems to be OK (there aren't any tests for this part afaict though). Speaking of tests, I haven't tested this to be working as I really don't want to swap out all my installed tooling for a locally built one, but I thought submitting a PR might get this in faster than an issue, so hopefully you'll be able to test it.