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

at-spi2-atk, at-spi2-core, clutter-gtk, fribidi: updates, build with meson, adding updareScript #41365

Merged
merged 11 commits into from Jun 8, 2018

Conversation

Anton-Latukha
Copy link
Contributor

@Anton-Latukha Anton-Latukha commented Jun 1, 2018

Please, let's merge this progress.
I gathered information and would open new pull request on new work.

Motivation for this change
  • Number of projects support Meson builds.
    This would make Hydra rebuilds faster for this packages.

  • Also doing version updates on these packages.

  • Light linting of this packages

  • Since many of these packages are under GNOME umbrella - migrating them to use fresh GNOME GitLab.

Packages

  • at-spi2-atk (GNOME)
    • Meson build
    • updateScript hook
  • at-spi2-core (GNOME)
    • Meson build
    • 2.26.2 -> 2.28.0
    • updateScript hook
  • clutter-gtk (GNOME)
    • Meson build
  • fribidi

Notes on encountered bugs

  • gnome-logs (GNOME)
    • Can not find meson.build with fetchurl
    • Upon migration on GitLab AND Meson:
    Running custom install script '/usr/bin/env python3 /build/source/meson_post_install.py'
    Failed to run install script '/usr/bin/env python3 /build/source/meson_post_install.py'
    FAILED: meson-install
    /nix/store/yshj6nmgf5zl9yyhw9qxdjkfmz0k1ijh-python3-3.6.5/bin/python3.6m /nix/store  /ayjq6cvqm0a3yd615ksv3va2a455vq5b-meson-0.46.1/bin/meson --internal install /build/source/build/meson-private/install.dat
    ninja: build stopped: subcommand failed.
    
  • gnome-nettool (GNOME)
    • Meson build not seen stable release
  • grilo (GNOME)
  • pango
    • Can not find meson.build with fetchurl
  • gnome3.gtk
    • Can not find meson.build with fetchurl

For later work

  • grilo-plugins (GNOME)
  • hexchat
  • intel-gpu-tools
  • jsoncpp
  • libdrm
  • libmediaart (GNOME)
  • mesa
  • mpc
  • orc
  • rofi
  • seahorse (GNOME)
Things done
  • Tested using sandboxing
  • 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/)
  • Fits CONTRIBUTING.md.

@Anton-Latukha Anton-Latukha changed the title [WIP] Meson builds, fetchFromGitLab for GNOME ones Meson builds, fetchFromGitLab for GNOME ones Jun 1, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Jun 1, 2018

Using mirror://gnome should be preferred to fetchFromGitLab, as it will automatically choose geographically close mirror.

@jtojnar
Copy link
Contributor

jtojnar commented Jun 1, 2018

  1. What does “Can not find configuration files with GitLab fetch” mean?
  2. Opened an issue for gnome-logs: https://gitlab.gnome.org/GNOME/gnome-logs/issues/25
  3. What is gnome3-gtk?
  4. systemd and zathura packages already use meson.
  5. GNOME 2 is dead, no need to port it.

@jtojnar
Copy link
Contributor

jtojnar commented Jun 1, 2018

For fribidi, does adding mesonFlags = [ "-Ddocs=false" ]; as suggested by the error message work?

@Anton-Latukha
Copy link
Contributor Author

Reverted commits.

@Anton-Latukha
Copy link
Contributor Author

mesonFlags = [ "-Ddocs=false" ]; does not work:

checking for references to /build in /nix/store/6dmhgimanfkwa6bsmklcrhg8bz4ksb8f-fribidi-1.0.3...
strip is /nix/store/92d2ifxcni4n3zx9s8wnkcjlvnx5ajlc-binutils-2.30/bin/strip
builder for '/nix/store/wk0m4b3i7n07kmg8gg6278m9ynd532zg-fribidi-1.0.3.drv' failed to produce output path '/nix/store/agpvl0lqg9kphgh4mdbccrb8zj8aa0j4-fribidi-1.0.3-devdoc'
error: build of '/nix/store/wk0m4b3i7n07kmg8gg6278m9ynd532zg-fribidi-1.0.3.drv' failed

@Anton-Latukha
Copy link
Contributor Author

Yes, systemd and zathura packages already uses meson.
I written a small script for the task, and it produced some false-positives.

@Anton-Latukha Anton-Latukha changed the title Meson builds, fetchFromGitLab for GNOME ones at-spi2-atk, at-spi2-core, clutter-gtk: build with meson Jun 1, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Jun 1, 2018

