Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Package for postmarketOS / Alpine Linux #11

Open
calebccff opened this issue Jun 7, 2021 · 6 comments
Open

Package for postmarketOS / Alpine Linux #11

calebccff opened this issue Jun 7, 2021 · 6 comments
Labels
packaging Request for packaging

Comments

@calebccff
Copy link

Unfortunately AppImages aren't really viable on Alpine / postmarketOS at the minute, so lets try and get this application packaged there instead!

Example of another (albeit simpler) rust package in alpine: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/testing/i3status-rust/APKBUILD

It should be as simple as including all -dev packages in the makedepends, and including the rest in depends (not sure about libhandy).

I'll try and get a working APKBUILD some time soonish, although I'm more than open to being beaten to it :D.

@Schmiddiii Schmiddiii added the packaging Request for packaging label Jun 7, 2021
@pojntfx
Copy link

pojntfx commented Jun 13, 2021

I second this! Running it on musl-based systems yields "No such file or directory". Maybe flatpak would be an option as well? Most GTK mobile apps have one now.

@Schmiddiii
Copy link
Collaborator

I have been working on a flatpak build on the last days (see #16). I got it working on my laptop, but could not cross compile to aarch64. It may be a error on my system (e.g. some package not installed) or in my build. As I do not have experience with flatpak
I do not know the cause of the error. Searching the internet did not help. Any help is appreciated.

@pojntfx
Copy link

pojntfx commented Jun 13, 2021

I too am not an expert with Flatpak's packaging, but a quick and dirty workaround could be to use https://github.com/pojntfx/hydrun - it uses qemu-user-static to spin up a quick aarch64 VM so that cross-compilation is no longer necessary, but it comes at the cost of taking longer to compile. Since Flatpak requires namespaces support note that you'd have to run hydrun with --extraArgs='--privileged' -i -a arm64 bash, i.e. like so:

$ hydrun --extraArgs='--privileged' -i -a arm64 bash
root@d78547cd001f:/data# history
    1  apt update && apt install -y ca-certificates flatpak
    2  flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
    4  flatpak install flathub fi.skyjake.Lagrange
    5  flatpak run fi.skyjake.Lagrange

@Schmiddiii
Copy link
Collaborator

Thank you. I now have a working cross compilation. My mistake was that installing qemu-user-static from the repos did not work.
I installed it from the github-website you linked in your README.

@calebccff
Copy link
Author

calebccff commented Jun 14, 2021

@pojntfx I was able to build from source and run on postmarketOS, although I only tried building on device.... I documented build instructions for pmOS here: https://github.com/Schmiddiii/Tubefeeder/wiki/Tested-on#build-instructions

flatpak would be great, although I'd really love to see it get packaged for alpine (as there aren't any significant drawbacks)

@Schmiddiii
Copy link
Collaborator

I decided to move all flatpak-related discussions to #13 to keep this issue about packaging with APKBUILD.
Even if flatpak would probably work fine on pmOS, the opening times of a not-sanboxed format would still be better (the difference between AppImage and native is noticable on my PinePhone).

As I do not use any musl-based systems I cannot help with this issue. Feel free to reach out to me when you have a working APKBUILD or any questions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
packaging Request for packaging
Projects
None yet
Development

No branches or pull requests

3 participants