From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gCz7KnZUBmH+BAEAgWs5BA (envelope-from ) for ; Sun, 01 Aug 2021 09:59:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AFKvJnZUBmFYEAAA1q6Kng (envelope-from ) for ; Sun, 01 Aug 2021 07:59:50 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3FCB2FB68 for ; Sun, 1 Aug 2021 09:59:50 +0200 (CEST) Received: from localhost ([::1]:44540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mA6Nw-0004xk-Q0 for larch@yhetil.org; Sun, 01 Aug 2021 03:59:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mA6NC-0004Ds-0w for guix-patches@gnu.org; Sun, 01 Aug 2021 03:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52168) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mA6NB-0000tI-Pe for guix-patches@gnu.org; Sun, 01 Aug 2021 03:59:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mA6NB-0002DN-Q7 for guix-patches@gnu.org; Sun, 01 Aug 2021 03:59:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47849] [PATCH v3 3/3] services: Add a service for Jami. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 01 Aug 2021 07:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47849 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos , 47849@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 47849-submit@debbugs.gnu.org id=B47849.16278047198483 (code B ref 47849); Sun, 01 Aug 2021 07:59:01 +0000 Received: (at 47849) by debbugs.gnu.org; 1 Aug 2021 07:58:39 +0000 Received: from localhost ([127.0.0.1]:35481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mA6Mo-0002Cl-Ql for submit@debbugs.gnu.org; Sun, 01 Aug 2021 03:58:39 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:32834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mA6Mm-0002Cb-AR for 47849@debbugs.gnu.org; Sun, 01 Aug 2021 03:58:37 -0400 Received: from [10.0.0.4] (194-118-35-216.adsl.highway.telekom.at [194.118.35.216]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4Gctmh6cLGz3xMn; Sun, 1 Aug 2021 09:58:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1627804709; bh=YSCQQUP6MMArAGGNfMtwyeSsAHAnqwcdQSJU++51lD0=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=UXixnBvQcXyV4IOjz0PaSYUCzKTSbIeFWCBG1DWEiolvJ/07G8imQLEtx4P8s0Fsf /fwMymqNOTsbubeRYuOV2JgT9K+0ESQrJg3Q48mGWs14AoUjpjtOu49DAkpJeMmRlm s62Z9zcNjOkJa1uSju9SfnaPbTbbW70du9q34wk4= Message-ID: From: Leo Prikler Date: Sun, 01 Aug 2021 09:58:02 +0200 In-Reply-To: <20210801065857.27657-4-maxim.cournoyer@gmail.com> References: <20210801065857.27657-1-maxim.cournoyer@gmail.com> <20210801065857.27657-4-maxim.cournoyer@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627804790; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YSCQQUP6MMArAGGNfMtwyeSsAHAnqwcdQSJU++51lD0=; b=BcRg/Hjd5RscrcZKarEPwqSRyu/8cq8pnZN/ENiyV1ES/79TXbRr2NI9zpt8uLt9a0MYNT srJIWIWVRH0NKosvKGrZzRn6LJvza0HRg1EaqQWTihzfk875v+dPsIeNU9a0GjVHZPU3lP IR1R5uRyeUxxHea0inSuj3GXMzVHS3rB9j64NUzy+YcMtw2ZGh6MHvpV+PKNGlMJhZzNV8 6Zh4sfRw12UGV0U3yVHo/JzCnmRFsWBhlEfE6j+fGAeDQ1iGBxgXv7cxA8A/1tj2KNwKgO xaJmNvnDNjjeeaOGD189eFwgIqbS+h03xqwfi+LsoUmTXsEHiqcdhq2Aq36/bw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627804790; a=rsa-sha256; cv=none; b=QkEtBvkganSRWKp+iNbUnafD20QhvNE/RyQGEadJz5FWRA8A1HHJreCqg53w9e8Yuj6H5d LXw1wrpvi58qnBJG9Mrp/UGowtF+XbpMWuYHqPJdnNjjHWcq/SbIs1YUqR9IY/z2aLeqv+ d/T3VuDXJugyNZBFJeLBszqtZ8qHg1RnxuPn3l4yX4FUjOepderrcKwfRSx2mJ31E8wixm P35aT2xxa+dbjlqJl1S6DOU8jUadF0hv5+VMuzAnuAUFUIpZsOqgFtQhdSzn6WNrF7waEz S2sN1ZGiIX2SoOOCf+4XWadrYmNVNzJMn0EmttIxWiDKOXWzQGnm9/rfo7G3Uw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=UXixnBvQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.18 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=UXixnBvQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 3FCB2FB68 X-Spam-Score: 0.18 X-Migadu-Scanner: scn1.migadu.com X-TUID: k6hriYM35BeM 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. > + ,@(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. 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? > + (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. I did not look at the rest of this patch, but 1+2 LGTM. Regards,