@Anton-Latukha then we either need to remove devdoc from fribidi outputs, or package https://github.com/fribidi/c2man

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jun 1, 2018

The behavior of fribidi upstream about c2man is unknown. They make remarks about it, but leave it, like here fribidi/fribidi#72, fribidi/fribidi#44, but say to disable documentation.

@Anton-Latukha
Copy link
Contributor Author

I would go rest.

Created bugreport for core GNOME library grilo.
https://gitlab.gnome.org/GNOME/grilo/issues/4

Others would do later.

};

# FIXME: Please build with Meson after https://github.com/fribidi/fribidi/issues/79 solved
nativeBuildInputs = [ autoreconfHook pkgconfig ];

# Configure script checks for glib, but it is only used for tests.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glib dependency was removed i 1.0.2.

rev = version;
sha256 = "10q5jfch5qzrj2w4fbkr086ank66plx8hp7ra9a01irj80pbk96d";
rev = "v${version}";
sha256 = "02483nscxc695j9b92clcdf0xb7xkfjry09kqdkkhkzl3vdcj039";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe try fetchurl with "https://github.com/fribidi/fribidi/releases/download/v${version}/${name}.tar.bz2", it should have the manpage bundled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how man pages should look in this packaging.
To me it seems like this tarball is the same deal. Build requires c2man OR mesonFlags = [ "-Ddocs=false" ]; and I see the in doc c2man input files.

I would elaborate more about the topic in that upstream bugreport fribidi/fribidi#79.

Copy link
Contributor

@jtojnar jtojnar Jun 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I think we can probably do without man pages for now.

@Anton-Latukha Anton-Latukha changed the title at-spi2-atk, at-spi2-core, clutter-gtk: build with meson at-spi2-atk, at-spi2-core, clutter-gtk, fribidi: build with meson Jun 2, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Jun 2, 2018

Could you replace the underscore in the at-spi2-core commit message, so that @GrahamcOfBorg could recognize the package?

@jtojnar
Copy link
Contributor

jtojnar commented Jun 2, 2018

I tested several packages depending on fribidi (abiword, mlterm, translate-shell, fbreader, renpy and enligtement.efl), and they build fine.

@Anton-Latukha
Copy link
Contributor Author

fribidi/fribidi#79 resulted in a dev PR that is waiting to merge there.
Meson checking c2man when shipped with docs, this gets dodged in PR.

c2man seems mostly only their dependency.

I would make changes.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jun 2, 2018

During my work:

  1. Is our Xorg packages more granular in some way to other distributions?
    https://www.archlinux.org/packages/extra/x86_64/at-spi2-core/

I see that not developers, not packages in other distros do not use: xextproto libSM libICE for this package.

  1. Do we need include API documentation generation for the package?
    As a general rule, do we include developer-related documentation.

  2. Since I would include D-Bus:
    Is this really needed:

# ToDo: on non-NixOS we create a symlink from there?
configureFlags = "--with-dbus-daemondir=/run/current-system/sw/bin/";
doCheck = false; # needs dbus daemon

@jtojnar
Copy link
Contributor

jtojnar commented Jun 2, 2018

Is our Xorg packages more granular in some way to other distributions?

Not sure, but other distributions often omit transitive dependencies from packages’ dependency list. Nix needs to list all dependencies that are not propagated from other dependencies.

Though some of the dependencies might no longer be needed, for example dbus-glib is not (it was replaced by glib and dbus).

Do we need include API documentation generation for the package? As a general rule, do we include developer-related documentation.

Having a developer documentation is preferred, we use a devdoc output for that. Unfortunately, building it is often not trivial so packagers do not bother with it.

Since I would include D-Bus:
Is this really needed:

meson does not use configureFlags. The corresponding thing would be dbus_daemon flag, but it is not needed since dbus-daemon is auto-detected.

@jtojnar
Copy link
Contributor

jtojnar commented Jun 2, 2018

It would be also nice to add updateScript to at-spi2-core: #36150

@Anton-Latukha
Copy link
Contributor Author

Yes. I tuned down some info, dbus, glib change.

Deps I asked about not needed I am removing them.

Updated package.

Created upstream bug report, they not updated install info for 8 years.

They have good documentation otherwise.

Would send changes, when get internet access.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jun 2, 2018

Since they are twins, I would review at-spi2-atk also.

