GNU bug report logs - #47849
[PATCH] Add a jami-daemon service.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Sat, 17 Apr 2021 20:05:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: bug#47849: closed (Re: bug#47849: [PATCH] Add a jami-daemon service.)
Date: Mon, 02 Aug 2021 19:18:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#47849: [PATCH] Add a jami-daemon service.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 47849 <at> debbugs.gnu.org.

-- 
47849: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47849
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: Maxime Devos <maximedevos <at> telenet.be>, 47849-done <at> debbugs.gnu.org
Subject: Re: bug#47849: [PATCH] Add a jami-daemon service.
Date: Mon, 02 Aug 2021 15:17:17 -0400
Hi Leo,

Leo Prikler <leo.prikler <at> student.tugraz.at> writes:

> Hi,
>
> Am Sonntag, den 01.08.2021, 02:58 -0400 schrieb Maxim Cournoyer:
>> [...]
>
>> +  (let* ((command `(,@(if dbus-send
>> +                          (list dbus-send)
>> +                          (list (%send-dbus-binary)))
> You can use non-splicing comma notation for things that are never
> supposed to be lists.

Good catch!

>> +                    ,@(if (or bus (%send-dbus-bus))
>> +                          (list (string-append "--bus="
>> +                                               (or bus (%send-dbus-
>> bus))))
>> +                          '())
> You use this style here, but
>> +        (let* ((uid (or (and=> (or user (%send-dbus-user))
>> +                               (compose passwd:uid getpwnam)) -1))
>> +               (gid (or (and=> (or group (%send-dbus-group))
>> +                               (compose group:gid getgrnam)) -1)))
> this style here.  I personally think using and=> everywhere would make
> things a little clearer.

I tried, but it seemed it had a bigger cognitive load to follow (or,
and=>, compose, list, cut all in the same expression), so ended up
keeping it as is.

> More importantly, though
>> +(define* (send-dbus #:key service path interface method
>> +                    bus
>> +                    dbus-send
>> +                    user group
>> +                    timeout
>> +                    arguments)
> If you e.g. write (bus (%send-dbus-bus)), I think the argument should
> already be correctly passed upon the function call, no?

the %send-dbus-bus is a parameter; if we were to provide it as a default
value, it would be evaluated at the time the module is read (IIUC), but
I want its value to be read at run time, when the procedure is called
instead.

>> +          (chown temp-port uid gid)))
>> +      (lambda ()
>> +        (let ((pid (fork+exec-command command
>> +                                      #:user (or user (%send-dbus-
>> user))
>> +                                      #:group (or group (%send-dbus-
>> group))
>> +                                      #:log-file temp-file)))
>> +          (match (waitpid pid)
>> +            ((_ . status)
>> +             (let ((exit-status (status:exit-val status))
>> +                   (output (call-with-port temp-port get-string-
>> all)))
>> +               (if (= 0 exit-status)
>> +                   output
>> +                   (error "the send-dbus command exited with: "
>> +                          command exit-status output)))))))
> Since output is unused in the error case, I think you can move the get-
> string-all there.  It would make a difference if you were to e.g. close
> temp-port before that.

It's actually used as the last argument of the 'error' call :-).  I
added it as it was helpful to debug stderr messages from dbus-send.

> I did not look at the rest of this patch, but 1+2 LGTM.
>
> Regards,

Thanks a lot for having a look!  It's been long in the making.

Pushed as commit 69dcc24c9f.

Closing.

Maxim

[Message part 3 (message/rfc822, inline)]
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [PATCH 0/1] [preview] Add a jami-daemon service.
Date: Sat, 17 Apr 2021 16:04:14 -0400
Hello,

This is an early version of a jami-daemon service that can be used to host
rendezvous points easily on servers, the conferencing feature of Jami.

It seems to work well in practice, but I've been struggling to fix a remaining
test failure with the stop action.  It's proving difficult to pinpoint what
the problem is.

Another thing that will need to be addressed is adding the documentation.

Thanks,

Maxim

Maxim Cournoyer (1):
  services: Add a service for the Jami daemon.

 gnu/local.mk                          |   6 +-
 gnu/services/telephony.scm            | 283 ++++++++++++++++++-
 gnu/tests/data/jami-dummy-account.dat | 391 ++++++++++++++++++++++++++
 gnu/tests/telephony.scm               | 202 +++++++++++++
 4 files changed, 878 insertions(+), 4 deletions(-)
 create mode 100644 gnu/tests/data/jami-dummy-account.dat
 create mode 100644 gnu/tests/telephony.scmb

-- 
2.31.1




This bug report was last modified 3 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.