├── LICENSE ├── README.md └── .travis.yml /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 probonopd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # assembly-service [![Build Status](https://travis-ci.com/probonopd/assembly-service.svg?branch=master)](https://travis-ci.com/probonopd/assembly-service) 2 | 3 | ![](https://cdn-images-1.medium.com/max/800/1*PRi2K9TJEa6hO0I92P-p6A.png) 4 | 5 | Experimental Assembly Service for Flatpak, converts applications distributed via Flatpak into AppImages 6 | 7 | Still in the (very) early stages. Playground. Who wants to help? 8 | 9 | ## Motivation 10 | 11 | Let's install a simple text editor, gedit, using Flatpak on a Xubuntu 18.04 Live system: 12 | 13 | ``` 14 | sudo add-apt-repository ppa:alexlarsson/flatpak -y 15 | sudo apt-get -y install flatpak 16 | sudo flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo 17 | sudo flatpak install -v --noninteractive flathub org.gnome.gedit 18 | This operation downloads around 400 MB and places no less than 48,192 files into the filesystem that take up 1.4 GB of space. 19 | me@host:~$ find /var/lib/flatpak -type f | wc -l 20 | 48192 21 | ``` 22 | 23 | For me, it is important for me to have one file per application, a file which does not need to be installed, a file which I can copy around to different systems, a file which I can use on non-persistent Live systems, a file which I can archive for future use long after the repositories will have vanished. 24 | 25 | So, if Flatpak is arguably great at delivering materials, and AppImage is arguably great at assembling them into shippable single-file binaries - why not combine both? 26 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: minimal 2 | dist: xenial 3 | 4 | env: 5 | global: 6 | - ARCH=x86_64 7 | jobs: 8 | - ID=org.gnome.gedit 9 | - ID=com.github.babluboy.bookworm 10 | - ID=com.github.calo001.fondo 11 | # ID=com.github.maoschanz.drawing 12 | - ID=org.videolan.VLC 13 | # ID=org.baedert.corebird 14 | - ID=io.github.GnomeMpv 15 | - ID=com.uploadedlobster.peek 16 | - ID=org.octave.Octave 17 | - ID=com.abisource.AbiWord 18 | - ID=com.leinardi.gwe 19 | - ID=net.meijn.onvifviewer 20 | - ID=com.discordapp.Discord 21 | - ID=com.slack.Slack 22 | 23 | before_install: 24 | - sudo add-apt-repository ppa:alexlarsson/flatpak -y 25 | - sudo apt-get update -q 26 | - sudo apt-get -y install flatpak imagemagick curl binutils libglib2.0-bin 27 | - wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) 28 | - chmod +x ./*.AppImage 29 | 30 | script: 31 | - flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo 32 | - flatpak install -v --noninteractive --user "${ID}" 33 | - mkdir -p appdir 34 | - cp -r "${HOME}/.local/share/flatpak/app/${ID}/current/active/files" ./appdir/usr/ 35 | - find ./appdir/usr/share/applications -type f -exec sed -i -e 's|/app/bin/||g' {} \; || true # Want no paths in Exec= 36 | - find ./appdir/usr/share/applications -type f -exec sed -i -e 's|/usr/bin/||g' {} \; || true # Want no paths in Exec= 37 | - find ./appdir/usr/share/applications -type f -exec sed -i -e 's|Exec=vlc|Exec=vlc.bin|g' {} \; || true # FIXME 38 | - sudo cp /usr/bin/glib-compile-schemas /usr/local/bin/ # We need this command to be available inside the "flatpak run" execution; how to do this? 39 | - flatpak run --filesystem=host --user --command=$(readlink -f ./appimagetool-*-x86_64.AppImage) "${ID}" -s deploy $(readlink -f appdir/usr/share/applications/"${ID}".desktop) --appimage-extract-and-run # On Ubuntu Live ISO, getting: bwrap: Can't make symlink at /var/run: File exists 40 | - LD_LIBRARY_PATH='' find $(readlink -f appdir) -type f -exec ldd {} 2>&1 \; | grep '=>' | grep -v $(readlink -f appdir) 41 | - sed -i -e 's|DBusActivatable|X-DBusActivatable|g' appdir/"${ID}".desktop # FIXME: Work around non-1.0 desktop files 42 | - sed -i -e 's|Keywords|X-Keywords|g' appdir/"${ID}".desktop # FIXME: Work around non-1.0 desktop files 43 | - mkdir -p appdir/usr/share/icons/hicolor/128x128/apps 44 | - cp appdir/usr/share/app-info/icons/flatpak/128x128/"${ID}.png" appdir/ 45 | - cp appdir/usr/share/app-info/icons/flatpak/128x128/"${ID}.png" appdir/usr/share/icons/hicolor/128x128/apps 46 | - sed -i -e 's|/usr||g' $(find appdir/ -type f -name loaders.cache | head -n 1) || true # FIXME in go-appimagetool 47 | - sudo chmod +x appdir/usr/lib64/ld-linux-x86-64.so.2 appdir/lib64/ld-linux-x86-64.so.2 || true # FIXME in go-appimagetool 48 | - RUNTIME=$(LANG=en flatpak info "${ID}" --user | grep "Runtime:" | cut -d ":" -f 2 | cut -d " " -f 2) # e.g., org.gnome.Platform/x86_64/3.36 49 | - cp -r "${HOME}/.local/share/flatpak/runtime/${RUNTIME}/active/files/share/glib-2.0/schemas" appdir/usr/share/glib-2.0/runtime-schemas || true 50 | - find appdir/ -type f -exec sed -i -e 's|/app/share|././/share|g' {} \; # Patch away hardcoded /app/share 51 | - touch appdir/dummy.ui # Force cd usr/ before AppImage is run 52 | - find $HOME -type f -name libqxcb.so || true # FIXME; for debugging VLC 53 | - find appdir/ 54 | - export VERSION=$(LANG=en flatpak info "${ID}" --user | grep "Version:" | cut -d ":" -f 2 | cut -d " " -f 2) 55 | - ./appimagetool-*-x86_64.AppImage appdir/ 56 | 57 | branches: 58 | except: 59 | - # Do not build tags that we create when we upload to GitHub Releases 60 | - /^(?i:continuous)/ 61 | --------------------------------------------------------------------------------