gramps-project / flatpak

Manifest and data files required to make a Gramps Flatpak
3 stars 4 forks source link

GExiv2 requires a writable-sdk #1

Closed OzarkShepherd closed 3 years ago

OzarkShepherd commented 4 years ago

Flathub gave me trouble over a writable-sdk because of the sandbox. GExiv2 is a meson build that gives the following error without the writable-sdk OSError: [Errno 30] Read-only file system: '/usr/lib/python3.8/site-packages/gi/overrides/GExiv2.py' FAILED: meson-install /usr/bin/meson install --no-rebuild ninja: build stopped: subcommand failed. Error: module gexiv2Dependency: Child process exited with code 1 Since it is a meson build that requires apparently a special command, a possible solution would be to use a simple buildsystem and give specific meson commands that it needs.

OzarkShepherd commented 4 years ago

I thought I made some progress with the module

  • name: gexiv2Dependency buildsystem: simple config-opts:

but ninja did not update the symbolic links, so Gramps doesn't recognize that gexiv2 is installed. That is where the problem is, even though I made various directories writable and even tried to change the lib folder, the /usr/ environment is not being modified to show the system that gexiv is installed. So when meson install -C /app/builddir is used instead of ninja, the module fails due to symlinks not being updated.

OzarkShepherd commented 4 years ago

I submitted a pull request that will fix this issue.

Nick-Hall commented 4 years ago

Although gexiv2 is not essential, it is useful to include. We may make more use of it in the future.

OzarkShepherd commented 4 years ago

When I took gexiv2 out, I got pop-up errors on startup of Gramps about reduced functionality due to gexiv2 not being installed. So even though gexiv2 was listed as optional, I didn't want to have someone's first experience with the flatpak to be popup errors. Maybe I put too much time and effort on it working, but the pull request I submitted yesterday fixed the issue anyway.

a-andre commented 4 years ago

This should work. Note build-options.

  - name: gexiv2
    buildsystem: meson
    config-opts:
      - -Dpython2_girdir=no
      - -Dpython3_girdir=no
    build-options:
      env:
        PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR": /app/share/gir-1.0
        PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR": /app/lib/girepository-1.0
    sources:
      - type: git
        url: https://gitlab.gnome.org/GNOME/gexiv2.git
        tag: gexiv2-0.12.1
        commit: a904953bb912ce383227a1a464bbc76b837046c7
OzarkShepherd commented 4 years ago

Thank you, since a flatpak for flathub is supposed to be reproducible and a stable release, I thought that archives would be better since gits change over time.

Is there an advantage in passing those environments, since it works without them as long as Dpython3_girdir=no is set?

a-andre commented 4 years ago

A git commit hash is provided additionally to the tag to detect changes in git history. But archives are fine, too. I use both types in https://github.com/flathub/org.gajim.Gajim/blob/master/org.gajim.Gajim.yaml.

I created a flatpak manifest to test my reverse DNS changes. It might not be optimal, yet.

There is probably no advantage in passing those environments. It could be that I set the environments first and later disabled python3_girdir.