emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47849: closed ([PATCH] Add a jami-daemon service.)


From: GNU bug Tracking System
Subject: bug#47849: closed ([PATCH] Add a jami-daemon service.)
Date: Mon, 02 Aug 2021 19:18:02 +0000

Your message dated Mon, 02 Aug 2021 15:17:17 -0400
with message-id <878s1j8xmq.fsf_-_@gmail.com>
and subject line Re: bug#47849: [PATCH] Add a jami-daemon service.
has caused the debbugs.gnu.org bug report #47849,
regarding [PATCH] Add a jami-daemon service.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
47849: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47849
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- 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




--- End Message ---
--- Begin Message --- Subject: Re: bug#47849: [PATCH] Add a jami-daemon service. Date: Mon, 02 Aug 2021 15:17:17 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hi Leo,

Leo Prikler <leo.prikler@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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]