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

Fix gobject-introspection, and package gnome-builder and dependencies #44187

Closed
wants to merge 4 commits into from

Conversation

jameysharp
Copy link
Contributor

Motivation for this change

I wanted to package GNOME Builder, but to do so I first had to package two other gnome.org libraries, and then I had to fix what appears to be a bug in the Nix packaging for gobject-introspection. That bug is described in the commit message in the first commit in this series, so here I'll focus on details about the series as a whole.

I've based this series against staging, because gobject-introspection has a lot of reverse dependencies. Implicitly, I've tested 33 packages that depend on gobject-introspection that are in the transitive closure of GNOME Builder, and they work correctly with this commit. The existing packages apparently worked correctly without this fix as well, but GNOME Builder in particular installs its libide-1.0.so in an unusual path that g-ir-scanner couldn't previously parse from ldd output.

The three new packages don't need to be built against staging, but they aren't useful without the whole series, so I figure they should all get build-tested at once.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Upstream hadn't been parsing ldd output correctly, and this Nix-specific
patch appears to have been an attempt to work around the bug. However,
this patch still didn't parse ldd output fully correctly.

Meanwhile, upstream recently landed a patch on their master branch to
make ldd output parsing work across all their supported platforms, which
in my testing appears to give correct results on NixOS across a large
sample of GNOME libraries.

So this commit replaces the Nix-specific ldd-parsing patch with a
backport of upstream's version, which can then be dropped entirely once
upstream ships a new release and nixpkgs upgrades to it.

The only backporting required was that upstream is now maintaining both
their old autotools build system as well as a new Meson-based build, so
I used filterdiff to strip out the part of the patch which touched
meson.build, leaving only the Makefile.am equivalent behind.

In addition to the above changes, this upstream patch required Python 3,
so I also changed the Python major version used in the
gobject-introspection tools.
@jtojnar
Copy link
Contributor

jtojnar commented Jul 29, 2018

See also #33270

@jtojnar
Copy link
Contributor

jtojnar commented Jul 29, 2018

$ less $(nix-build -A atk.dev)/share/gir-1.0/Atk-1.0.gir | grep shared
             shared-library="libatk-1.0.so.0"

Does not look working to me. We want absolute paths.

@jtojnar
Copy link
Contributor

jtojnar commented Jul 29, 2018

Also, some packages depend on that patch. For example gnome3.gnome-bluetooth fails with g-ir-scanner: error: no such option: --fallback-library-path.

@jameysharp jameysharp mentioned this pull request Jul 30, 2018
9 tasks
@jameysharp
Copy link
Contributor Author

Thank you for these pointers. After carefully reading a lot of commits, I figured out how to make your patches to gobjectIntrospection and meson work. Since the result doesn't need to be based on staging, I've opened a new PR for that in #44217.

@jameysharp jameysharp closed this Jul 30, 2018
@jameysharp jameysharp deleted the gnome-builder branch July 8, 2019 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants