From patchwork Mon May 19 00:28:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 42735 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A4B3927BC4B; Mon, 19 May 2025 01:30:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 91C0227BC49 for ; Mon, 19 May 2025 01:30:11 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uGoON-0003JW-MU; Sun, 18 May 2025 20:30:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uGoOL-0003J1-DE for guix-patches@gnu.org; Sun, 18 May 2025 20:30:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uGoOL-00012q-3T for guix-patches@gnu.org; Sun, 18 May 2025 20:30:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=IJODwHaPWJFYWKEzG3UQQHss9Fulvd5AIZxau/pteTk=; b=MBSaEMBxTBQoo6jErmAXZDAkBh68JtELD725G173mFBuq7WiPV0bWrmpSGaLKh1cpsAC/SqiAMCLnjdWa/r4qW2WQmDsQImpB0Ver1LBEnIiQSm6jq79hkqhtqvTNnyt7xYY+OU7Pu/fDkGQPg0Q02UjBT7atwfmcTFtJwLQFYhpLRNX/Ia+T6wGn1MSudPDXmtkFiykepT3CPRuIttQFZMmXOwL/dn3xLC9pg30lzlnzlagMPfMmM0PuWB+Yyd4+HAhxgu+gYh1CL/izqlzeK9y861uEL+ix1Qh/7d+60hFlCLzkswLHDIG5rheoY4XMYghnTVvJEwh4ryYyRXD2A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uGoOJ-0006k4-FR; Sun, 18 May 2025 20:30:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78308] [PATCH v3 01/10] system: Source scripts from the /etc/profile.d directory. References: In-Reply-To: Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, rutherther@ditigal.xyz, lgcoelho@disroot.org, guix-patches@gnu.org Resent-Date: Mon, 19 May 2025 00:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78308@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Rutherther , Luis Guilherme Coelho X-Debbugs-Original-Xcc: Maxim Cournoyer , Rutherther , Luis Guilherme Coelho Received: via spool by 78308-submit@debbugs.gnu.org id=B78308.174761457925730 (code B ref 78308); Mon, 19 May 2025 00:30:03 +0000 Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:29:39 +0000 Received: from localhost ([127.0.0.1]:34016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGoNu-0006gt-O7 for submit@debbugs.gnu.org; Sun, 18 May 2025 20:29:39 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:56550) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uGoNs-0006gf-NE for 78308@debbugs.gnu.org; Sun, 18 May 2025 20:29:37 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-7425bd5a83aso3886346b3a.0 for <78308@debbugs.gnu.org>; Sun, 18 May 2025 17:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747614570; x=1748219370; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IJODwHaPWJFYWKEzG3UQQHss9Fulvd5AIZxau/pteTk=; b=XT5aULobdVbf8quY4jBIq5/MnWYKHNVPTVk/pbVUHsQO7ObAmMXQRBPkLW9UCUec// 2srgpMB4cGOSJJLYs5Hww5hf3E0tJvF/i537k8sBVslmrjhoVyeB+1YG1lH8AqLfGwpK PctIJmCFaIHLL00Y6/HLlctcc9+XQn5+xqzl94cD7HSa0makQTfoFXKVdtsC/U8gslx7 77APzzA751scpIJfqc/2868NHt+svBdNDLxm3LxyF5I8i/hsKFj6Wh1V4GgKvsjwCxIZ bNqnDpmxGtlT6hl3x04tmstJRklr37qZzGyHzYtKbYH8kJdo3f0uw6SOcCcAirLu2FPl eA1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747614570; x=1748219370; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IJODwHaPWJFYWKEzG3UQQHss9Fulvd5AIZxau/pteTk=; b=k5t2G9n2qyH5lvWr7N8LjZl3Z/9Q6pczVdJvP88Qn/TK1ksKA8RXve2ykwrnJvC6o4 Pn4JPmE4E7039EAAB83mA3mnVFACFBvbMsimQbol97VQOEJuF92SOHEVgwtmn2znWWOw LH291IUhf51FGpAQPh78r/1mMpmSu1qhv/Wz/Y03boFTzSjaJvMm20nImGO9oLuQrtsa d0vg+Av7dZUbsjAG1HRRol+6ajhG2vJQEH85MsvMi1TsSz8PMwPm5kpcNf6QW5IMrKJ6 ngl/kodA8u+fvnDNKjXVPYTTdbFmg1gjmK92jGj1kToe88+woP3ePX/nG1y5NBEgB3A6 vLBw== X-Gm-Message-State: AOJu0YzlrXnnOanDnJmmp5SD2nDsi27+YDGmdQBIHwZzGMr0GlVMuhxH e60m/f3oz7g1htbf8LckM1yzV5Ghy+1/ztDYSm9D/gDjL94BCWEGsAjBDjipew== X-Gm-Gg: ASbGncuKPHwBWY3gBW+gjS6fwsKSwvG8aPCFhQCgAD2PTQiMRtOWXvqmzp47477VQGp TO0vn7Td5eCdsBClg1RjIKfcnZcWztYX+gJcsq6t766PAXuOVRJpyzCRgMPNCQRX9Chs6DCrOrB r4m56e52EFk16t3/ExDsjOXbrvfQiO+fqwLtuKz+1dn8bJubWWyKaVdCfg/QYo2bmsjyag57R2h /8VYe4LnwAD82Fc3f7wybBxxw0JQcLxX1Vuzvwu2hK2rZ/fKNqhAEzC7mEquRU6n9qhFkc3xvRX +jMsEkfSFQRcZctdEY3qYMQXft4RHW2oszbzkbNgSPrExv6/VML0BEbip0iSrVLRzA0Wb20I0yZ +V5GRCA== X-Google-Smtp-Source: AGHT+IHWSH4cSpsbcJFTlW6thLKseWW5d8LO4j65Ue9FRDd83tehBEjMQ+dLnJ8JrWRKYtxHSvEmyA== X-Received: by 2002:a05:6a00:10c6:b0:742:a5f2:9c51 with SMTP id d2e1a72fcca58-742a9893acdmr15683698b3a.16.1747614569685; Sun, 18 May 2025 17:29:29 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a970c882sm5254027b3a.55.2025.05.18.17.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 17:29:29 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 19 May 2025 09:28:59 +0900 Message-ID: X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is useful since our /etc/profile file is otherwise not easily extendable. * gnu/system.scm (operating-system-etc-service): Source all '.sh' ending files found under the /etc/profile.d directory. Change-Id: Ia6d777195241f69219f00fbd5975e3e6b7c265fb --- gnu/system.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) base-commit: 6b5fc4812981f2cadffcc5d39e48cd8e02ee73af diff --git a/gnu/system.scm b/gnu/system.scm index 2beca4b6d08..7db0ff5ba5e 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1122,6 +1122,17 @@ (define* (operating-system-etc-service os) # Allow GStreamer-based applications to find plugins. export GST_PLUGIN_PATH=\"$HOME/.guix-profile/lib/gstreamer-1.0\" +for i in /etc/profile.d/*.sh; do + if [ -r \"$i\" ]; then + if [ \"${-#*i}\" != \"$-\" ]; then + . \"$i\" + else + . \"$i\" >/dev/null + fi + fi +done +unset i + if [ -n \"$BASH_VERSION\" -a -f /etc/bashrc ] then # Load Bash-specific initialization code. From patchwork Mon May 19 00:29:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 42736 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 83D1D27BC4B; Mon, 19 May 2025 01:30:34 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D8A4927BC49 for ; Mon, 19 May 2025 01:30:33 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uGoOU-0003Mg-N1; Sun, 18 May 2025 20:30:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uGoOS-0003Le-2F for guix-patches@gnu.org; Sun, 18 May 2025 20:30:12 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uGoOQ-00014H-N8; Sun, 18 May 2025 20:30:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=g6w3hsNNrJGkxCqIraPMerlWKqQy6ltFb3o9SFjI0D8=; b=eqKIqCiJOV+Cix8AnTWnnyQeZoQSAEp4u1Yw50Y8Zbp1czuO5mPWIHd28Py1gRACr2fWBLJR8CfUK3kknpKx+/2hwoSNtmc+BrNzCOhOPl0vH6QZXP59OfhrIzlIuAFS5aqGo8H3PAxM6TjgSHYLyMMJleR+Zh6tpQq6aF4VK3NMDyEcce2UA7T8gby6KxiMDLJdKEaG4/DrS0vaGzr2eL+wJ6Ogqarea64w8ckc6DS9gyEXPyGOrkMTm4e6I07dmGFkD/YBrWzNFFH1q5KLvxdPb0F62BdX1yXnn2tWaCgpcbH0o5q9wECKIO0jSRSdX4r95mIM9VcWfl0UX/6MbQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uGoOL-0006nQ-Ct; Sun, 18 May 2025 20:30:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78308] [PATCH v3 02/10] services: Add etc-profile-d-service-type. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, rutherther@ditigal.xyz, lgcoelho@disroot.org, gabriel@erlikon.ch, ludo@gnu.org, guix-patches@gnu.org Resent-Date: Mon, 19 May 2025 00:30:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78308@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Gabriel Wicki , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Gabriel Wicki , Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 78308-submit@debbugs.gnu.org id=B78308.174761459225793 (code B ref 78308); Mon, 19 May 2025 00:30:05 +0000 Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:29:52 +0000 Received: from localhost ([127.0.0.1]:34023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGoO5-0006hX-7E for submit@debbugs.gnu.org; Sun, 18 May 2025 20:29:52 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:61521) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uGoNw-0006gj-Hn for 78308@debbugs.gnu.org; Sun, 18 May 2025 20:29:44 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-7424ccbef4eso3818156b3a.2 for <78308@debbugs.gnu.org>; Sun, 18 May 2025 17:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747614574; x=1748219374; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=g6w3hsNNrJGkxCqIraPMerlWKqQy6ltFb3o9SFjI0D8=; b=IuNhLdIdOJ6Dpdwqkj+v/tGVvCBzDCaoDcHC/KnQJgECwP/jqZxIE0SJtZkfk6MCWv VKr9VsW2nUxCbJQd4kzI8iJxzQkYdD4NXHraFHpn3IlDeIjby/XsL4lW1BLWFHqjmmXd ORVs7GTw2G/GWMYbxK7Pq4lE02UWwHrdayouEbk5jYd1Dh5ap5YderZPBG4VrgtXeYdL wSqt/Km5u1aGFZzUr67d/84GOtmjhWlnyvy3tf2Rb0lHUhX2/0YS/ekm6RDaS+TA6lxX 4oRzInacbJFQf9rcXMixnRc4R9uCTpOMmAku6qKtBDs1TvcS/sfGs4urcQyVcHr1PWe+ M0Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747614574; x=1748219374; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g6w3hsNNrJGkxCqIraPMerlWKqQy6ltFb3o9SFjI0D8=; b=C1apeqHBsZDHctx6APjSetE1lWIOtMj6tlo1oIeRWz1XtFx8KmIRwHpJrxR8r8y5kk uJFXw/xWjCwvwS8uJ5kJbQeIrm0ovLixLTPNu8EqpJilMnFgS/12S1ys09Oyv/cdQuFz pnogwRs8FWqI3WW4Hda0nmedwQTZRR/jVReh1tWQ3BRlToK1K0UtCU0wdwP7UHE0l0v6 mClkLANse56KSobWZ2+tEYenzM3AkjVZ9ZTXDtQm3YXyvfpeCSiY5E/lxL3yz3HUDx/X RQabL85W/rRQMBGYazt2DZY3UYuEvcbCwbS0antLt4vH4IzcQTOqOPY0wxME7FrkYlGU FiNg== X-Gm-Message-State: AOJu0Yykigb4a9PAO1Mm5NGusOS6Y3uH3JlU1AvpAPejLg+ACzJww72Z Rz18d4r2a+dRE+a2zJSBH3dyeNLDdWALjBU+B5uvfqNAUkZjl8ZhKY0NIYhVFQ== X-Gm-Gg: ASbGncsfUZZ5ajYqvaUWoHg1piBgdxzzeFt/dKzL9IktpG2IZ/2POolLP+zMZLdCfDm Vay3NI7rCaZnDtpWdaclSiTdzVh4gehNo3Tv75ZOq1FgrAfN2zrnPS9KHZ8iGKDbQ793VmfyI0U 1Wx+q2SX24GDMiGb2ZtoOlKNyJIj55qeSaRu7USjfag623LWd348RAIyqc+K0f+sLp2Dq1DVNvL rTOEkzzldIsC9EVfAQxGDWCNNhLqonutZ1dObUsgo78c6qrADkidA7CdAOo0loY28HqI091Jq/X g94jYiycUZcwyNpj5A91MCeeutjLDUDTHZy6Au1s+wKGIMN6AMclPOZCrdusEcAIh4a7llQ= X-Google-Smtp-Source: AGHT+IERgAo7WwOo2rZP08ORdlRD8mGCzJ7eIIqfsswlkhqceFeXfft9fq0lM85C0I9pm783fztpxQ== X-Received: by 2002:aa7:888e:0:b0:742:a02e:dd8d with SMTP id d2e1a72fcca58-742a98b4a84mr15019038b3a.20.1747614573835; Sun, 18 May 2025 17:29:33 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a970c882sm5254027b3a.55.2025.05.18.17.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 17:29:33 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 19 May 2025 09:29:00 +0900 Message-ID: <18ad655bcd4a5e0fba23130315d48c2e15792f47.1747614548.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services.scm (make-files->etc-directory) (files->profile-d-entries): New procedures. (etc-profile-d-service-type): New service type. * doc/guix.texi (Service Reference): Document it. * gnu/tests/base.scm (run-basic-test): Test it. Change-Id: I45dde43a1b9603c3384b933ebd1d6e45dba146b9 --- doc/guix.texi | 16 ++++++++++++ gnu/services.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++ gnu/tests/base.scm | 19 +++++++++++++- 3 files changed, 96 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 8e73685a216..b236a358a1f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47629,6 +47629,22 @@ Service Reference pointing to the given file. @end defvar +@defvar etc-profile-d-service-type +The type of the @file{/etc/profile.d} service. This service is used to +create files under @file{/etc/profile.d}. It takes as value a list of +file-like objects, as can be produced with @code{local-file}, +@code{plain-file}, etc. Note that provided files whose file names do +not end with @file{.sh} are @emph{not} added to @file{/etc/profile.d/} +and are silently dropped. Package objects can also be provided directly +to have their @file{etc/profile.d/*.sh} prefixed files added. A simple +usage may look like: + +@example +(service etc-profile-d-service-type + (list (plain-file "youppi.sh" "HOW_IMPORTANT=very"))) +@end example +@end defvar + @defvar privileged-program-service-type Type for the ``privileged-program service''. This service collects lists of executable file names, passed as gexps, and adds them to the set of diff --git a/gnu/services.scm b/gnu/services.scm index af054339fd9..8584b16ac5c 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2022 Tobias Geerinckx-Rice ;;; Copyright © 2023 Brian Cully ;;; Copyright © 2024 Nicolas Graves +;;; Copyright © 2025 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu services) + #:use-module (guix derivations) #:use-module (guix gexp) #:use-module (guix monads) #:use-module (guix store) @@ -120,6 +122,7 @@ (define-module (gnu services) special-files-service-type extra-special-file etc-service-type + etc-profile-d-service-type etc-directory privileged-program-service-type setuid-program-service-type ; deprecated @@ -926,6 +929,65 @@ (define-deprecated (etc-service files) FILES must be a list of name/file-like object pairs." (service etc-service-type files)) +(define (make-files->etc-directory name) + "Return a procedure that accept a list of FILES and compute a directory named NAME. +The returned procedure FILES argument can be packages containing +@file{etc/@var{name}.d/@var{x}.sh} scripts or single file-like objects of the +@file{.sh} file extension. The constructed procedure returns a list of +two-elements list suitable for extending `etc-service-type'." + (lambda (files) + `((,name + ,(computed-file name + ;; This is specialized variant of `file-union'. + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils) + (ice-9 ftw) + (ice-9 match) + (srfi srfi-1) + (srfi srfi-26)) + + (define sh-files + (append-map + (lambda (f) + (let* ((dir (format #f "~a/etc/~a" f #$name))) + `(,@(if (file-exists? dir) + (map (lambda (x) + (list x (string-append dir "/" x))) + (scandir dir + (cut string-suffix? ".sh" <>))) + (if (string-suffix? ".sh" f) + (list (list (basename + (strip-store-file-name f)) f)) + '()))))) + (list #$@files))) + + (mkdir #$output) + (chdir #$output) + + (map (match-lambda ;XXX: adapted from file-union + ((target source) + ;; Stat the source to abort early if it does not exist. + (stat source) + (mkdir-p (dirname target)) + (symlink source target))) + sh-files)))))))) + +(define files->profile-d-directory + (make-files->etc-directory "profile.d")) + +(define etc-profile-d-service-type + (service-type + (name 'etc-profile-d) + (extensions (list (service-extension etc-service-type + files->profile-d-directory))) + (compose concatenate) + (extend append) + (default-value '()) + (description "A service for populating @file{/etc/profile.d/} with POSIX +scripts having the @file{.sh} file extension, to be sourced when users +log in."))) + (define (privileged-program->activation-gexp programs) "Return an activation gexp for privileged-program from PROGRAMS." (let ((programs diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index f28c610ccb2..09fc91383df 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -170,6 +170,14 @@ (define* (run-basic-test os command #:optional (name "basic") info --version") marionette))) + (test-assert "/etc/profile.d is sourced" + (zero? (marionette-eval '(system " +. /etc/profile +set -e -x +test -f /etc/profile.d/test_profile_d.sh +test \"$PROFILE_D_OK\" = yes") + marionette))) + (test-equal "special files" '#$special-files (marionette-eval @@ -576,7 +584,16 @@ (define* (test-basic-os #:optional (kernel linux-libre)) (let* ((os (marionette-operating-system (operating-system (inherit %simple-os) - (kernel kernel)) + (kernel kernel) + (services (cons (service + etc-profile-d-service-type + (list (plain-file + "test_profile_d.sh" + "export PROFILE_D_OK=yes\n") + (plain-file + "invalid-name" + "not a POSIX script -- ignore me"))) + %base-services))) #:imported-modules '((gnu services herd) (guix combinators)))) (vm (virtual-machine os))) From patchwork Mon May 19 00:29:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 42738 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 41F1227BC4D; Mon, 19 May 2025 01:30:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B8ABF27BC49 for ; Mon, 19 May 2025 01:30:50 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uGoOQ-0003KR-1U; Sun, 18 May 2025 20:30:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uGoON-0003JO-5r for guix-patches@gnu.org; Sun, 18 May 2025 20:30:07 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uGoOM-00013L-Sw for guix-patches@gnu.org; Sun, 18 May 2025 20:30:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=W6xpWnQinAL51xcGWLaiqQnKJM7Y9RLwRqV+A8ybzW4=; b=F6ICpf9AS5A9IV3KDRLfZXQh5kstvDwoiW5p3QUw46g3KHXaLAvR3ddcvveXMpbt7WTqSqhQvE5qCLtntMv3o/pHdQdI0CFWeVDv5qZdD/6OJfmiNlUrW9R6LXWHHa8F2Zue4f4akN7zfvgQH599nYGuXPk+X9Yjh7HUA12cKgZGFKIwPehw2MgcS7ar+BclDaeXjysfcTAeld03Q3RmGjCtkavNsekZov0RxVyYEeBeALX25qT/Lbt/8M3rVC1K1kmcULPGN0O50zzdqjmO6ZVkf2rnoFn0qop+OmZQkIAXYeHnpdLU5Z9aeORvIbBS+5feEM7OtecXuuRRhrXzVw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uGoOK-0006m0-GA; Sun, 18 May 2025 20:30:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78308] [PATCH v3 03/10] gnu: bash: Define the SYS_BASHRC macro. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, rutherther@ditigal.xyz, lgcoelho@disroot.org, guix-patches@gnu.org Resent-Date: Mon, 19 May 2025 00:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78308@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Rutherther , Luis Guilherme Coelho X-Debbugs-Original-Xcc: Maxim Cournoyer , Rutherther , Luis Guilherme Coelho Received: via spool by 78308-submit@debbugs.gnu.org id=B78308.174761458625756 (code B ref 78308); Mon, 19 May 2025 00:30:04 +0000 Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:29:46 +0000 Received: from localhost ([127.0.0.1]:34020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGoO1-0006hL-DP for submit@debbugs.gnu.org; Sun, 18 May 2025 20:29:46 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:44530) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uGoNz-0006gr-6d for 78308@debbugs.gnu.org; Sun, 18 May 2025 20:29:43 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-742af84818cso1717903b3a.1 for <78308@debbugs.gnu.org>; Sun, 18 May 2025 17:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747614577; x=1748219377; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=W6xpWnQinAL51xcGWLaiqQnKJM7Y9RLwRqV+A8ybzW4=; b=MOO1sNdIsHG/scQdTIOIA3xlae3eAA3LA78JpKsn29b2Qgzn69xPZCwnU0cNZnDPLh 9nGfhBH1Fx0e1om15knER1bij7MwN9v6Mj/mqmz+UKgiGVz7HrmFD7Sd3IBGfKS+b0Pz QUHJkr8RR+NCvGJODm/+SSTYs8otTlvB6P94XQUoWXoaCA+WTvWacIt1pzzE1U/m7M4g +H7M80FCOuMNmP8FjgfxHngdc5zmkeLj5Akq2H8i2RsXov7sneLGPAdy0BVeFvpRHJmJ 4ZAPhzbkBswLHpIsNblOEvIVSVrqHUwWN5GCU5Dup0RcTbsZtiN15d7JJ9g0PH0RFx/r A3Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747614577; x=1748219377; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W6xpWnQinAL51xcGWLaiqQnKJM7Y9RLwRqV+A8ybzW4=; b=M2VqPHhGLnESBdVpgU3tzACGwXFfBuimTozImTPTy4h9DBwfAmEah5V4mI+zk/dHOx Gxyr1zg9SNhe5fj89dSmkxBWBbN7Ql/cZy4OXT0eYLHReaRMJ0ar7U7rY37oXtvhZjrg FuHvDErgYAcauzCf16kNR0tsJCDSpNoEwGk+9VAisOG0TEYDL9Cv7CCgQClKORLG4FGB lZ0SH2znIaALGKWyfHW8YuMk6KMCZKb3b7WSgE+QCYMuwO0d/lzDDVXQswLyatz/GY27 qnvJ1Go1UevMKKiFJzDIjH+ddzDHWmi6PHnxFjek628Wi0UpICZVjL033AsU+Yn4Rl4a uYJg== X-Gm-Message-State: AOJu0Yx/DsKM5bJqFUZHSho5SVyGIhtciZtqaWWgxRqfyzGm1fjh9p/3 xVlfsbCDCfsTLI0dcNa1Z8JjhZTtb2DovDH3Lz6XAK/LVzXzlpFmNoykkRTyEQ== X-Gm-Gg: ASbGnctFjpRFYas0ffZxkj9HH9WdbM0MxJMrnK1M7Dehcen1FtR4+2hSiuLb+vEm9KI HCsn6Bsji3QZjqi+evZzQFOsaJZzCOAa6lNAGNkit66ploKc+mzdz1TO7dofQTJ46Ew1yHSxRn7 ZIvgQIt6Ne/nnCoMfu7e28jetcar8J/NvOWbkPzu1u4TRSkFDB2GiDsmyDASD1vKn5t5J41m8XS 5YhnR0z4ehvrG08RYSCSDHof9RXN5DCcyTby9dGdTt1xvxCe7NW2Bq22F4/Of6HGFzBS1jVk7X5 EfREZy+TPoQeb2yJ7fZ1gzwFskvPmcSLYQe3y+hKexEpkGz7SVxKffXqTLlzOTW3ommRpGQ= X-Google-Smtp-Source: AGHT+IEAA4HIdss5LmjM9rXK+7my0c2RkmwujokHFfDqibbg8q8azYSiNOytef94n9aCqeSf95qwFw== X-Received: by 2002:a05:6a00:3a20:b0:736:a6e0:e66d with SMTP id d2e1a72fcca58-742a97a6df2mr13223241b3a.6.1747614576727; Sun, 18 May 2025 17:29:36 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a970c882sm5254027b3a.55.2025.05.18.17.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 17:29:36 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 19 May 2025 09:29:01 +0900 Message-ID: <94963f01fe3fca8180794bcd461f7a98e61c7470.1747614548.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This causes Bash to treat /etc/bashrc as a startup file, removing the need to source /etc/bashrc from ~/.bashrc. * gnu/packages/bash.scm (bash-fixed): New package, with added SYS_BASHRC define. (bash) [replacement]: Use it. * gnu/system/shadow.scm (%default-bashrc): Do not source /etc/bashrc, now done implicitly. Change-Id: I5b0afd7d81653ef19c482e5501efdf7e50ef37c0 --- gnu/packages/bash.scm | 20 ++++++++++++++++++++ gnu/system/shadow.scm | 3 --- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index c88f38f5376..bcd78d7d2a9 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2024 Oleg Pykhalov ;;; Copyright © 2024 Janneke Nieuwenhuizen ;;; Copyright © 2024 chris +;;; Copyright © 2025 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -137,6 +138,7 @@ (define-public bash (version "5.1")) (package (name "bash") + (replacement bash-fixed) (source (origin (method url-fetch) (uri (string-append @@ -254,6 +256,24 @@ (define-public bash (license license:gpl3+) (home-page "https://www.gnu.org/software/bash/")))) +(define bash-fixed + (package + (inherit bash) + (arguments + (substitute-keyword-arguments (package-arguments bash) + ((#:modules modules '%default-gnu-modules) + (append '((ice-9 receive) + (srfi srfi-1) + (srfi srfi-26)) + modules)) + ((#:configure-flags flags) + #~(receive (cppflags flags) + (partition (cut string-prefix? "CPPFLAGS" <>) + #$flags) + (cons (string-append (first cppflags) + " -DSYS_BASHRC='\"/etc/bashrc\"'") + flags))))))) + (define-public bash-minimal ;; A stripped-down Bash for non-interactive use. (package/inherit bash diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index 7258a57dc6a..b9a5a6134bc 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -165,9 +165,6 @@ (define %default-bashrc return fi -# Source the system-wide file. -[ -f /etc/bashrc ] && source /etc/bashrc - alias ls='ls -p --color=auto' alias ll='ls -l' alias grep='grep --color=auto' From patchwork Mon May 19 00:29:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 42739 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A7C6027BC49; Mon, 19 May 2025 01:30:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DAA2327BC4B for ; Mon, 19 May 2025 01:30:50 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uGoOR-0003LL-AE; Sun, 18 May 2025 20:30:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uGoOO-0003Jt-9a for guix-patches@gnu.org; Sun, 18 May 2025 20:30:08 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uGoON-00013Z-Q3 for guix-patches@gnu.org; Sun, 18 May 2025 20:30:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=j03xWHbz4JV5trI7wo+BpJ6PqmseEA+uaoCK6e3ezuY=; b=Bkax6JOLUFY//Or8JWmczffliMyDuj4bnL8VqnbduCx3U/Wl0/tjZF9+oZwrnQ0gIDSwkn8cquAoe7ODQ+DIJ9RgqvOO8M9bHYMHFQnZrHb4WwjY791apd+bu+4aEeZFi5goN9fHaFuYYxm7Fk1IFQavW487TUJl9yvCcH6gCJi+oSwqGBsm8iGbAQY4QewL/uHdCmk5lmsuj8pVoVVEMnMHWz6ZdQOr/14CyHqOdHVhYufRoNg0ELRjh0+SN+Y1lKNsT+Q7bwf5ymvsKfz8Ku4feidrezrruvneNgD6PEDZSMVbqp9PhhM0ZzeaYH4RaeXMXq6x9/kw+93KBOogvg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uGoOM-0006p5-HQ; Sun, 18 May 2025 20:30:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78308] [PATCH v3 04/10] system: Source scripts from the /etc/bashrc.d directory. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, rutherther@ditigal.xyz, lgcoelho@disroot.org, guix-patches@gnu.org Resent-Date: Mon, 19 May 2025 00:30:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78308@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Rutherther , Luis Guilherme Coelho X-Debbugs-Original-Xcc: Maxim Cournoyer , Rutherther , Luis Guilherme Coelho Received: via spool by 78308-submit@debbugs.gnu.org id=B78308.174761459625823 (code B ref 78308); Mon, 19 May 2025 00:30:06 +0000 Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:29:56 +0000 Received: from localhost ([127.0.0.1]:34027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGoO8-0006i0-Pw for submit@debbugs.gnu.org; Sun, 18 May 2025 20:29:56 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:54782) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uGoO2-0006h4-1v for 78308@debbugs.gnu.org; Sun, 18 May 2025 20:29:49 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-742c46611b6so1142270b3a.1 for <78308@debbugs.gnu.org>; Sun, 18 May 2025 17:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747614579; x=1748219379; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=j03xWHbz4JV5trI7wo+BpJ6PqmseEA+uaoCK6e3ezuY=; b=X4EtWHXzmtSJObXRSK/mA65NAgTA0Pi0GjzkeGt4GFWJxzmwBNT9wKErrp5jdci8Xc rfqHImAsjK7lzSynANMKTrSb6QhSmEDIgyLmDPLza8Yw5xvr1cHIy/lAn3bQ8JAQMnS0 wlk/xuLkJo5XwS+ES2C8jxORqtb+yKTYzqIYVK8r5ZYogiGsY9aJY5iOitUns3YBlDkZ DPMwyo5tUQKUDyJhVp2C5A2qEDfWLYiRqQ+69/VlcbeqXAKruXuiMquJRkDtBV/qXxZ/ 6WOv1tB82hsukJqhV88OSaD21yqG6IBlQ4jmHPIUsGh26XpTRQVX21zsUq6m2le8INmb phzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747614579; x=1748219379; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j03xWHbz4JV5trI7wo+BpJ6PqmseEA+uaoCK6e3ezuY=; b=I9wwa96nKtFNmzdXGoKHqPDtG+tKF7+jLunVbfkD19pvVm8pjs0ja2esg3YkVW2ltH vGmqFuuzrdvZwslSv+AIUZpwpe3h48l9hA60MZvEDNkQAdsjB56+WNDWDNvj94eC/IpT 28bshjJHjtK2uQRqV8pD83D2KZBbeSwYVFCOs3fZwH/Q04KndEvu6JZ8NM3fY7Y3Qfn5 I2b7quOr5/FougLDSuD1KmvlZOBQDU8manFLCWkqBEcRDKDEk81gVKwV78aiCfI1lxfN XcTtbtL9efFgwKlhiGBbWyJIs3pt6Lg/QRlmJrI1fMw0z0cJrRkoIfuTxsZfCTmOy4bA dq1g== X-Gm-Message-State: AOJu0YzoKwAIq+48YTxf9QYh58Qp+VzWgo2Wd+N68IVrUjbtQyD0dcit dT2oMxwjMk3KbhMb5D/zvp7LJS91zcz9XQAnmmQK1R9IL0jN+deHsH9x0LDYsQ== X-Gm-Gg: ASbGncvLMzkdhZC2FQNlR0814sflEXoRZlUKci6SXtM4AhtAeDGt3lHvXAV9VZ+tY9m zHbDCN60AxYHkJkuWuwYBHsi4XvKWKGNNHa4EP7W2EMLMiV8vogy2C/bm2Aa4bbHYb/rtgWQQqN wby6NPC5YVfq4zLy/PxPvsaIxTwk3epjfKJzznv7T95fQ3eWpZmNr5ZJh4pap+Q0iYyFalM39jl ahOnoojjFeOhr9pR2FHkVMexLKiG/C0WkQwwljgMv7AAA6jlf1cDs9F42KduLkvsrp02EuC7Bgj R+fMZuTBjjBukRtg7NhORUTD2v5gt63OGOuTnPS+qP/DVCQRt1jXuyfp8JzTSblA9MWcL/Y= X-Google-Smtp-Source: AGHT+IGxBjlUoaXhhSHAeHJMw0leIalIP+aBz4kc8Pj8p1DOlzh9koxHxJ3gnPIN2EUGZ8ba91GY3Q== X-Received: by 2002:a05:6a20:1591:b0:201:b65:81ab with SMTP id adf61e73a8af0-2170cc8e813mr15120082637.23.1747614579551; Sun, 18 May 2025 17:29:39 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a970c882sm5254027b3a.55.2025.05.18.17.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 17:29:39 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 19 May 2025 09:29:02 +0900 Message-ID: <4fc4167eb21e028ddb38121a8237e841ddf07dff.1747614548.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system.scm (operating-system-etc-service): : Source scripts from the /etc/bashrc.d directory. Change-Id: I27a20a8eae5d736f32e0df55a68529d9bb613b7a --- gnu/system.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 7db0ff5ba5e..0b64927f5ba 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2020 Danny Milosavljevic ;;; Copyright © 2020, 2021 Brice Waegeneire ;;; Copyright © 2020 Florian Pelz -;;; Copyright © 2020, 2022 Maxim Cournoyer +;;; Copyright © 2020, 2022, 2025 Maxim Cournoyer ;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2020, 2022, 2025 Efraim Flashner ;;; Copyright © 2021 Maxime Devos @@ -1153,7 +1153,13 @@ (define* (operating-system-etc-service os) # completion loader that searches its own completion files as well # as those in ~/.guix-profile and /run/current-system/profile. source /run/current-system/profile/etc/profile.d/bash_completion.sh -fi\n"))) +fi + +for i in /etc/bashrc.d/*.sh; do + [[ -r $i ]] && source \"$i\" +done +unset i +"))) (service etc-service-type `(("os-release" ,os-release) ("services" ,(file-append net-base "/etc/services")) From patchwork Mon May 19 00:29:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 42737 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9905C27BC4A; Mon, 19 May 2025 01:30:42 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4B06727BC49 for ; Mon, 19 May 2025 01:30:41 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uGoOS-0003Lq-2W; Sun, 18 May 2025 20:30:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uGoOP-0003KS-He for guix-patches@gnu.org; Sun, 18 May 2025 20:30:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uGoOO-00013i-E8; Sun, 18 May 2025 20:30:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=jKm/JoMD9BTK8p0SJlD/aTlE5AJQXIw2PtkqDrcoc5s=; b=JrjADe4hjrhT+ZoYFb57JbS/mdoJ0NeYE4i7q7vZ3VrWTpIaoQUsr7rteokrC/FL7OU1iHSz+Y9x/u73JHSdYOtpYycimUUYXth6bF87dqWUaWWaV+cqazXUAx8jmCsjzvTys0tT5gTwF0NI7DsaLt8ZJ5UWWUxRtjJl4Fb6xLgkeXHPaRoz4ElN352Bm8E0umRkR4Pk2VApwIL5AepSV8P0LzuzKe7HDsMgO1blXjynxA2Mnn1hOhk/hJWzsRdfYxNdtn6cnfdibEniMQbBR80afV/IxzimEYUm+kiOBDrL3+xja/A7MOwwttswOy2bAL4DUD04QbcWyIyXp4TTyQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uGoON-0006pv-3B; Sun, 18 May 2025 20:30:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78308] [PATCH v3 05/10] services: Add etc-bashrc-d-service-type. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, rutherther@ditigal.xyz, lgcoelho@disroot.org, gabriel@erlikon.ch, ludo@gnu.org, guix-patches@gnu.org Resent-Date: Mon, 19 May 2025 00:30:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78308@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Gabriel Wicki , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Gabriel Wicki , Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 78308-submit@debbugs.gnu.org id=B78308.174761460225881 (code B ref 78308); Mon, 19 May 2025 00:30:07 +0000 Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:02 +0000 Received: from localhost ([127.0.0.1]:34031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGoOE-0006ig-HS for submit@debbugs.gnu.org; Sun, 18 May 2025 20:30:02 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:45471) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uGoO5-0006hE-9Z for 78308@debbugs.gnu.org; Sun, 18 May 2025 20:29:53 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-7426c44e014so3872942b3a.3 for <78308@debbugs.gnu.org>; Sun, 18 May 2025 17:29:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747614582; x=1748219382; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jKm/JoMD9BTK8p0SJlD/aTlE5AJQXIw2PtkqDrcoc5s=; b=LELt4I/oa2uBWBd583Pklaiz9iIBvEuvt8fenpsuqEFon7MNbS/rq1VXwRJtyWD8t7 j87lyoxm7Jwaq/x8BaiYoZIAa3T9qg8yN2R+MijFN4WsDzJ4h4Vp66H94M6afzC8rp+K vFvhG5E9X69scsjfoKMEbUj8KlkANLI7rdUgso7kqH9SiBICWNoyyfo4Y81lw2wOVjrP T/dO6AQrwULGDzUn7g1bYt2rvKdoyyrGshaO/mwBrHVBZmtoOcL2QlP+3vZbN181i//4 p98Ei3qZu3ExjoJK2Bxa6azvJGymG9Xgl7RG+5MHlvQZLNVhQp5PItwyf9Qt9ourTqDh n03g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747614582; x=1748219382; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jKm/JoMD9BTK8p0SJlD/aTlE5AJQXIw2PtkqDrcoc5s=; b=we7pN5lXuAh3bVCRBjHew0q7cnxmWRXmCXspZDfOsqYeNdwcThOUtXBo+Cp6/0KKff Xb85hAUDTV8JA4DizdxxxkExqqGdh5PYUyLGrr+Mc/qqQGLSBp2wZ3Gpl8OP0S8HylIx sY/g+3hZc3y6W4kh390Eimt4+mzP5cv58xzU9zvk99/sUVos7qFZSLTDpbEXGTHYQDRP JZgn3Z9rujMbrfbBiIkj0pU30L1vsVZl4AHmnSZTTkdCy/45jvk34kIlz46CrcqUBVs+ 1Q8DWhyj9ImI8eRIseXqRG3wReNlBtafkPMMaR/JhzYdqjl1eqqaQxkry7Y7pYqgI7gH EXuQ== X-Gm-Message-State: AOJu0YxI1mnWc5IkB+KfR33DrykZvAyT5Qg/Eb72p6T6z8Z77qGsYmHX mnqs9LW3ahlFZHtBwvhWUY69BGs8xVo0R9Ypsn+tMbIqkD7JCNFjNTiTWyxN/Q== X-Gm-Gg: ASbGncsByvU/gIVU121xC4VYJU/CiNFogYP3sONQBmxrChspVegEeyKn2U8T++dsG6M e/qURBbLTr4z6lujjhdaR1Xa1LxuPMo02pVQLegbiuVFtRHM857AiZo8z2iJ601H1+XypBvLkA7 w9CmNcJ/VBvdLD++ZX35ZW1Z0Ni9C392b//F4wT7D0K/A3P2RbkEyEpmYfP0VZKyZxXTD/1/8S/ a2hAmkMvaCXvMiW39X7gQ6vRr2EZBImgkpc88EE9AgsPdV6Vgej5GBVAq0IceqsrWiey/JuPvVj Kq6ce3BgH8lh5/+UTFzMw+hGVEDR2sidDBbvHovQZdi/Fq/CbEf2WHVITGuXSN1pfnG7dmgOwMx hLUBzaw== X-Google-Smtp-Source: AGHT+IHMW4S0ifgMiyPM0xJyR3BEJeK7rJDDWXOtozH/DpNXWu87/TYld3dPfQ7s26uZfwmtc1xzog== X-Received: by 2002:aa7:888e:0:b0:742:39fa:13df with SMTP id d2e1a72fcca58-742a98a2520mr15236378b3a.19.1747614582382; Sun, 18 May 2025 17:29:42 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a970c882sm5254027b3a.55.2025.05.18.17.29.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 17:29:41 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 19 May 2025 09:29:03 +0900 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services.scm (files->bashrc-d-directory) New procedure. (etc-bashrc-d-service-type): New service type. * doc/guix.texi (Service Reference): Document it. * gnu/tests/base.scm (test-basic-os): Test it. Change-Id: Ibbb0f684de7aee296adedbce5b1192786d661af2 --- doc/guix.texi | 18 ++++++++++++++++++ gnu/services.scm | 14 ++++++++++++++ gnu/tests/base.scm | 39 ++++++++++++++++++++++++++++++--------- 3 files changed, 62 insertions(+), 9 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index b236a358a1f..927e9243bfb 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47645,6 +47645,24 @@ Service Reference @end example @end defvar +@defvar etc-bashrc-d-service-type +The type of the @file{/etc/bashrc.d} service. This service is used to +create files under @file{/etc/bashrc.d}. It takes as value a list of +file-like objects, as can be produced with @code{local-file}, +@code{plain-file}, etc. Note that provided files whose file names do +not end with @file{.sh} are @emph{not} added to @file{/etc/profile.d/} +and are silently dropped. Package objects can also be provided directly +to have their @file{etc/bashrc.d/*.sh} prefixed files added. An example +usage may look like: + +@example +(use-package-modules gnome) ;for the `vte' package + +(service etc-bashrc-d-service-type + (list (file-append vte "/etc/profile.d/vte.sh"))) +@end example +@end defvar + @defvar privileged-program-service-type Type for the ``privileged-program service''. This service collects lists of executable file names, passed as gexps, and adds them to the set of diff --git a/gnu/services.scm b/gnu/services.scm index 8584b16ac5c..7083c88c130 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -123,6 +123,7 @@ (define-module (gnu services) extra-special-file etc-service-type etc-profile-d-service-type + etc-bashrc-d-service-type etc-directory privileged-program-service-type setuid-program-service-type ; deprecated @@ -988,6 +989,19 @@ (define etc-profile-d-service-type scripts having the @file{.sh} file extension, to be sourced when users log in."))) +(define files->bashrc-d-directory + (make-files->etc-directory "bashrc.d")) + +(define etc-bashrc-d-service-type + (service-type + (inherit etc-profile-d-service-type) + (name 'etc-bashrc-d) + (extensions (list (service-extension etc-service-type + files->bashrc-d-directory))) + (description "A service for populating @file{/etc/bashrc.d/} with Bash +scripts having the @file{.sh} file extension, to be sourced by interactive +Bash shells."))) + (define (privileged-program->activation-gexp programs) "Return an activation gexp for privileged-program from PROGRAMS." (let ((programs diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 09fc91383df..0f31c152e0f 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -178,6 +178,19 @@ (define* (run-basic-test os command #:optional (name "basic") test \"$PROFILE_D_OK\" = yes") marionette))) + (test-assert "/etc/bashrc.d is sourced" + (zero? (marionette-eval + '(system* "bash" + ;; Ensure Bash runs interactively. + "--init-file" + #$(plain-file "test_bashrc_d.sh" + "\ +. /etc/bashrc +set -e -x +test -f /etc/bashrc.d/test_bashrc_d.sh +test \"$BASHRC_D_OK\" = yes")) + marionette))) + (test-equal "special files" '#$special-files (marionette-eval @@ -585,15 +598,23 @@ (define* (test-basic-os #:optional (kernel linux-libre)) (operating-system (inherit %simple-os) (kernel kernel) - (services (cons (service - etc-profile-d-service-type - (list (plain-file - "test_profile_d.sh" - "export PROFILE_D_OK=yes\n") - (plain-file - "invalid-name" - "not a POSIX script -- ignore me"))) - %base-services))) + (services (cons* (service + etc-profile-d-service-type + (list (plain-file + "test_profile_d.sh" + "export PROFILE_D_OK=yes\n") + (plain-file + "invalid-name" + "not a POSIX script -- ignore me"))) + (service + etc-bashrc-d-service-type + (list (plain-file + "test_bashrc_d.sh" + "export BASHRC_D_OK=yes\n") + (plain-file + "invalid-name" + "not a Bash script -- ignore me"))) + %base-services))) #:imported-modules '((gnu services herd) (guix combinators)))) (vm (virtual-machine os))) From patchwork Mon May 19 00:29:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 42740 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D12BE27BC4B; Mon, 19 May 2025 01:31:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 44B1927BC49 for ; Mon, 19 May 2025 01:31:23 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uGoPW-0003vz-8a; Sun, 18 May 2025 20:31:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uGoPK-0003ru-5f for guix-patches@gnu.org; Sun, 18 May 2025 20:31:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uGoPJ-0001Eh-Fz; Sun, 18 May 2025 20:31:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=0IgiGBMTiVorKTeGK5mSv3t2lOjylq+Qjos4cyY2yPY=; b=jlq8aCs5QXFjQeM/ihQDHRhoripgYeB8pjGoEKx97gGLvelqp2+vk+s0tRQF2Kz07+jHARDzrL8PEdsZiyQq7ZnGdIaDQ5HNZQRVvgsZitjiPxO/q70SVZyztTQvKo61JQsgtarMXd3OVDhEvcc+r5wVD91R6ocprvLouJhbr5xylPhno1Vjo72XxrEuYKiZy0qMCWKH7vvyLn5qGaJQ19gROwbsJmsCLhavqKvryxzMhvovPXaLclkyO6rcF9keVI1bt/4dMVvQcepDEC2ntTpzf6YkiFQccRT/yAMNv97fV4l6W1G7aHSnRvbQ5hpILkCD9qtnv6An0wtVU6IAMg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uGoPH-0000AH-S0; Sun, 18 May 2025 20:31:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78308] [PATCH v3 06/10] system: Migrate sourcing bash_completion.sh to etc-bashrc-d-service-type. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, rutherther@ditigal.xyz, lgcoelho@disroot.org, gabriel@erlikon.ch, ludo@gnu.org, guix-patches@gnu.org Resent-Date: Mon, 19 May 2025 00:31:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78308@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Gabriel Wicki , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Gabriel Wicki , Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 78308-submit@debbugs.gnu.org id=B78308.174761461227005 (code B ref 78308); Mon, 19 May 2025 00:31:03 +0000 Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:12 +0000 Received: from localhost ([127.0.0.1]:34061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGoOR-0006zx-ER for submit@debbugs.gnu.org; Sun, 18 May 2025 20:30:12 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:61528) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uGoO8-0006hU-Bg for 78308@debbugs.gnu.org; Sun, 18 May 2025 20:29:57 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-7424ccbef4eso3818202b3a.2 for <78308@debbugs.gnu.org>; Sun, 18 May 2025 17:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747614585; x=1748219385; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0IgiGBMTiVorKTeGK5mSv3t2lOjylq+Qjos4cyY2yPY=; b=Jpmc7XCfzje/Z9/npvZGr4XoO42nW7HPlLNZ/duh+66VVJ2H6HPtt9AB3MmQU3yzBc ZW43wUnO9VblYjcLxVPT9PBrclFurfefJKzzR77tIqS9ewUq3Nsw5h+qP7/U2DrtmUoE MFqNKaOb09BQuHq10F0akr0YwTOgXOdeS5pa1oIPznaEV828XeGUP1JdHW5oBRrDuUha Y81rRGNtRIn82bFODFMwwses344Qp/oFUyGhdvvbXfHxkkjEMgKLJOb62nPcG+XT/PEw 4nJUd2PW0Q23gldY1yMNImdd6FonC3X2pAKQOwp1mFb+Bjt28lmizcuMCfwK/nVDu9hw eHzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747614585; x=1748219385; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0IgiGBMTiVorKTeGK5mSv3t2lOjylq+Qjos4cyY2yPY=; b=o58WfeyRItTOzCbrUHzeevC1K8sBX2iJElkJEVPgiLRWJoroET8yvJQjvCSr3ykeoZ NGFTxBjg4at0zabbkSKIG28tX6MzBnhJwGsPgLp6EI2EbtasLOPpUK35IafSuoNmAgTg XOMaMLhPOqemZlwKVQtwDd/+SNeURHybCfdXRFdCh/p5G7dyeyZ+VxJecUxr1cB1Tw3n KvZNKr8VzJ/nVsnuOzuMirN8NR1mKYDJuHp+X2t711EdUPKdUf0vjcJZ7hsfw1P/SKCk 9Im911/H6/bnjeRrEMLbcE1bqHQxcvFSoX1eH1MlX2JPGiSLIQePkGy1JMY0XpHhlVFG u86A== X-Gm-Message-State: AOJu0Yyghb2AUGDhliuCAJHv+She7oRGxI66pCZT+AVHufxj9mAEc9jC xvlLRDgsVhmqRk0RxA7umI/qP+iRwkBH0TxcnuExFYlI9hkvxZTEE/2OKiTcng== X-Gm-Gg: ASbGncur2PsdFFs1iE+HIutEMkS0unQ5wPL3dV6VMh9xpjILMQBwEQDFT/gxUKo7zIv izOQTXA0GmG8QhtseI01kvll9FX4/uYtUSRwis5yOqT14dbsiOM/x0jd5JxCIv5uoLkq0w2n5zV jHd7c/1b0F0k1NMZgF4dYHe6yPo8CnKQLlwL+qBXp4mVr4sOYVVjktYPkI8D6JR/h4JjwNYvRdA vIBuknLTQXuzfoCRiA63zUszxpImpdZ//N/fwMRwh3gzVJ9Mje4g61vvFYZjW+Zr3ZlSEM8dgdO uiyPESRmg4Es5bu4+33cgX2RqcKxIrwObYtRf+vSkA7j7AD60p+D03YqtyqyQYpGG3khNFghsVN SRweqKQ== X-Google-Smtp-Source: AGHT+IHyKedh7M5ZbRzdSbSXKO6K1FqcAB4LewggEqU/4nQIy+fFgxSDHwR9CZL3cSccWKA1oFjG7w== X-Received: by 2002:a05:6a00:2b97:b0:742:aecc:c472 with SMTP id d2e1a72fcca58-742aeccc683mr12376224b3a.2.1747614585293; Sun, 18 May 2025 17:29:45 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a970c882sm5254027b3a.55.2025.05.18.17.29.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 17:29:44 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 19 May 2025 09:29:04 +0900 Message-ID: <7f1761694001e006ee9d878783338af2bc02867e.1747614548.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system.scm (operating-system-etc-service): Remove block sourcing bash_completion.sh. (%base-packages-interactive): Delete bash-completion. * gnu/services.scm (%default-etc-bashrc-d-files): New variable, which includes the bash_completion.sh file. (etc-bashrc-d-service-type): Use it. * doc/guix.texi (Service Reference): Update documentation. Change-Id: I2223a5f96f5d761148badc6be29e1c5c80465a1d --- doc/guix.texi | 11 +++++++---- gnu/services.scm | 8 +++++++- gnu/system.scm | 10 ---------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 927e9243bfb..746722caa61 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47651,15 +47651,18 @@ Service Reference file-like objects, as can be produced with @code{local-file}, @code{plain-file}, etc. Note that provided files whose file names do not end with @file{.sh} are @emph{not} added to @file{/etc/profile.d/} -and are silently dropped. Package objects can also be provided directly -to have their @file{etc/bashrc.d/*.sh} prefixed files added. An example -usage may look like: +and are silently dropped. The default value is made available via the +@var{%default-etc-bashrc-d-files} variable for users to extended. +Package objects can also be provided directly to have their +@file{etc/bashrc.d/*.sh} prefixed files added. An example usage may +look like: @example (use-package-modules gnome) ;for the `vte' package (service etc-bashrc-d-service-type - (list (file-append vte "/etc/profile.d/vte.sh"))) + (append (list (file-append vte "/etc/profile.d/vte.sh")) + %default-etc-bashrc-d-files)) @end example @end defvar diff --git a/gnu/services.scm b/gnu/services.scm index 7083c88c130..5dbda176b80 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -124,6 +124,7 @@ (define-module (gnu services) etc-service-type etc-profile-d-service-type etc-bashrc-d-service-type + %default-etc-bashrc-d-files etc-directory privileged-program-service-type setuid-program-service-type ; deprecated @@ -992,6 +993,10 @@ (define etc-profile-d-service-type (define files->bashrc-d-directory (make-files->etc-directory "bashrc.d")) +(define %default-etc-bashrc-d-files + (list (file-append bash-completion + "/etc/profile.d/bash_completion.sh"))) + (define etc-bashrc-d-service-type (service-type (inherit etc-profile-d-service-type) @@ -1000,7 +1005,8 @@ (define etc-bashrc-d-service-type files->bashrc-d-directory))) (description "A service for populating @file{/etc/bashrc.d/} with Bash scripts having the @file{.sh} file extension, to be sourced by interactive -Bash shells."))) +Bash shells.") + (default-value %default-etc-bashrc-d-files))) (define (privileged-program->activation-gexp programs) "Return an activation gexp for privileged-program from PROGRAMS." diff --git a/gnu/system.scm b/gnu/system.scm index 0b64927f5ba..50f739c17c7 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -960,7 +960,6 @@ (define %base-packages-interactive nvi man-db info-reader ;the standalone Info reader (no Perl) - bash-completion kbd ;; The 'sudo' command is already in %SETUID-PROGRAMS, but we also ;; want the other commands and the man pages (notably because @@ -1146,15 +1145,6 @@ (define* (operating-system-etc-service os) # Provide a default prompt. The user's ~/.bashrc can override it. PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ ' -# The 'bash-completion' package. -if [ -f /run/current-system/profile/etc/profile.d/bash_completion.sh ] -then - # Bash-completion sources ~/.bash_completion. It installs a dynamic - # completion loader that searches its own completion files as well - # as those in ~/.guix-profile and /run/current-system/profile. - source /run/current-system/profile/etc/profile.d/bash_completion.sh -fi - for i in /etc/bashrc.d/*.sh; do [[ -r $i ]] && source \"$i\" done From patchwork Mon May 19 00:29:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 42741 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E72A127BC4A; Mon, 19 May 2025 01:31:25 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 55A7827BC49 for ; Mon, 19 May 2025 01:31:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uGoPY-0003xX-Jl; Sun, 18 May 2025 20:31:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uGoPS-0003v5-Gl for guix-patches@gnu.org; Sun, 18 May 2025 20:31:16 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uGoPQ-0001FY-L7; Sun, 18 May 2025 20:31:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=XwCkbEj8vfgAwu7Ge8WVzlgQQKDphxSijvbBFRVwgEA=; b=r37CLFK2vQI4SizZRmibjqdP0WDR89dToQQevQRBxjLs7fVbYJGInqxhC1rAR0kTJq3zw9hhYR9sYZvoRpD4FhDHkYZ7Fd0fZgsNcuoq6mtp6uC/FokCCLDmis/SQVsECLQXWHsHzCRMrP6eWHYdUrn/dqIiKzTxB4Cg6QZWYT7MXJqaMdHBs8aXFV8+oEywAEa+CAe+HjbJy1Pu8vo9bogmmoR/SnyL25YUlz7BaaVqF2Rft5Rp4+9jZh52wqLKUiUhckMVmq4hRIpftEI5k0XZjdrQK38d86n6+rDwOQeRxn0JrEZpuXCE0VJ1IZHpWcj1l/cnj5FcW2sEInOBPA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uGoPK-0000C6-Ob; Sun, 18 May 2025 20:31:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78308] [PATCH v3 07/10] system: Factorize bashrc default configuration. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, rutherther@ditigal.xyz, lgcoelho@disroot.org, andrew@trop.in, gabriel@erlikon.ch, hako@ultrarare.space, janneke@gnu.org, ludo@gnu.org, tanguy@bioneland.org, guix-patches@gnu.org Resent-Date: Mon, 19 May 2025 00:31:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78308@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Andrew Tropin , Gabriel Wicki , Hilton Chain , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Tanguy Le Carrour X-Debbugs-Original-Xcc: Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Andrew Tropin , Gabriel Wicki , Hilton Chain , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Tanguy Le Carrour Received: via spool by 78308-submit@debbugs.gnu.org id=B78308.174761461327093 (code B ref 78308); Mon, 19 May 2025 00:31:06 +0000 Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:13 +0000 Received: from localhost ([127.0.0.1]:34063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGoOS-00071b-Kg for submit@debbugs.gnu.org; Sun, 18 May 2025 20:30:13 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:55774) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uGoOB-0006hY-1x for 78308@debbugs.gnu.org; Sun, 18 May 2025 20:29:58 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-742b614581dso2209142b3a.3 for <78308@debbugs.gnu.org>; Sun, 18 May 2025 17:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747614588; x=1748219388; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XwCkbEj8vfgAwu7Ge8WVzlgQQKDphxSijvbBFRVwgEA=; b=D25q1eFzxNIoICkqB1cUvOFYGwQEL8CBamdAFXVUhuSo4mtg1oMVZDreEA+LRWAwxK gIXVmdm9s4zlCasNkPUPz5PKGRg31evLcQTWQEtQBuCVn0ElmhmDSOTQNbaWhdGGprht +JD+l81i9yHWMBAz0QyN5otNOrDqklEWxAQYpRQDI+YvYxDSQBttxtwztLeLWE72JkFs xxuhlkWN7Fj2/rcm1FPKP1Wjm2nowvgdFravMX63bhDJ9xCS/JWK6xRYreC+7ZX6Yv7A B9eUwz25huryoeYq9iDd5C2vj3MozzWZVriFGDfI7GAMMe53gxW1bK7ayXVQI4d9AOFH MYPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747614588; x=1748219388; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XwCkbEj8vfgAwu7Ge8WVzlgQQKDphxSijvbBFRVwgEA=; b=jZBsV8/YahgSJ/DFphbbTAdDFC78tafBpHM1XFIegm//jOWtRDcEVrTxbP154ejcoR 154RZ772zX3w9zkEjpLvH7m6Wmy+IcbtX+ki7VI6UaX9Zjx6PXTTMZO9TpHiodIqOEXE 1TXTtsD1VpakH+pb8hx/2FCS2/ixrmNLyxlbWX5TXynuKDxKhpawnf91/iNlWJJEPIsl Y9ruv8NnfuG34WLL+gcz+Wyq9hqQXcMEArWjYR96ulOnUTXnMBCtyHr1Al4TMYNJ33jr u9drRRkoUAawi9ofmeNmg3dI2V5ISmazzDGO9nJKdK4A1daJTmg9jydYXsl0/DudIybW e9pg== X-Gm-Message-State: AOJu0YzXWh4RbgXJGawJrPmLiDY+2GBp0WSeB8q0E4oBL0lXGkCBo+UF aO89/gF83UfBSZMdIKPvYdqR5dEYqOqeLk+uwGAVj+avyPx508mlSjEdmUJIGg== X-Gm-Gg: ASbGncuUj8ax2r0Jn7djMI/5qkzF61pfSjZEUfXHnwE4EIIjM164Z94M/XJcKm7WKti qwmthPFvVpsQ2FnlWg1GPVV5r7SzI6mC6KPNjz8TBpeG9OeKjZU/rJ5PRB82Z+GQzIIPnLgblR4 GePF/+VN5mG55P4aFglk/HpbL9256wgzjatOimyv2QHm7E+Jc7OjnXGf2cHruKxYGMpMD9EoD20 6oWVZqUQlS7ncoGPPXsZ1i3+1X9G+oapYxSs0wCNHh0sM/T9tJYMTrWORBMn9uWDe1vMsUIg+F/ bH9Mk0aIzso50TkLGKJElJbS+dPpUFQ/z5uv3rcimFn5yEObNip+hmeefzJbGjHTHBN7eRc= X-Google-Smtp-Source: AGHT+IH3cvyi/yUTS11aZsYrBbOqGcJ3FhAZG1lBPWvR6eJAbuhAUnRR1ehDHvgKGfTznzyMV6BF1Q== X-Received: by 2002:a05:6a00:1994:b0:736:46b4:bef2 with SMTP id d2e1a72fcca58-742accc6d5fmr13334007b3a.6.1747614588263; Sun, 18 May 2025 17:29:48 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a970c882sm5254027b3a.55.2025.05.18.17.29.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 17:29:47 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 19 May 2025 09:29:05 +0900 Message-ID: <703cabd6f79c691b33c639ae7a1952ef1a7ebb0e.1747614548.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This factorizes out the remaining bashrc bits from /etc/skel/.bashrc to a the template used for both /etc/bashrc on Guix System and ~/.bashrc for home-bash-service-type. Rationale: The use of /etc/skel introduce state: the file is only copied originally when the user account is created, and never (automatically) refreshed again. * gnu/system.scm (operating-system-etc-service): : Guard against souring /etc/bashrc in non-interactive, SSH case. : Use %default-bashrc, having migrated the remaining definitions to... * gnu/system/shadow.scm (%default-bashrc): ... here. Factorize aliases to... * gnu/services.scm (%default-bash-aliases): ... here. (%default-bashrc-d-aliases): New variable. (%default-etc-bashrc-d-files): Include it in the default configuration. * gnu/services/base.scm (%base-services): Register etc-bashrc-d-service-type. * gnu/home/services/shells.scm (add-bash-configuration): Do not set PS1, now part of %default-bashrc. (home-bash-configuration) [guix-defaults?]: Update doc. [aliases]: Set %default-bash-aliases as the default value. Update doc. * doc/guix.texi (Shells Home Services): Update documentation. (Service Reference): Update example. Change-Id: I340c614983a78fd20a9c4a9705e7fc542ae9b513 --- doc/guix.texi | 19 +++++++++++-------- gnu/home/services/shells.scm | 14 +++++++------- gnu/services.scm | 23 +++++++++++++++++++++-- gnu/services/base.scm | 5 ++++- gnu/system.scm | 24 +++++++----------------- gnu/system/shadow.scm | 18 ++++++++++-------- gnu/tests/base.scm | 17 ++++++++++------- 7 files changed, 70 insertions(+), 50 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 746722caa61..80a109e2bb3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47654,15 +47654,15 @@ Service Reference and are silently dropped. The default value is made available via the @var{%default-etc-bashrc-d-files} variable for users to extended. Package objects can also be provided directly to have their -@file{etc/bashrc.d/*.sh} prefixed files added. An example usage may -look like: +@file{etc/bashrc.d/*.sh} prefixed files added. Since the service is +part @code{%base-services}, it can be extended via @code{simple-service} +like so: @example (use-package-modules gnome) ;for the `vte' package -(service etc-bashrc-d-service-type - (append (list (file-append vte "/etc/profile.d/vte.sh")) - %default-etc-bashrc-d-files)) +(simple-service 'vte-integration etc-bashrc-d-service-type + (list (file-append vte "/etc/profile.d/vte.sh"))) @end example @end defvar @@ -49288,8 +49288,11 @@ Shells Home Services The Bash package to use. @item @code{guix-defaults?} (default: @code{#t}) (type: boolean) -Add sane defaults like reading @file{/etc/bashrc} and coloring the output of -@command{ls} to the top of the @file{.bashrc} file. +Add sane defaults like setting @env{PS1}, @env{SHELL}, and ensuring +@file{/etc/profile} is sourced for non-interactive SSH shells. If you +use Guix System, is it safe to set this to @code{#f}, as in this case +this is already taken care of by the globally installed +@file{/etc/bashrc}. @item @code{environment-variables} (default: @code{'()}) (type: alist) Association list of environment variables to set for the Bash session. The @@ -49297,7 +49300,7 @@ Shells Home Services here (@pxref{Essential Home Services}). The contents of this field will be added after the contents of the @code{bash-profile} field. -@item @code{aliases} (default: @code{'()}) (type: alist) +@item @code{aliases} (default: @code{%default-bash-aliases}) (type: alist) Association list of aliases to set for the Bash session. The aliases will be defined after the contents of the @code{bashrc} field has been put in the @file{.bashrc} file. The alias will automatically be quoted, diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index bab5730c3d6..969a3eb8dcf 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -20,6 +20,7 @@ (define-module (gnu home services shells) #:use-module (gnu services configuration) + #:use-module ((gnu services) #:select (%default-bash-aliases)) #:autoload (gnu system shadow) (%default-bashrc %default-zprofile) #:use-module (gnu home services utils) #:use-module (gnu home services) @@ -333,9 +334,12 @@ (define-configuration home-bash-configuration (package bash) "The Bash package to use.") (guix-defaults? + ;; TODO: Set to #f when the target system is determined to be Guix System. (boolean #t) - "Add sane defaults like reading @file{/etc/bashrc} and coloring the output of -@command{ls} to the top of the @file{.bashrc} file.") + "Add sane defaults like setting @env{PS1}, @env{SHELL}, and ensuring +@file{/etc/profile} is sourced for non-interactive SSH shells. If you use +Guix System, is it safe to set this to @code{#f}, as in this case this is +already taken care of by the globally installed @file{/etc/bashrc}.") (environment-variables (alist '()) "Association list of environment variables to set for the Bash session. The @@ -344,7 +348,7 @@ (define-configuration home-bash-configuration added after the contents of the @code{bash-profile} field." (serializer serialize-posix-env-vars)) (aliases - (alist '()) + (alist %default-bash-aliases) "Association list of aliases to set for the Bash session. The aliases will be defined after the contents of the @code{bashrc} field has been put in the @file{.bashrc} file. The alias will automatically be quoted, so something line @@ -423,10 +427,6 @@ (define (add-bash-configuration config) 'bashrc (if (home-bash-configuration-guix-defaults? config) (list (plain-file-content %default-bashrc) "\n" - ;; The host distro might provide a bad 'PS1' - ;; default--e.g., not taking $GUIX_ENVIRONMENT into - ;; account. Provide a good default here when asked. - "PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ '\n" (serialize-field 'aliases)) (list (serialize-field 'aliases)))) (file-if-not-empty 'bash-logout))))) diff --git a/gnu/services.scm b/gnu/services.scm index 5dbda176b80..159d357c3e7 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -125,6 +125,7 @@ (define-module (gnu services) etc-profile-d-service-type etc-bashrc-d-service-type %default-etc-bashrc-d-files + %default-bash-aliases etc-directory privileged-program-service-type setuid-program-service-type ; deprecated @@ -993,9 +994,27 @@ (define etc-profile-d-service-type (define files->bashrc-d-directory (make-files->etc-directory "bashrc.d")) +;;; Use an alist to be compatible with . +(define %default-bash-aliases + '(("ls" . "ls -p --color=auto") + ("ll" . "ls -l") + ("grep" . "grep --color=auto") + ("ip" . "ip -color=auto"))) + +;;; ... but avoid the full blown bash-serialize-aliases, which depends on +;;; other 'guix home' definitions such as `shell-double-quote'. +(define %default-bashrc-d-aliases + (plain-file "aliases.sh" + (string-join + (map (match-lambda + ((alias . value) + (format #f "~a=~s~%" alias value))) + %default-bash-aliases) + ""))) + (define %default-etc-bashrc-d-files - (list (file-append bash-completion - "/etc/profile.d/bash_completion.sh"))) + (list (file-append bash-completion "/etc/profile.d/bash_completion.sh") + %default-bashrc-d-aliases)) (define etc-bashrc-d-service-type (service-type diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 5a3dd2f555d..1f5da97f0a7 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -4138,7 +4138,10 @@ (define %base-services (service mingetty-service-type (mingetty-configuration (tty "tty5"))) (service mingetty-service-type (mingetty-configuration - (tty "tty6"))) + (tty "tty6"))) + + ;; Extra Bash configuration including Bash completion and aliases. + (service etc-bashrc-d-service-type) (service static-networking-service-type (list %loopback-static-networking)) diff --git a/gnu/system.scm b/gnu/system.scm index 50f739c17c7..0b251bd3a08 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1132,23 +1132,13 @@ (define* (operating-system-etc-service os) done unset i -if [ -n \"$BASH_VERSION\" -a -f /etc/bashrc ] -then - # Load Bash-specific initialization code. - . /etc/bashrc +if [ -n \"$BASH_VERSION\" -a -f /etc/bashrc ]; then + # Load Bash-specific initialization code, taking care to not source + # /etc/bashrc when invoked from a non-interactive SSH shell, + # to avoid recursion (/etc/bashrc also sources /etc/profile + # in the non-login, non-interactive SSH case). + [[ $- != *i* && -n $SSH_CLIENT ]] || source /etc/bashrc fi -")) - - (bashrc (plain-file "bashrc" "\ -# Bash-specific initialization. - -# Provide a default prompt. The user's ~/.bashrc can override it. -PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ ' - -for i in /etc/bashrc.d/*.sh; do - [[ -r $i ]] && source \"$i\" -done -unset i "))) (service etc-service-type `(("os-release" ,os-release) @@ -1159,7 +1149,7 @@ (define* (operating-system-etc-service os) ("issue" ,issue) ,@(if nsswitch `(("nsswitch.conf" ,nsswitch)) '()) ("profile" ,profile) - ("bashrc" ,bashrc) + ("bashrc" ,%default-bashrc) ;; Write the operating-system-host-name to /etc/hostname to prevent ;; NetworkManager from changing the system's hostname when connecting ;; to certain networks. Some discussion at diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index b9a5a6134bc..6443fd9922d 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -147,8 +147,11 @@ (define %base-user-accounts (define %default-bashrc (plain-file "bashrc" "\ -# Bash initialization for interactive non-login shells and -# for remote shells (info \"(bash) Bash Startup Files\"). +# Bash-specific initialization, including for non-login and remote +# shells (info \"(bash) Bash Startup Files\"). + +# Provide a default prompt. +PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ ' # Export 'SHELL' to child processes. Programs such as 'screen' # honor it and otherwise use /bin/sh. @@ -165,10 +168,11 @@ (define %default-bashrc return fi -alias ls='ls -p --color=auto' -alias ll='ls -l' -alias grep='grep --color=auto' -alias ip='ip -color=auto'\n")) +for i in /etc/bashrc.d/*.sh; do + [[ -r $i ]] && source \"$i\" +done +unset i +")) (define %default-bash-profile (plain-file "bash_profile" "\ @@ -289,12 +293,10 @@ (define (default-skeletons) 'useradd' in the home directory of newly created user accounts." (let ((profile %default-bash-profile) - (bashrc %default-bashrc) (zprofile %default-zprofile) (xdefaults %default-xdefaults) (gdbinit %default-gdbinit)) `((".bash_profile" ,profile) - (".bashrc" ,bashrc) ;; Zsh sources ~/.zprofile before ~/.zshrc, and it sources ~/.zlogin ;; after ~/.zshrc. To avoid interfering with any customizations a user ;; may have made in their ~/.zshrc, put this in .zprofile, not .zlogin. diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 0f31c152e0f..db904d7f102 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -187,6 +187,8 @@ (define* (run-basic-test os command #:optional (name "basic") "\ . /etc/bashrc set -e -x +test -f /etc/bashrc.d/bash_completion.sh +test -f /etc/bashrc.d/aliases.sh test -f /etc/bashrc.d/test_bashrc_d.sh test \"$BASHRC_D_OK\" = yes")) marionette))) @@ -606,14 +608,15 @@ (define* (test-basic-os #:optional (kernel linux-libre)) (plain-file "invalid-name" "not a POSIX script -- ignore me"))) - (service + (simple-service + 'extra-bashrc-d-files etc-bashrc-d-service-type - (list (plain-file - "test_bashrc_d.sh" - "export BASHRC_D_OK=yes\n") - (plain-file - "invalid-name" - "not a Bash script -- ignore me"))) + (list (plain-file + "test_bashrc_d.sh" + "export BASHRC_D_OK=yes\n") + (plain-file + "invalid-name" + "not a Bash script -- ignore me"))) %base-services))) #:imported-modules '((gnu services herd) (guix combinators)))) From patchwork Mon May 19 00:29:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 42744 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A583327BC49; Mon, 19 May 2025 01:31:55 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CC07727BC4A for ; Mon, 19 May 2025 01:31:53 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uGoPf-00040u-R4; Sun, 18 May 2025 20:31:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uGoPS-0003v4-Gc for guix-patches@gnu.org; Sun, 18 May 2025 20:31:16 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uGoPQ-0001FX-Jz; Sun, 18 May 2025 20:31:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=uzj7HILEHiTeiosqjjTB9dVclpi+awIARwM06RtsmXU=; b=Q2SQ0P4CAxHZE1NeRJMFgCbb5aapYf47p73cTif9yAhH27vMBE8cwpPabXY4YthnuXAcP1ruktZrZZYLzLnSU80zsP7CNJTaS+cvbpV9fzhAlzA/1Xv3xpT15pD9lbI9ptPhyVvvKY1aREHySTjkBhxeGBri9QQzh5OgSf9YWBN+iPmZtUVNidSku9JK3/yvRqIhzEhAR3j7xHE8yj8+Z+ntmgQenAUHqUeF8FCz0bJj49NtQ8+Pa7mUVhM7La+ANfN+XfkPwGl7q3klhM5uOVqGzTeqh8K5BtbdfPeg6p0UVJyFL2S/joIeFJWsK/wYscfd9g/08Yioud6/ffYQCg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uGoPO-0000Ds-5V; Sun, 18 May 2025 20:31:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78308] [PATCH v3 08/10] services: Add vte-integration-service-type. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, rutherther@ditigal.xyz, lgcoelho@disroot.org, gabriel@erlikon.ch, ludo@gnu.org, guix-patches@gnu.org Resent-Date: Mon, 19 May 2025 00:31:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78308@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Gabriel Wicki , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Gabriel Wicki , Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 78308-submit@debbugs.gnu.org id=B78308.174761463130258 (code B ref 78308); Mon, 19 May 2025 00:31:09 +0000 Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:31 +0000 Received: from localhost ([127.0.0.1]:34070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGoOh-0007h7-1R for submit@debbugs.gnu.org; Sun, 18 May 2025 20:30:31 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:43147) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uGoOE-0006hw-4U for 78308@debbugs.gnu.org; Sun, 18 May 2025 20:30:02 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7406c6dd2b1so4124668b3a.0 for <78308@debbugs.gnu.org>; Sun, 18 May 2025 17:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747614591; x=1748219391; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uzj7HILEHiTeiosqjjTB9dVclpi+awIARwM06RtsmXU=; b=Zth0cRUb18uiHDUQlyuthUoexan0FoyqWXLhdT+t4UQNegd0kiXXAbyk1hhqDkrArU nJKyr7F7QZfoXimdWFuuFSAVLuyXxjD5KhgRt2XJ8buki/MwCbcV7IXWkdfmXMAjlvcE oY2AMafgU2+8JgWJ3eZyna8iupMnzHL/mbNNo51966u9kvPFfuwAMb6bhpF5Zt/MHym2 jdiAUDIx/EEwn1A0sDWC9DOA/T6I9bnRKjvM9A4lvuzkYtzBU/L9Bdn8t3ioBSQnx8Tj TB0NMiRVUUpBvoKpjlzdO2quNsncLyh86xL5xWMfEtOxXu7JziqR0Pg2yXJ0qqtaTOwv zIUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747614591; x=1748219391; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uzj7HILEHiTeiosqjjTB9dVclpi+awIARwM06RtsmXU=; b=V+/IgwZah41dIwv8hwGr4S1qNv7+2eu3wEiqS61IZZ72UI3fkx1AVZtYdag+MfiCWD zTY9GSDPuMZrXxT96j2iicsBkG7RnOFbzyVjIubCQLICc/JT6d5ViStTKT1HKTy78X2U pb0dwB1p453K4xDQ1BcKq8BBfKEm0UnSPliW2P1f/ZYevPCpId+CcXtJjkismRNQ2evk ubMgvpMvZwDuRQIDPpiPTItnvpmOkqTvGCLvdtDVQ1iyDmXVm+mcr32kpEQ5YXMXD6fz OEh/1XEpImMfsf26yV+p3wkUO+P1iSvmw/rCh7qDDOrtf9QMhKYKoIwK/EmiQl4yLFno zPgw== X-Gm-Message-State: AOJu0Yywrugvjq3t5TUMvw0zjPWXsBQPpdgkvlial/gs+PNM8nw4qVBL c1zqtcsNt86x3paF5jlPBFFl3LmbMq16T7HNRXBoksyKlpxx+EVYK/6evREyiQ== X-Gm-Gg: ASbGncvQ7XkIZunOCxqTej0FG8KvMuf5wM+HpIvf0xpgNfhs6J5k4iwfaAHLE1N31r3 Uuf2Cl3Oza9O2YjOOMyIAO1zVlmiV76aUaxf8G5f7dtzltFgd5s6iNGTf49DaCASyB+Cvfdp6z4 wq3DEvn092ZbZwfrhk10vlHxsk3DiJ0qhGgmosl32pwt4l9Z6iLpRW7mDr+ze1u3Ao3K2/QeLwl 1UEN9X0v/L+w/5rNTfGQrFI+8W7l4oywxISdAt/kW/RYF4KJkyVbB3jIvZMbnCRkwXXRHo77tDY SVKPUB4/sq2RqmfplsyLDLXnqVGg2bZJT3wnqeNdY4HdRfjLdUhFf5K9kQpJTJJ7DPGmJUg= X-Google-Smtp-Source: AGHT+IE/B6xT0Zfgvx1OccEQDc5SN2u2t6OKZ04rGgkKnK59ErEVUkZvrCvr5Xl1LYaTBpIxZgJ9oA== X-Received: by 2002:a05:6a21:3990:b0:1f3:323e:3743 with SMTP id adf61e73a8af0-2165f68cb4fmr16473211637.12.1747614591111; Sun, 18 May 2025 17:29:51 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a970c882sm5254027b3a.55.2025.05.18.17.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 17:29:50 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 19 May 2025 09:29:06 +0900 Message-ID: <4d0498a8135b67e9a929042e8e9974413e1dbbc4.1747614548.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services.scm (vte-integration-service-type): New service type. * doc/guix.texi (Service Reference): Document it. Change-Id: I7e4bc1b913b50a5a061894f9ddef27f1877b62a2 --- doc/guix.texi | 15 +++++++++++++++ gnu/services.scm | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 80a109e2bb3..b53823bc65c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47666,6 +47666,21 @@ Service Reference @end example @end defvar +@defvar vte-integration-service-type +This services adds the @file{/etc/bashrc.d/vte.sh} to your system, which +improves the Bash and Zsh experience when using VTE-powered terminal +emulators. This causes for example the current directory to be +displayed in the terminal emulator's tab title, and the current +directory to be preserved when creating a new tab, among other features. +The value of the service is the @code{vte} package to use. + +@example +(use-package-modules gnome) ;for the `vte' package + +(service vte-integration-service-type vte) +@end example +@end defvar + @defvar privileged-program-service-type Type for the ``privileged-program service''. This service collects lists of executable file names, passed as gexps, and adds them to the set of diff --git a/gnu/services.scm b/gnu/services.scm index 159d357c3e7..ce15a39d063 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -47,6 +47,7 @@ (define-module (gnu services) #:use-module (guix deprecation) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages gnome) #:use-module (gnu packages hurd) #:use-module (gnu packages linux) #:use-module (gnu system privilege) @@ -138,6 +139,7 @@ (define-module (gnu services) linux-builder-configuration-kernel linux-builder-configuration-modules linux-loadable-module-service-type + vte-integration-service-type %boot-service %activation-service @@ -1027,6 +1029,19 @@ (define etc-bashrc-d-service-type Bash shells.") (default-value %default-etc-bashrc-d-files))) +(define vte-integration-service-type + (service-type + (name 'vte-integration) + (extensions + (list (service-extension etc-bashrc-d-service-type + (lambda (vte) + (list (file-append + vte "/etc/profile.d/vte.sh")))))) + (default-value vte) ;the vte package to use + (description "A service for adding the @file{/etc/bashrc.d/vte.sh} script +to your system, which improves the Bash and Zsh experience when using +VTE-powered terminal emulators."))) + (define (privileged-program->activation-gexp programs) "Return an activation gexp for privileged-program from PROGRAMS." (let ((programs From patchwork Mon May 19 00:29:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 42743 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 710FE27BC49; Mon, 19 May 2025 01:31:47 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F158127BC4A for ; Mon, 19 May 2025 01:31:46 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uGoPf-00040f-Hh; Sun, 18 May 2025 20:31:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uGoPU-0003vt-F2 for guix-patches@gnu.org; Sun, 18 May 2025 20:31:17 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uGoPU-0001G0-55 for guix-patches@gnu.org; Sun, 18 May 2025 20:31:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=wSipURcQQopoOfrhNW27LFRDGwCCkxr52wU0hsGgUSg=; b=uvc9PrHsIp0gI/Jt3x3UyiQmmjW7VpS+nScEI8ikPs/osuw9TfRAzRdb+e05l9xxRxM1DMWt55oODQ0ba+Enj0AvvdYb322MU0mazLdc4K+LzGbRMi8XArcCijdjMQZNgkLNwrpeHCcQ/RQdobrjefNT8tCDSxdkKo8OqW+Oc4xVTpgNzaoowNBRJJIjfHiGUEMDABIluwRhGYkCRXnW4LwaTc8G65GGmzwNNotJMnU6yZtoAVHzdhGh4WKIarmmfGcWhPGTEn4RJlrGPdOjBmpNP5wwofBoJXqz/S3Zu3Sam8aQCb8VDa8WH30K+7/hZySi/ZXCrOIevIg1bxxr5g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uGoPQ-0000FT-21; Sun, 18 May 2025 20:31:12 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78308] [PATCH v3 09/10] services: Add vte-integration-service-type to %desktop-services. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, rutherther@ditigal.xyz, lgcoelho@disroot.org, liliana.prikler@gmail.com, noelopez@free.fr, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Mon, 19 May 2025 00:31:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78308@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Liliana Marie Prikler , =?utf-8?q?No=C3=A9?= Lopez , Vivien Kraus X-Debbugs-Original-Xcc: Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Liliana Marie Prikler , =?utf-8?q?No=C3=A9?= Lopez , Vivien Kraus Received: via spool by 78308-submit@debbugs.gnu.org id=B78308.174761463530977 (code B ref 78308); Mon, 19 May 2025 00:31:11 +0000 Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:35 +0000 Received: from localhost ([127.0.0.1]:34072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGoOl-0007s9-EX for submit@debbugs.gnu.org; Sun, 18 May 2025 20:30:35 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:49313) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uGoOH-0006iP-JJ for 78308@debbugs.gnu.org; Sun, 18 May 2025 20:30:05 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-7376dd56f8fso4412988b3a.2 for <78308@debbugs.gnu.org>; Sun, 18 May 2025 17:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747614594; x=1748219394; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wSipURcQQopoOfrhNW27LFRDGwCCkxr52wU0hsGgUSg=; b=aucjGfcy8MxPYTVQjWilVp7i97NuqaztQCHl4ci7Cb+gp43G2BqVDJ8agobVdU07E1 WPuH4kgbl6vmT/VWKGehYnwZB+3Ef7My9wbBCexVHgUeblZko9CYBFg9NG4RS5HCQ0l/ 6K09otK8Rif1uGdKia9R4lnqWVXx8Da/dHaU4HDtzbQN0uhIv0YasTA5Uqoq1z2+GDrw dPDClE2mIJoGLbuWR6+ovkTAvKstmyeFyxkGhWnHtnGImX1G5COHdFU8MsTyHpsitGgq yW6JF+/CNP+aYF3giCSW0n4Zl4oC9PU3Zts45vSLy9sHV/vrlsGuyCpIgcU7I1YI38Op VoXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747614594; x=1748219394; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wSipURcQQopoOfrhNW27LFRDGwCCkxr52wU0hsGgUSg=; b=F4Db0Q4mjvq+z97uP5WUx6SLL2FXt8WjeqFN1UEV91ZtU9PHelII4EwolRKX+IZikn qQJu4rW7axGE/Hd+ExZaCqzbKktx+TkDgtJcH0PjzP3zkvT/g7HTQ5dXEch3mWzTurjD XUE0w5+nOZW6APgJpK/ryk6veQ9+s4ox2c6f+cFErO0Hv9LHu3pTEhg8BGZZyvzrl5e0 upsG6mKiN0cZJrgoUxORylOqmlL4AkIapfgvvcIiDQnpxksNpnNbLqzRQ4sn+X4cct1O oVzGNA8GUPb4rC4+Ms4EeYQ78nF7CJHOAQ0jSwHe3jY2XEgkNLTRa2J9SdIn0C4oycyQ hwuw== X-Gm-Message-State: AOJu0YzeOUe0UXGLWpldJLoaDEy9aUBtg0ySbbwmvnLhF8QBa5tpnAZ5 fsy67Cug7hVCjCT+vzBev3ehhTnJGcRrYtIExXtEZaNPqpCytFulZGsHxEaa4Q== X-Gm-Gg: ASbGnculfZhL14pvfw7vsL4hTqElQ8QM++3bl9QKBISCUd6222f1qOFo0k1p0sdLviu QBhejOMZAWIU0Ptdz1KDo9VpF69J7BVkAOZwSv4lQRNrcejqXFB+PdTnyJkbjJH0e/TUi9J0IWC yLuBTNa7U9pdf0L07OQPCrN2ymG6PLcdZlhfcbJnDl5lIGQVk2JTfgo4NN9RF3OEPsYbuA7UPCZ jHkVpiWAre+KcGy+xIedOwB8yiarfIhIgeayEAA9kfDfwNBfOL7KVgeQIORQAVAmmqerxm4w3ep MJOKIx3aW7LWgs6ET2Sd308f2DaDVwi+Z4DIMGF5y3imU1kXEOK0/zr2H1nOtaOYbj5KPDs= X-Google-Smtp-Source: AGHT+IFaEHq2V+ufobkerJf7KpHN3HXAiXBiC6sEVT5btIhYgAlSKueYTu4xI1iMAe3NzDwkH00GVw== X-Received: by 2002:a05:6a21:69b:b0:1f5:8622:5ed5 with SMTP id adf61e73a8af0-2162187a8a8mr17834152637.3.1747614593941; Sun, 18 May 2025 17:29:53 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a970c882sm5254027b3a.55.2025.05.18.17.29.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 17:29:53 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 19 May 2025 09:29:07 +0900 Message-ID: <719b3247f3a9ed8e63db29485a683fc3116c49c9.1747614548.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/desktop.scm (desktop-services-for-system): Fixes: Fixes: Change-Id: Ib29468468e327801a4e95361610159de61f7e8d6 --- gnu/services/desktop.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 12560a6249d..38ff2187356 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -2463,6 +2463,10 @@ (define* (desktop-services-for-system #:optional ;; to avoid GDM stale cache and permission issues. gdm-file-system-service + ;; Provides a nicer experience for VTE-using terminal emulators such + ;; as GNOME Console, Xfce Terminal, etc. + (service vte-integration-service-type) + ;; The global fontconfig cache directory can sometimes contain ;; stale entries, possibly referencing fonts that have been GC'd, ;; so mount it read-only. From patchwork Mon May 19 00:29:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 42742 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C2B2227BC4B; Mon, 19 May 2025 01:31:33 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4A7E027BC49 for ; Mon, 19 May 2025 01:31:33 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uGoPb-0003zP-C3; Sun, 18 May 2025 20:31:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uGoPW-0003wa-Dg for guix-patches@gnu.org; Sun, 18 May 2025 20:31:18 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uGoPU-0001GB-Sm for guix-patches@gnu.org; Sun, 18 May 2025 20:31:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=maJ+DNmulxU5rWmwPTvzWto431Q65MpnEdAbLdrJq50=; b=dAOpQJ+qJG6Z0PS4ur0j5Oc1H6FkQ8GrOAg3CTN18IUKJQBLFl4qMaiQpBn2D8qjOL/KEWY8JkR5P1KHaknVe9ohEjmXyeGWB6UbEoaIpXbE3ne/nJKPDzkH+aAZWh9SmOjlO2DNMOKCvZfzQp6lqd66+iOALK//D/sFablIcD61/t+Lpkv9ekvRhKhcK19JMloOGpUZJvoFEfdJWXS75n3Q+blAwLL6CPFp8XWxCjJyaE1Mkj0nSlF/g6PgK80Anui3j6Fy29vf2SGSFmMY/rSw4D7ka/0fFE8KhxNXLF+SLtWa3fxjyIO3o/8gVl2PTbJkHMfOdYKYNnaW85srNw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uGoPQ-0000Go-Ue; Sun, 18 May 2025 20:31:12 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78308] [PATCH v3 10/10] news: Add news entry for etc-bashrc-d-service-type. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, rutherther@ditigal.xyz, lgcoelho@disroot.org, pelzflorian@pelzflorian.de, julien@lepiller.eu, guix-patches@gnu.org Resent-Date: Mon, 19 May 2025 00:31:12 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78308@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Florian Pelz , Julien Lepiller X-Debbugs-Original-Xcc: Maxim Cournoyer , Rutherther , Luis Guilherme Coelho , Florian Pelz , Julien Lepiller Received: via spool by 78308-submit@debbugs.gnu.org id=B78308.174761463631050 (code B ref 78308); Mon, 19 May 2025 00:31:12 +0000 Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:36 +0000 Received: from localhost ([127.0.0.1]:34077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGoOp-00083h-J9 for submit@debbugs.gnu.org; Sun, 18 May 2025 20:30:36 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:60841) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uGoOJ-0006if-PL for 78308@debbugs.gnu.org; Sun, 18 May 2025 20:30:07 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-742af848148so1538209b3a.1 for <78308@debbugs.gnu.org>; Sun, 18 May 2025 17:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747614597; x=1748219397; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=maJ+DNmulxU5rWmwPTvzWto431Q65MpnEdAbLdrJq50=; b=jU0pDpZKaWK1Ary4fkPuHuXCgSJ4rr79054+s4qJJk1INEyThb0MoJWDzymse84QP4 iW1MP/2wLHm7lCzsOhxuizB88I0187txfAaxXOmEsFK48c89pwINlRO7/fEtxdS/Ja4P 2bppWIQue0ADpV8jYOJwKbCTyN2FXzLgAKPZzeOl4QfK2jv/5UhjwfKpCg5rbsJcrgYw k8aw4bjDGHcBM/HFm29LJjWM72c4vNrJVNjU6+sHaDXLyqf8nU3i4p8QtIl7fOSvACfC p8k5jC39K+Qgl995kECyNdMkUtzeHeLPbNCnX1w0uqxjGLv2BnRI1EZ3ly2jBi6TiOrp 7g9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747614597; x=1748219397; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=maJ+DNmulxU5rWmwPTvzWto431Q65MpnEdAbLdrJq50=; b=nTHMTR5AhLX/mgRJzB5BLDOljFjjsu0i096g2MsWXQluv36UsK+6P7d6iCLfXUqCbI Fgw3q6pLSa8kskbs0LCD2Z5RNwWK/Rje9yKbv7csEDcpJoPoDF+L2ST+dehcEX6UBhzG 2rENxuYdNZ10skqAO0ZbXVfoYzNYaQtCIbwoRUbb7A15Sqypo6WZSuUs5RHHrGq1EWyX saiusmtg3thuCnUSaF9yA/9e2o+8fOCsS4NTvW2nnVHWKjn2kvIdSHojlk/Lthy0CfvH e02FwekjfLH/mCckR81MNgUcMB5jdgEVLw6uu9jz6P6twmO27NdbL0TC2AnlAhSCYoMv 2LtA== X-Gm-Message-State: AOJu0YxKUwMksGctU2PC/cgXVcX3HI7sWnCej69Vw19yqMlAOovPQ6gd PFn+UZzVEFGfMT44Jfyv8bgeK7UEGB5oGPC5KUcPqWHWNYPMu0+C/Y+lWJpPmQ== X-Gm-Gg: ASbGnct5xqnYpOQbHOrhXQDr837m/M1URozRZVxakwm3qfJn7vyoMqxwDgl+GBMKIjp /huaDGMww7jznmgvd1rIAF90/OHz0JjRuzNbUzMZXNBe312QftSnZ4HYkmpLyaoYYar2XLE8Rqh qbmCFMbm/u8ehzy+2krMRVwmOnedDQUWGL18RktVypN3L28RrDrQlJ1sgoSCxlCPaNkyjciTHoK 0AKbVvdrK+VN0bTLVQT8q1tAg0TUJuBJOsuxJyUIf46D/xOI4iQjYsHYgvyw/K7mBTjt4uCKuaZ ZkcIVgGAu+O0s24p+xtVH98NoIEt+UBvON9mjsFqrgKXLIUlU7vUe/Fv9FDIOm2Q2QBuxv8= X-Google-Smtp-Source: AGHT+IEIaq8+qbwJj2YvnoUkS7OtksAf4jX9A5yWkKiFFPxyPh8z1eHuijFN/Zyn2Qmd3C/0qcEcwQ== X-Received: by 2002:a05:6a00:9185:b0:736:3979:369e with SMTP id d2e1a72fcca58-742a97ac52cmr12912911b3a.9.1747614596794; Sun, 18 May 2025 17:29:56 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a970c882sm5254027b3a.55.2025.05.18.17.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 17:29:56 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 19 May 2025 09:29:08 +0900 Message-ID: <56d43aee7b18ea07af627f65d8f8859369fa071b.1747614548.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * etc/news.scm (channel-news): New entry. Change-Id: Iaf861617e871eca90ac28ba5e14876c0f2f0f731 --- etc/news.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/etc/news.scm b/etc/news.scm index c70234ece7b..32303253440 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -38,6 +38,23 @@ (channel-news (version 0) + (entry (commit "XXX") + (title + (en "New services for /etc/profile.d and /etc/bashrc.d")) + (body + (en "Two new Shepherd services, @code{etc-profile-d-service-type} and +@code{etc-bashrc-d-service-type}, can now be used to configure and extend your +shell. The services accept a list of file-like objects that must have the +@file{.sh} file name extension. @code{etc-bashrc-d-service-type} is now used +instead of skeleton files to provision the Guix-provided Bash +aliases (@file{/etc/bashrc.d/aliases.sh}). It is also used to configure the +@code{bash-completion} package, by provisioning +@file{/etc/bashrc.d/bash_completion.sh}. If your @code{operating-system} +configuration does not include the @code{%base-services}, you may want to add +@code{(service etc-bashrc-d-service-type)} to your services, so Bash +completion will continue working for new users. See (info \"(guix) Service +Reference\") for extra information and examples."))) + (entry (commit "6e8ffdf3c5afac265e540027c2332573b25461ae") (title (en "Linux-libre 6.13 removed from Guix")