This partially fixes <https://issues.guix.gnu.org/54786>, allowing the 'jami'
and 'jami-provisioning' system tests to pass again.
In version 0.9.0, Shepherd constructors are now run concurrently, via
cooperative scheduling (Guile Fibers). The Jami service previously relied on
blocking sleeps while polling for D-Bus services to become ready after forking
a process; this wouldn't work anymore since while blocking the service process
wouldn't be given the chance to finish starting. The new reliance on Fibers
in Shepherd's fork+exec-command in the helper 'send-dbus' procedure also meant
that it wouldn't work outside of Shepherd anymore. Finally, the
'start-service' Shepherd procedure used in the test suite would cause the Jami
daemon to be spawned multiple times (a bug introduced in Shepherd 0.9.0).
To fix/simplify these problems, this change does the following:
1. Use the Guile AC/D-Bus library for D-Bus communication, which simplify
things, such as avoiding the need to fork 'dbus-send' processes.
2. The non-blocking 'sleep' version of Fiber is used for the 'with-retries'
waiting syntax.
3. A 'dbus' package variant is used to adjust the session bus configuration,
tailoring it for the use case at hand.
4. Avoid start-service in the tests, preferring 'jami-service-available?' for
now.
* gnu/build/jami-service.scm (parse-dbus-reply, strip-quotes)
(deserialize-item, serialize-boolean, dbus-dict->alist)
(dbus-array->list, parse-account-ids, parse-account-details)
(parse-contacts): Delete procedures.
(%send-dbus-binary, %send-dbus-bus, %send-dbus-user, %send-dbus-group)
(%send-dbus-debug): Delete parameters.
(jami-service-running?): New procedure.
(send-dbus/configuration-manager): Rename to...
(call-configuration-manager-method): ... this. Turn METHOD into a positional
argument. Turn ARGUMENTS into an optional argument. Invoke
`call-dbus-method' instead of `send-dbus', adjusting callers accordingly.
(get-account-ids, id->account-details, id->account-details)
(id->volatile-account-details, username->id, add-account remove-account)
(username->contacts, remove-contact, add-contact, set-account-details)
(set-all-moderators, username->all-moderators?, username->moderators)
(set-moderator): Adjust accordingly.
(with-retries, send-dbus, dbus-available-services)
(dbus-service-available?): Move to ...
* gnu/build/dbus-service.scm: ... this new module.
(send-dbus): Rewrite to use the Guile AC/D-Bus library.
(%dbus-query-timeout, sleep*): New variables.
(%current-dbus-connection): New parameter.
(initialize-dbus-connection!, argument->signature-type)
(call-dbus-method): New procedures.
(dbus-available-services): Adjust accordingly.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register new module.
* gnu/packages/glib.scm (dbus-for-jami): New variable.
* gnu/services/telephony.scm: (jami-configuration)[dbus]: Default to
dbus-for-jami.
(jami-dbus-session-activation): Write a D-Bus daemon configuration file at
'/var/run/jami/session-local.conf'.
(jami-shepherd-services): Add the closure of guile-ac-d-bus and guile-fibers
as extensions. Adjust imported modules. Remove no longer used parameters.
<jami-dbus-session>: Use a PID file, avoiding the need for the manual
synchronization.
<jami>: Set DBUS_SESSION_BUS_ADDRESS environment variable. Poll using
'jami-service-available?' instead of 'dbus-service-available?'.
* gnu/tests/telephony.scm (run-jami-test): Add needed Guile extensions. Set
DBUS_SESSION_BUS_ADDRESS environment variable. Adjust all tests to use
'jami-service-available?' to determine if the service is started rather than
the now problematic Shepherd's 'start-service'.
Fixes <https://issues.guix.gnu.org/52519>. The package was propagating two
variants of libsigc++.
* gnu/packages/glib.scm (glibmm-2.64)[propagated-inputs]: Replace existing
libsigc++ package instead of prepending an extra one.
Reported-by: Leo Famulari <leo@famulari.name>
Fixes <https://issues.guix.gnu.org/52574>.
Reported by L p R n d n <guix@lprndn.info>.
Thanks to Maxime Devos for the suggested fix.
* gnu/packages/glib.scm (glib)[configure-flags]: Define as a G-expression.
(glib-with-documentation)[configure-flags]: Likewise.
This is the result of running:
./pre-inst-env guix style --input-simplification=safe
and manually undoing changes on a dozen of packages to reduce
rebuilds (derivations for emacs, icecat, and libreoffice are unchanged.)
* gnu/packages/glib.scm (glib): Update to 2.70. Remove trailing #t.
[outputs]: Add a debug output.
[configure-flags]: Specify --bindir and disable manpage generation.
[phases]{disable-failing-tests}: Disable the flaky testfilemonitor test.
{move-static-libraries}: Use rename-file instead of link and delete.
{move-bin}: Rename to...
{patch-pkg-config-files}: ... this, and adjust the substitutions.
[native-inputs]: Remove docbook-xsl, libxml2 and libxslt.
[properties]: Re-add the hidden? property that commit 18f73d8041 had
temporarily removed.
(glib-with-documentation)[properties]: Revert to a visible package.
[native-inputs]: Add docbook-xsl and libxslt.
[configure-flags]: Delete the inherited "-Dman=false" flag.
Fixes <https://issues.guix.gnu.org/50957>.
This reverts the following commits:
- 42231bc (gnu: cheese: Propagate gdk-pixbuf+svg rather than gdk-pixbuf)
- ad6a950 (gnu: mutter: Propagate gdk-pixbuf+svg rather than gdk-pixbuf)
- 5e02d1a (gnu: cogl: Propagate gdk-pixbuf+svg rather than gdk-pixbuf)
- 5c467b2 (gnu: libgweather: Propagate gdk-pixbuf+svg rather than gdk-pixbuf)
- 26487f6 (gnu: librsvg-next: Do not propagate gdk-pixbuf)
- d891922 (gnu: librsvg: Do not propagate gdk-pixbuf)
- 22476d3 (gnu: libgsf: Do not propagate gdk-pixbuf)
- 099ca0e (gnu: libnotify: Propagate gdk-pixbuf+svg rather than gdk-pixbuf)
- fb6a1ff (gnu: appstream-glib: Propagate gdk-pixbuf+svg rather than gdk-pixbuf)
- 4fb525d (gnu: weasyprint: Propagate gdk-pixbuf+svg rather than gdk-pixbuf)
These commits were made to resolve a gdk-pixbuf loaders clash that could occur
in a profile when both gdk-pixbuf and gdk-pixbuf+svg were propagated.
Unfortunately, librsvg really needs to propagate gdk-pixbuf itself, which
would introduce a cycle. Packages such as 'efl' were broken as a result of
not propagating gdk-pixbuf.
A more definitive fix will be proposed for core-updates, which includes a
profile hook to generate the gdk-pixbuf loaders.cache file, as well as a build
phase and search path specification, that should resolve the issue for good.
Propagating gdk-pixbuf rather than gdk-pixbuf+svg is dangerous as it clashes
with GTK+'s own gdk-pixbuf+svg propagation.
* gnu/packages/glib.scm (appstream-glib)[propagated-inputs]: Replace gdk-pixbuf by
gdk-pixbuf+svg.
* gnu/packages/glib.scm
(python-extension-suffix, correct-library-name-phase): New procedures.
(gobject-introspection)[arguments]<#:phases>{rename-library}:
New phase, correct the name of the python extension when cross-compiling.
* gnu/packages/glib.scm
(gobject-introspection)[native-inputs]: Add 'bison' and 'flex'
when cross-compiling.
(gobject-introspection)[inputs]: Use 'python' instead of 'python-wrapper'
when cross-compiling. Remove 'bison', 'flex' when cross-compiling.
* gnu/packages/glib.scm
(gobject-introspection)[arguments]<#:configure-flags>: Set
gi_cross_use_prebuilt_gi to 'true'.
(gobject-introspection)[arguments]<#:phases>{set-typelibs}: New phase,
avoid undefined variable in "meson.build".
This allows cross-compilation to succeed when not using
QEMU's transparent emulation, and the cross-compilation
is not a pointless cross-compilation like x86_64 -> i686.
* gnu/packages/glib.scm (dbus-glib)[arguments]: Set --with-dbus-binding-tool
to a native version of "dbus-binding-tool" when cross-compiling.
* gnu/packages/glib.scm (appstream-glib)[arguments]<#:phases>{set-home}: Add a
new phase 'set-home' for tests that want to write to $HOME.
Signed-off-by: Leo Famulari <leo@famulari.name>
Otherwise, "tzdata" won't be found when cross-compiling
and string-append will complain about types. Alternatively,
"tzdata" could be moved from 'native-inputs' to 'inputs'.
* gnu/packages/glib.scm (glib)[arguments]<#:phases>{pre-check}:
Look up "tzdata" in 'native-inputs', not 'inputs'.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
During the build, a native python should be used as these
scripts will be invoked during the build, but when installed,
they should be a python for the system we're compiling for.
* gnu/packages/glib.scm
(glib)[arguments]<#:phases>{patch-python-references}: Look up
"python" in 'native-inputs', not 'inputs'.
(glib)[inputs]{python,python-wrapper,bash-minimal}: New inputs.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Dependants of perl-glib also require glib for its typelibs and schemas.
* gnu/packages/glib.scm (perl-glib)[inputs]: Move glib to ...
[propagated-inputs]: ... here.
This reverses removing this phase in
a24562af52, which is still needed by some
slower machines.
* gnu/packages/glib.scm (glib)[arguments]: Add 'increase-test-timeout
phase to ensure tests which don't hang also don't timeout.
This fixes the fatal error "Settings schema 'org.gnome.system.proxy' is not
installed", which causes builds to fail.
* gnu/packages/glib.scm (appstream-glib)[native-inputs]: Add
gsettings-desktop-schemas.