-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(bundler): Add Pacman package support, closes #3728 #4301
base: dev
Are you sure you want to change the base?
Conversation
Awesome PR as an Arch BTW user! Can't wait to take a look at it after v1 lands. |
Hello, Anything I need to do for this pr? |
I didn't check it yet @attenuation we need to sort out how to include this - might be merged to a |
Just a archlinux package maintainer chiming in here: Yes, ArchLinux does have binary packages, but the amount of users who contributes them is very small. There are much more maintainer who are not "trusted" and thus only providing building instructions to the AUR. This PR covers only using an local tauri app and create a binary for it and ship it as packaged binary. It would actually be much better to have a tool which can generate a PKGBUILD from a tauri app, which fetches the tauri app's source via an url, fetches tauri as dependency and builds everything locally. This is something every AUR user can use. Going this route does not block the generation of binaries for the repositories either, as repository packages are always meant to be built inside a chroot and be fully self-contained. |
Yes! This is so fundamentally important for proper package distribution. Thankyou for sharing your perspective! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't test this on linux, but I think the idea is sound. Especially since its is proactive.
@nothingismagick wrote:
I'm happy to help, just mention me if there's anything you need to know to make sure I'm seeing this in time. There's a PKGBUILD-proto-file for creating packages under arch. I think the best practice would be that you can download any Tauri archive. Run a command and get a PKGBUILD generated for it. A package maintainer would compare this to his current PKGBUILD make the necessary changes and build the package for the repository in a clean chroot. I'll write a longer answer below how a generation could look like. |
The build instructions, named PKGBUILD, in Arch are pretty straight forward. Tauri can simply generate the build script and let the arch tooling do the job of compiling the tauri app by reading the PKGBUILD files. The reason for this is, the whole Arch User Repository is not in binary files, but in PKGBUILD files. So the pregenerated files would only need minor adjustments to be uploaded there by the maintainers. The packages for the binary repositories of Arch are also published by the maintainers as PKGBUILD files, and then build and distributed as binaries, too. If there's a tauri-app stored for example in a .zip-archive, it the url to it would be stored in the source-array like this: This will be extracted in the $srcdir, so as path it would end up in: And there the tauri app could be built. It would be nice if the build-process could accept a general "package-root" variable where the files are placed, instead of putting them into the source folder under something like If that's not possible the package() { } section would look like that: cd "$srcdir/$pkgname-$pkgver"
package_src='src-tauri/target/release/bundle/linux/packageroot'
install -Dm 755 "$package_src/usr/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm 644 "$package_src/usr/share/applications/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm 644 "$package_src/usr/share/icons/hicolor/256x256@2/apps/$pkgname.png" /usr/share/icons/hicolor/256x256@2/apps/$pkgname.png
install -Dm 644 "$package_src/usr/share/icons/hicolor/32x32/apps/$pkgname.png" /usr/share/icons/hicolor/256x256@2/apps/$pkgname.png
install -Dm 644 "$package_src/usr/share/icons/hicolor/128x128/apps/$pkgname.png" /usr/share/icons/hicolor/256x256@2/apps/$pkgname.png In detail:
|
So 99% can currently be extracted from the tauri.conf and written to a PKGBUILD-file to read it with standard arch linux tools. This would require a conversion tool of some kind ... should I write one? I'm currently gravitating towards shellscript for this. If you guys think that's fine I would submit a patch for that. :) |
Hi, it would be good if it is merged. Is there any reason to wait to merge the pull request? |
}; | ||
|
||
pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> { | ||
// unimplemented!(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// unimplemented!(); |
@oowl @lucasfernog @FabianLars could you please merge this PR? Currently on Arch Linux the !strip option in PKGBUILD seems to not work, making impossible to create an AppImage, and consequently creating a Tauri app package in AL. |
Just reacting because i was pinged: I stopped working on Linux specific things some time ago so i keep somewhat ignoring this, sorry. Also, there was another approach/change proposed here and there was not enough discussion for me as a non-arch user to quickly decide which is better. But again, i didn't look at that PR much either, so maybe it is obvious... Lastly, from what i can see NO_STRIP=true still works absolutely fine, though building appimages on arch is of course not that useful anyway since you can then only share your app with users of (updated) rolling release distros. -> That's probably why we didn't publish a hotfix that forces the NO_STRIP env var |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information