ublue-os / image-template

Build your own custom Universal Blue Image!
Apache License 2.0
86 stars 17 forks source link

How to manage preinstalled Flatpak packages? #20

Closed cjuniorfox closed 1 week ago

cjuniorfox commented 1 month ago

I was creating my atomic image (https://github.com/cjuniorfox/hyprland-atomic) and was willing to manage the default Flatpak installation packages, but I don't know how to do it. I tried to straightforwardly run flatpak install -y ... on "build.sh" but it seems not to work at all.

Follows the output error:

+ flatpak install -y com.github.tchx84.Flatseal org.gnome.Calculator org.gnome.Evince org.gnome.FileRoller org.gnome.FontManager org.gnome.Loupe org.gnome.TextEditor org.mozilla.firefox org.freedesktop.Platform.ffmpeg-full/x86_64/22.08 org.freedesktop.Platform.openh264/x86_64/2.3.1
Bail out! ERROR:../subprojects/libglnx/glnx-shutil.c:156:mkdir_p_at_internal: assertion failed: (!did_recurse)
**
ERROR:../subprojects/libglnx/glnx-shutil.c:156:mkdir_p_at_internal: assertion failed: (!did_recurse)
/tmp/build.sh: line 86:   303 Aborted                 (core dumped) flatpak install -y com.github.tchx84.Flatseal org.gnome.Calculator org.gnome.Evince org.gnome.FileRoller org.gnome.FontManager org.gnome.Loupe org.gnome.TextEditor org.mozilla.firefox org.freedesktop.Platform.ffmpeg-full/x86_64/22.08 org.freedesktop.Platform.openh264/x86_64/2.3.1
Error: building at STEP "RUN mkdir -p /var/lib/alternatives &&     /tmp/build.sh &&     ostree container commit": while running runtime: exit status 134

I believe there's something I missed. I would be glad if you can point me in the right direction. Thanks by advance

proJM-Coding commented 1 month ago

Similarly I am trying to use the aurora as my source image but I want to remove the flatpak BoxBuddy. I am unsure of how to do this. I also want to remove the kde-connect package but I am told it is missing.

noelmiller commented 1 week ago

Flatpaks cannot be installed in a container. They must be declared as part of the ISO build process. See Bazzite, Bluefin, or Aurora as examples. None of the images come with flatpaks preinstalled.

cjuniorfox commented 1 week ago

Great. I did as mentioned and worked well as you can see here https://github.com/cjuniorfox/hyprland-atomic/blob/main/.github/workflows/build.yml

proJM-Coding commented 1 week ago

You also can try to use https://github.com/blue-build.