Skip to content

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
nekename:dev
Mar 9, 2025
Merged

fix(bundler): bundle resources to correct path during RPM bundling when resources are specified as a map#12759
FabianLars merged 2 commits intotauri-apps:devfrom
nekename:dev

Conversation

@nekename
Copy link
Contributor

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
image

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-bundler seems 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.

@nekename nekename requested a review from a team as a code owner February 21, 2025 10:55
@nekename
Copy link
Contributor Author

Thanks for forcing me to sign my commits, I would never have gotten around to setting that up otherwise

@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2025

Package Changes Through ad9e475

There 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 Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.3.0 2.4.0
tauri-bundler 2.2.4 2.2.5
tauri-runtime-wry 2.4.1 2.5.0
tauri 2.3.1 2.4.0
@tauri-apps/cli 2.3.1 2.3.2
tauri-cli 2.3.1 2.3.2

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@nekename
Copy link
Contributor Author

The failing lint check is not in my code.

@nekename
Copy link
Contributor Author

nekename commented Mar 8, 2025

@FabianLars?

@FabianLars
Copy link
Member

that's me

@FabianLars FabianLars merged commit 3626b7a into tauri-apps:dev Mar 9, 2025
14 checks passed
@nekename
Copy link
Contributor Author

nekename commented Mar 9, 2025

Yay

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.

2 participants

Comments