blueman does not start

  • Done
  • quality assurance status badge
Details
3 participants
  • Pierre Neidhardt
  • Marius Bakke
  • Raghav Gururajan
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 2 May 2020 15:39
(address . bug-guix@gnu.org)(name . Raghav Gururajan)(address . raghavgururajan@disroot.org)
87lfmacv7s.fsf@ambrevar.xyz
Hi!

It seems that the blueman package is missing a wrapper unless I'm
missing something:

Toggle snippet (25 lines)
> blueman-tray
Traceback (most recent call last):
File "/gnu/store/yhbnsjay66w7kky1i7ldki2ljcc1ws9i-blueman-2.1.2/bin/.blueman-tray-real", line 13, in <module>
from blueman.Functions import set_proc_title, create_parser, create_logger
ModuleNotFoundError: No module named 'blueman'

> blueman-applet
Traceback (most recent call last):
File "/gnu/store/yhbnsjay66w7kky1i7ldki2ljcc1ws9i-blueman-2.1.2/bin/.blueman-applet-real", line 15, in <module>
from blueman.Functions import create_logger, create_parser, set_proc_title
ModuleNotFoundError: No module named 'blueman'

> blueman-assistant
Traceback (most recent call last):
File "/gnu/store/yhbnsjay66w7kky1i7ldki2ljcc1ws9i-blueman-2.1.2/bin/.blueman-assistant-real", line 9, in <module>
import gi
ModuleNotFoundError: No module named 'gi'

> blueman-services
Traceback (most recent call last):
File "/gnu/store/yhbnsjay66w7kky1i7ldki2ljcc1ws9i-blueman-2.1.2/bin/.blueman-services-real", line 8, in <module>
import gi
ModuleNotFoundError: No module named 'gi'

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl6td/cACgkQm9z0l6S7
zH+jUgf+IeWQF+Y9pqCO1UalD5q/gyrBhWEA+9YmtVz5XdNxIRT2pbtTjjInJFWM
CBWXPni9WjF6AE9Mv+/xRXWB9MVqVEH2PV6CyKF76+9tlcn0EdOfWKRTzIeeQzFD
8cMVOd+ARO3FUnMKdvrQZuiDGG8ul8XPwtW+ln1kDZI7x+dUAN+sOwFGu06Nkpbz
nrwlZobxsMdTkV6FnpeOrB3lpSwHkS2ZnadpRe1LtNULg9P57126ob0FJDodU+N6
oSjtxsYmEC+Nh/GmD/ubm4UPkpw+57jGphYM2DBkLpCmfD3DgOSSsavEv6yfcEqa
3Di7j9WvUR0MhRtoxQ2k6WUs6NW4yA==
=I751
-----END PGP SIGNATURE-----

R
R
Raghav Gururajan wrote on 2 May 2020 15:56
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . bug-guix@gnu.org)
20200502095619.35385ab1.raghavgururajan@disroot.org
Hi Pierre!

Toggle quote (3 lines)
> It seems that the blueman package is missing a wrapper unless I'm
> missing something:

When I packaged it, all I got was error regarding dbus. But now it seems there
are more errors. I am wondering if it has to do with updates in gtk and/or glib
and/or gobject-introspection.

Also, I found out that python references are not getting patched during
the build. I have made a patch to fix it, which I attached with this email.

Regards,
RG.
From 4a2739cfa69d3537dcd3d4cee85d33bd790d0980 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Sat, 2 May 2020 09:51:09 -0400
Subject: [PATCH] gnu: blueman: Fix python references.

* gnu/packages/networking.scm (blueman): Fix python references.
[arguments]:<#:phases>:['patch-python-references]: New phase.
---
gnu/packages/networking.scm | 39 ++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 94b521584f..b775a9e689 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -143,7 +143,44 @@
"--enable-polkit"
"--disable-appindicator" ; Deprecated
"--with-systemdsystemunitdir=no" ; Not required
- "--with-systemduserunitdir=no"))) ; Not required
+ "--with-systemduserunitdir=no") ; Not required
+ #:phases
+ (modify-phases %standard-phases
+ ;; Python references are not being patched in patch-phase of build;
+ ;; despite using python-wrapper as input. So patching them manually.
+ (add-after 'unpack 'patch-python-references
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "apps/blueman-adapters.in"
+ (("@PYTHON@") (string-append (assoc-ref inputs "python")
+ "/bin/python3.7")))
+ (substitute* "apps/blueman-applet.in"
+ (("@PYTHON@") (string-append (assoc-ref inputs "python")
+ "/bin/python3.7")))
+ (substitute* "apps/blueman-assistant.in"
+ (("@PYTHON@") (string-append (assoc-ref inputs "python")
+ "/bin/python3.7")))
+ (substitute* "apps/blueman-manager.in"
+ (("@PYTHON@") (string-append (assoc-ref inputs "python")
+ "/bin/python3.7")))
+ (substitute* "apps/blueman-mechanism.in"
+ (("@PYTHON@") (string-append (assoc-ref inputs "python")
+ "/bin/python3.7")))
+ (substitute* "apps/blueman-report.in"
+ (("@PYTHON@") (string-append (assoc-ref inputs "python")
+ "/bin/python3.7")))
+ (substitute* "apps/blueman-rfcomm-watcher.in"
+ (("@PYTHON@") (string-append (assoc-ref inputs "python")
+ "/bin/python3.7")))
+ (substitute* "apps/blueman-sendto.in"
+ (("@PYTHON@") (string-append (assoc-ref inputs "python")
+ "/bin/python3.7")))
+ (substitute* "apps/blueman-services.in"
+ (("@PYTHON@") (string-append (assoc-ref inputs "python")
+ "/bin/python3.7")))
+ (substitute* "apps/blueman-tray.in"
+ (("@PYTHON@") (string-append (assoc-ref inputs "python")
+ "/bin/python3.7")))
+ #t)))))
(native-inputs
`(("cython" ,python-cython)
("glib:bin" ,glib "bin")
--
2.26.2
P
P
Pierre Neidhardt wrote on 2 May 2020 20:45
(name . Raghav Gururajan)(address . raghavgururajan@disroot.org)(address . bug-guix@gnu.org)
87v9leb2gx.fsf@ambrevar.xyz
Thanks! Sadly your patch does not fix the issue for me.

You can reproduce with

Toggle snippet (3 lines)
./pre-inst-env guix environment --pure --ad-hoc blueman -- blueman-tray

I had a quick look at the package definition: it's a
glib-or-gtk-build-system but the package is in python, so you need to
set the PYTHONPATH manually I think. Look at the other GNOME package
written in Python, my guess is that it's the same thing.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl6tv74ACgkQm9z0l6S7
zH8BCwf+PmqF1pZ2dVTRBCfpD//7/TYN62AsdSO5sYUdqDn0LkfUGshC3VruzV73
KU5UlwSTju+9sEELScsD6nFpw/ECh9yQhbrzrwU9Od0uANoha1IWepYiPoMtCKEK
UWrxb5UP1JyKNAhRV6B6C39zRjYqmBocNqUUdbl1auxupIjs1Eck853OeiC46QXa
hXUYf0aipfH0KisaEgMOaIz/NNYTUGoBqqEuN+HR3GyE6QEs5yn3DJY1sHldT/+a
zKHBvL0k+h0wccIyprWlIAZdXXVA2+DGeZhJXFHD69NeXmcktkYzCT91WKd/evWf
O5ywWQh2cZ0OApRW/rh8QSrW0klRLg==
=ApRj
-----END PGP SIGNATURE-----

R
R
Raghav Gururajan wrote on 3 May 2020 17:24
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . bug-guix@gnu.org)
20200503112441.66903f8c.raghavgururajan@disroot.org
Hi Pierre!

Toggle quote (13 lines)
> Thanks! Sadly your patch does not fix the issue for me.
>
> You can reproduce with
>
> --8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix environment --pure --ad-hoc blueman -- blueman-tray
> --8<---------------cut here---------------end--------------->8---
>
> I had a quick look at the package definition: it's a
> glib-or-gtk-build-system but the package is in python, so you need to
> set the PYTHONPATH manually I think. Look at the other GNOME package
> written in Python, my guess is that it's the same thing.

Thanks! I was able to fix "gi" error. But "No module 'blueman', I could not
fix. Any ideas?

I have attached a new patch.

Regards,
RG.
P
P
Pierre Neidhardt wrote on 3 May 2020 18:13
(name . Raghav Gururajan)(address . raghavgururajan@disroot.org)(address . bug-guix@gnu.org)
87a72pyp1h.fsf@ambrevar.xyz
Suggestion: instead of adding one phase per wrapper, use a single phase,
loop over the executables to generate the wrapper. This should shorten
your code.

I think the "gi" issue is because "(getenv ...)" does not include the
output "out". I'm guessing you need to add (string-append out
"/lib/python...blueman...") to the PYTHONPATH.

Cheers!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl6u7boACgkQm9z0l6S7
zH/KMgf+LbVt1FozERIV0aaDC+DYUuE0CX4ZqeNPgFnj9me+mB6ZfxJugE2nPOs1
eY1hqrbsBvRVwqYEsxeBNDhoNQaQILoi7RoHHJBHZ/jYqfS7hoBc3FF9MH0KeaVO
FE16heLgiP1TrYDXIoy6Cu8PzvhEfmt7+CtE5tveQ62zy0fRsZQyjUfgBg0cfGEt
cZmkJ8EETXUjm2Cu99Ubx8HuXaACfq++WXctHevlnL+0fe+V3+9ef1OXwp5FiPsI
3Mi+V0beF9ikXKae//0q7D0DAx+xcduiZ6gVhrNf147zJ2W1IH/nU43SZB5xWvkQ
Ckx8OoipT7GpF5vwUvESsoftX+h/0A==
=jZeZ
-----END PGP SIGNATURE-----

R
R
Raghav Gururajan wrote on 4 May 2020 05:18
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . bug-guix@gnu.org)
20200503231853.5dc44352.raghavgururajan@disroot.org
Hi Pierre!

Toggle quote (8 lines)
> Suggestion: instead of adding one phase per wrapper, use a single phase,
> loop over the executables to generate the wrapper. This should shorten
> your code.
>
> I think the "gi" issue is because "(getenv ...)" does not include the
> output "out". I'm guessing you need to add (string-append out
> "/lib/python...blueman...") to the PYTHONPATH.

I tried using (string-append (assoc-ref outputs "out")
"/lib/python3.7/site-packages/blueman"); instead of (getenv PYTHONPATH). I got
the same error.

Regards,
RG.
P
P
Pierre Neidhardt wrote on 4 May 2020 10:47
(name . Raghav Gururajan)(address . raghavgururajan@disroot.org)(address . bug-guix@gnu.org)
87pnbkxf1h.fsf@ambrevar.xyz
Sorry if I misled you with the ellipsis. You need to add
/lib/python3.7/site-packages without the "blueman" part.

With the definition below I can start blueman-services. But all
programs report that blueman-applet fails.
Indeed, blueman-applet fails with


Toggle snippet (63 lines)
blueman-applet version 2.1.2 starting
blueman-applet 10.41.17 ERROR PluginManager:90 load_plugin: Unable to load plugin module NMPANSupport
Traceback (most recent call last):
File "/gnu/store/1f9x9hwfjpkq4h79dwsi06m3zrzdm8fp-blueman-2.1.2/lib/python3.7/site-packages/blueman/main/NetworkManager.py", line 6, in <module>
gi.require_version('NM', '1.0')
File "/gnu/store/y4qwsw06ynvw3fjk2lrspp89mfmjzj5i-python-pygobject-3.28.3/lib/python3.7/site-packages/gi/__init__.py", line 130, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace NM not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/gnu/store/1f9x9hwfjpkq4h79dwsi06m3zrzdm8fp-blueman-2.1.2/lib/python3.7/site-packages/blueman/main/PluginManager.py", line 88, in load_plugin
importlib.import_module(self.module_path.__name__ + ".%s" % plugin)
File "/gnu/store/c0ysvb6s92kwwnmkgdhnspllxvd3f231-python-3.7.4/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/gnu/store/1f9x9hwfjpkq4h79dwsi06m3zrzdm8fp-blueman-2.1.2/lib/python3.7/site-packages/blueman/plugins/applet/NMPANSupport.py", line 3, in <module>
from blueman.main.NetworkManager import NMPANConnection
File "/gnu/store/1f9x9hwfjpkq4h79dwsi06m3zrzdm8fp-blueman-2.1.2/lib/python3.7/site-packages/blueman/main/NetworkManager.py", line 8, in <module>
raise ImportError('NM python bindings not found.')
ImportError: NM python bindings not found.
blueman-applet 10.41.17 ERROR PluginManager:90 load_plugin: Unable to load plugin module NMDUNSupport
Traceback (most recent call last):
File "/gnu/store/1f9x9hwfjpkq4h79dwsi06m3zrzdm8fp-blueman-2.1.2/lib/python3.7/site-packages/blueman/main/NetworkManager.py", line 6, in <module>
gi.require_version('NM', '1.0')
File "/gnu/store/y4qwsw06ynvw3fjk2lrspp89mfmjzj5i-python-pygobject-3.28.3/lib/python3.7/site-packages/gi/__init__.py", line 130, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace NM not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/gnu/store/1f9x9hwfjpkq4h79dwsi06m3zrzdm8fp-blueman-2.1.2/lib/python3.7/site-packages/blueman/main/PluginManager.py", line 88, in load_plugin
importlib.import_module(self.module_path.__name__ + ".%s" % plugin)
File "/gnu/store/c0ysvb6s92kwwnmkgdhnspllxvd3f231-python-3.7.4/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/gnu/store/1f9x9hwfjpkq4h79dwsi06m3zrzdm8fp-blueman-2.1.2/lib/python3.7/site-packages/blueman/plugins/applet/NMDUNSupport.py", line 3, in <module>
from blueman.main.NetworkManager import NMDUNConnection
File "/gnu/store/1f9x9hwfjpkq4h79dwsi06m3zrzdm8fp-blueman-2.1.2/lib/python3.7/site-packages/blueman/main/NetworkManager.py", line 8, in <module>
raise ImportError('NM python bindings not found.')
ImportError: NM python bindings not found.
Traceback (most recent call last):
File "/gnu/store/1f9x9hwfjpkq4h79dwsi06m3zrzdm8fp-blueman-2.1.2/lib/python3.7/site-packages/blueman/plugins/applet/StatusIcon.py", line 116, in _on_plugins_changed
launch('blueman-tray', icon_name='blueman', sn=False)
File "/gnu/store/1f9x9hwfjpkq4h79dwsi06m3zrzdm8fp-blueman-2.1.2/lib/python3.7/site-packages/blueman/Functions.py", line 137, in launch
launched = appinfo.launch(files, context)
GLib.Error: g-exec-error-quark: Failed to execute child process “gio-launch-desktop” (No such file or directory) (8)
blueman-applet 10.41.17 WARNING DiscvManager:109 update_menuitems: warning: Adapter is None
killed

It seems that network-manager bindings for python are missing.

Maybe I'm not starting it the right way.
Have you got blueman to work on your system? Are you using a foreign
distribution?

New package definition:

Toggle snippet (81 lines)
(define-public blueman
(package
(name "blueman")
(version "2.1.2")
(source
(origin
(method url-fetch)
(uri
(string-append "https://github.com/blueman-project/blueman/releases/"
"download/2.1.2/blueman-2.1.2.tar.gz"))
(sha256
(base32 "0wamxdw36c8i3aqwmja5q70fajqwd7inpkvlpkldd54wdxbcd38d"))))
(build-system glib-or-gtk-build-system)
(arguments
`(#:configure-flags
(list
"--enable-polkit"
"--disable-appindicator" ; Deprecated
"--with-systemdsystemunitdir=no" ; Not required
"--with-systemduserunitdir=no") ; Not required
#:phases
(modify-phases %standard-phases
;; Python references are not being patched in patch-phase of build;
;; despite using python-wrapper as input. So patching them manually.
(add-after 'unpack 'patch-python-references
(lambda* (#:key inputs #:allow-other-keys)
(for-each
(lambda (name)
(substitute* (format #f "apps/blueman-~a.in" name)
(("@PYTHON@") (string-append (assoc-ref inputs "python")
"/bin/python3.7"))))
'("adapters" "applet" "assistant" "manager" "mechanism" "report"
"rfcomm-watcher" "sendto" "services" "tray"))
#t))
(add-after 'glib-or-gtk-wrap 'wrap-blueman
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin/blueman-"))
(lib (string-append out "/lib/python3.7/site-packages/")))
(for-each
(lambda (program)
(pk program)
(pk (string-append bin program))
(wrap-program (string-append bin program)
`("PYTHONPATH" = (,(getenv "PYTHONPATH")
,lib))
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))
'("adapters" "applet" "assistant" "manager" "report"
"sendto" "services" "tray"))
#t))))))
(native-inputs
`(("cython" ,python-cython)
("glib:bin" ,glib "bin")
("gtk+:bin" ,gtk+ "bin")
("intltool" ,intltool)
("libtool" ,libtool)
("pkg-config" ,pkg-config)))
(inputs
`(("adwaita-icon-theme" ,adwaita-icon-theme)
("bluez" ,bluez)
("dbus" ,dbus)
("gdkpixbuf" ,gdk-pixbuf)
("glib" ,glib)
("gtk+" ,gtk+)
("iproute2" ,iproute)
("net-tools" ,net-tools)
("pango" ,pango)
("polkit" ,polkit)
("pulseaudio" ,pulseaudio)
("pycairo" ,python-pycairo)
("pygobject" ,python-pygobject)
("python" ,python-wrapper)
("libnm" ,libnma)))
(synopsis "GTK+ Bluetooth manager")
(description "Blueman is a Bluetooth management utility using the Bluez
D-Bus backend. It is designed to be easy to use for most common Bluetooth
tasks.")
(home-page "https://github.com/blueman-project/blueman")
(license license:gpl3+)))

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl6v1poACgkQm9z0l6S7
zH+0iAf+Nv7w0i7atUgLvxGfBbBMpiINByw82L8mi8twMe6gd5JuaA3LUrKVJP6d
wOurZA41Gxc0+cR7Hu6Ma9NCEMXD87CZamfphvyAnwBajnrN1pTIZmOU7jbinM54
eYXDY6SCO0d96hrc1hfDZZbtzrm2wfbX8GeI7minuPw9m7smWBeyPGSzNYoziBo2
GRegqO6bmqJChCEx1qrEmXberDGHZ48EKbRk7HVEDZSMmh8OSEcf67u/bdeqHO4e
MnnC5wJGQHG7jUU7dJfxreWt8YeoZjrYDmvRRzMJUaeYqStFDMnunKq7JT9aj4Kx
xo4jcYonM5eUrcPD4EMUfi2e1vrhGQ==
=ydS3
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 4 May 2020 11:11
(name . Raghav Gururajan)(address . raghavgururajan@disroot.org)(address . bug-guix@gnu.org)
87h7wwxdwj.fsf@ambrevar.xyz
We should not hardcode the python version but instead use something like

Toggle snippet (6 lines)
(string-append dir "/lib/python"
,(version-major+minor
(package-version python))
"/site-packages")

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl6v3FwACgkQm9z0l6S7
zH9W4Qf/ZBD3RW/GsmSpZ0VnA29ZcMv8+YYvW/DjhFQX8pSctece/mcVv65o9rnG
sRrPofdovch7Hau8/5qP++Ekoh4vfvv4C2waN/xjfndzPrcWz1PJ3jpyn8fpi4bi
53VunTsb2uf9TgKGAAHpxKlllkbEfbFmY8iR81MD2uTAYmu1d1hzKyb70EN6/qVt
s9sRilYtMtrVBD6TkJPfOZX86GWkbq62F2cGHtmSpbA0c4TLXTUF8flNM96psGAV
ImjhE6x1MxqJud6mBiHxun7hL0/jWz66KTh+1ibBgE5CsSNNKOCGRYlhHONAEJ1R
BVpUToQygaF3meN68/Y7G5TOTU12YA==
=py0M
-----END PGP SIGNATURE-----

R
R
Raghav Gururajan wrote on 9 May 2020 08:29
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . bug-guix@gnu.org)
f041b737-39b5-9e35-04ce-481846abf8cc@disroot.org
Hi Pierre!

Please find the new patch attached with this email. It fixes the
discussed issues. Now, blueman just needs "dbus-launch", which I think
provided by %desktop-services.

If you could push this patch, that would be great.

Thank you!

Regards,
RG.
Attachment: signature.asc
P
P
Pierre Neidhardt wrote on 9 May 2020 11:12
(name . Raghav Gururajan)(address . raghavgururajan@disroot.org)(address . bug-guix@gnu.org)
878si1sc86.fsf@ambrevar.xyz
Thanks, looking good!

- Could you remove the `pk' lines?
- Looks like pulseaudio is missing for blueman-manager:

Toggle snippet (30 lines)
> /gnu/store/6s8d3di9k4vwxwjvv45rznam6a0l3vfn-blueman-2.1.3/bin/blueman-manager
blueman-manager 11.06.01 ERROR PluginManager:90 load_plugin: Unable to load plugin module PulseAudioProfile
Traceback (most recent call last):
File "/gnu/store/6s8d3di9k4vwxwjvv45rznam6a0l3vfn-blueman-2.1.3/lib/python3.7/site-packages/blueman/main/PulseAudioUtils.py", line 10, in <module>
libpulse = CDLL("libpulse.so.0")
File "/gnu/store/c0ysvb6s92kwwnmkgdhnspllxvd3f231-python-3.7.4/lib/python3.7/ctypes/__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libpulse.so.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/gnu/store/6s8d3di9k4vwxwjvv45rznam6a0l3vfn-blueman-2.1.3/lib/python3.7/site-packages/blueman/main/PluginManager.py", line 88, in load_plugin
importlib.import_module(self.module_path.__name__ + ".%s" % plugin)
File "/gnu/store/c0ysvb6s92kwwnmkgdhnspllxvd3f231-python-3.7.4/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/gnu/store/6s8d3di9k4vwxwjvv45rznam6a0l3vfn-blueman-2.1.3/lib/python3.7/site-packages/blueman/plugins/manager/PulseAudioProfile.py", line 5, in <module>
from blueman.main.PulseAudioUtils import PulseAudioUtils, EventType
File "/gnu/store/6s8d3di9k4vwxwjvv45rznam6a0l3vfn-blueman-2.1.3/lib/python3.7/site-packages/blueman/main/PulseAudioUtils.py", line 13, in <module>
raise ImportError("Could not load pulseaudio shared library")
ImportError: Could not load pulseaudio shared library
blueman-manager version 2.1.3 starting

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl62dBkACgkQm9z0l6S7
zH/+uwf+IwPrkcX8iPp99tHqFxjg0fwttrNJdWatmB5FJ4uRY4n1BM/L2GIp4Fwp
/EfM4OAQZ07zdDOZbgFaOHo71kK4rot91U/zfumCZC9cL9pwzN9XgMycbhaCgiWY
5JlXQJf3e34/V4Pbz9GGjVIABfLQkIfb1sM/XYilqkJ+jyZkSPp9vtV0AoqrMSsR
3cs0ttYsma/TsxbDvLJWtRABDwcnMpJcCGL/WvbmhzgOPgC2PQvMjkOi+TXMffwI
T33qaMFulQ5Fim4/eRrnpjFXqZDwa3R2C1kM+jWiobiqV97bvxGSJr1vHTquy7Q8
sr19VVpSKg1kozF7jeyAN2tHTG4yNg==
=hE9N
-----END PGP SIGNATURE-----

R
R
Raghav Gururajan wrote on 9 May 2020 23:49
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . bug-guix@gnu.org)
b54c2a5d-ea08-e7a2-0e36-6a091c0f4a83@disroot.org
Hi Pierre!

Toggle quote (5 lines)
> Thanks, looking good!
>
> - Could you remove the `pk' lines?
> - Looks like pulseaudio is missing for blueman-manager:

Please find the revised patch attached with this email.

Regards,
RG.
Attachment: signature.asc
R
R
Raghav Gururajan wrote on 10 May 2020 00:03
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . bug-guix@gnu.org)
2beca260-cf82-3099-8d4f-c246314d7121@disroot.org
Hi Pierre!

Toggle quote (7 lines)
>> Thanks, looking good!
>>
>> - Could you remove the `pk' lines?
>> - Looks like pulseaudio is missing for blueman-manager:
>
> Please find the revised patch attached with this email.

Sorry, I sent the wrong patch. I have attached the correct one with this
email. I hope this patch does not have any blocker for merging. :-)

Regards,
RG.
Attachment: signature.asc
P
P
Pierre Neidhardt wrote on 10 May 2020 11:27
(name . Raghav Gururajan)(address . raghavgururajan@disroot.org)(address . bug-guix@gnu.org)
878si0cf6t.fsf@ambrevar.xyz
Sorry to disappoint :p Sadly this patch does not work yet ;)

- You've hardcoded the python version (3.7) while you should get it
dynamically from the one you are using.

You can try using something like

Toggle snippet (3 lines)
,(version-major+minor (package-version python))

- You've hardcoded paths to ~/.guix-profile which should be avoided
because profiles can be anywhere.

Toggle snippet (14 lines)
+ (substitute*
+ '("apps/blueman-mechanism.in" "blueman/Functions.py")
+ (("/usr/bin:/bin:/usr/sbin:/sbin")
+ (string-append
+ "~/.guix-profile/bin:"
+ "/run/current-system/profile/bin:"
+ "~/.guix-profile/sbin:"
+ "/run/current-system/profile/sbin"))
+ ((":/sbin:/usr/sbin")
+ (string-append
+ ":/run/current-system/profile/sbin:"
+ "~/.guix-profile/sbin")))

I think this should be replace by the Python equivalent of `(getenv "PATH")`.

- In the following comment, the ';' should be a colon. "patching"
should probably be something like "we patch".

Toggle snippet (4 lines)
+ ;; Python references are not being patched in patch-phase of build;
+ ;; despite using python-wrapper as input. So patching them manually.

Stay put, almost there! :)

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl63yRoACgkQm9z0l6S7
zH8Kxwf/ZxRCotabRDVyyYOgeq397iRoGG5bbfyWM8MGB3YLK5iH4iv4LRH1wJAX
Rzol0W2bMc3IJGdFcIMFRf2CJQ338p3s1FInXVUWDSirVZtQRcWH7d/ls91jOJQv
aTwigIBUMpmFEb2ruBuWLuqHQWhpvs/ILXyGYdJszPmvbPlemGdadA6QDcWmJ156
NZWUzQjOIEnMjG/1xHJ6BexU3qOyaOx5HvMnSzOVuO99AFFegovcNtlnqAgsD2c6
kb6mpOV1Uh/Yn9/yRQ/kGL1YMnAaKZkF0Ka18s93p+5ST2Lu/skkvw0E5MDJY4Am
+Uk/aR6h6XZ/1BNEGhtfH8N4TbRWLg==
=EJ1J
-----END PGP SIGNATURE-----

M
M
Marius Bakke wrote on 10 May 2020 23:29
Re: bug#41025: blueman does not start
(address . 41025@debbugs.gnu.org)
878shz1ntq.fsf@devup.no
Raghav Gururajan <raghavgururajan@disroot.org> writes:

Toggle quote (7 lines)
> + ;; Prevent the autogen.sh script to carry out the configure
> + ;; script, which has not yet been patched to replace /bin/sh.
> + (add-before 'bootstrap 'setenv
> + (lambda _
> + (setenv "NOCONFIGURE" "TRUE")
> + #t))

This phase is no longer necessary after the recent 'core-updates' merge.

Toggle quote (18 lines)
> + ;; PATH is hard-coded for FHS directories.
> + ;; Patch it to PATH used by Guix.
> + (add-after 'patch-python-references 'patch-os-path
> + (lambda _
> + (substitute*
> + '("apps/blueman-mechanism.in" "blueman/Functions.py")
> + (("/usr/bin:/bin:/usr/sbin:/sbin")
> + (string-append
> + "~/.guix-profile/bin:"
> + "/run/current-system/profile/bin:"
> + "~/.guix-profile/sbin:"
> + "/run/current-system/profile/sbin"))
> + ((":/sbin:/usr/sbin")
> + (string-append
> + ":/run/current-system/profile/sbin:"
> + "~/.guix-profile/sbin")))
> + #t))

These paths are "impure": the contents will differ from system to
system, and are also unavailable in e.g. 'guix environment -container'.
It might be better to patch these directories to something nonsensical
like "/no-such-path": that ensures we catch any missing references.

That's not always feasible though, but hopefully works for this
package.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl64ciEACgkQoqBt8qM6
VPoIBgf/YQaqbHgQaX7UAK6vdjL9/13LoIQVeB2QJEMlR9x1XjJshD1UnIq/hC8r
z8PoaQkJ9J1upMqY1tTyFoaPdQXIdlQWI9PKe9Rtsn0IwBvzaItb7WpPdrqIjSuD
iWbZywpznl37+ZN3IpAuqkIYKs6f215cz13N4ILYLhutYAl4ybeL3l/KvftkzYhf
5+ReXRsiVu7LwUKrJw/pPW1ap4XUPVoQt8aOfFQjlxcHZmMjvtMKl1zJiqqmjgRz
/i/ocA+77qAi7314rIwP/9GybOg6MBZSFhU+X0HrK4TB6R7xUQhFkqjl4lhbHjh+
7zLt33CW2RmuRYG/VUZzIU4kmsn+Rg==
=YdXS
-----END PGP SIGNATURE-----

R
R
Raghav Gururajan wrote on 11 May 2020 12:05
Re: blueman does not start
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . bug-guix@gnu.org)
1323ea28-3411-419c-1b67-2b73d6444c2c@disroot.org
Hi Pierre!

Toggle quote (3 lines)
> Sorry to disappoint :p Sadly this patch does not work yet ;)
> Stay put, almost there! :)

No worries! I have attached updated patch.

No all it needs is "dbus-launch" and "Blueman.Mechanism.service". The
former should be provided by (dbus-service). For the latter, the service
should be run at system-level. So we may need to create a service for
that by extending dbus-root-service. Also, I think it would be good to
add this service as an option to bluetooth-service-type. Like an option
"blueman? #t|#f". When its true, the bluetooth service adds and enables
the blueman-dbus-service. I do not know how to work with services. Help?

Thank you!

Regards,
RG.
Attachment: signature.asc
R
R
Raghav Gururajan wrote on 11 May 2020 12:07
Re: bug#41025: blueman does not start
(address . 41025@debbugs.gnu.org)
0304d5a0-47b0-e2d3-e241-e05e5e98d1c4@disroot.org
Hi Marius!

Toggle quote (2 lines)
> This phase is no longer necessary after the recent 'core-updates' merge.

I don't know, when I tried it did not work.

Toggle quote (8 lines)
> These paths are "impure": the contents will differ from system to
> system, and are also unavailable in e.g. 'guix environment -container'.
> It might be better to patch these directories to something nonsensical
> like "/no-such-path": that ensures we catch any missing references.
>
> That's not always feasible though, but hopefully works for this
> package.

I see. Thanks :-)

Regards,
RG.
Attachment: signature.asc
P
P
Pierre Neidhardt wrote on 14 May 2020 19:16
Re: blueman does not start
(name . Raghav Gururajan)(address . raghavgururajan@disroot.org)(address . bug-guix@gnu.org)
87y2puzbc7.fsf@ambrevar.xyz
I've pushed your latest patch here:
c5a9b16dbdc8849560fb43095e090ba0952277b6.

The only change I've done beside indentation is patching the scripts in libexec/.

Thanks for your patience!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl69fNgACgkQm9z0l6S7
zH8WJAf/WkjtGTEyZgvTsKqXxO1UKcQkXwD1VI+nxQA+gbZRPtV1fNq528quyO5v
9vGQyXPI6YMMpyfE/zdI1zp4qFJQGctUmqBkThRmk1wL18ZKfuFGleh7Ltzn/Odc
lhwHkZCmC2YvyRg878v7lSASR5xSUK0yhjv2NoENJjBCUBtqyPnhNKh99T0sJrWo
eiXXb+bplVAVO57KT5wKsxIUR5o+MStC4/eEq5nxHbuNShhBxoJ6ggkaraQskl5Q
d8YYBkWXS/Cf7olgN9XtXZRuTMLTIq7lnopwuXuZBxwA6mCOqPEo4rHafR9f6bzZ
em1nnlJG9dOTGrwcxYs6FSsg42NFiA==
=q3rz
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 14 May 2020 19:16
control message for bug #41025
(address . control@debbugs.gnu.org)
87wo5ezbbo.fsf@ambrevar.xyz
close 41025
quit
R
R
Raghav Gururajan wrote on 15 May 2020 01:37
Re: blueman does not start
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . bug-guix@gnu.org)
54569469-72da-1faa-1316-c18895cac305@disroot.org
Hi Pierre!

Toggle quote (7 lines)
> I've pushed your latest patch here:
> c5a9b16dbdc8849560fb43095e090ba0952277b6.
>
> The only change I've done beside indentation is patching the scripts in libexec/.
>
> Thanks for your patience!

Thank you!

Do you still get the following error, while starting blueman-manager or
blueman-applet?

Failed to apply network settings
You might not be able to connect to the Bluetooth network via this machine
Exception
g-dbus-error-quark:
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
org.blueman.Mechanism was not provided by any .service files

Regards,
RG.
Attachment: signature.asc
R
R
Raghav Gururajan wrote on 15 May 2020 02:56
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . bug-guix@gnu.org)
5925f67f-15c2-c48c-8d50-64560a138ce5@disroot.org
Hi Pierre!

Toggle quote (19 lines)
>> I've pushed your latest patch here:
>> c5a9b16dbdc8849560fb43095e090ba0952277b6.
>>
>> The only change I've done beside indentation is patching the scripts in libexec/.
>>
>> Thanks for your patience!
>
> Thank you!
>
> Do you still get the following error, while starting blueman-manager or
> blueman-applet?
>
> Failed to apply network settings
> You might not be able to connect to the Bluetooth network via this machine
> Exception
> g-dbus-error-quark:
> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
> org.blueman.Mechanism was not provided by any .service files

Also, please find the attached patch to enable appindicator in blueman.

Regards,
RG.
From bb7ddb8471d7473fdac3d8e545f0141036d6edb7 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Thu, 14 May 2020 20:50:42 -0400
Subject: [PATCH] gnu: blueman: Enable AppIndicator.

* gnu/packages/networking.scm (blueman) [arguments]: Remove --disable
-appindicator configure-flag.
[inputs]: Add libappindicator.
---
gnu/packages/networking.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 7ae1240e15..42a3609ac2 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -87,6 +87,7 @@
#:use-module (gnu packages dejagnu)
#:use-module (gnu packages documentation)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
@@ -140,7 +141,6 @@
(build-system glib-or-gtk-build-system)
(arguments
`(#:configure-flags (list "--enable-polkit"
- "--disable-appindicator" ; Not available
"--without-systemdsystemunitdir" ; Not required
"--without-systemduserunitdir") ; Not required
#:phases
@@ -232,6 +232,7 @@
("pycairo" ,python-pycairo)
("pygobject" ,python-pygobject)
("python" ,python-wrapper)
+ ("libappindicator" ,libappindicator)
("libnm" ,network-manager)))
(synopsis "GTK+ Bluetooth manager")
(description "Blueman is a Bluetooth management utility using the Bluez
--
2.26.2
Attachment: signature.asc
P
P
Pierre Neidhardt wrote on 15 May 2020 11:52
(name . Raghav Gururajan)(address . raghavgururajan@disroot.org)(address . bug-guix@gnu.org)
87y2pty18c.fsf@ambrevar.xyz
Pushed as 729cfbdd07f95e60a44dfcdccdbda6696b265b5d.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl6+ZkMACgkQm9z0l6S7
zH/mywgAips5DDPEXtrXojNOX59TXyYAv2ltmfNTyaoFi99/LmbtPXklGHZ+QEcH
ViCDVFWJwBx3SW75Gecs6pwKzx0DfWrB69GDneDEWn3YlnHvxpUoidykZOKS3nrZ
ZNeVd0ElWwc0WhPkq+8INSX2Q+5eafewh5eyl5W9jEZxK2AQ5prUEEHCkrZC8+J3
tqXOYs2DGcCMWaogXU0NgHbmkhoOoschBEXN8TJJldIJsCFl/ZbmPk5wqHmgkqp4
kzNk3GIrFKXh6ocwn5iOE3CW0KtnOSVBqQ1koZihdUGL1GVKt6OYwf4DkpK3NGzh
EPQo4nr5lqcwp6YxqcETjB5bsSZQPw==
=ol8h
-----END PGP SIGNATURE-----

?