@Anton-Latukha
Copy link
Contributor Author

Thanks for support, lots of info, and you double my effort on most cases. It is hardcore.

@Anton-Latukha Anton-Latukha changed the title at-spi2-atk, at-spi2-core, clutter-gtk, fribidi: build with meson [WIP] at-spi2-atk, at-spi2-core, clutter-gtk, fribidi: build with meson Jun 3, 2018

meta = with stdenv.lib; {
description = "D-Bus bridge for Assistive Technology Service Provider Interface (AT-SPI) and Accessibility Toolkit (ATK)";
homepage = "https://gitlab.gnome.org/GNOME/at-spi2-atk";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to wrap the URL in quotes.

name = "${moduleName}-${versionMajor}.${versionMinor}";
moduleName = "at-spi2-atk";
versionMajor = "2.26";
versionMinor = "2";

src = fetchurl {
url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${name}.tar.xz";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to use stdenv.lib.versions.majorMinor version so that the various update tools could update the single version attribute, see #36150.

platforms = platforms.unix;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While at it, could you also add a license and me as a maintainer?

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jun 6, 2018

Then it says it does not know what is gnome3.
So I put it up in the head.

You say I need to do with gnome3;. Ok. Maybe I not tried this.

@jtojnar
Copy link
Contributor

jtojnar commented Jun 6, 2018

You need to add gnome3 argument to the top-level function.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jun 6, 2018

You marked it in reviews. So that is why I am asking how to do it in other way.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jun 6, 2018

It is strange to see update helper script in pkgs/desktop/gnome3 near definitions of packages, while script is used, but itself it is not a package.

Maybe it belongs to stdenv.lib.gnome3.updateScript in lib/gnome3/updateScript.nix.
Then gnome3 would not be needed in top level function to some core packages.

@jtojnar
Copy link
Contributor

jtojnar commented Jun 6, 2018

Perhaps I did not express clearly. Qualified names should be used instead of with statement, except in localized situations (e.g. meta attribute). majorMinor has fully qualified name stdenv.lib.versions.majorMinor, GNOME’s updateScript has gnome3.updateScript.

GNOME’s update script is in gnome3 package set because the scripts are only relevant to gnome packages. Again this is the locality principle.

@Anton-Latukha
Copy link
Contributor Author

So this mean all this currently seems OK?

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jun 6, 2018

fribidi does not have maintainers.
I use LANG=en_US.UTF-8 so I am not a candidate there.

clutter-gtk I left mostly untouched, it is important package and I decided to left it to maintainers who know the stack. It can have devdoc, probably this:

postBuild = "rm -rf $out/share/gtk-doc";

was before split-packages, if I know what I am talking about.

sha256 = "10q5jfch5qzrj2w4fbkr086ank66plx8hp7ra9a01irj80pbk96d";
# NOTE: 2018-06-06 v1.0.4: Only URL tarball has "Have pre-generated man pages: true", which works-around upstream usage of rare ancient `c2man` fossil.
src = fetchurl {
url = "https://github.com/${pname}/${pname}/releases/download/v{$version}/${name}.tar.bz2";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The URL or the comment? ;]

Ok, all further changes I going to do on the next day.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The {$version} should be ${version}.

passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
versionPolicy = "none";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: at-spi2-atk is version 2.26.2, while *this (at-spi2-core) is 2.28.0 version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but it still uses the default version policy.

@Anton-Latukha
Copy link
Contributor Author

@jtojnar

Jan, thank you.

@Anton-Latukha Anton-Latukha changed the title at-spi2-atk, at-spi2-core, clutter-gtk, fribidi: build with meson at-spi2-atk, at-spi2-core, clutter-gtk, fribidi: updates, build with meson, adding updareScript Jun 7, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Jun 7, 2018

@GrahamcOfBorg build

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Jun 7, 2018

What it can be? Looks like bot did not built them.

https://monitoring.nix.ci/dashboard/db/ofborg?orgId=1&from=1528343308390&to=1528400908390

I am interested what it can be? We need to wait more, or bot drops/does not return some requests?

@jtojnar
Copy link
Contributor

jtojnar commented Jun 8, 2018

It sometimes requires to list the package names, not sure why

@GrahamcOfBorg build at-spi2-core at-spi2-atk clutter-gtk fribidi gnome3.lightsoff

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: at-spi2-core, at-spi2-atk, fribidi

The following builds were skipped because they don't evaluate on x86_64-darwin: clutter-gtk, gnome3.lightsoff

Partial log (click to expand)

Installing /private/tmp/nix-build-at-spi2-atk-2.26.2.drv-0/at-spi2-atk-2.26.2/build/atk-bridge-2.0.pc to /nix/store/hrbrxqf00vranv3z3fz9x3zj97whvyjs-at-spi2-atk-2.26.2/lib/pkgconfig
Installing /private/tmp/nix-build-at-spi2-atk-2.26.2.drv-0/at-spi2-atk-2.26.2/at-spi2-atk.desktop to /nix/store/hrbrxqf00vranv3z3fz9x3zj97whvyjs-at-spi2-atk-2.26.2/lib/gnome-settings-daemon-3.0/gtk-modules
glibPreFixupPhase
post-installation fixup
strip is /nix/store/8q05v40n0f7amgw70pk6bkb23r7hrzgn-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/hrbrxqf00vranv3z3fz9x3zj97whvyjs-at-spi2-atk-2.26.2/lib
patching script interpreter paths in /nix/store/hrbrxqf00vranv3z3fz9x3zj97whvyjs-at-spi2-atk-2.26.2
/nix/store/wn2d5zz7dp6kd8mjg07dywgs59avziag-at-spi2-core-2.28.0
/nix/store/hrbrxqf00vranv3z3fz9x3zj97whvyjs-at-spi2-atk-2.26.2
/nix/store/19m8mzy9vqqmjhg892a6fmlxqf689wz6-fribidi-1.0.4

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: at-spi2-core, at-spi2-atk, clutter-gtk, fribidi, gnome3.lightsoff

Partial log (click to expand)

glibPreFixupPhase
hicolorPreFixupPhase
post-installation fixup
Wrapping program /nix/store/g480s3qadzgpqjr8ipa86viqp3r49xm7-lightsoff-3.28.0/bin/lightsoff
shrinking RPATHs of ELF executables and libraries in /nix/store/g480s3qadzgpqjr8ipa86viqp3r49xm7-lightsoff-3.28.0
shrinking /nix/store/g480s3qadzgpqjr8ipa86viqp3r49xm7-lightsoff-3.28.0/bin/.lightsoff-wrapped
strip is /nix/store/4mf2xm9p32lzrim927yk92xhx35yaz62-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/g480s3qadzgpqjr8ipa86viqp3r49xm7-lightsoff-3.28.0/bin
patching script interpreter paths in /nix/store/g480s3qadzgpqjr8ipa86viqp3r49xm7-lightsoff-3.28.0
checking for references to /build in /nix/store/g480s3qadzgpqjr8ipa86viqp3r49xm7-lightsoff-3.28.0...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: at-spi2-core, at-spi2-atk, clutter-gtk, fribidi, gnome3.lightsoff

Partial log (click to expand)

shrinking /nix/store/qxzw98vvqlgd6nk5q5j5yxkvqhz9x5lp-lightsoff-3.28.0/bin/.lightsoff-wrapped
strip is /nix/store/3ki967c3ij4zi1q9ycc3g1vfwr608nrb-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/qxzw98vvqlgd6nk5q5j5yxkvqhz9x5lp-lightsoff-3.28.0/bin
patching script interpreter paths in /nix/store/qxzw98vvqlgd6nk5q5j5yxkvqhz9x5lp-lightsoff-3.28.0
checking for references to /build in /nix/store/qxzw98vvqlgd6nk5q5j5yxkvqhz9x5lp-lightsoff-3.28.0...
/nix/store/xq43jmz0qxacc9v1m25j5k96snxhsfp1-at-spi2-core-2.28.0
/nix/store/xm381r7cimvvvdr8yv69zd5dkzgyi2z0-at-spi2-atk-2.26.2
/nix/store/7y4cn4sh7c9g75gi71qlsfd9hdaiwwa0-clutter-gtk-1.8.4
/nix/store/mijw0lrsxavi4gjvjqabfdxdpn1p1251-fribidi-1.0.4
/nix/store/qxzw98vvqlgd6nk5q5j5yxkvqhz9x5lp-lightsoff-3.28.0

@jtojnar jtojnar merged commit 2890ff7 into NixOS:staging Jun 8, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Jun 8, 2018

Thank you.

@Anton-Latukha Anton-Latukha deleted the migrateToMeson branch June 8, 2018 15:21
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