From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4LV/MFZHZGI8DAAAbAwnHQ (envelope-from ) for ; Sat, 23 Apr 2022 20:37:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mOt4MFZHZGJkUwAA9RJhRA (envelope-from ) for ; Sat, 23 Apr 2022 20:37:10 +0200 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 85280354F0 for ; Sat, 23 Apr 2022 20:37:10 +0200 (CEST) Received: from localhost ([::1]:52234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niKd3-0002BX-GY for larch@yhetil.org; Sat, 23 Apr 2022 14:37:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niKcw-0002B8-Ei for guix-patches@gnu.org; Sat, 23 Apr 2022 14:37:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niKcw-0003s2-6O for guix-patches@gnu.org; Sat, 23 Apr 2022 14:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1niKcw-0000vB-3S for guix-patches@gnu.org; Sat, 23 Apr 2022 14:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54986] [PATCH v2 3/3 WIP] services: mpd: Support socket activation. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Apr 2022 18:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54986 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos , 54986@debbugs.gnu.org Cc: ludo@gnu.org Received: via spool by 54986-submit@debbugs.gnu.org id=B54986.16507389883500 (code B ref 54986); Sat, 23 Apr 2022 18:37:02 +0000 Received: (at 54986) by debbugs.gnu.org; 23 Apr 2022 18:36:28 +0000 Received: from localhost ([127.0.0.1]:57224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niKcO-0000uO-0B for submit@debbugs.gnu.org; Sat, 23 Apr 2022 14:36:28 -0400 Received: from mail-ej1-f65.google.com ([209.85.218.65]:44641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niKcN-0000uB-0B for 54986@debbugs.gnu.org; Sat, 23 Apr 2022 14:36:27 -0400 Received: by mail-ej1-f65.google.com with SMTP id u15so22131055ejf.11 for <54986@debbugs.gnu.org>; Sat, 23 Apr 2022 11:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=CTY+rF9BpTylosfPKSFrc7ZkUUchZ4earzJ72TpEp6A=; b=MeEktht4NtVmnzy3rMNuBAniNv2uvI1yMwaNHp0RuLs+j4UPl99mTL87XhIsQQa5n3 WJdim35xwLtC2P3JfR51KRbGjlI/4VIDZA///gEnS4LrQAKltqno4bv2BssDESyh/TmG Mg3u+ZkDh4evXYB65Kg+6lVFTsstyYQ/MIl4jsVLH832vo26ec2XjdBcqOQPJi4Y2y5c wY9u3lVizgwAjoKP7UdtJQrJ0f9FHEfy8e6jHsIOVejgFz8Lp7tcq47kAF2QiZS7cny7 D/8Kf0lSZJRyk5xHNfilE9ibXO6AvGw+iSM5becUVSE2okJXPkhtDvOHITj4thT9655F oFsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=CTY+rF9BpTylosfPKSFrc7ZkUUchZ4earzJ72TpEp6A=; b=D8ETvB2KcYv2zCeb01KAFxd7YC4g/crFQ1ccKyVcXIS5yUfipyTja2uI16NkEHScTC CEcr2AL3iZSKj20olixXyjm1gaqXoWSWnhLSvAkXN7timaV6MHhziC1mwBPKUGQXn2Fd 8F4Fqyvimd5ckhuL4s41fmsbNyJA8magP1iuiV1kXn6h/Cfv59hOWudPTcuDyYJ8NmXu jJTq5SJKVVooOkMBFc+LLaOE3lqgG2iLdpps3puQLgYCwD5sR0mUGJzYONGH/kP1n1O3 w7j0m/Kx1wepAEtSC0eQjG6e9MVvPJTBqVkLPqLxioVeNqY+QIIDASRbqgKVDnPFH7bg 7ffw== X-Gm-Message-State: AOAM532Al9jDha4xYbDdnf5lLTsKOaKG5m9U4rKGQz3aev3vRJ2fcrd3 PpIkOJ25l9s7/XmuUZbXO3o= X-Google-Smtp-Source: ABdhPJzCVEMPekVyPgIYlqxNs4Y7x3r2/eCDKGXqom3fWsvkOfwAUNQCL5+9Y7GHg4ON5lXuUxbJMQ== X-Received: by 2002:a17:907:7206:b0:6f3:8361:338e with SMTP id dr6-20020a170907720600b006f38361338emr1324878ejc.485.1650738981120; Sat, 23 Apr 2022 11:36:21 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id z12-20020a50f14c000000b00425d61cbb0esm85696edl.22.2022.04.23.11.36.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Apr 2022 11:36:20 -0700 (PDT) Message-ID: <9d93799fedd4f40748669af04473198092c77173.camel@gmail.com> From: Liliana Marie Prikler Date: Sat, 23 Apr 2022 20:36:19 +0200 In-Reply-To: References: <9d4cc9d3ebb05d2aabf8f06e1890efe9b0b9a849.camel@gmail.com> <155723efbcf08c6e0bb6552b8f6341d4a1f20ecb.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650739030; 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=CTY+rF9BpTylosfPKSFrc7ZkUUchZ4earzJ72TpEp6A=; b=CxpAesmSNFahm0Sef0d+FfQahE7ZWGTIz2TYN3Fc84vsp0r42zOCiYsVC8haLiIX2G666e sX+yxxVb87IknWXASjUBqb68loKbrpHvyI48YKDE0FhoeN+eCCbRNIOPJTnc2Ta6xVHrz7 SOPZeDPJhYP4YPsgxoa8ENiyf9tf6L2hhJnQoq3Yh94GkbiE+YHCn18PjyNpt2WgRFq91+ TSr4A7viL40c+xNmgwwQWepRKyO3pfp5+sjZGvMiYb5yMeouuPebOar378gcFSOa5e0Vgb JhGdTZ5VyIQanvNcX8CoN6nClJD2cEphIHPgTRpieLUSkFFrkfO7jg3LHHbs7A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650739030; a=rsa-sha256; cv=none; b=j5tO4cbT7iVvUEvsRc9hrI8BYRfieR64K0+Tpvvxkl0v/1+PqRM9MvMeegzYGpg80mPtKZ u0jsoChEymYXi0WKegryc14GdoTQcK/HBCkjLqM7l3InEdUwD3f/1yAqlX7V3Nql+UiuZQ pk8MCcdFCN2vWGJ2EX6d+/3OHid9eH1Gi9onWdUBgNcBbKhoPhxlED9WurmzycWLdNV1NB AMVhAdmjIeUh1pSk0zriXcFtWcIlB0egBXo5ZXdr0lXClMUEnWkTzIF2VkdpzPIG8NfQrr uFUKKAX42YEvR1QXHnGiSnjL9Hc4/XITubb+6zjm4lBPyS1L+vnJhow0pARI+Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=MeEktht4; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.98 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=MeEktht4; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 85280354F0 X-Spam-Score: 5.98 X-Migadu-Scanner: scn1.migadu.com X-TUID: N2FzXonMCriJ Am Samstag, dem 23.04.2022 um 19:31 +0200 schrieb Maxime Devos: > > +(define (shepherd-endpoint->sexp endpoint) > > +  (match endpoint > > +    (($ address > > +                            name style backlog socket-owner > > socket- > group > > +                            socket-directory-permissions) > > +     `(endpoint > > +       ,(match (sockaddr:fam address) > > +          ((? (cute = <> AF_INET) _) > > +           `(make-socket-addr AF_INET > > +                              ,(sockaddr:addr address) > > +                              ,(sockaddr:port address))) > > Liliana Marie Prikler schreef op za 23-04-2022 om 16:39 [+0200]: > > +                 (list #$@(map shepherd-endpoint->sexp > > +                               (mpd-configuration-shepherd- > > endpoints config)))  > > For hygiene reasons, should 'shepherd-endpoint->sexp' use @? > >   `((@ (the module) endpoint) >     ,(match [...] >         ((@ [...] make-socket-addr (@ [...] AF_UNIX) ...) >         ...)) > > That way, no assumptions are made on what modules are imported and it > avoids hygiene problems like in > >   ;; There are two ‘endpoints’ here: the ‘API endpoint’, >   ;; and Shepherd endpoints. >   #~(let ((endpoint "http://localhost:1234/api")) >       (make-systemd-constructor >          (list #$(file-append soft "/bin/ware") >                "--endpoint" #$endpoint) >          (list (shepherd-endpoint->sexp ...)))) Good point, that's should probably done for defensive programming. Note also that I'm missing half of the documentation still, so it won't be pushed too soon, though.