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 ms0.migadu.com with LMTPS id OCg5Lw4pGmKoTAAAgWs5BA (envelope-from ) for ; Sat, 26 Feb 2022 14:20:14 +0100 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 kBCSLA4pGmI2BAAA9RJhRA (envelope-from ) for ; Sat, 26 Feb 2022 14:20:14 +0100 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 3056A40034 for ; Sat, 26 Feb 2022 14:20:14 +0100 (CET) Received: from localhost ([::1]:34206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwzd-0007aB-9S for larch@yhetil.org; Sat, 26 Feb 2022 08:20:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwzS-0007YG-VM for guix-patches@gnu.org; Sat, 26 Feb 2022 08:20:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwzS-0001VM-Li for guix-patches@gnu.org; Sat, 26 Feb 2022 08:20:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwzS-00060m-Cn for guix-patches@gnu.org; Sat, 26 Feb 2022 08:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53676] [PATCH v2 2/4] gnu: pulseaudio: Graft to adjust configuration. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53676 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 53676@debbugs.gnu.org Received: via spool by 53676-submit@debbugs.gnu.org id=B53676.164588156123045 (code B ref 53676); Sat, 26 Feb 2022 13:20:02 +0000 Received: (at 53676) by debbugs.gnu.org; 26 Feb 2022 13:19:21 +0000 Received: from localhost ([127.0.0.1]:54531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwym-0005zc-W4 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:19:21 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:33337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwyl-0005zP-Cy for 53676@debbugs.gnu.org; Sat, 26 Feb 2022 08:19:19 -0500 Received: by mail-ed1-f66.google.com with SMTP id s14so11094109edw.0 for <53676@debbugs.gnu.org>; Sat, 26 Feb 2022 05:19:19 -0800 (PST) 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=WtKRjXngVtSqza7HYbMkUktl1Cog03Pr3Du53aZ+62c=; b=bwCzgZuaalxwo70ILSJMFG4xdWXO9RTMFOtlbwBFMci8eztdXQixHhpqNcrTotjPfa uTwFI/4O97qfcfcFNZlWXv0gU6RSjKWdPRs2lVgubcMuxzUSGPLsIsSNhvQK6/bTc7NL E33oqkuemyOHRnAJGZNErDjOMCkfLpavdb+Mls2RSGPCELMt8SEi616/YiyZuIIvxtrf jE34w23lpekuH3pRSAd8oIIBcUnVjDZKzGybj+pG5fYuPzdO/6AjZy6lfSuotS36f6JE IufeR0YW3RHj0NprXJGgFlnMO/NX4n1tkWory/YP1cidgRXLPkxw0rHunvjsyv6HAlW9 2NPA== 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=WtKRjXngVtSqza7HYbMkUktl1Cog03Pr3Du53aZ+62c=; b=b32mzoKzsdKGw/UkcZpp0w4a7CUsB+B0dFNtQe86J1QGaSRRsOaEVChIqCqnmAfh66 PmueOO2YXpNiHTC1XMto4GmLxXHrfFzR+a0FZm8YbVS4hEEYzxPcPuwRAZFeK7ZDWlsv vGHi+FZkZ6GHRoL4QXYMDHd9FphXZTg5EjYls9ilQvqmzNSNAg91uhFRRBD+Abe3JX2S aruB8PjjxrNZMHxR7g3ydxE3uwE+5VVKp9AbncpVWy8y4ZWb8L4HDIS/W+ZeJ/ClOqLL HSMt8UhzQ/Hep8NDCJMvxRv1IyL1xd0XOVvboMFYfuuA6U4bX1GiiUceiLatMRioUjvH MgJQ== X-Gm-Message-State: AOAM531rohDqId2rx0pgeYpgo3+jgTEZRJaBJFu/mComqB1mys1hnHyX lTJUfESDX8xieFAqftCh94E= X-Google-Smtp-Source: ABdhPJxTkIShR6vUNPlTVV660ca0V60hXc7gOx7TOtRMsog4Eltb4tNWYnmWeKG7pZ/IVrqgzMXJ1Q== X-Received: by 2002:aa7:d1d7:0:b0:410:d6cf:82b2 with SMTP id g23-20020aa7d1d7000000b00410d6cf82b2mr11033087edp.193.1645881553330; Sat, 26 Feb 2022 05:19:13 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id p7-20020aa7cc87000000b00410ee30cefbsm2827536edt.71.2022.02.26.05.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Feb 2022 05:19:12 -0800 (PST) Message-ID: <7e6c5696e16e3452640aa8936d9ceb09c613314b.camel@gmail.com> From: Liliana Marie Prikler Date: Sat, 26 Feb 2022 14:19:11 +0100 In-Reply-To: <87zgmew3k7.fsf@gmail.com> References: <20220224163828.11330-1-maxim.cournoyer@gmail.com> <20220224163828.11330-2-maxim.cournoyer@gmail.com> <387664c06141015c8fbf8db79a29e7ab09367dc2.camel@gmail.com> <877d9j2ad9.fsf@gmail.com> <103c1a1c803c3d8ae73dffa1e4ee9a71bc28d33b.camel@gmail.com> <87zgmew3k7.fsf@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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645881614; 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=WtKRjXngVtSqza7HYbMkUktl1Cog03Pr3Du53aZ+62c=; b=oPMz0TI3iEyEEDMXe++H3LrClptzJ6miWf9PVy+jkAioxa5I3MFh8egWXrDcWLLj8xYIC2 xQOZLhb2kvyFyz8gzFI/aorcmk/I5DfItLVDT5/K83hRoXpHDHb5YBLJmS08ReHD75Kgj9 QNxicyqANpdIdl6E/+rPTEpdcOlMAAfKTw47LztZbbz6gHLaTDUR0SXib2WmrOsuKxo+po LtC0/tjkXmINMK5lJJrW3DKTLEfV7hURZew+fX4C/naf2gbOO6MhYMVI54UNsIz1aVTHOa 5VdfDnmV94B0RBeqxK5TOxGWOxhK6rDSNeYpCpzTVGmD/ia0SEHO/e/f1sv28g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645881614; a=rsa-sha256; cv=none; b=n5+aiPvaFtFRqrmpGstwvF/0Sp4xvEpJF044qmynQ49MFXUyiNS1Ky26j2rLnG1hWqsPKu s+GpZPERd9NZBtbqWkwsmvtgNviddO40LVdZpM2183qcl4nj7vKuyLI8hoWx0gacwv+oa0 qVYYRmHAJFB/SveL5cQGLUcH18OdJMEtNQJgBXc9BfNscSKL0vMPCBtbBTY7ZlLi/i+SLv lZJ8u6A+J2d0wVvkWGbu7Wb07ueCuT9kChDd8meDBdsW+mRgdrKJ60eOu6XKWJaR8M6fYN aM5BoBMAzw4zWHj5kAaPby7zjyNmFNjsh3pl8SC13cYguD5FCJsWBzKJB6Kq/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=bwCzgZua; 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.08 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=bwCzgZua; 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: 3056A40034 X-Spam-Score: 5.08 X-Migadu-Scanner: scn0.migadu.com X-TUID: FaHI+u0sb4hl Hi Maxim, Am Samstag, dem 26.02.2022 um 01:21 -0500 schrieb Maxim Cournoyer: > Hi Liliana, > > Liliana Marie Prikler writes: > > > Hi Maxim, > > > > Am Donnerstag, dem 24.02.2022 um 17:00 -0500 schrieb Maxim > > Cournoyer: > > > > > Thank you for your continued feedback.  The reason I prefer this > > > simple substitution to a conditional one is two-fold: > > > > > > 1. It avoids two actors potentially touching the default 'script- > > > file' (the pulseaudio-service-type code as well as the user), > > > which could be unwieldy (do we plug the default.pa.d after their > > > changes to ensure it is there, or before, which means it'd > > > potentially be erased?).  Having it part of the shipped > > > default.pa file makes this simpler to reason with. > > Sure, but all we'd need here is proper documentation.  For the > > record, I would check if a `source /etc/pulse/default.pa.d' is in > > the user-supplied file (even if commented) and append it if not. > > OK; I went a bit dumber/safer: when extra-script-files is non-null, > the .include is appended. That works too and from what I can see you documented it, so people will at least understand it if they read the manual :) > > > I wouldn't mind using a feature branch to get the < 2k dependent > > > packages rebuilt as suggested by Leo, if you think that's > > > preferable. > > That would work for the rebuilds, making this not a graft, but I'm > > still concerned whether we really want these semantics or not.  > > With the WebkitGTK bug fixed, we can put our generated default.pa > > into /etc again, making it more debuggable.  My personal opinion is > > still on explicitly declared rather than implicitly assumed. > > OK, if we want to add the .include conditionally, I'd go with > something like: > > --8<---------------cut here---------------start------------->8--- > modified   doc/guix.texi > @@ -21507,7 +21507,10 @@ List of settings to set in > @file{daemon.conf}, formatted just like >  @var{client-conf}. >   >  @item @code{script-file} (default: @code{(file-append pulseaudio > "/etc/pulse/default.pa")}) > -Script file to use as @file{default.pa}. > +Script file to use as @file{default.pa}.  In case the > +@code{extra-script-files} field below is used, an @code{.include} > +directive pointing to @file{/etc/pulse/default.pa.d} is appended to > the > +provided script. >   >  @item @code{extra-script-files} (default: @code{'())}) >  A list of file-like objects defining extra PulseAudio scripts to run > at > modified   gnu/services/sound.scm > @@ -174,6 +174,21 @@ (define (assert-pulseaudio-script-file-name > name) >                       extra-script-files))) >      (file-union "default.pa.d" (zip labels extra-script-files)))) >   > +(define (append-include-directive script-file) > +  "Append an include directive to source scripts under > /etc/pulse/default.pa.d." > +  (computed-file "default.pa" > +                 #~(begin > +                     (use-modules (ice-9 textual-ports)) > +                     (define script-text > +                       (call-with-input-file #$script-file get- > string-all)) > +                     (call-with-output-file #$output > +                       (lambda (port) > +                         (format port (string-append script-text > +                                                     " > +# Added by Guix to include scripts specified in extra-script-files. > +.nofail > +.include /etc/pulse/default.pa.d~%"))))))) > + >  (define pulseaudio-etc >    (match-lambda >      (($ client-conf daemon-conf default- > script-file > @@ -181,7 +196,10 @@ (define pulseaudio-etc >       `(("pulse" >          ,(file-union >            "pulse" > -          `(("default.pa" ,default-script-file) > +          `(("default.pa" > +             ,(if (null? extra-script-files) > +                  default-script-file > +                  (append-include-directive default-script-file))) >              ("system.pa" ,system-script-file) >              ,@(if (null? extra-script-files) >                    '() > --8<---------------cut here---------------end--------------->8--- > > A mixed-file as you used previously (combining two .include) could > have been used, but I prefer to have the content directly visible > under /etc/pulse/default.pa (and the shebang line preserved). I trust that this code does as you say it does, but looking at it with my static analysis glasses I have no reason to believe it doesn't. > This gets rid of the change on the pulseaudio package itself. > > What do you think? Looks good to me. Is feedback from others still pending to make a v3 or am I the last straw here? Cheers