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

[FEAT]: Flatpak package for Linux #1374

Open
imbev opened this issue May 12, 2024 · 4 comments
Open

[FEAT]: Flatpak package for Linux #1374

imbev opened this issue May 12, 2024 · 4 comments

Comments

@imbev
Copy link

imbev commented May 12, 2024

What would you like to see?

Given dependency problems such as #898 and additional setup required to use Appimages, I suggest the building and publication of a Flatpak package to Flathub. Unlike Appimage, Flatpak "just works" on the vast majority of Linux distributions and is often available OOTB in distribution graphical app stores.

@imbev imbev added enhancement New feature or request feature request labels May 12, 2024
@timothycarambat
Copy link
Member

The issue with the AppImage is that when the AppImage mounts, it mounts to a temp directory and that directory is read-only, but often the prisma engine needs to download for the users OS. This fails, which then fails to run the migration and client generation, which then prevents some commands from saving due to the old primsa client not knowing about new fields and preventing updates on specific columns.

If on launch, flatpak does the same, this will not resolve the issue. I have never used flatpak though

@imbev
Copy link
Author

imbev commented May 12, 2024

Flatpak has a completely different approach to building and distribution from Appimage. See https://docs.flatpak.org/

I've created a manifest that almost works, but has a permission problem. Someone more experienced with Flatpak can probably complete it. Another issue with this manifest is that it allows the network permission to allow the prisma openssl download, so the prisma issue will need to be solved before publishing to Flathub.

id: com.useanything.AnythingLLMDesktop
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
  - org.freedesktop.Sdk.Extension.node18
command: entrypoint.sh
finish-args:
  - --share=ipc
  - --socket=x11
  - --socket=fallback-x11
  - --socket=wayland
  - --device=dri
  - --share=network
  #- --filesystem=xdg-documents
modules:
  - name: entrypoint.sh
    buildsystem: simple
    build-commands:
      - install -D entrypoint.sh /app/bin/entrypoint.sh
    sources:
      - type: file
        path: entrypoint.sh
  - name: anythingllmdesktop
    buildsystem: simple
    build-commands:
      - chmod +x *.AppImage && ./AnythingLLMDesktop.AppImage --appimage-extract
      - cd squashfs-root/resources/backend/ && node node_modules/prisma generate
      - mkdir -p /app/anythingllmdesktop
      - cp -r squashfs-root/* /app/anythingllmdesktop
    sources:
      - type: file
        url: https://web.archive.org/web/20240512181948/https://s3.us-west-1.amazonaws.com/public.useanything.com/latest/AnythingLLMDesktop.AppImage
        sha256: 792278729c870b4db3a2fd6512aee1d81e4130c1d5876d5df7e93b16bc97db65
  - name: zypak
    sources:
      - type: git
        url: https://github.com/refi64/zypak
        tag: v2024.01.17
build-options:
  append-path: /usr/lib/sdk/node18/bin
  build-args:
    - --share=network
#!/bin/sh
zypak-wrapper /app/anythingllmdesktop/AppRun

@imbev
Copy link
Author

imbev commented May 16, 2024

@timothycarambat Is there an all-in-one build that's not the appimage?

@timothycarambat
Copy link
Member

@imbev the docker image - but that is it. We dont publish multiple linux desktop wrappers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants