unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Raghav Gururajan <raghavgururajan@disroot.org>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: 41025@debbugs.gnu.org
Subject: bug#41025: blueman does not start
Date: Sat, 9 May 2020 17:49:45 -0400	[thread overview]
Message-ID: <b54c2a5d-ea08-e7a2-0e36-6a091c0f4a83@disroot.org> (raw)
In-Reply-To: <878si1sc86.fsf@ambrevar.xyz>


[-- Attachment #1.1.1: Type: text/plain, Size: 216 bytes --]

Hi Pierre!

> 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 #1.1.2: 0001-gnu-blueman-Update-package-definition.patch --]
[-- Type: text/x-patch, Size: 7632 bytes --]

From 52dc6e2dd01cbbf280e7e17af6274d2b1aa2bde1 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Sat, 9 May 2020 17:38:43 -0400
Subject: [PATCH] gnu: blueman: Update package definition.

* gnu/packages/networking.scm (blueman): Fixes.
[version]: Upgrade to 2.1.3.
[source]<origin>[method]: Change from url-fetch to git-fetch.
[arguments]<#:configure-flags>[--disable-appindicator]: Remove flag.
[--disable-schemas-compile]: New flag.
[arguments]<#:phases>['setenv]: New phase.
['patch-python-references]: New phase.
['patch-os-path]: New phase.
['patch-progs-path]: New phase.
['wrap-blueman-progs]: New phase.
[native-inputs]: Add autoconf, autogen, automake and gobject-introspection.
[inputs]: Add iptables and ppp. Replace libnma with network-manager.
Remove adwaita-icon-theme.
---
 gnu/packages/networking.scm | 101 +++++++++++++++++++++++++++++++-----
 1 file changed, 89 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index d7720724cc..ddf1d95df4 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -72,6 +72,7 @@
   #:use-module (gnu packages adns)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages autogen)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
@@ -113,6 +114,7 @@
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages samba)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages ssh)
@@ -127,46 +129,121 @@
 (define-public blueman
   (package
     (name "blueman")
-    (version "2.1.2")
+    (version "2.1.3")
     (source
      (origin
-       (method url-fetch)
+       (method git-fetch)
        (uri
-        (string-append "https://github.com/blueman-project/blueman/releases/"
-                       "download/2.1.2/blueman-2.1.2.tar.gz"))
+        (git-reference
+         (url "https://github.com/blueman-project/blueman.git")
+         (commit version)))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "0wamxdw36c8i3aqwmja5q70fajqwd7inpkvlpkldd54wdxbcd38d"))))
+        (base32 "1vb0zfns4q5d65hnja4c0k11lr38xxhdnkpkzfs6xca3mm6jyi1d"))))
     (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
+        "--disable-schemas-compile" ; Compiled at 'glib-or-gtk-compile-schemas
+        "--without-systemdsystemunitdir" ; Not required
+        "--without-systemduserunitdir")  ; Not required
+       #:phases
+       (modify-phases %standard-phases
+         ;; 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))
+         ;; 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)
+             (with-directory-excursion "apps"
+               (substitute*
+                   '("blueman-adapters.in" "blueman-applet.in"
+                     "blueman-assistant.in" "blueman-manager.in"
+                     "blueman-mechanism.in" "blueman-report.in"
+                     "blueman-rfcomm-watcher.in" "blueman-sendto.in"
+                     "blueman-services.in" "blueman-tray.in")
+                 (("@PYTHON@") (string-append (assoc-ref inputs "python")
+                                              "/bin/python3.7"))))
+             #t))
+         ;; 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))
+         (add-after 'patch-os-path 'patch-progs-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute*
+                 '("apps/blueman-report.in" "blueman/main/NetConf.py"
+                   "blueman/main/PPPConnection.py")
+               (("/usr/sbin/bluetoothd")
+                (string-append (assoc-ref inputs "bluez")
+                               "/libexec/bluetooth/bluetoothd"))
+               (("/sbin/iptables")
+                (string-append (assoc-ref inputs "iptables")
+                               "/sbin/iptables"))
+               (("/usr/sbin/pppd")
+                (string-append (assoc-ref inputs "ppp")
+                               "/sbin/pppd")))
+             #t))
+         (add-after 'glib-or-gtk-wrap 'wrap-blueman-progs
+           (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)
+                  (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)
+     `(("autoconf" ,autoconf)
+       ("autogen" ,autogen)
+       ("automake" ,automake)
+       ("cython" ,python-cython)
        ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
        ("gtk+:bin" ,gtk+ "bin")
        ("intltool" ,intltool)
        ("libtool" ,libtool)
        ("pkg-config" ,pkg-config)))
     (inputs
-     `(("adwaita-icon-theme" ,adwaita-icon-theme)
-       ("bluez" ,bluez)
+     `(("bluez" ,bluez)
        ("dbus" ,dbus)
        ("gdkpixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
        ("gtk+" ,gtk+)
        ("iproute2" ,iproute)
+       ("iptables" ,iptables)
        ("net-tools" ,net-tools)
        ("pango" ,pango)
        ("polkit" ,polkit)
+       ("ppp" ,ppp)
        ("pulseaudio" ,pulseaudio)
        ("pycairo" ,python-pycairo)
        ("pygobject" ,python-pygobject)
        ("python" ,python-wrapper)
-       ("libnm" ,libnma)))
+       ("libnm" ,network-manager)))
     (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
-- 
2.26.2


[-- Attachment #1.1.3: 0xAE6EF3046D6F7B57.asc --]
[-- Type: application/pgp-keys, Size: 2877 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-05-09 21:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02 13:39 bug#41025: blueman does not start Pierre Neidhardt
2020-05-02 13:56 ` Raghav Gururajan
2020-05-02 18:45   ` Pierre Neidhardt
2020-05-03 15:24     ` Raghav Gururajan
2020-05-03 16:13       ` Pierre Neidhardt
2020-05-04  3:18         ` Raghav Gururajan
2020-05-04  8:47           ` Pierre Neidhardt
2020-05-04  9:11             ` Pierre Neidhardt
2020-05-09  6:29             ` Raghav Gururajan
2020-05-09  9:12               ` Pierre Neidhardt
2020-05-09 21:49                 ` Raghav Gururajan [this message]
2020-05-09 22:03                   ` Raghav Gururajan
2020-05-10  9:27                     ` Pierre Neidhardt
2020-05-11 10:05                       ` Raghav Gururajan
2020-05-14 17:16                         ` Pierre Neidhardt
2020-05-14 23:37                           ` Raghav Gururajan
2020-05-15  0:56                             ` Raghav Gururajan
2020-05-15  9:52                               ` Pierre Neidhardt
2020-05-10 21:29                     ` Marius Bakke
2020-05-11 10:07                       ` Raghav Gururajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b54c2a5d-ea08-e7a2-0e36-6a091c0f4a83@disroot.org \
    --to=raghavgururajan@disroot.org \
    --cc=41025@debbugs.gnu.org \
    --cc=mail@ambrevar.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).