Skip to content
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

Alternative package formats: Docker, Flatpak, AppImage, Snap #444

Open
UnixPhonez opened this issue Jun 14, 2022 · 8 comments
Open

Alternative package formats: Docker, Flatpak, AppImage, Snap #444

UnixPhonez opened this issue Jun 14, 2022 · 8 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@UnixPhonez
Copy link

Describe the what you'd like
An interest in supporting flatpak and submitting to the flathub store or making an appimage

@UnixPhonez UnixPhonez added the enhancement New feature or request label Jun 14, 2022
@superrnovae
Copy link

superrnovae commented Jun 15, 2022

Flatpak does not yet support packaging gradle projects as it requires fetching pre-built binaries during the build phase.

@airsquared
Copy link
Owner

I don't have any plans to create or add a package to those repositories myself, as it becomes too much of a hassle for me to have to update the package everywhere.

It would be great if someone was willing to help create and update a blobsaver package on either of those repositories/formats (this is how blobsaver is on winget and the AUR; I'm not the one who updates those packages). Even a script or GitHub Action would be helpful. I'd welcome any new way to make it easier for users to install and use blobsaver.

@airsquared airsquared added the help wanted Extra attention is needed label Jun 17, 2022
@airsquared
Copy link
Owner

Flatpak does not yet support packaging gradle projects as it requires fetching pre-built binaries during the build phase.

If flatpack doesn't support packaging gradle projects it could be a separate script or GitHub Action that consumes the binaries that are produced by gradle.

@superrnovae
Copy link

superrnovae commented Jul 4, 2022

it could be a separate script or GitHub Action that consumes the binaries that are produced by gradle.

I found a way to fetch all dependencies into a local maven repository so that gradle can pick them up during build phase. All files are in my flatpak branch. I have been able to successfully compile and build (in sandbox mode) the flatpak bundle. But it won't run, due to following error:

Error occurred during initialization of boot layer
java.lang.module.FindException: Module airsquared.blobsaver not found

If someone could investigate and help me figure out why this is happening, we could have a working flatpaked blobsaver. This is my first time building a java application in a flatpak, so it's hard to figure everything out on my own.

Note: I had to set language version back to 17, as gradle provided by flatpak's openjdk sdk does not yet support java 18.

@superrnovae
Copy link

superrnovae commented Jul 8, 2022

I have finally managed to build a flatpak through an action. It works, but there are obviously some limitations, for example:

  1. the device is visible to the app if it was connected before the application had been launched.
  2. the device is correctly sent to recovery mode, but the apnonce can't be read, because the device is no longer visible to the app.
  3. setting background settings doesn't work as it requires access to systemd (needs to be called with flatpak-spawn --host if app detects that it's flatpaked).

It would be possible for the 1st and 2nd steps to work once the usb-device-portal is implemented in flatpak.

Things that work:

  1. reading ecid
  2. saving blobs for already saved devices.
  3. adding/removing/exporting/importing new devices.
  4. background-autosave, but requires a manually created systemd service.

@airsquared
Copy link
Owner

airsquared commented Nov 7, 2022

Thanks for figuring out how to build the flatpak (seems like it took a lot, looking at your fork).

As soon as reading the apnonce starts working, I'd be ready to submit it to Flathub. I don't want to submit it without that, as it would likely confuse users why it's not available (especially since it's a key feature).

@airsquared airsquared changed the title Flatpak + Flathub support or appimage support Alternative package formats: Flatpak + Flathub, AppImage Nov 10, 2022
@PassiveLemon
Copy link

PassiveLemon commented Jan 29, 2023

I would just like to let you guys know that I am working on a Docker container with support for the new CLI arguments. I don't think it will be possible for me to get it to read the apnonce and generator stuff from a device so those will need to be obtained some other way. It's really just so you can have it run in the background and save the blobs if Blobsaver isn't available to your system (ex: NixOS). Ideally I would like it to be entirely CLI based but worst case scenario, I will just repurpose a VNC container and stuff this into it.

@airsquared airsquared changed the title Alternative package formats: Flatpak + Flathub, AppImage Alternative package formats: Docker, Flatpak, AppImage, Snap Jan 29, 2023
@PassiveLemon
Copy link

PassiveLemon commented Jan 29, 2023

I would just like to let you guys know that I am working on a Docker container with support for the new CLI arguments. I don't think it will be possible for me to get it to read the apnonce and generator stuff from a device so those will need to be obtained some other way. It's really just so you can have it run in the background and save the blobs if Blobsaver isn't available to your system (ex: NixOS). Ideally I would like it to be entirely CLI based but worst case scenario, I will just repurpose a VNC container and stuff this into it.

https://github.com/PassiveLemon/blobsaver-docker
I have it functional now. It's a little janky but it does what I originally wanted it to do. Currently, it can't connect to usb devices to get the apnonce and generator so some other method is needed to obtain the required details. It only functions as a server to save the blobs once provided the valid XML. I will see what I can do to get that functionality working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants