From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wPXsDJvs+mE3DAEAgWs5BA (envelope-from ) for ; Wed, 02 Feb 2022 21:42:03 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id PzZuCpvs+mFWQwEA9RJhRA (envelope-from ) for ; Wed, 02 Feb 2022 21:42:03 +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 8BF333FFCE for ; Wed, 2 Feb 2022 21:42:02 +0100 (CET) Received: from localhost ([::1]:56144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFMS1-0000tw-F6 for larch@yhetil.org; Wed, 02 Feb 2022 15:42:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFLvI-0005Bi-Fr for guix-patches@gnu.org; Wed, 02 Feb 2022 15:08:12 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nFLv8-00060r-6g for guix-patches@gnu.org; Wed, 02 Feb 2022 15:08:12 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nFLv8-0000TI-2Z for guix-patches@gnu.org; Wed, 02 Feb 2022 15:08:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53676] [PATCH 4/5] services: pulseaudio: Add an extra-script-files configuration field. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Feb 2022 20:08: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.16438324581776 (code B ref 53676); Wed, 02 Feb 2022 20:08:02 +0000 Received: (at 53676) by debbugs.gnu.org; 2 Feb 2022 20:07:38 +0000 Received: from localhost ([127.0.0.1]:53756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFLuk-0000Sa-B9 for submit@debbugs.gnu.org; Wed, 02 Feb 2022 15:07:38 -0500 Received: from mail-ej1-f66.google.com ([209.85.218.66]:34425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFLui-0000SK-7M for 53676@debbugs.gnu.org; Wed, 02 Feb 2022 15:07:37 -0500 Received: by mail-ej1-f66.google.com with SMTP id h7so887908ejf.1 for <53676@debbugs.gnu.org>; Wed, 02 Feb 2022 12:07:36 -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=Luz3gnhXjlCTznw08IIncyG7khYQzTXuhktzrNlTvZk=; b=acgUusqTa6HS+LsJZW7dd1lODQKUx/zDXmQihjyRuvzpgyFpvo4hNBfR0JBjaVeb2g Fu3NUyKe+tfNbqhVNFT2BhPmAC2wUWVXkcTAZiIxt/WfB17m9AX5HFa+rQVqcp6MbJCP WsKmTzbgLKoUj3CsNNfLUEVq5Q50PtS6tOOnXU53Xg97EzxSWeZ1YX9GlP8SXnhntjAL 1iLf+4Kcxj1uLpFDcbEVU+bTqIvVm1eKdZ77cRzjl5tGISj9KG05iybnWLiksOjgV82t J6ysjS2i+6jAtQUVExDJVfHNIruf+Y54EewxOu8Yk3i3PZ7PQuWZs80o95axc01RWq+r f4Bw== 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=Luz3gnhXjlCTznw08IIncyG7khYQzTXuhktzrNlTvZk=; b=TC9VdMO/nRqFn4dr/ul8ekfrR9xyAw+5t2RTS+x5R9T/yovySJzx/KlVeLAPHx9jf5 OnqYh0UOPFkJaNsI7EYUumUPXwgQByMXS3yME5bDWG3sizvwugXqyNL4h4/RhCcIgiVc fTJOHqs4KMx+LlzY0q1CIY5FHvQpMN/q26AsJjCGsDdF1+CetBo66OnvBWZsOLj/xVFe uQ2R8Mh027DZl6MhTnBL/MisWK8qOayHW3Gc5HxzZb/QK5uo+l08MOaNJzvYSYNnZARQ 3GR++QLNm9x25BmAkaDlC9W0BqFeh75wJ8xcLTzwe8FyOt6pewuogJs+l2bHMZP8seVA K5Fg== X-Gm-Message-State: AOAM533DS+xYS86ssx6aFcUiqx9D/JwUHftS4se1adALfoTY0RaicL03 2q4GBqfJ04Q0jLfLb2V1Y2F3w5NBbOY= X-Google-Smtp-Source: ABdhPJwAwxqbM5sTMMZI+mqtJMpCe/0OCMEucI1+Emv9pRY6k0b8jaSBvM8JYUTNXVOThcTPPyIkNg== X-Received: by 2002:a17:907:2da2:: with SMTP id gt34mr27489475ejc.620.1643832449100; Wed, 02 Feb 2022 12:07:29 -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 d17sm21519237ede.88.2022.02.02.12.07.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 12:07:28 -0800 (PST) Message-ID: <2b8017576ee2570fd38ab61729556e31694b2552.camel@gmail.com> From: Liliana Marie Prikler Date: Wed, 02 Feb 2022 21:07:27 +0100 In-Reply-To: <87o83qyltg.fsf@gmail.com> References: <20220201041933.16603-1-maxim.cournoyer@gmail.com> <20220201041933.16603-4-maxim.cournoyer@gmail.com> <97111754acacc576aec4eb55889a32474fe71f95.camel@gmail.com> <871r0m1gdy.fsf@gmail.com> <3c9845d7b893dddcd44be41d2ee475c29d9f5a85.camel@gmail.com> <87o83qyltg.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=1643834522; 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=Luz3gnhXjlCTznw08IIncyG7khYQzTXuhktzrNlTvZk=; b=HuEh8JDV1oR2xGOuIFW5PgH5uA6eAbOBmJtAbCpB84ZiasCXtS6fbju9hsCypGMq8bN7rO mEZrLyt2Q8UAnxP1A/8TKnmAQPF1dorKn5qkGpyVlP2Ntue6wiGS4ZFSR16sSNDUb6HV17 TXvQ1S6EVpgSfIZujutDOsuQjms6NKgpiXkyuwRXKets5RN/AzBUA3VAFyGYc0CVrYLgfh gA8smf55iKWf+lwJcB+BLx1zSMhZAkNDWrF9tzxWetUV8Z0he4bczblHzpon6xIeprurL+ tV0Ie+9Q2DYUmevc7V7BGjQRudg+0J455f/v3Fn9RLUXEEvAzxdtpYVGZybzTg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643834522; a=rsa-sha256; cv=none; b=mwF7ll2egywC0+XG4RGk/S0zaBhmWR7iv8haJyJnG7j0Xu7I2zn7+4laS3Xc7hSn2uU376 3EHO6JqstlyoAo5yt0I992T/usFjORdiIwl01VeoMXevM3WVFlD7v7BD+KpvqpA3Eahrmv MO69qnOK7TU9F3JzGnw/cGGfcQ5pICXftAa2+oYhPDQhHcqohHWg51b6bd7E9H3aAI9Lg8 tlWqd1DVqYpOdpdwq8bU3moQA23kFcC6am4WRbANkfpSOZAqbFeGo4JuIhuuVzrKUbJFaD YeT6jBQc/xtvGW6iARuAF8+yn5roHsncq4xvRGBuPqXwpepR3FCf6iVwB18P5w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=acgUusqT; 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: -2.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=acgUusqT; 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: 8BF333FFCE X-Spam-Score: -2.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: SBKyB1JmFzfb Hi, Am Dienstag, dem 01.02.2022 um 22:44 -0500 schrieb Maxim Cournoyer: > > > My use case is the one I documented in the manual; setting a > > > default > > > card profile for example.  Also choosing the default sink and > > > source > > > of a card; this can be done in client.conf but that doesn't get > > > reflected anywhere on the state of a running pulseaudio server it > > > seems, contrary to calling 'set-default-sink ...', which takes > > > effect > > > server-side. > > And you can't do this inside default.pa, because ... ? > > I could; but what I want is to *extend*, rather than *replace* the > default.pa script; the native PulseAudio mechanism to do so is to put > files under '/etc/default.pa.d'.  We could simply tell people to use > extra-special-file service to achieve that, but that's less > discoverable than having a convenient, documented field to do so :-). I still don't understand what the big difference would be when it comes to Guix. You can already split your configuration over several modules and include the bits you want, it doesn't particularly have to be the way pulseaudio hacks around the lack of such functionality in traditional distros. Again, I might be missing a use case in which pulseaudio's style makes more sense, but there appears little reason to create these directories simply for the sake of it. > > > > Also, assuming that we're using file-like objects here, I think > > > > we should use the store name minus prefix and hash for the file > > > > name. > > > > E.g. if Alice adds soundblaster.pa, it'd make sense to label it > > > > soundblaster.pa, so that changes to snippet order don't mess up > > > > any configuration referring to those files. > > > > > > I actually wanted to do that but decided against since there's no > > > clean API to retrieve the name of a G-Exp file-like object (it > > > could be done, currently, but it'd be messy and fragile, it > > > seems). > > > > > > But good observation, I wanted to document that the extra script > > > files are loaded in the order they are listed. > > Isn't that what "strip-store-file-name" from (guix build utils) > > does? > > (Let's ignore hard-coded hash length...) > > 'strip-store-file-name' would be able to get the name from the store > item (built derivation), but file-union takes a "two-element list > where the first element is the file name to use in the new directory, > and the second element is a gexp denoting the target file", e.g., > before the file-like object is built.  I don't see an easy way to > make it work. For the record, I do think we'd like to use file-like objects here, not raw gexps. If that fails, why not expose the name to gexp mapping completely? I don't know why you'd want to take away that control.