Assorted frustrations

Nolan Darilek nolan at thewordnerd.info
Tue Mar 13 20:02:25 UTC 2018


Hey,


I've recently migrated to Atomic Workstation and am starting to embrace
flatpaks. I use gPodder for podcasts, and instead of managing my own
separate installation, I thought I'd build a flatpak. Unfortunately,
I've had bunches of problems making this work, and am hoping for some
pointers. Here is my current manifest:


{
  "app-id": "io.github.gpodder.gPodder",
  "runtime": "org.gnome.Platform",
  "runtime-version": "3.26",
  "sdk": "org.gnome.Sdk",
  "command": "gpodder",
  "rename-icon": "gpodder",
  "rename-desktop-file": "gpodder.desktop",
  "finish-args": [
    "--socket=x11",
    "--socket=wayland",
    "--share=ipc",
    "--share=network"
  ],
  "cleanup": [
    "include"
  ],
  "modules": [
    {
      "name": "python-dbus",
      "sources": [
        {
          "type": "archive",
          "url":
"https://pypi.python.org/packages/ad/1b/76adc363212c642cabbf9329457a918308c0b9b5d38ce04d541a67255174/dbus-python-1.2.4.tar.gz",
          "sha256":
"e2f1d6871f74fba23652e51d10873e54f71adab0525833c19bad9e99b1b2f9cc"
        }
      ],
      "build-options": {
        "env": {
          "PYTHON": "python3.5"
        }
      }
    },
    {
      "name": "podcastparser",
      "sources": [
        {
          "type": "archive",
          "url":
"https://github.com/gpodder/podcastparser/archive/0.6.3.tar.gz",
          "sha256":
"5cd36182bf0c8ec5b36fb309b23bb1c67b507909d94ef402f04f08e64e545489"
        }
      ],
      "buildsystem": "simple",
      "build-commands": [
        "python3 setup.py install --prefix=/app"
      ]
    },
    {
      "name": "mygpoclient",
      "sources": [
        {
          "type": "archive",
          "url":
"https://github.com/gpodder/mygpoclient/archive/1.8.tar.gz",
          "sha256":
"65fcb3ab220a2ba2d32a77f969b423a2f663413b6c485b7b02e5a955b28e68d2"
        }
      ],
      "buildsystem": "simple",
      "build-commands": [
        "python3 setup.py install --prefix=/app"
      ]
    },
    {
      "name": "gpodder",
      "sources": [
        {
          "type": "archive",
          "url": "https://github.com/gpodder/gpodder/archive/3.10.0.tar.gz",
          "sha256":
"c5cf0c1e530dedcb4e652d2350a07d515c155f34c6c76d0e98c918f8042baf54"
        }
      ],
      "buildsystem": "simple",
      "build-commands": [
        "make install PREFIX=/app",
        "mv /app/share/applications/gpodder-url-handler.desktop
/app/share/applications/io.github.gpodder.gPodder.gpodder-url-handler.desktop"
      ]
    }
  ]
}


1. When I build this, then run it with bash, I still have an
/app/include directory despite listing it in "cleanup". It's a small
directory, so this isn't a huge deal, but I don't know why it isn't deleted.


2. I can run the built manifest with `flatpak-builder --run`. When I do
this, it doesn't appear to run in a sandbox like I expect. I have an
old, system-wide version of gPodder that accesses files in my home
directory, and flatpak fires up with that, downloading podcasts from my
current subscriptions. My expectation is that gPodder would be running
in a sandbox, and thus not access the old installation. Am I
misunderstanding?


3. If I install the flatpak, then run it from my launcher, it fails to
start. Running it from the command line via `flatpak run` gives:


Failed to register:
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown:
org.freedesktop.DBus.Error.ServiceUnknown


Interestingly enough, it now works via `flatpak run`. It launches in a
sandbox, and I only get warnings about a missing dependency. But it
still silently fails to launch from my desktop and I don't know why
things are so inconsistent.


4. While I have folks' attentions, I'm also trying to package the Chirp
amateur radio programming app. If I try retrieving
https://trac.chirp.danplanet.com/chirp_daily/daily-20180313/chirp-daily-20180313.tar.gz
via Firefox, it downloads. Via flatpak, curl, and wget I get certificate
errors. If I wanted to package this app and submit it to flathub, how
should I handle this case? It looks like Chirp is only distributed as
daily builds, so eventually this build may no longer be available for
download. Should I commit it to the repo alongside the manifest, or do
something else entirely?


Any help would be very much appreciated.


More information about the Flatpak mailing list