unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: bluez: Install 'org.bluez.obex.service' and fix '97-hid2hci.rules'.
@ 2016-06-17 12:39 宋文武
  2016-06-17 15:19 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: 宋文武 @ 2016-06-17 12:39 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

* gnu/packages/linux.scm (bluez)[arguments]: Add 'post-install' phase.
---
 gnu/packages/linux.scm | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index e71ecbe..16fd5d0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2429,7 +2429,28 @@ Bluetooth audio output devices like headphones or loudspeakers.")
                "--disable-systemd"
                ;; Install dbus/udev files to the correct location.
                (string-append "--with-dbusconfdir=" out "/etc")
-               (string-append "--with-udevdir=" out "/lib/udev")))))
+               (string-append "--with-udevdir=" out "/lib/udev")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'post-install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out        (assoc-ref outputs "out"))
+                    (servicedir (string-append out "/share/dbus-1/services"))
+                    (service    "obexd/src/org.bluez.obex.service")
+                    (rule       (string-append
+                                 out "/lib/udev/rules.d/97-hid2hci.rules")))
+               ;; Install the obex dbus service file.
+               (substitute* service
+                 (("/bin/false")
+                  (string-append out "/libexec/bluetooth/obexd")))
+               (install-file service servicedir)
+               ;; Fix paths in the udev rule.
+               (substitute* rule
+                 (("hid2hci --method")
+                  (string-append out "/lib/udev/hid2hci --method"))
+                 (("/sbin/udevadm")
+                  (string-append (assoc-ref inputs "eudev") "/bin/udevadm")))
+               #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("gettext" ,gnu-gettext)))
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: bluez: Install 'org.bluez.obex.service' and fix '97-hid2hci.rules'.
  2016-06-17 12:39 [PATCH] gnu: bluez: Install 'org.bluez.obex.service' and fix '97-hid2hci.rules' 宋文武
@ 2016-06-17 15:19 ` Ludovic Courtès
  2016-06-18  1:53   ` 宋文武
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2016-06-17 15:19 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> skribis:

> * gnu/packages/linux.scm (bluez)[arguments]: Add 'post-install' phase.

[...]

> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((out        (assoc-ref outputs "out"))
> +                    (servicedir (string-append out "/share/dbus-1/services"))
> +                    (service    "obexd/src/org.bluez.obex.service")
> +                    (rule       (string-append
> +                                 out "/lib/udev/rules.d/97-hid2hci.rules")))
> +               ;; Install the obex dbus service file.
> +               (substitute* service
> +                 (("/bin/false")
> +                  (string-append out "/libexec/bluetooth/obexd")))

Why is it /bin/false by default?

Otherwise LGTM, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: bluez: Install 'org.bluez.obex.service' and fix '97-hid2hci.rules'.
  2016-06-17 15:19 ` Ludovic Courtès
@ 2016-06-18  1:53   ` 宋文武
  0 siblings, 0 replies; 3+ messages in thread
From: 宋文武 @ 2016-06-18  1:53 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> 宋文武 <iyzsong@gmail.com> skribis:
>
>> * gnu/packages/linux.scm (bluez)[arguments]: Add 'post-install' phase.
>
> [...]
>
>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>> +             (let* ((out        (assoc-ref outputs "out"))
>> +                    (servicedir (string-append out "/share/dbus-1/services"))
>> +                    (service    "obexd/src/org.bluez.obex.service")
>> +                    (rule       (string-append
>> +                                 out "/lib/udev/rules.d/97-hid2hci.rules")))
>> +               ;; Install the obex dbus service file.
>> +               (substitute* service
>> +                 (("/bin/false")
>> +                  (string-append out "/libexec/bluetooth/obexd")))
>
> Why is it /bin/false by default?
It has a 'SystemdService' field, and supposed to be bus-activatable by
the systemd user unit file.


Pushed, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-18  1:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-17 12:39 [PATCH] gnu: bluez: Install 'org.bluez.obex.service' and fix '97-hid2hci.rules' 宋文武
2016-06-17 15:19 ` Ludovic Courtès
2016-06-18  1:53   ` 宋文武

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).