Received: (at 78308) by debbugs.gnu.org; 20 May 2025 11:21:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 20 07:21:46 2025 Received: from localhost ([127.0.0.1]:55779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uHL2X-00060p-CO for submit <at> debbugs.gnu.org; Tue, 20 May 2025 07:21:46 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:48170) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1uHL2T-0005zu-T2 for 78308 <at> debbugs.gnu.org; Tue, 20 May 2025 07:21:43 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-60179d8e65fso178223a12.0 for <78308 <at> debbugs.gnu.org>; Tue, 20 May 2025 04:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1747740095; x=1748344895; darn=debbugs.gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=56molOm/tvgk8OFj0vxPcTOI1FzQuY3yoGToUT+x7yo=; b=FXEWECVipEtPyucv2+pHu0gPoY+VQYm1uW9O1UrT3gRv/zewKw2oJo7CSxZaOWEAPZ WaA67YDSQYJF2ijCArre30ete+jnWIFOnafaqoTsfxb45jOwl8dxKmkhg+uQ0ijdeJfF wkwzcJC1ypfot1H5Kr3zTg1QxMY4xlJ5F+uju/WBY5Wrs8LB0MOV1KCsJoq/S5siOM0F 4FbomQFboZB3w392wiX44aeY/6OHXd6aqkIfYNBG4IuQZaQcZZcUZhFbSKDPIsZui0Wz zYMWs/xwOUKANQ5x3zyUIqotE+z2Y38GZsSZk2sZAbkEQooUjpKlTErXpz2W/3cO3vUS yIVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747740095; x=1748344895; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=56molOm/tvgk8OFj0vxPcTOI1FzQuY3yoGToUT+x7yo=; b=mAcoZTX0aCWA5B2R59/sLyFv/GRUpKfGfQlXGc2I4eyC4Og1NYmtEh5igMvXyPVvsV 2DeXA4A0mzIQBWJmaaSdQEN4k2SLup+8qNnOQTBqWvUeFQwmNodb0dyc5wY5iWSZydYW oVoWKZ46ta3dokxA2spvHi07cExUmQ+xn8BYEtxf2gnElbN3MCUJlu+tdrpybBR/6ab2 qzBS//5mT3PWzPE92sd2z72iZr0w/SF1y6Yz/OoHh0gnQ3SzH716G047TmDXgQNW2c1H UGXncyEVxzuLASAYzJnnvSdulxpQxZH7lpEd95z51hFDv3441+Loz3c54fr9bMeS6IF2 HMXQ== X-Gm-Message-State: AOJu0Yy7yNA7GJD9KEqNBfqkjz+g9X97sMvv+Jfj1KbZnPM6AZrvUwXx U1081550g9sb1qOxPM6symHuLkBqni87bwEvOVpq70oJL19H4vJc/+qJBjXFdOMqb28= X-Gm-Gg: ASbGncuENbPXs4XmhQNDtBY3AAJZAXi29/mJIkaUu2hOLpa7yXbYr5iDcKHlfsOjG/Z 0I4TJGJ/K0UXvexXZ24sRXRSLTVjfL6aoBqWxkTXtkrLhPuEBioE/TbI3VFPK36YP3MOZ5aR9rh zCgg1/RytYe06IYOw+qcc2QPkVI0cTt7Bc6fGaWB26l8EjMyHGxbt7PdUHCRDrAFG4r6e2LdVj+ VzNymg2icqkvS20A0aqdhgvHyyl64+yIKBFDctMQT/vHFp52DyyPgA68zW/ZiMM4vwurr95vWW3 x4NZix6W/dMJcIzCwo45bB1Kp+ZuGPyX3EtpNlWnBc0HYyvY X-Google-Smtp-Source: AGHT+IGmd7p8XwC6gVqXJAJYQWIec7k8+fYqlwl8cfmnCbdU6RHC10PUKf5bPJl5kyksqjyDP8fWVw== X-Received: by 2002:aa7:d399:0:b0:5e0:82a0:50dd with SMTP id 4fb4d7f45d1cf-6009010e9c0mr12084799a12.27.1747740095123; Tue, 20 May 2025 04:21:35 -0700 (PDT) Received: from localhost ([2a02:2454:a095:5600:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6005a6e745fsm7183106a12.48.2025.05.20.04.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 May 2025 04:21:34 -0700 (PDT) From: Sergey Trofimov <sarg@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: [bug#78308] [PATCH v3 10/10] news: Add news entry for etc-bashrc-d-service-type. In-Reply-To: <87y0urmz6i.fsf@HIDDEN> (Sergey Trofimov's message of "Tue, 20 May 2025 11:03:33 +0200") References: <87h61hknb8.fsf@HIDDEN> <87bjrocgre.fsf@HIDDEN> <874ixfomwk.fsf@HIDDEN> <87msb7buki.fsf@HIDDEN> <87y0urmz6i.fsf@HIDDEN> User-Agent: mu4e 1.12.9; emacs 30.0.92 Date: Tue, 20 May 2025 13:21:33 +0200 Message-ID: <87frgz4jeq.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Luis Guilherme Coelho <lgcoelho@HIDDEN>, Rutherther <rutherther@HIDDEN>, 78308 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN>, Florian Pelz <pelzflorian@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hi Maxim, a follow-up to my previous reply containing my proposal materialised to a patch. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-source-profile.d-as-intended.patch Content-Description: patch From c674d1fdf83bb1bc7930b48f9c0333f2936563d2 Mon Sep 17 00:00:00 2001 Message-ID: <c674d1fdf83bb1bc7930b48f9c0333f2936563d2.1747739946.git.sarg@HIDDEN> From: Sergey Trofimov <sarg@HIDDEN> Date: Tue, 20 May 2025 13:18:29 +0200 Subject: [PATCH] source profile.d as intended Change-Id: I37c0980ca66b2bfb8516df26d3376b16a009f855 --- gnu/system.scm | 10 +--------- guix/build/profiles.scm | 25 +++++++++++++++++++++++-- guix/profiles.scm | 4 +++- guix/scripts/environment.scm | 4 ++-- 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 2beca4b6d0..0969228f0a 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1134,15 +1134,7 @@ (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\n"))) +"))) (service etc-service-type `(("os-release" ,os-release) ("services" ,(file-append net-base "/etc/services")) diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm index b19d93f971..a4854386fb 100644 --- a/guix/build/profiles.scm +++ b/guix/build/profiles.scm @@ -98,9 +98,30 @@ (define (build-etc/profile output search-paths) # to this specific profile generation. \n" port) (let ((variables (evaluate-search-paths search-paths - (list output)))) + (list output))) + (profile-d (string-append output "/etc/profile.d")) + (guard-flag (string-append "GUIX_PROFILE_" + (string-take (basename output) 32) + "_LOADED"))) + + (format port "if [ \"x$~a\" = x ]; then\n" guard-flag) (for-each (write-environment-variable-definition port) - (map (abstract-profile output) variables)))))) + (map (abstract-profile output) variables)) + + (format port " +~a=1 +fi + +for i in ~a/*.sh; do + if [ -r \"$i\" ]; then + if [ \"${-#*i}\" != \"$-\" ]; then + . \"$i\" + else + . \"$i\" >/dev/null + fi + fi +done" + guard-flag profile-d))))) (define* (ensure-writable-directory directory #:key (symlink symlink)) diff --git a/guix/profiles.scm b/guix/profiles.scm index 264396401e..68ad6a6bc5 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -2165,7 +2165,9 @@ (define* (load-profile profile (string-append value separator current) value) value))))) - (profile-search-paths profile manifest))) + (profile-search-paths profile manifest)) + (setenv (string-append "GUIX_PROFILE_" (string-take (basename profile) 32) + "_LOADED") "1")) (define (profile-regexp profile) "Return a regular expression that matches PROFILE's name and number." diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 96bbc6c9fa..839ad7ce97 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -1123,8 +1123,8 @@ (define (guix-environment* opts) (if container? ;; The user's shell is likely not available ;; within the container. - '("/bin/sh") - (list %default-shell)))) + '("/bin/sh" "--login") + (list %default-shell "--login")))) (mappings (pick-all opts 'file-system-mapping)) (white-list (pick-all opts 'inherit-regexp))) base-commit: e7d73a08d569904f8a71db5b84f5fafaf0dff188 -- 2.49.0 --=-=-=--
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 20 May 2025 09:03:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 20 05:03:46 2025 Received: from localhost ([127.0.0.1]:54307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uHIsz-0001dr-Cm for submit <at> debbugs.gnu.org; Tue, 20 May 2025 05:03:45 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:50468) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1uHIsv-0001dR-BG for 78308 <at> debbugs.gnu.org; Tue, 20 May 2025 05:03:43 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3a0adcc3e54so3459471f8f.1 for <78308 <at> debbugs.gnu.org>; Tue, 20 May 2025 02:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1747731815; x=1748336615; darn=debbugs.gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=bDmyn4TvKql9c+O7SwytfHJsWqJc0IqjBFt2ubiHm4E=; b=L1r+UJVk2gTchaKfZsE6kBUk2HF2qNTO3uAtMbSjhPII9v/SrxeGaWlW/Ob5H9rGwE kzrkrVj8vZWQEcR9fFIWfLUOLvqJZQk6X7O7FmhW3gmhVDygXpL7MofwHHreqricthP2 JoxkgzDncLY4RDJGmYz8tkBua9fr0W3mHxiMnbaScWLNWXkLdGVHd3AGj/7cMPW9LKwt HrxrP/5dt0GaprnszhhDMSHHTXqQsQTAHc6AvjsEszYB0PAULk2cubMXjJ+Wf6D+IxxZ p0Ak5O2awEhL14ixjsk1jc8WFK4+ZSwMgstlSY+U5LO38pxGcbaxxlFxdbgDiUfYdxEW +vBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747731815; x=1748336615; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bDmyn4TvKql9c+O7SwytfHJsWqJc0IqjBFt2ubiHm4E=; b=EeS4ilCN1DlC52QmfHP69l40Jtwxeetll+Kbp3nyrHt5CIe/Gbte/gb1hhdbBaEEdz nRwz4nXZp6VQl+KVmJL+Q8t0XB5g9eTmBZ4BA+kfWAeYUbC6qSYnN8p0KFWNyFcLPQeK VbZAkdLzF7EN3sLzIod+bqo3VlQVukkPSep0sUXh3fUhL9xjKRF09CiyOi9y4GeMYdJs zh8w4JzSUisyBnTbuLWcKcgm9+rOUOCBrcC1IPKi0RKfLlj6O3h8xYjPCSI5/Jbwg0WA rtb6eYGsL6MYWCJTWxU+JxEoVADuosxQJ6LagjJNzu8xUxV20F4NhSyAFH6Fu50Wbwap HxxQ== X-Gm-Message-State: AOJu0YyRZq9XOwwtpFN2suGSJSVWJoTZyYhP3MoJiuA25yDruxNSPjoi ZCBtNTxKz7/DOVLC/Y6qfC5dYuZpaILCcEBW7gO46pkTU8TB+4AxeeLJUvMdSOxWgHk= X-Gm-Gg: ASbGnctuy6vxkOTcgDp2r/VFy1pqVSmESPVwrqRIZb02Q3yypgJu4WYj2+1gbne6kYk XkbWwIQCGbqjofgglDtDgyANgG/xtdWJuEuX2zZ7DmsdtTQM1H8q7GhbjjGKcfyEJtZekQTef45 M0lHfh38GuAjMeQpwLOgnAy11OBWZKmdODkMCg5ga3MV6kt32hzAJdBpUBXJjQlBrEmKdcUTkDQ zaReXUedXmyFfxRGrm9GuGJcgTOJDCYzEm3+o/HkpwkCg+b1qzR3sCEg6h1rf7fI8rdy5k4t5SI Dalyk8uTTm1zngfYBiVY4Mi4VXKeizsrLfAbrMu6f9ekZuoa X-Google-Smtp-Source: AGHT+IF08w+jF6q1vIdIGJAy2IFmIvxJbYRFrjQwnIRkBhAn9+bGWxLpizLMHOiFK+WbRszP3er21Q== X-Received: by 2002:a05:6000:178e:b0:3a3:58f0:a38b with SMTP id ffacd0b85a97d-3a3600da0aamr11884877f8f.43.1747731814692; Tue, 20 May 2025 02:03:34 -0700 (PDT) Received: from localhost ([2a02:2454:a095:5600:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a35ca4d1basm15890647f8f.15.2025.05.20.02.03.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 May 2025 02:03:34 -0700 (PDT) From: Sergey Trofimov <sarg@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: [bug#78308] [PATCH v3 10/10] news: Add news entry for etc-bashrc-d-service-type. In-Reply-To: <87msb7buki.fsf@HIDDEN> (Maxim Cournoyer's message of "Tue, 20 May 2025 16:38:37 +0900") References: <87h61hknb8.fsf@HIDDEN> <87bjrocgre.fsf@HIDDEN> <874ixfomwk.fsf@HIDDEN> <87msb7buki.fsf@HIDDEN> User-Agent: mu4e 1.12.9; emacs 30.0.92 Date: Tue, 20 May 2025 11:03:33 +0200 Message-ID: <87y0urmz6i.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Luis Guilherme Coelho <lgcoelho@HIDDEN>, Rutherther <rutherther@HIDDEN>, 78308 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN>, Florian Pelz <pelzflorian@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Maxim, Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes: [...] >>>> also, I wonder if `etc/profile` produced by `build-etc/profile` should >>>> also source files in corresponing `etc/profile.d`. This would allow >>>> packages install shell profile extensions and it would fix e.g. >>>> https://issues.guix.gnu.org/44997 >>> >>> That would be useful, but there's one issue I see, is that the Red >>> Hat/Fedora have standardized on /etc/profile.d/ as the place to put any >>> shell extension scripts, which are even sourced for example by >>> /etc/bashrc, which is a bit odd to me: /etc/profile is for interactive >>> login shells, and /etc/profile.d should logically follow, it seems. >>> >>> Having /etc/profile.d instead of /etc/bashrc.d also means that scripts >>> placed there must be POSIX compliant or contain conditional guards for >>> the specific Shell they target. >> >> It seems I've phrased it a bit vague. I was writing about `profile.d` >> directories in any guix profile (be it `guix home`, `guix shell` or >> whatever). What I propose is that `<...>/etc/profile` (produced by >> `build-etc/profile` procedure) would include the snippet to source >> `profile.d`. The snippet could find the dir relative to its own location >> so that the very same code could be placed as in the global file >> (/etc/profile) as in per-profile files. > > Thank you for clarifying what you meant. So just rephrasing to make > extra sure, what you would like to see is that every profile generated > would have in their etc/profile generated file something sourcing its > etc/profile.d/*.sh files, so that installing e.g. bash_completion in a > profile would automatically have its etc/profile.d/bash_completion.sh > file sourced, correct? Exactly. Basically, install the "for i in /etc/profile.d/*.sh; do" snippet adjusted to look for `profile.d` relative to current file. > > I'm not sure how useful that would be, because IIRC the > $profile/etc/profile of a generated profile is only ever sourced: > > 1. When it appears at /etc/profile, e.g. mapped there within a > container ... or is one of the default user profiles: --8<---------------cut here---------------start------------->8--- # from /etc/profile for profile in "$HOME/.guix-profile" \ "$HOME/.guix-home/profile" \ "$HOME/.config/guix/current" do if [ -f "$profile/etc/profile" ] then # Load the user profile's settings. GUIX_PROFILE="$profile" ; \ . "$profile/etc/profile" else # At least define this one so that basic things just work # when the user installs their first package. export PATH="$profile/bin:$PATH" fi done --8<---------------cut here---------------end--------------->8--- this alone is already helpful as it resolves the flatpak bug granted, custom profiles are not sourced by `/etc/profile`, but then it's a power-user territory and they'll sort it out themselves. > 2. The shell is started as a login shell, e.g. 'bash --login' > Note the --login requirement; which would not be in effect for example > when entering a 'guix shell' (which spawns 'sh') by default. The > etc/profile could be sourced manually, of course, but that seems to > defeat the purpose of having it there in the first place. > This is a tougher nut to crack, could be done separately. On a first glance it seems logical that 'guix shell' would start login shells, however this would lead to duplicated search paths as these would be set when starting the container and then when sourcing /etc/profile inside. It could be remedied with such steps: - Extract mandatory search path variables (PATH=, MANPATH=, etc) to a separate file (e.g. profile.env). - Prevent 'profile.env' files to be sourced twice: if [ "GUIX_PROFILE_<hash>_LOADED" -ne 1 ]; then export PATH=... ... GUIX_PROFILE_<hash>_LOADED=1 fi - 'guix/scripts/environment.scm' procedures should be adjusted to additionally set 'GUIX_PROFILE_<hash>_LOADED' env variable to avoid duplication of search paths > > Another idea would be to have /etc/bashrc source /etc/profile.d like > done in Fedora; that's a bit odd and I don't like it much for reasons > explained earlier, but it has the benefit of being compatible with the > packages like flatpak and vte that install things under etc/profile.d to > extend the non-login shells as well. I also don't like this idea. Why would non-login shells run `/etc/profile.d`? Aren't they launched in environment where login happened and therefore `/etc/profile` got applied already? > That could be made to work automatically for the fixed location like > /run/current-system/profile/etc/profile.d for system-installed > packages as well as $HOME/.profile/etc/profile.d/, and even for > non-containerized environments via $GUIX_ENVIRONMENT/etc/profile.d/. > It wouldn't work in containerized environment; this would need adding > a /etc/bashrc inside the container that would source > $GUIX_ENVIROMNENT/etc/profile.d.
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 20 May 2025 07:38:52 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 20 03:38:51 2025 Received: from localhost ([127.0.0.1]:53294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uHHYp-0001Rm-8h for submit <at> debbugs.gnu.org; Tue, 20 May 2025 03:38:51 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:61614) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uHHYm-0001Qn-11 for 78308 <at> debbugs.gnu.org; Tue, 20 May 2025 03:38:49 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-23278ce78efso5329715ad.2 for <78308 <at> debbugs.gnu.org>; Tue, 20 May 2025 00:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747726721; x=1748331521; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=NjGcVLdxoxlvo+xwpeSnyTQTqJrxhXVi2gSbhN0PNPs=; b=aCe6Gdg+aKO7ar+SwNyaVAbqqBW02EGRUtTRM1K4GH3wQL95FbtVqV3L0JfUKU0lik tEMpobHjVfcJl3+NAgfVEkDYhLErK0t8Xjo27Mksa1LSO2A4jXaR3D4UMIbCjlsCVVij kZWLP6NWXt4pe8CvtR4ijkSs2x5XS7CENvwRq8lXFfuWhGycNMXaw8X9nF1QQfWEWpxZ uANmLLLrH8Zsl6FOIWV6F23K1rW4/IU47IOtz7nClK88aYLRx2a7oT9RESMtBNey/OIM G2Jp6xbnmPc1MW/d0Ef6WNRUafOtK1gLPhdTm6wDdUIw4W1jK1By9f0axQKr+K7UJ3Kq GBeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747726721; x=1748331521; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NjGcVLdxoxlvo+xwpeSnyTQTqJrxhXVi2gSbhN0PNPs=; b=uG1gVmdxegXW8ana12Er2viJGQIBKJ8rFDSv5aYZBNsZYCROnnSuKLC4KOx4aUqCe6 mzw5EZ22HTCa1NcjEioFr0HftSPhp1fycVmtR3LfFArwOkKWu7c2pJiTsENBIggwxJcy kDqhh9XSS6tcVN+UpOWoPKBmgl9D3LPoFXIN23M+MKmpYUOt9b+sNZ76HmhXrbhKv7MU wl/6TX270HiVJn7NH7EkzRWlwPamfiEiU0Ony/qKouQKO0MjVFivizzoDQ5BzX/E7Pik vkRdXyAh/oMm1KsoDYBUdL2o3Vn9LTOgby4ACZGPxz5HAyVVQ+kT3ucdEHb1GMzGUhxI A73w== X-Gm-Message-State: AOJu0YwTdEdeNvtt9WmCi4aoSOjDBDrGgHgcNoeZUz2Ti4mMP3Lyfnwn GX8jowBptDIU/7rkriHrshfnkUq+u0eUhtZyBl/zDJq90avu1T90+x39 X-Gm-Gg: ASbGncuQmRk/twJ19Fp8ncKL8DZt2K+hRnkbXPcOg8i3NhD78Vx2ySFYA1KlYHLW39w +9RvnqU/Y7HcaNuGabcItOPGe1KkDgaOsr+sdp15JT5SShPvrV86UYDGqP0tq1Rgrm17si9FQo5 1aILQN7hkkf6nJv1oV3uqAvX0+trKG1LYsODpSiaYD0O/Leg56FYr8kR6AC3snvwc8SdOhWSIH0 JcX99RjLIQpOSTmHPrnUw9ltn3RA64CIk+2/aBlnjNB04wiegFbOi4OidSF4ftyRnQVVwfJ2BDw F/0xCVWoUmbeHX37MIn7d5DSr30wE5p3zNu9HHTCvmkbvwQgYg== X-Google-Smtp-Source: AGHT+IEwBaxesZoc+l0f6+CxNVpxJ6c3ZSOzmK7/kAKwIK+fu3mmOJufQ9JP/RvN5S+1+IywMIr1dQ== X-Received: by 2002:a17:903:187:b0:226:30f6:1639 with SMTP id d9443c01a7336-231d45e637dmr201391885ad.51.1747726721386; Tue, 20 May 2025 00:38:41 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-231d4e975d8sm70838955ad.145.2025.05.20.00.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 May 2025 00:38:40 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Sergey Trofimov <sarg@HIDDEN> Subject: Re: [bug#78308] [PATCH v3 10/10] news: Add news entry for etc-bashrc-d-service-type. In-Reply-To: <874ixfomwk.fsf@HIDDEN> (Sergey Trofimov's message of "Tue, 20 May 2025 07:45:47 +0200") References: <87h61hknb8.fsf@HIDDEN> <87bjrocgre.fsf@HIDDEN> <874ixfomwk.fsf@HIDDEN> Date: Tue, 20 May 2025 16:38:37 +0900 Message-ID: <87msb7buki.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Luis Guilherme Coelho <lgcoelho@HIDDEN>, Rutherther <rutherther@HIDDEN>, 78308 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN>, Florian Pelz <pelzflorian@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Sergey, Sergey Trofimov <sarg@HIDDEN> writes: > Hi Maxim, > > Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes: > >>>> * etc/news.scm (channel-news): New entry. >>> [...] >>>> + (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 >>>> >>> these are not Shepherd services, right? >> >> At the core, they are, but they are wrapped with some sugar in Guix, >> > > Could you please explain this bit? As I see these are just computed > files that produce `profile.d` and `bashrc.d` unions which are then > sourced by a piece of code placed in a well-known file. When I read > "shepherd", I expect that the service is managed with "herd". Ah, you are right! Re-reading (info "(guix) Service Composition") made that clear to me. I always assumed services had to be sequenced by Shepherd no matter the type, but it seems it is Guix System that is in charge during the early boot here, when running the activation script, IIUC. >>> also, I wonder if `etc/profile` produced by `build-etc/profile` should >>> also source files in corresponing `etc/profile.d`. This would allow >>> packages install shell profile extensions and it would fix e.g. >>> https://issues.guix.gnu.org/44997 >> >> That would be useful, but there's one issue I see, is that the Red >> Hat/Fedora have standardized on /etc/profile.d/ as the place to put any >> shell extension scripts, which are even sourced for example by >> /etc/bashrc, which is a bit odd to me: /etc/profile is for interactive >> login shells, and /etc/profile.d should logically follow, it seems. >> >> Having /etc/profile.d instead of /etc/bashrc.d also means that scripts >> placed there must be POSIX compliant or contain conditional guards for >> the specific Shell they target. > > It seems I've phrased it a bit vague. I was writing about `profile.d` > directories in any guix profile (be it `guix home`, `guix shell` or > whatever). What I propose is that `<...>/etc/profile` (produced by > `build-etc/profile` procedure) would include the snippet to source > `profile.d`. The snippet could find the dir relative to its own location > so that the very same code could be placed as in the global file > (/etc/profile) as in per-profile files. Thank you for clarifying what you meant. So just rephrasing to make extra sure, what you would like to see is that every profile generated would have in their etc/profile generated file something sourcing its etc/profile.d/*.sh files, so that installing e.g. bash_completion in a profile would automatically have its etc/profile.d/bash_completion.sh file sourced, correct? I'm not sure how useful that would be, because IIRC the $profile/etc/profile of a generated profile is only ever sourced: 1. When it appears at /etc/profile, e.g. mapped there within a container 2. The shell is started as a login shell, e.g. 'bash --login' Note the --login requirement; which would not be in effect for example when entering a 'guix shell' (which spawns 'sh') by default. The etc/profile could be sourced manually, of course, but that seems to defeat the purpose of having it there in the first place. Another idea would be to have /etc/bashrc source /etc/profile.d like done in Fedora; that's a bit odd and I don't like it much for reasons explained earlier, but it has the benefit of being compatible with the packages like flatpak and vte that install things under etc/profile.d to extend the non-login shells as well. That could be made to work automatically for the fixed location like /run/current-system/profile/etc/profile.d for system-installed packages as well as $HOME/.profile/etc/profile.d/, and even for non-containerized environments via $GUIX_ENVIRONMENT/etc/profile.d/. It wouldn't work in containerized environment; this would need adding a /etc/bashrc inside the container that would source $GUIX_ENVIROMNENT/etc/profile.d. -- Thanks, Maxim
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 20 May 2025 05:45:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 20 01:45:59 2025 Received: from localhost ([127.0.0.1]:51956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uHFna-0001Ks-HT for submit <at> debbugs.gnu.org; Tue, 20 May 2025 01:45:59 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:46274) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1uHFnX-0001Js-5c for 78308 <at> debbugs.gnu.org; Tue, 20 May 2025 01:45:56 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-441d1ed82dbso52172995e9.0 for <78308 <at> debbugs.gnu.org>; Mon, 19 May 2025 22:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1747719949; x=1748324749; darn=debbugs.gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=qEkvJ7v9ALgQTuCWxO86inNKk1jLE8DYZ3SwGpFGN0E=; b=hx+ZXI/P9k/PlRXjqxHiNdemIdBLQ2OELhLVFSlTFwa1AxMoNaCsQMhDD3V9gcDfRg j3IwDoPJ83d1y6en18GGNoWVvABkUcSk95WcPsfYjlmC1RsPTRS28DzHPgNr6t4w11CK 5FjyrfaqJYKnSXGL8GkQ2MSQ8GELvGgRVsG318pTNP6LL1s+czXiJVCIOOQsARNJUBr7 FcEJjU2naE/sF+NJREPasgN+L/u49SXe+VeMOan0m2+w1mjBwVdRXb+GvISoWuGez2X9 d4x1CmRKLRHni6yyivCYc8OHfgZvKc4GnSaDHGHXBmzQxBUApbfO6/lU2ocQKHo85WSR XlrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747719949; x=1748324749; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qEkvJ7v9ALgQTuCWxO86inNKk1jLE8DYZ3SwGpFGN0E=; b=vp/P3y2KiKXhGsph+YplZaOXxD1NiUDkmZUhUc/MaDnyWJw9B98GNE8vE+4HNnRNZP Pxx01jLTtaXqMRRbIT5PMkh2QSr4vSaOrCmGvLF+SdpB6fY/A4QYboDKZO4wD/PgcTR0 7D9XXFze5fao1KeXIU1srx6fA4eSDkE6aoJyHYt/SdSxIGlJvaMyRlHc9MDHcjPmbpoY 7QuiCLC/R0lkPGNGBa1zruxUz25WKUFIap9+owcmQv6GIzEbBPoIQ5n+wZC8awUxLDR8 N89ruK06mhtfRNr/NYNa68/u1z1/8Lu36GQVNJfdl4Od9/obXVHnQprBncVhD0fAWocI W+qw== X-Gm-Message-State: AOJu0Yy48kvWLCfmqAv/DQsyruFcHDKPnnAk/bdVTh1rpvTUQ7MnECwj i97+FLE6q7kCPKEBGfA3X1rgPGC9GWZLoyDimosIpymopWcGAYyzxEFiOY2om3DRMG0= X-Gm-Gg: ASbGnctTRiWSdzgpFq8KS1W3hJ6XJMOTmxC5x+PfaRWeJsQLLLh3fMmSDzU6ebOryql 3Bo1DA76jfj3BBI0Ax8nlXoEZVtMWeNCMfTjvER0AhS2zeD7A8pFc92ZI4UA891E7CXqaPmo3mS 1hy/2d45QQZKyXnaR8rHgWbs5aSRhmLafLrdW7qxPvIp5Days0bV/Hr1VRCJA12RZJSoduqlRyr CaaiNRrbqAH/O0FV9WoLAdNyi7q4bs4Q32RtNnBB4aLrnTKTviNbW+JkI0o6555mtlhMJr/Seud TxrJ0IRsp+UVXOwY2pB2RQNRsKcsFDT5VHrag+Zu2eEaQ7WbNP4DCp0= X-Google-Smtp-Source: AGHT+IFKZS2R+0Cqu0YH5vpRuxVDCcXzFNejEoTdCerdFEnQjqgjkplT88HKvvl2K7uV8qKdHmY9tw== X-Received: by 2002:a05:600c:1d81:b0:43c:fc04:6d35 with SMTP id 5b1f17b1804b1-442fd606b8emr138834065e9.4.1747719948445; Mon, 19 May 2025 22:45:48 -0700 (PDT) Received: from localhost ([92.206.121.205]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a35ca5a7cbsm15359943f8f.35.2025.05.19.22.45.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 22:45:47 -0700 (PDT) From: Sergey Trofimov <sarg@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: [bug#78308] [PATCH v3 10/10] news: Add news entry for etc-bashrc-d-service-type. In-Reply-To: <87bjrocgre.fsf@HIDDEN> (Maxim Cournoyer's message of "Tue, 20 May 2025 08:39:17 +0900") References: <87h61hknb8.fsf@HIDDEN> <87bjrocgre.fsf@HIDDEN> User-Agent: mu4e 1.12.9; emacs 30.0.92 Date: Tue, 20 May 2025 07:45:47 +0200 Message-ID: <874ixfomwk.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Luis Guilherme Coelho <lgcoelho@HIDDEN>, Rutherther <rutherther@HIDDEN>, 78308 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN>, Florian Pelz <pelzflorian@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Maxim, Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes: >>> * etc/news.scm (channel-news): New entry. >> [...] >>> + (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 >>> >> these are not Shepherd services, right? > > At the core, they are, but they are wrapped with some sugar in Guix, > Could you please explain this bit? As I see these are just computed files that produce `profile.d` and `bashrc.d` unions which are then sourced by a piece of code placed in a well-known file. When I read "shepherd", I expect that the service is managed with "herd". > > so perhaps I can say just 'services' or 'Guix services'. >> also, I wonder if `etc/profile` produced by `build-etc/profile` should >> also source files in corresponing `etc/profile.d`. This would allow >> packages install shell profile extensions and it would fix e.g. >> https://issues.guix.gnu.org/44997 > > That would be useful, but there's one issue I see, is that the Red > Hat/Fedora have standardized on /etc/profile.d/ as the place to put any > shell extension scripts, which are even sourced for example by > /etc/bashrc, which is a bit odd to me: /etc/profile is for interactive > login shells, and /etc/profile.d should logically follow, it seems. > > Having /etc/profile.d instead of /etc/bashrc.d also means that scripts > placed there must be POSIX compliant or contain conditional guards for > the specific Shell they target. It seems I've phrased it a bit vague. I was writing about `profile.d` directories in any guix profile (be it `guix home`, `guix shell` or whatever). What I propose is that `<...>/etc/profile` (produced by `build-etc/profile` procedure) would include the snippet to source `profile.d`. The snippet could find the dir relative to its own location so that the very same code could be placed as in the global file (/etc/profile) as in per-profile files.
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 20 May 2025 01:02:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 19 21:02:35 2025 Received: from localhost ([127.0.0.1]:48890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uHBNK-00062M-Af for submit <at> debbugs.gnu.org; Mon, 19 May 2025 21:02:35 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:45067) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uHBMd-0005yj-GQ for 78308 <at> debbugs.gnu.org; Mon, 19 May 2025 21:01:52 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-7390d21bb1cso4569531b3a.2 for <78308 <at> debbugs.gnu.org>; Mon, 19 May 2025 18:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747702903; x=1748307703; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=epWLjaqo8cqmIVPcoB3DkhNJQsSLbFHMPisT93Q5qao=; b=HP9EoHz06Y4D0Yaef08Q+jCSLVvKEECyQdatOMjCUlMKD5P6PmeCDPAhXGA2UgVpY2 va1Tg3wIaPxLXea4H5jPrl3eT5qZcXTMt5rrVhgIKdRWdDfcCmraGPt6ScIeKYv8l/Se MfFcypgFYO5j/IJMZSnGN6TJc9EWd9QU39vsueBWznx4ImOllllbuFVTKQ39qdqr5TAx XzgztOJ0wZ26ba56SCaCGYA4HPUNUcRzaNe4rAtpQcstr3eBKrVE8Ff6Eq/R7Q11ZUuC YVfp+lBV0BZMxeqMIs0g3yZ/cgwjZp1MWb/7KdAs8DPr6+pQyBN4v/cFmK+ShBUmjJKV 9kWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747702903; x=1748307703; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=epWLjaqo8cqmIVPcoB3DkhNJQsSLbFHMPisT93Q5qao=; b=mmWS1jI03rfqJZWKyY5Y0nQm1MJeGwz5R1b1B4Ylxfgh1HhMUHwSlscMgrEP8jf8rE f4VXFCuYLBwPCQf1jAXAOHfF0OdvayfdIHto2iJouPU2LxVfkny2e0NUZtzHLEroukJx eQk5tPFsLYF7yCm9R8pEs0jyq1EHYTeyuLX2lIiPycsPT8cIWKNFHMoTbLuWkAWr/x5x WqYIu4ynCWuk922YrvK7Pn1tZlG5x5xQOr9jJU5Gyar25rmaibS27sMNRaduSs0+ery/ pAwRivjeNISpm1/oms89eb8EYJHgvgNZe+byO7wnWUtQGDpiJIXLNjWpGr3CzpdDODdn xMtQ== X-Gm-Message-State: AOJu0YzMIvwfFEZscs1b2qS3biOs3EpgcHHLL2N7URVzXeJ4OXCYyruh ABVcWSiNoUEBXmmQnamafHlAKQk710bxdIc2Ci0zP3Ehvt1ZudBpxxJG X-Gm-Gg: ASbGncsdJXc99b59xqAyLpGRbLzMBev6SDcN0789eMptlg3FDtGZXWtx5m1LGiNWGeo 4JWmT167jRjv3yjhk4rR4qU+9DOA+R8o7xBiUv2mMVEklC7oRQESvGY8D7eOMQX7TkIyh9DYMY+ Vn7aGRJ0aswwNDQ4inMlsFdh1Ent0ceGFrZWI6yw48p2uad8D52CE1lfoevw5rqLlvYsbJOak+n D6BhL8UHPXpF6p54yXJn7lcYbgQMkI6VYAbmwtvKct+I7jkP5SG8XHkVPuMlcVVepeW8xNuHswo QjEYqC0zqyON83cknKQtIw9Jx8a9qI2pEG6QKrTM1d4cAZr2Mw== X-Google-Smtp-Source: AGHT+IFrag2P/71Nekv4kRREbGiWnEcgNSkS125BZlU0OkkgWCdT6VSHT7UlrVAtwb7mij3P70HdYQ== X-Received: by 2002:aa7:9d88:0:b0:742:da7c:3f27 with SMTP id d2e1a72fcca58-742da7c3f6cmr4101075b3a.0.1747702903073; Mon, 19 May 2025 18:01:43 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a970d5b5sm7119276b3a.62.2025.05.19.18.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 18:01:42 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> Subject: Re: [bug#78308] [PATCH v3 10/10] news: Add news entry for etc-bashrc-d-service-type. In-Reply-To: <87wmacer5v.fsf@HIDDEN> (pelzflorian@HIDDEN's message of "Mon, 19 May 2025 14:11:40 +0200") References: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> <56d43aee7b18ea07af627f65d8f8859369fa071b.1747614548.git.maxim.cournoyer@HIDDEN> <87wmacer5v.fsf@HIDDEN> Date: Tue, 20 May 2025 10:01:39 +0900 Message-ID: <87y0usaydo.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Luis Guilherme Coelho <lgcoelho@HIDDEN>, Rutherther <rutherther@HIDDEN>, 78308 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Florian, "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> writes: > This patch series I have not reviewed this time, but could you add this > German translation? > > For clarity, I have replaced in the English news and German >> +configuration does not include the @code{%base-services}, you may want = to add > by > =E2=80=9C configuration does not include the @code{%base-services} or > @code{%desktop-services}, you may want to add=E2=80=9D Good catch. > I still think command-line commands =E2=80=9CSee (info \"(guix) Service > Reference\")=E2=80=9D should not be enclosed in mere parentheses in displ= ayed > news. OK, I've made the switch to use @samp{info ...}. > If you follow Sergey Trofimov=E2=80=99s suggestion to replace >> + (en "Two new Shepherd services, > by =E2=80=9C(en "Two new services,=E2=80=9D then please replace the Germa= n beginning > =E2=80=9C(de "Zwei neue Shepherd-Dienste,=E2=80=9D by =E2=80=9C(de "Zwei = neue Dienste,=E2=80=9D. Thank you, done. > (title > (en "New services for /etc/profile.d and /etc/bashrc.d") > (de "Neue Dienste f=C3=BCr /etc/profile.d und /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} or > @code{%desktop-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) Servi= ce > Reference\") for extra information and examples.") > (de "Zwei neue Shepherd-Dienste, @code{etc-profile-d-service-typ= e} und > @code{etc-bashrc-d-service-type}, k=C3=B6nnen jetzt benutzt werden, um Ih= re Shell zu > konfigurieren und zu erweitern. Die Dienste nehmen eine Liste dateiartig= er > Objekte entgegen, deren Dateinamen auf die Dateinamenserweiterung @file{.= sh} > enden m=C3=BCssen. @code{etc-bashrc-d-service-type} wird jetzt anstelle = von > Skeleton-Dateien benutzt, um von Guix ausgelieferte Bash-Aliasse bereitzu= stellen > (@file{/etc/bashrc.d/aliases.sh}). Mit ihm wird auch das > @code{bash-completion}-Paket eingerichtet, indem > @file{/etc/bashrc.d/bash_completion.sh} bereitgestellt wird. Wenn Ihre > Betriebssystemkonfiguration @code{%base-services} oder @code{%desktop-ser= vices} > nicht beinhaltet, m=C3=B6chten Sie vielleicht > @code{(service etc-bashrc-d-service-type)} in Ihre Dienstliste aufnehmen,= damit > Bash-Komplettierung weiterhin f=C3=BCr neue Benutzer Befehle vervollst=C3= =A4ndigt. Siehe > (info \"(guix.de) Service-Referenz\") f=C3=BCr weitere Informationen und > Beispiele."))) I applied your version (locally) with the extra translation. Thank you! I'll push it in a few days if there are no new issues/concerns reported here. --=20 Thanks, Maxim
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 23:39:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 19 19:39:35 2025 Received: from localhost ([127.0.0.1]:47822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uHA50-0005ef-C1 for submit <at> debbugs.gnu.org; Mon, 19 May 2025 19:39:34 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:58572) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uHA4u-0005dO-UV for 78308 <at> debbugs.gnu.org; Mon, 19 May 2025 19:39:30 -0400 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-af523f4511fso3968001a12.0 for <78308 <at> debbugs.gnu.org>; Mon, 19 May 2025 16:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747697961; x=1748302761; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=iGivPRzhYuSMAAB5dKcx6SZA+Atomh3CouqxJgt1vdA=; b=D1T16wT68kntSG4FHrEG/6k45I7qAGtnIa2s6pnnpiCU1X5DBzN/dhk5LTrAQnhDg5 gMW8afl7duJghvxI4oR8a+/QADvdArmEjRQ0WH32e6gvAL7IvByXLpnbJZqdo+V2Vj1w G9pd020bXrUpZ9DUokwx/vFnxOLAk8v6Gl8jKKxp6OHAVu5U9/PlFcG4GeZSBPeGZs0w MPh2POb6cgEBnxT5PoGJ7Br3uplBWJEoBRZJuF6Vk0KTzNZYIW3wTt8LVx9p5gcxveiG VrQj3JrfeeiT16SJOhJclIraUgmiW0lzBM/aB5oLyVyK/WvbxEvuk4KsyUBHxCZCm1er wjVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747697961; x=1748302761; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iGivPRzhYuSMAAB5dKcx6SZA+Atomh3CouqxJgt1vdA=; b=X9L4G0vXWqDYSMTsY4Ve45sf3R5ASyWnfCLJmV3xqbXdQJKaVB/ZWt/QByDIvXFueN B+0bz5wlX0f0pjIiJFh72fAmMrlOH74MWvl4vAbosIxrjlYOZgnJQEQVvMUr9cbDgBG6 xLAahZ6H2BUGDxnkA20zygtbFVK71irfPSU81wnP6K4l+O33yQao4pkck1yXP7Hk6Tqz fNhyyBnyKICXPFAsrHSN2/MNVEcxVM486WrFXlaReIzcoPbYhWl/Ti1cjCPWGiU5eoa9 tnPAhgR7Vhmp8NkDl+rwTIJMZ8modiOWh/FB6Hsjg8qn9N1iMtrRMG3ZXJAw5ymU/YUl Ho8Q== X-Gm-Message-State: AOJu0YwW+sc8a6c207DgJ/Y6ZSrVsmtHTLwbqpf0iJt+nh4nHPRKVFIK LitWKURF+myONPq9ieb8BNRCiBxJPuP3HBnL8Q/F5D78ldWrUmAFN5oP X-Gm-Gg: ASbGncuKXXQJvTb/3aWs3+C9Qp6LAGvBkWKque1cmLeBWGqZrE/30ciGEHIaO9aXEKA wkkvNnYvy2vE2APaO62KLxy9NjUdsVFIxeoKFRN7M4fOX8ssJhgcL8Irco3wbEcqaGCBhqBxDOY ezcp+mQE4mY4jx7YNZIfMfjzgLiVlfgFbC/MRgWnJ15dw/PKOCnoYYDmzOf7egO3E969He3tHEB i51Z3wjzevq92GKOsdgicftZS536ChAcxZahYtBw4tP0+MRvXdChHLolr5oRdNhy+U3N36ftoSS NqW+s60zRo7eNj6BRQGmm+xDpOmDXylWUcUHGrFkTJaCcaaL0BHuD1aAVnZa X-Google-Smtp-Source: AGHT+IFx27UuF7VWAipq86GNaWchs3ogIPDEpellh35dj34WO9hWhxUSR1SDxCNCBVi3XcdXksRfIA== X-Received: by 2002:a17:902:f64f:b0:223:26da:4b6f with SMTP id d9443c01a7336-231d43a479amr229969515ad.14.1747697961347; Mon, 19 May 2025 16:39:21 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-231d4adbfecsm65506185ad.76.2025.05.19.16.39.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 16:39:20 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Sergey Trofimov <sarg@HIDDEN> Subject: Re: [bug#78308] [PATCH v3 10/10] news: Add news entry for etc-bashrc-d-service-type. In-Reply-To: <87h61hknb8.fsf@HIDDEN> (Sergey Trofimov's message of "Mon, 19 May 2025 10:38:19 +0200") References: <87h61hknb8.fsf@HIDDEN> Date: Tue, 20 May 2025 08:39:17 +0900 Message-ID: <87bjrocgre.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Luis Guilherme Coelho <lgcoelho@HIDDEN>, Rutherther <rutherther@HIDDEN>, 78308 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN>, Florian Pelz <pelzflorian@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Sergey, Sergey Trofimov <sarg@HIDDEN> writes: > Hi Maxim > > Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes: > >> * etc/news.scm (channel-news): New entry. > [...] >> + (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 >> > these are not Shepherd services, right? At the core, they are, but they are wrapped with some sugar in Guix, so perhaps I can say just 'services' or 'Guix services'. > also, I wonder if `etc/profile` produced by `build-etc/profile` should > also source files in corresponing `etc/profile.d`. This would allow > packages install shell profile extensions and it would fix e.g. > https://issues.guix.gnu.org/44997 That would be useful, but there's one issue I see, is that the Red Hat/Fedora have standardized on /etc/profile.d/ as the place to put any shell extension scripts, which are even sourced for example by /etc/bashrc, which is a bit odd to me: /etc/profile is for interactive login shells, and /etc/profile.d should logically follow, it seems. Having /etc/profile.d instead of /etc/bashrc.d also means that scripts placed there must be POSIX compliant or contain conditional guards for the specific Shell they target. -- Thanks, Maxim
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 12:12:01 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 19 08:12:01 2025 Received: from localhost ([127.0.0.1]:38891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGzLc-00079L-Ab for submit <at> debbugs.gnu.org; Mon, 19 May 2025 08:12:01 -0400 Received: from relay.yourmailgateway.de ([188.68.63.170]:44821) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <pelzflorian@HIDDEN>) id 1uGzLW-00078I-5m for 78308 <at> debbugs.gnu.org; Mon, 19 May 2025 08:11:57 -0400 Received: from mors-relay8203.netcup.net (localhost [127.0.0.1]) by mors-relay8203.netcup.net (Postfix) with ESMTPS id 4b1Gkv6tQ1z8bR5; Mon, 19 May 2025 12:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1747656712; bh=prnlOVfmAwANG8XHstoqX7nQa+8GZNmVb6UwDlxNSH8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=IPQz01S8jUeI/D2ZKQ3Xq4+j9m/+bGYsG10GdAeyyMIrt0MMM4++HytMDgJct2gm9 O+RSyTi+rEgmeghSfK/LS0WNoc6oUYZ9+ml4lrxJF0di2R7E7+EBmnhLGQX7GYSzqS osryZHXwqRGCUrNDL9ql88XZnd9w6WChWSfzbjOXQwEC5enU7NJHm1c3vU8h5faZMY IWd0LcRzAttAK+KVD6FtCN/HfJkWvLyCvph9Xotpuh5R2Y0SjhU9lW54pXFr4EF64m H7ya7U8C6ta9YlLB9MOFsYM0yYYSIU1/x7ud1Ggh8nxWaR1OmmgjtAWb8u8UYNL8AX 5/i5yreX+hIQw== Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by mors-relay8203.netcup.net (Postfix) with ESMTPS id 4b1Gkv689wz8ZpW; Mon, 19 May 2025 12:11:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at policy01-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -2.898 X-Spam-Level: X-Spam-Status: No, score=-2.898 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy01-mors.netcup.net (Postfix) with ESMTPS id 4b1Gkt1FL4z8tY1; Mon, 19 May 2025 14:11:49 +0200 (CEST) Received: from florianhp (ipb21a5dbf.dynamic.kabel-deutschland.de [178.26.93.191]) by mxe217.netcup.net (Postfix) with ESMTPSA id 66E6685BF8; Mon, 19 May 2025 14:11:40 +0200 (CEST) From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: [bug#78308] [PATCH v3 10/10] news: Add news entry for etc-bashrc-d-service-type. In-Reply-To: <56d43aee7b18ea07af627f65d8f8859369fa071b.1747614548.git.maxim.cournoyer@HIDDEN> (Maxim Cournoyer's message of "Mon, 19 May 2025 09:29:08 +0900") References: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> <56d43aee7b18ea07af627f65d8f8859369fa071b.1747614548.git.maxim.cournoyer@HIDDEN> Date: Mon, 19 May 2025 14:11:40 +0200 Message-ID: <87wmacer5v.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Rspamd-Server: rspamd-worker-8404 X-Rspamd-Queue-Id: 66E6685BF8 X-NC-CID: OW6hqad3ReGkpa9kOkJL7eRRXSr9tKmdj5Uh+/5Y9RJaNSuvdQKIbJfm X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Luis Guilherme Coelho <lgcoelho@HIDDEN>, Rutherther <rutherther@HIDDEN>, 78308 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable This patch series I have not reviewed this time, but could you add this German translation? For clarity, I have replaced in the English news and German > +configuration does not include the @code{%base-services}, you may want t= o add by =E2=80=9C configuration does not include the @code{%base-services} or @code{%desktop-services}, you may want to add=E2=80=9D I still think command-line commands =E2=80=9CSee (info \"(guix) Service Reference\")=E2=80=9D should not be enclosed in mere parentheses in display= ed news. If you follow Sergey Trofimov=E2=80=99s suggestion to replace > + (en "Two new Shepherd services, by =E2=80=9C(en "Two new services,=E2=80=9D then please replace the German = beginning =E2=80=9C(de "Zwei neue Shepherd-Dienste,=E2=80=9D by =E2=80=9C(de "Zwei ne= ue Dienste,=E2=80=9D. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename=german-news-bash.scm Content-Transfer-Encoding: quoted-printable (title (en "New services for /etc/profile.d and /etc/bashrc.d") (de "Neue Dienste f=C3=BCr /etc/profile.d und /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 y= our 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 us= ed 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} or @code{%desktop-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.") (de "Zwei neue Shepherd-Dienste, @code{etc-profile-d-service-type}= und @code{etc-bashrc-d-service-type}, k=C3=B6nnen jetzt benutzt werden, um Ihre= Shell zu konfigurieren und zu erweitern. Die Dienste nehmen eine Liste dateiartiger Objekte entgegen, deren Dateinamen auf die Dateinamenserweiterung @file{.sh} enden m=C3=BCssen. @code{etc-bashrc-d-service-type} wird jetzt anstelle von Skeleton-Dateien benutzt, um von Guix ausgelieferte Bash-Aliasse bereitzust= ellen (@file{/etc/bashrc.d/aliases.sh}). Mit ihm wird auch das @code{bash-completion}-Paket eingerichtet, indem @file{/etc/bashrc.d/bash_completion.sh} bereitgestellt wird. Wenn Ihre Betriebssystemkonfiguration @code{%base-services} oder @code{%desktop-servi= ces} nicht beinhaltet, m=C3=B6chten Sie vielleicht @code{(service etc-bashrc-d-service-type)} in Ihre Dienstliste aufnehmen, d= amit Bash-Komplettierung weiterhin f=C3=BCr neue Benutzer Befehle vervollst=C3= =A4ndigt. Siehe (info \"(guix.de) Service-Referenz\") f=C3=BCr weitere Informationen und Beispiele."))) --=-=-= Content-Type: text/plain Regards, Florian --=-=-=--
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 08:38:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 19 04:38:31 2025 Received: from localhost ([127.0.0.1]:37250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGw10-00072W-GI for submit <at> debbugs.gnu.org; Mon, 19 May 2025 04:38:30 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:51447) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1uGw0x-00071y-Gh for 78308 <at> debbugs.gnu.org; Mon, 19 May 2025 04:38:28 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-601fb2b7884so393733a12.2 for <78308 <at> debbugs.gnu.org>; Mon, 19 May 2025 01:38:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1747643901; x=1748248701; darn=debbugs.gnu.org; h=mime-version:message-id:date:user-agent:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=P+KRMIr66PXgmf6dHtmVlhnbIVXqy19iYAEQ0Ar1QfU=; b=rJNLcaU/LW0yEHPb4kf0BD0eFAx9uSnX00RWotUwbBl36IGmRt1tuZISbgChVAIaRZ nZyUV6KesnWnJKTG5v8YfDrGZaCy/fJSn0CM8c5KEg8VmqDnTn+hI3QR+z7rBsZ9HD1a 6mYj916fAbfQ5STSTVtlYa4tn1dzrMcyeiQdl1qpd2U6Vs//r7t9e2gHSd5y1vA1mMIY 7u5sQg8bgRQ4679gW/KySR6foNRsp2cnMztFbp3aijEnxA1nk0eDhLlqnCPMLcEkZhnf PtgnGfvee0z0VUBhX5RGFibqks1sSa5xnDbF55tgSZCSHu+vphZaoLVtQ+gJIKKZOQ3o ANkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747643901; x=1748248701; h=mime-version:message-id:date:user-agent:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=P+KRMIr66PXgmf6dHtmVlhnbIVXqy19iYAEQ0Ar1QfU=; b=vn+34Gz4Q2pZcWsr3KeITdw5Sh1KtqwhDdol/QsNU4sKOOw54X5jRm3+vxmM76Nzh/ B8jSwTZ1NZ0v0xOwUFVNv2oVaspXbqb5zzZbmkcvbzIghptZqLX2W8D28HdO7EKl3U56 kBMtSNr1hyenOLIeNeoImy+3NiL2cn2vqmF03+mm4fdaRE0hYDKtNvl6rFRTyPjtIuUY 6t3cxJA9rntn/bxNksm8SKUKWF0huBurONGP/r8n2xkDYcl414WPKyQNSRyeqJu+fyKO 0wGMMETghtAseOr9am2WeETFN4K+fvMDxGtAGVSETJtPNCT0xfGv9y2ZEMeFxmC3CWbT wJwA== X-Gm-Message-State: AOJu0YzjjYucqL5GRz/PE+JXaBd5O2D81SrMkDZzfU6jKQvPrIRiWMdN NEjDebDNPdhJ/DUnmlrA3fXDnUA7W1WsfaFpjjmA1HyiJdtazMsYfxqTmqlKD0gJk9w= X-Gm-Gg: ASbGncshVJ0tTDaa0LTkwKAop118/Xgu+IPVh96c3VSV2wRbA2ZnjDe70uCBF2LUZgM e8vc8p9KqOSZpkomSvF46saIORY+/x1Q4teyKDLvJxMtF5CzsNnskmOROG6rlcIi3zvCChGFmVp UPp9pMEx0HkScy8UfZyKU4Uw3NdBk1133iIw/xrI/lRHycrnMVLyUqQOq1ebX97aWnluPHHU3GU Mgl3st1Oz1Sn28EHsyTdLP2K+hJIauth2QQ5Di59FalK/i2mJi6IMjttudb9+uTNpNUjdpyM0w7 8tSnwd/uzGX6szlyXmRs+DVAYfiLIg+JH21eY7fyXefreYmlLA== X-Google-Smtp-Source: AGHT+IGKgsVGWR63VNZBmuHIEBLIGXn/e5zGDTxDyXtxh1tW24M/J0y1zZ4iPGmL1QSJqxyHe0vg1A== X-Received: by 2002:a17:907:3e03:b0:ad4:c55e:ef8b with SMTP id a640c23a62f3a-ad536f9db9emr972130566b.48.1747643900872; Mon, 19 May 2025 01:38:20 -0700 (PDT) Received: from localhost ([2a02:2454:a095:5600:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad52d06dcbbsm559578066b.51.2025.05.19.01.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 01:38:20 -0700 (PDT) From: Sergey Trofimov <sarg@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: [bug#78308] [PATCH v3 10/10] news: Add news entry for etc-bashrc-d-service-type. User-Agent: mu4e 1.12.9; emacs 30.0.92 Date: Mon, 19 May 2025 10:38:19 +0200 Message-ID: <87h61hknb8.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Luis Guilherme Coelho <lgcoelho@HIDDEN>, Rutherther <rutherther@HIDDEN>, 78308 <at> debbugs.gnu.org, Julien Lepiller <julien@HIDDEN>, Florian Pelz <pelzflorian@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Maxim Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes: > * etc/news.scm (channel-news): New entry. [...] > + (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 > these are not Shepherd services, right? also, I wonder if `etc/profile` produced by `build-etc/profile` should also source files in corresponing `etc/profile.d`. This would allow packages install shell profile extensions and it would fix e.g. https://issues.guix.gnu.org/44997
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 05:24:40 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 19 01:24:40 2025 Received: from localhost ([127.0.0.1]:35962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGszQ-0003FF-8X for submit <at> debbugs.gnu.org; Mon, 19 May 2025 01:24:40 -0400 Received: from ditigal.xyz ([2a01:4f8:1c1b:6a1c::]:45544 helo=mail.ditigal.xyz) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <rutherther@HIDDEN>) id 1uGszN-0003Ei-7f for 78308 <at> debbugs.gnu.org; Mon, 19 May 2025 01:24:37 -0400 Received: by cerebrum (OpenSMTPD) with ESMTPSA id 2d746c01 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Mon, 19 May 2025 05:24:30 +0000 (UTC) Date: Mon, 19 May 2025 07:24:28 +0200 From: Rutherther <rutherther@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_0/9=5D_VTE_integration_sup?= =?US-ASCII?Q?port_/_Shell_startup_files_refactor?= User-Agent: K-9 Mail for Android In-Reply-To: <87bjrpe9c3.fsf@HIDDEN> References: <875xi6xlbz.fsf@HIDDEN> <87msbinfb9.fsf@HIDDEN> <87a57am3ck.fsf@HIDDEN> <87bjrpe9c3.fsf@HIDDEN> Message-ID: <FDF215C1-CBEE-4864-87DC-37EFB3C3CABF@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ditigal.xyz; i=@ditigal.xyz; q=dns/txt; s=20240917; t=1747632270; h=date : from : to : cc : subject : in-reply-to : references : message-id : mime-version : content-type : content-transfer-encoding : from; bh=/8y1z1uDrnelV4GrQpBKpeRuJE1zeDuEyoOY5UtdmFg=; b=XYwr6hjNTlneIREGhNZDqmrqj0Cn6RpLi4zEPT6xy/KLTM0GWBg2eSIvREyoEttuvXnek krcwgyDHHSDLOif22ly7vDQZvO2ShHb/letFYLwVDZQs17ybnSEiQUsLKTOJs6Q/w6hmGiS JzUjCVM9YzaUD4uR5u2v4Ag9DLLoBAc= X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi On May 19, 2025 2:24:28 AM GMT+02:00, Maxim Cournoyer <maxim.cournoyer@HIDDEN> wrote: >Hi Rutherther, > >Rutherther <rutherther@HIDDEN> writes: > >> Hi, >> >> I've tried playing with this a bi [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ditigal.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: 78308 Cc: 78308 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi On May 19, 2025 2:24:28 AM GMT+02:00, Maxim Cournoyer <maxim.cournoyer@HIDDEN> wrote: >Hi Rutherther, > >Rutherther <rutherther@HIDDEN> writes: > >> Hi, >> >> I've tried playing with this a bi [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ditigal.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Hi On May 19, 2025 2:24:28 AM GMT+02:00, Maxim Cournoyer <maxim=2Ecournoyer@g= mail=2Ecom> wrote: >Hi Rutherther, > >Rutherther <rutherther@ditigal=2Exyz> writes: > >> Hi, >> >> I've tried playing with this a bit=2E >> >> I would like to point out that maybe it would be better to add extensio= n >> of the service to the manual rather than creation of the service=2E Mos= t >> users will be using profile-d service as they are using >> desktop-services=2E So instead of (service-type etc-profile-d-service-t= ype >> =2E=2E=2E) something like (simple-service 'my-simple-profile-file >> etc-profile-d-service-type =2E=2E=2E)=2E > >Currently only etc-bashrc-d-service-type is used in %base-services, so >we can't extend etc-profile-d-service-type, since it doesn't exist in >the base templates=2E But we definitely can! Extensions bring the service in, unconditionally=2E= So they work every time no matter if the service is in the list already=2E= =20 > >> As for the bashrc and profile d, it seems working right and I don't hav= e >> any more comments apart from documentation changes=2E > >I'm pushing a v3 with the news entry you had suggested in a minute=2E > >> As for vte, I am not really sure what the integration does and have >> difficulty searching for the features=2E All I can get is that it >> integrates with terminal and makes it better, but not in what way=2E As= I >> am quite a minimal, using dwl and foot, I have no idea how does Gnome >> and Gnome Terminal integrate nor how to check if it does the right thin= g >> with this addition=2E > >The main thing for me is having a consistent title for the tab in gnome >console or gnome terminal applications=2E It also preserves the current >working directory when opening new tabs, and offers other features=2E I >guess the best way to know what other features it provides is by reading >the vte=2Esh script or the source of libvte=2E > >Thanks for reviewing/testing! > Rutherther
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:36 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 20:30:36 2025 Received: from localhost ([127.0.0.1]:34077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGoOp-00083h-J9 for submit <at> 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 <maxim.cournoyer@HIDDEN>) id 1uGoOJ-0006if-PL for 78308 <at> 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 <at> 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 <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v3 10/10] news: Add news entry for etc-bashrc-d-service-type. Date: Mon, 19 May 2025 09:29:08 +0900 Message-ID: <56d43aee7b18ea07af627f65d8f8859369fa071b.1747614548.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> References: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Luis Guilherme Coelho <lgcoelho@HIDDEN>, Florian Pelz <pelzflorian@HIDDEN>, Julien Lepiller <julien@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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") -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, lgcoelho@HIDDEN, pelzflorian@HIDDEN, julien@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 20:30:35 2025 Received: from localhost ([127.0.0.1]:34072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGoOl-0007s9-EX for submit <at> 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 <maxim.cournoyer@HIDDEN>) id 1uGoOH-0006iP-JJ for 78308 <at> 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 <at> 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 <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v3 09/10] services: Add vte-integration-service-type to %desktop-services. Date: Mon, 19 May 2025 09:29:07 +0900 Message-ID: <719b3247f3a9ed8e63db29485a683fc3116c49c9.1747614548.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> References: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Luis Guilherme Coelho <lgcoelho@HIDDEN>, Liliana Marie Prikler <liliana.prikler@HIDDEN>, Noé Lopez <noelopez@HIDDEN>, Vivien Kraus <vivien@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/services/desktop.scm (desktop-services-for-system): Fixes: <https://issues.guix.gnu.org/72172> Fixes: <https://issues.guix.gnu.org/35424> 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. -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, lgcoelho@HIDDEN, liliana.prikler@HIDDEN, noelopez@HIDDEN, vivien@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 20:30:31 2025 Received: from localhost ([127.0.0.1]:34070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGoOh-0007h7-1R for submit <at> 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 <maxim.cournoyer@HIDDEN>) id 1uGoOE-0006hw-4U for 78308 <at> 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 <at> 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 <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v3 08/10] services: Add vte-integration-service-type. Date: Mon, 19 May 2025 09:29:06 +0900 Message-ID: <4d0498a8135b67e9a929042e8e9974413e1dbbc4.1747614548.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> References: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Luis Guilherme Coelho <lgcoelho@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, lgcoelho@HIDDEN, gabriel@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:13 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 20:30:13 2025 Received: from localhost ([127.0.0.1]:34063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGoOS-00071b-Kg for submit <at> 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 <maxim.cournoyer@HIDDEN>) id 1uGoOB-0006hY-1x for 78308 <at> 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 <at> 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 <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v3 07/10] system: Factorize bashrc default configuration. Date: Mon, 19 May 2025 09:29:05 +0900 Message-ID: <703cabd6f79c691b33c639ae7a1952ef1a7ebb0e.1747614548.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> References: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Luis Guilherme Coelho <lgcoelho@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Hilton Chain <hako@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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): <profile>: Guard against souring /etc/bashrc in non-interactive, SSH case. <bashrc>: 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 <home-bash-configuration>. +(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)))) -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, lgcoelho@HIDDEN, andrew@HIDDEN, gabriel@HIDDEN, hako@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:12 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 20:30:12 2025 Received: from localhost ([127.0.0.1]:34061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGoOR-0006zx-ER for submit <at> 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 <maxim.cournoyer@HIDDEN>) id 1uGoO8-0006hU-Bg for 78308 <at> 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 <at> 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 <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v3 06/10] system: Migrate sourcing bash_completion.sh to etc-bashrc-d-service-type. Date: Mon, 19 May 2025 09:29:04 +0900 Message-ID: <7f1761694001e006ee9d878783338af2bc02867e.1747614548.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> References: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Luis Guilherme Coelho <lgcoelho@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, lgcoelho@HIDDEN, gabriel@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:30:02 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 20:30:02 2025 Received: from localhost ([127.0.0.1]:34031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGoOE-0006ig-HS for submit <at> 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 <maxim.cournoyer@HIDDEN>) id 1uGoO5-0006hE-9Z for 78308 <at> 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 <at> 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 <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v3 05/10] services: Add etc-bashrc-d-service-type. Date: Mon, 19 May 2025 09:29:03 +0900 Message-ID: <a95d353c8298653e386d9f66bcd712ca26417aca.1747614548.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> References: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Luis Guilherme Coelho <lgcoelho@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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))) -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, lgcoelho@HIDDEN, gabriel@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:29:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 20:29:56 2025 Received: from localhost ([127.0.0.1]:34027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGoO8-0006i0-Pw for submit <at> 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 <maxim.cournoyer@HIDDEN>) id 1uGoO2-0006h4-1v for 78308 <at> 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 <at> 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 <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v3 04/10] system: Source scripts from the /etc/bashrc.d directory. Date: Mon, 19 May 2025 09:29:02 +0900 Message-ID: <4fc4167eb21e028ddb38121a8237e841ddf07dff.1747614548.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> References: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Luis Guilherme Coelho <lgcoelho@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/system.scm (operating-system-etc-service): <bashrc>: 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 <dannym@HIDDEN> ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@HIDDEN> ;;; Copyright © 2020 Florian Pelz <pelzflorian@HIDDEN> -;;; Copyright © 2020, 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN> +;;; Copyright © 2020, 2022, 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <jannek@HIDDEN> ;;; Copyright © 2020, 2022, 2025 Efraim Flashner <efraim@HIDDEN> ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN> @@ -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")) -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, lgcoelho@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:29:52 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 20:29:52 2025 Received: from localhost ([127.0.0.1]:34023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGoO5-0006hX-7E for submit <at> 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 <maxim.cournoyer@HIDDEN>) id 1uGoNw-0006gj-Hn for 78308 <at> 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 <at> 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 <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v3 02/10] services: Add etc-profile-d-service-type. Date: Mon, 19 May 2025 09:29:00 +0900 Message-ID: <18ad655bcd4a5e0fba23130315d48c2e15792f47.1747614548.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> References: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Luis Guilherme Coelho <lgcoelho@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 <me@HIDDEN> ;;; Copyright © 2023 Brian Cully <bjc@HIDDEN> ;;; Copyright © 2024 Nicolas Graves <ngraves@HIDDEN> +;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (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))) -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, lgcoelho@HIDDEN, gabriel@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:29:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 20:29:46 2025 Received: from localhost ([127.0.0.1]:34020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGoO1-0006hL-DP for submit <at> 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 <maxim.cournoyer@HIDDEN>) id 1uGoNz-0006gr-6d for 78308 <at> 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 <at> 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 <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v3 03/10] gnu: bash: Define the SYS_BASHRC macro. Date: Mon, 19 May 2025 09:29:01 +0900 Message-ID: <94963f01fe3fca8180794bcd461f7a98e61c7470.1747614548.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> References: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Luis Guilherme Coelho <lgcoelho@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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 <go.wigust@HIDDEN> ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@HIDDEN> ;;; Copyright © 2024 chris <chris@HIDDEN> +;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; ;;; 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' -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, lgcoelho@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:29:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 20:29:39 2025 Received: from localhost ([127.0.0.1]:34016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGoNu-0006gt-O7 for submit <at> 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 <maxim.cournoyer@HIDDEN>) id 1uGoNs-0006gf-NE for 78308 <at> 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 <at> 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 <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v3 01/10] system: Source scripts from the /etc/profile.d directory. Date: Mon, 19 May 2025 09:28:59 +0900 Message-ID: <c493d4eb6d0ed610e61e39bebe635a26ff4b8066.1747614548.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Luis Guilherme Coelho <lgcoelho@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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(+) 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. base-commit: 6b5fc4812981f2cadffcc5d39e48cd8e02ee73af -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, lgcoelho@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 19 May 2025 00:24:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 20:24:41 2025 Received: from localhost ([127.0.0.1]:33963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGoJ7-0006Ip-9m for submit <at> debbugs.gnu.org; Sun, 18 May 2025 20:24:41 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:45205) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uGoJ4-0006IH-17 for 78308 <at> debbugs.gnu.org; Sun, 18 May 2025 20:24:38 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2322bace4ceso4104735ad.2 for <78308 <at> debbugs.gnu.org>; Sun, 18 May 2025 17:24:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747614271; x=1748219071; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=NJrCnny0842sh5P6KdEUK4PCgatn61d91pDvMA7WFeo=; b=F130d5DrmTmXEgwmbe5o6fN9bIuhFW/d8TOawCfB30anVNov/a0LiQLGgbyJ/hGGdv Wo4PRsDB16optGnqARNkaQTLdWsfF0RqvH00CHKUxT95FsY5URAF18x7joXsGgIe3aEt RQf76hhkYjj8nO6YtnER7G6FZ0UYXebNl+ARnucoqpitPtjZkgQmQQcTCZMvbbpUc0TV FPO5Nh2ysHKfZZ7szhs3Ze15nB7bpVLHzvzRvOC4WT9dhhCMlJqsggpqYA+yEtImwnhZ Tlq0ilMn3bkt/b2TgtY37sbY3g/jEnI+SS4z5RaWNd/YK4DenKgB/7nBMQ3/BwcnwAvd vfJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747614271; x=1748219071; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NJrCnny0842sh5P6KdEUK4PCgatn61d91pDvMA7WFeo=; b=mURjtMYn2pcTNArciWKg32g6pjK+T/8PqiQ6INGh8B2D2mJZTgb6SMfuLEMiyl02UN i2jMMa5nr+vCo7qB9qjRhKcPYgt9HnHGg/vIHLZWJ0RO03mZOW6KVU1jukDoeYo/SHNf 6yjXOlvOAda65thoVXXYX2B9uUI4J/qTvgOscReySnWVdYonTws3rBEBQ7Fc8mPx2ut7 hGCtyWhTH9FPR/5yYeCDtJiLO/MvKu1Ejh8Z26FS5WGvagur3t2YAeVXiLX6+wAat5Sx AGmpwennMA3LjL3YLHhJnyOpzroTzK8asNHAVNMYfgYxSs+EImazUpzl1LPUPCY5ht00 xAwg== X-Gm-Message-State: AOJu0YyxlA9i2kQlHWK9Jgddbz094xXDfMhC1VhRLkm6KWQeVxbktlD8 fniYPtlPhq8+jXZ5zKyOeAKiRGd/MDzKR66ebH++LRCxZagStFmN40lCqxPq+w== X-Gm-Gg: ASbGncthnqwLpiL1nKXYfKKsELVklZljK14YDmy7OSvopwlkXvNgF3hjM7er7xCW2JT kL7cVueAhL1ZQQO2t9/Sx9nNURXT7c+XycXoeGo5F1WOYERPxhC4YS3t2ylgrMO1/jpPLU0Gkfo 6ReFbH/zabARpR3w8tXs8IxM9gDowLMTsZg0qOKzCgn/L2nFKiG7gAdnKtjaw+qjPERZVkkimAO IdzBl6PsVjaLdtNoiN9mSkTLFrNav8Wx/PXRb43dOYpje62gFoXXbKJGKwFPr/sm3pF8y8/lUjM NyzSyLFM9h8YLLMecA0oCYqGVsbqkf7wMJm8NKweWwqCLZ6WTg== X-Google-Smtp-Source: AGHT+IEr+7ZOUGRkVLxqgMnoNEGFgi8js1HxhJg0q+5aKo0foXSGKPHRV1MwOMVCTdWoHVEi+EA+5Q== X-Received: by 2002:a17:903:1ca:b0:221:78a1:27fb with SMTP id d9443c01a7336-231d438a223mr161110495ad.11.1747614271285; Sun, 18 May 2025 17:24:31 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-231d4ac94a0sm48527915ad.2.2025.05.18.17.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 May 2025 17:24:30 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Rutherther <rutherther@HIDDEN> Subject: Re: [PATCH 0/9] VTE integration support / Shell startup files refactor In-Reply-To: <87a57am3ck.fsf@HIDDEN> (rutherther@HIDDEN's message of "Sun, 18 May 2025 15:54:19 +0200") References: <875xi6xlbz.fsf@HIDDEN> <87msbinfb9.fsf@HIDDEN> <87a57am3ck.fsf@HIDDEN> Date: Mon, 19 May 2025 09:24:28 +0900 Message-ID: <87bjrpe9c3.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Rutherther, Rutherther writes: > Hi, > > I've tried playing with this a bit. > > I would like to point out that maybe it would be better to add extension > of the service to the manual rather than creation of the service. Most > us [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:62a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ditigal.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (maxim.cournoyer[at]gmail.com) X-Debbugs-Envelope-To: 78308 Cc: 78308 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) Hi Rutherther, Rutherther <rutherther@HIDDEN> writes: > Hi, > > I've tried playing with this a bit. > > I would like to point out that maybe it would be better to add extension > of the service to the manual rather than creation of the service. Most > users will be using profile-d service as they are using > desktop-services. So instead of (service-type etc-profile-d-service-type > ...) something like (simple-service 'my-simple-profile-file > etc-profile-d-service-type ...). Currently only etc-bashrc-d-service-type is used in %base-services, so we can't extend etc-profile-d-service-type, since it doesn't exist in the base templates. > As for the bashrc and profile d, it seems working right and I don't have > any more comments apart from documentation changes. I'm pushing a v3 with the news entry you had suggested in a minute. > As for vte, I am not really sure what the integration does and have > difficulty searching for the features. All I can get is that it > integrates with terminal and makes it better, but not in what way. As I > am quite a minimal, using dwl and foot, I have no idea how does Gnome > and Gnome Terminal integrate nor how to check if it does the right thing > with this addition. The main thing for me is having a consistent title for the tab in gnome console or gnome terminal applications. It also preserves the current working directory when opening new tabs, and offers other features. I guess the best way to know what other features it provides is by reading the vte.sh script or the source of libvte. Thanks for reviewing/testing! -- Thanks, Maxim
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 18 May 2025 13:54:34 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 18 09:54:34 2025 Received: from localhost ([127.0.0.1]:56706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uGeTK-0005Xm-57 for submit <at> debbugs.gnu.org; Sun, 18 May 2025 09:54:34 -0400 Received: from ditigal.xyz ([78.46.201.50]:43522 helo=mail.ditigal.xyz) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <rutherther@HIDDEN>) id 1uGeTG-0005XF-8C for 78308 <at> debbugs.gnu.org; Sun, 18 May 2025 09:54:31 -0400 Received: by cerebrum (OpenSMTPD) with ESMTPSA id a50fc182 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sun, 18 May 2025 13:54:21 +0000 (UTC) From: Rutherther <rutherther@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: [PATCH 0/9] VTE integration support / Shell startup files refactor In-Reply-To: <87msbinfb9.fsf@HIDDEN> References: <875xi6xlbz.fsf@HIDDEN> <87msbinfb9.fsf@HIDDEN> Date: Sun, 18 May 2025 15:54:19 +0200 Message-ID: <87a57am3ck.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ditigal.xyz; i=@ditigal.xyz; q=dns/txt; s=20240917; t=1747576461; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=ln0EewbIXD0kBPcdeTjJPgl5QksVuy+A+QNa/b3X86Q=; b=SWjWDLxlwcxh0PvD/T5lRjoEtHB7AOuHkMzf/ceeyagHOSVOtHd+v/SV2Vidw48Jdawb2 i5XAVSYaIKyO72XCOdSj0o0aff8tBeErqKE3jAGnDIR4DOXc3jXl/JAcdPTpkkrzHtZCrZ5 2VJF2KAnvRfJxbaPIXu1Xe3pjX57E1s= X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, I've tried playing with this a bit. I would like to point out that maybe it would be better to add extension of the service to the manual rather than creation of the service. Most users will be using profile-d service as they are using [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [78.46.201.50 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [78.46.201.50 listed in sa-accredit.habeas.com] -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ditigal.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: 78308 Cc: 78308 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, I've tried playing with this a bit. I would like to point out that maybe it would be better to add extension of the service to the manual rather than creation of the service. Most users will be using profile-d service as they are using [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [78.46.201.50 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [78.46.201.50 listed in sa-accredit.habeas.com] -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ditigal.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Hi, I've tried playing with this a bit. I would like to point out that maybe it would be better to add extension of the service to the manual rather than creation of the service. Most users will be using profile-d service as they are using desktop-services. So instead of (service-type etc-profile-d-service-type ...) something like (simple-service 'my-simple-profile-file etc-profile-d-service-type ...). As for the bashrc and profile d, it seems working right and I don't have any more comments apart from documentation changes. As for vte, I am not really sure what the integration does and have difficulty searching for the features. All I can get is that it integrates with terminal and makes it better, but not in what way. As I am quite a minimal, using dwl and foot, I have no idea how does Gnome and Gnome Terminal integrate nor how to check if it does the right thing with this addition. Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes: > > A full world rebuild seems very expensive for this change alone. The > only thing this switch does is cause Bash to source /etc/bashrc when it > also sources also ~/.bashrc. Since there is no /etc/bashrc in the build > container, we shoud be good in terms of not breaking anything build wise. > I got a bit confused I think. The thing is that I was thinking about other packages using bash. But as bash is not a library, but an executable, all should really be fine. > >> I don't think removing the PS1 from guix home bashrc is appropriate. I think >> the PS1 is mostly for foreign distros, not for Guix System, it's even >> mentioned in the comment that it's for distros that don't provide a good PS1. > > It's not removed, but moved, as the change log says for the "system: > Factorize bashrc default configuration." commit: > > --8<---------------cut here---------------start------------->8--- > * gnu/home/services/shells.scm (add-bash-configuration): Do not set PS1, now > part of %default-bashrc. > --8<---------------cut here---------------end--------------->8--- > > Guix home uses the %default-bashrc, so it's covered. It's something > I've tried paying attention to, it's good you saw that too. Ah, I've missed that. WDYT, thanks Rutherther
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 14 May 2025 13:27:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 14 09:27:35 2025 Received: from localhost ([127.0.0.1]:41525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uFC91-00055v-07 for submit <at> debbugs.gnu.org; Wed, 14 May 2025 09:27:35 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:45229) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uFC86-0004zM-Rp for 78308 <at> debbugs.gnu.org; Wed, 14 May 2025 09:26:41 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-7390d21bb1cso6807575b3a.2 for <78308 <at> debbugs.gnu.org>; Wed, 14 May 2025 06:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747229192; x=1747833992; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=eufsRCHIFzYwv5gS6LtOMAF/T9v1rolVh4s9WYH/I8E=; b=g5yu/8rbJqOvHJZNxVseLCndHAHrZ0p84ASS2WlR3G6EeRt8yQ3LV8MWjAXdySfgn9 ODpnWFM3LYcyt2IF8JKoneEkPb/HovqhhdpmFT4iTjVTy7bSpeRPmX9LLeopsxN7mKVs Q8z40w/Ek5VMhCWatS9so90+IXuTACNlOsWrRYS8IoSKcPXaPCSl6nTrK+RT16bEoOEW Yp1wTOR80VDmh08xthKy2Oi6BW/Cr68MBURShqKa3V5hoaUiLBlFYKxQxJTHNAX/ovdT 3r0lZpxmSGIlH389SrJqili2gnptJy+W8IMdbf9YbCFAF1OKhFyDyLs5cJuUY5hfrJeK 1Xbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747229192; x=1747833992; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eufsRCHIFzYwv5gS6LtOMAF/T9v1rolVh4s9WYH/I8E=; b=Tb+fkq2tEd8ROkaWXVUeOe0EnbCwdTQapTuierxAyenSJjcb6siDmK9PTxKQvkANOi ExUw/Nw3S1HG4mf4f9vQK/ievBXlers8OQSBVf7s/ttKTxXWe8q4H/xYuj42IPi3SDaD kePxTG9EnoCZqoq0JiK74anXaSTZGOd/EQh4DGTcBKq0F+zia3emL7tvF1MqkznAM3Gb yTJkcF37q56+vw/ZbTmUcXpFS80yVdLfChFAYwQ/0YwAC4CiaAOXBE/ssTkSLRxUqVNp BgzA5Diqk7u9xAZ4YRR61MvbP3bMiqelF2K/InfytEWmvamJNs8ulgWh1SYMgtJnhJF3 YL+w== X-Gm-Message-State: AOJu0YzG2neJ1TmGROVpagKp/9/lad9GOgnSYDWoRI1DFgtazCAtGuS1 rSBaSt1lf86dEvO/LIoVh6RR9GlsAEBk72AxsYyTtwSj+0ycvOjw X-Gm-Gg: ASbGncs/KjPh2FKejZeI7R5xpWCZY31Lnsl/Es5TEwqCowZGks1fm3aClmJnosd3fOn 6VIfVkoWJwM3VD3ueecBcZQejccXR3W1OwTHGvElNuYjDvEPdHtihJkbN6h74huYxqfPxjdOddj y8BeW5Q9t5n2/z51O9Wsh+GGDRF/cPI7gpRvhQzFkWELfzurJxs81nOaj8MXsWX4flu5uJ0zqpL +M+/wYZJfDcIzm5l95wIFe+wxRqYwwtqxR+zBDpDTbyaMdra26SyUXeoK0v+0Oh1ZommHPj4vES lJ/SYzU8h0ij0Qfxe8bBQ9F0uO/+ld+eoDQHW1E07VE8jeUBgA== X-Google-Smtp-Source: AGHT+IHQN7l0tkYWkEzO/5SWCliOW2BoFGK/0ADYkr4L+pzmgj/MO5pUV0c/nBCgu0KJoAmWrWWg6g== X-Received: by 2002:a05:6a20:2589:b0:215:ce2e:8b1e with SMTP id adf61e73a8af0-215ff19eab0mr4708756637.26.1747229191948; Wed, 14 May 2025 06:26:31 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a1088csm9399865b3a.113.2025.05.14.06.26.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 06:26:31 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: "Luis Guilherme Coelho" <lgcoelho@HIDDEN> Subject: Re: [bug#78308] [PATCH v2 2/9] services: Add etc-profile-d-service-type. In-Reply-To: <D9V0WYAMXEC8.23L1TBX8FEY6Z@HIDDEN> (Luis Guilherme Coelho's message of "Tue, 13 May 2025 09:15:16 -0300") References: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> <1492757e33cc1159cde8a144cbaeca783c1012f1.1747103508.git.maxim.cournoyer@HIDDEN> <D9V0WYAMXEC8.23L1TBX8FEY6Z@HIDDEN> Date: Wed, 14 May 2025 22:26:28 +0900 Message-ID: <87ikm3migr.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Gabriel Wicki <gabriel@HIDDEN>, Rutherther <rutherther@HIDDEN>, 78308 <at> debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Luis, "Luis Guilherme Coelho" <lgcoelho@HIDDEN> writes: >> +@example >> +(service etc-profile-d-service-type >> + (list (plain-file "youppi.sh" HOW_IMPORTANT=very"))) >> +@end example >> +@end defvar > I'm not really doing a review or something, but thought it would be > pertinent do say. There's a missing quote before HOW_IMPORTANT=very. Thanks. Maybe I'll get it right in v3. I probably should have just copied a snippet used in the system tests to ensure it's been tested and works ;-). I also forgot the news entry, which I'll tackle in v3 as well. -- Thanks, Maxim
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 13 May 2025 12:15:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 13 08:15:30 2025 Received: from localhost ([127.0.0.1]:58523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uEoXh-0002aE-TC for submit <at> debbugs.gnu.org; Tue, 13 May 2025 08:15:30 -0400 Received: from layka.disroot.org ([178.21.23.139]:51136) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <lgcoelho@HIDDEN>) id 1uEoXc-0002Zz-Hl for 78308 <at> debbugs.gnu.org; Tue, 13 May 2025 08:15:25 -0400 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 7CB072616E; Tue, 13 May 2025 14:15:22 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id oQRPYcTcahGO; Tue, 13 May 2025 14:15:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1747138521; bh=3DobkAqUwx/Am7/SKyGQ5OnXYnmajoSNORbU6/sNdWM=; h=Date:Cc:Subject:From:To:References:In-Reply-To; b=VuCFnfbzcOJ4Xt+ef77KGj5kGSAMVeG8Sep2VhmyAfcYl/HC0lkz9vchfjMRhxjOP k6AVnUM2QZEq1U94Iy0E3myO7KpejIPeLmpyYZy70j+a4O3C88rR+TK5IDZ8GQfJlL FxkrWoFzc2cJA2LulU/XZJaNo5yIIXz2NCILpsQWYFv7DNPOjbhUh28HGMrOp4PM7i /VIPVEswQKWkIs1JAS+DeWDeUhMhAZ+BAFo5VLAwl8gB1uk2cjHL8cuQJBji+W6tqP O75TdizN3YTig4Fu3S6xs72OLGb0DNY7FDdbQcPGI5Z4x25Ol/ejv1ln9YQftjVFUD OiuYo2ngYvTsQ== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 13 May 2025 09:15:16 -0300 Message-Id: <D9V0WYAMXEC8.23L1TBX8FEY6Z@HIDDEN> Subject: Re: [bug#78308] [PATCH v2 2/9] services: Add etc-profile-d-service-type. From: "Luis Guilherme Coelho" <lgcoelho@HIDDEN> To: "Maxim Cournoyer" <maxim.cournoyer@HIDDEN>, <78308 <at> debbugs.gnu.org> References: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> <1492757e33cc1159cde8a144cbaeca783c1012f1.1747103508.git.maxim.cournoyer@HIDDEN> In-Reply-To: <1492757e33cc1159cde8a144cbaeca783c1012f1.1747103508.git.maxim.cournoyer@HIDDEN> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Rutherther <rutherther@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, =?utf-8?q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > +@example > +(service etc-profile-d-service-type > + (list (plain-file "youppi.sh" HOW_IMPORTANT=3Dvery"))) > +@end example > +@end defvar I'm not really doing a review or something, but thought it would be pertinent do say. There's a missing quote before HOW_IMPORTANT=3Dvery. Best regards, Luis Guilherme Coelho
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 13 May 2025 02:32:51 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 12 22:32:51 2025 Received: from localhost ([127.0.0.1]:56336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uEfRr-0001hI-4w for submit <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:51 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:56552) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uEfRk-0001gN-Cz for 78308 <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:44 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-7425bd5a83aso1828454b3a.0 for <78308 <at> debbugs.gnu.org>; Mon, 12 May 2025 19:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747103558; x=1747708358; 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=MoAMoaEusKroBnrdKiR5DNzke0YokH2E1H9vDfTJa6c=; b=Oxrw+VkfoUiL2OYshKvRArMg6gpqCUB7VsqOh65hFIKlCH4nBppebO8Aug1l0f5Hye l981qTVf/a+cuk8PBcobWqbqHknswcgXcDy71O5TfmPKvvZbdGm7uYF0lw/QhnRCko9J s68vT8OpHid2NA25GKmYuuvtqZwuryLbu1Lj6axSkGfhK67QHcinrcGMjyKVljyBViRX wsB7IlAHE5+dCtFZEempbcZjo8NPgT0DFqPEqw9d2vwNpUaVmnQPAva3b9nwEauolM+2 dP9gguDVvUjkVn2P4Oth1XeH1atz9mIpkDugQZorNzZdRZ5DIu/L4nKobhvyZ+XEyNfR FaKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747103558; x=1747708358; 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=MoAMoaEusKroBnrdKiR5DNzke0YokH2E1H9vDfTJa6c=; b=bLpk9J1rYAAdMt3FiRzWyJaW9vfX9zjpaJdFO47U8Ir6K0EWownwpVlV10FLROtDy6 TYkkcqqGnRjopdgODWWlJ7zMsZEmJsFM1eDvsXcJeBZJVVoDp5Hh40iF4d5fpzktr1v+ XypYh8wHNVTUcPMDK5gr3wO48Ctx0B1/9NCGxs7QsjQvV4yFPhB6bdKY5tCZSxCPQHHr BOE/YEu0HP92FDIdxu+N5Rs3cv9lDx8CNtg5SS6Qzz4wW87wVEBOH9ZYK5cqTSBOiseG Rs0bJRwDxCtCgYhv+k1LJt+VF9q+WvoiHQn72CZmpfXgo/wI7PCNuSxu0fYXHdpc8fpP Se0w== X-Gm-Message-State: AOJu0YyY7yw65usQ2qOmda0O4g+yKfvZkyfXSaVMngVhyRphQANlm0/f wMaE+Fhx/ubrymDhBf3yh2lQ4n1gE6tNwmhX3+YXIVPV5W166TXKWTA/4NPT X-Gm-Gg: ASbGncukoYOifzGL9OWLIZIqhmppSe36LPrCRo48juXjoPPp8yTC7LGEnp0CDFVfMZA cFIt6HT9eSTI2FaecSDN5DVwgh4Wi3+pzJ2O8YG29moq4aR0iZsui3VLM6RMkcPWgYxQ9vR4Uy0 UsZ75bHjybOhAJLd9DrjCvABgUW4Adar5DSq47UWLPd9tLPGXmP0u/hih6BYypwrHNWZK5/Ja58 55MUGvOZY9c3qUvXcSi8aukP+Rz6L0kQlWFu9YRq/XYhqSeG9snnsshkjhPP60NYJqdnNibaVsQ q64mBnyepg65S2qCgaYiGvNlW2eC8pqb1NKySdTIWLK2XjBsjBBOLRAVOrVMGP7HV65yURs= X-Google-Smtp-Source: AGHT+IEhdAM+VuAr8lpZ/KANU/7NvRkPYWkvRRPNC0SSLc7iixU5IMKZmoNwb0nRAaZBwJuSGXLNXg== X-Received: by 2002:a05:6a21:3296:b0:1f6:6539:e026 with SMTP id adf61e73a8af0-215abb04384mr22733614637.15.1747103557693; Mon, 12 May 2025 19:32:37 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a387a6sm6947460b3a.137.2025.05.12.19.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 19:32:37 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v2 9/9] services: Add vte-integration-service-type to %desktop-services. Date: Tue, 13 May 2025 11:31:48 +0900 Message-ID: <97a0168581a8849007a14d488f446347d3c5fb41.1747103508.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> References: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Liliana Marie Prikler <liliana.prikler@HIDDEN>, Noé Lopez <noelopez@HIDDEN>, Vivien Kraus <vivien@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/services/desktop.scm (desktop-services-for-system): Fixes: <https://issues.guix.gnu.org/72172> 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. -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, liliana.prikler@HIDDEN, noelopez@HIDDEN, vivien@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 13 May 2025 02:32:47 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 12 22:32:47 2025 Received: from localhost ([127.0.0.1]:56334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uEfRm-0001h1-Ks for submit <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:47 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:44129) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uEfRi-0001g7-Ip for 78308 <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:43 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-7423fb98c5aso2911775b3a.0 for <78308 <at> debbugs.gnu.org>; Mon, 12 May 2025 19:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747103555; x=1747708355; 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=dfTsUSoT6HyssPfKpHTdpFPLK2IFk7JhpFbmEnrAPMY=; b=lmcG7KFLeXxjUlQp5m7iMW7ctwlxOLdr+BAgRQ5YCw4YgdY932PPE0jF+N9JqpbqU9 QELO1ghkfiIgtd/elP4PTzNYnGVjoQvinJIpbRqI4JZY9svIr5HHCJ2P69/WU3T33M83 iJsdOp5hMKb2b8UTFQd0JFDte+xSXgkMbiscGBNCP07rZXs/egYax/StBpneMHvOgNFg 4a9Yoiu/i4AjNQfjbJ0devCjLjHyLzwX8mJCLq6JIifUiTXg3F3EPVMoXM4AKfoRIBdy O53QzaATaxfdoJTbCrHbgx4fIZOkVZhWzSws/h/AvqlBxyIvUKy0F+G9rXd2hROwYbEg JHqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747103555; x=1747708355; 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=dfTsUSoT6HyssPfKpHTdpFPLK2IFk7JhpFbmEnrAPMY=; b=FbSey/VcPWAvM6UPPKkTBUa4Lm2SnAL8sCUO0z62hn9ziF2OKrTAd3j+Kt9hnJ3f5c n7/UjuKGam6M1GcsC81w8nKF6Y8YnWAnIO6fMjVpHNXcOyPtGvcnly4/PrrZN6gztxkZ XgdQzicKOmy94dYfP/c7HwkZpnNPSCV3QbEld/aNSs8DByz7UDuX7ILaRhvQY7JhuUdU EKwz3HFnlRXz3Jbc+NBKpAdKElU3moyUXSz1yUyW73zw/EE+ttlPHqbTBOeYIpO944xU MKT5Q1JKbeXm2L5QDJLhOz/RcjOggZ1pvruUxA35hwKOj8N08KbVXgzUUbG06iCi08tl A/VA== X-Gm-Message-State: AOJu0YzT3ZrqHOTGvKi4UnIiwK36neTppT9iaI6m8XHDHTY6Y56DRjTM WduFk1BJLDaXmPTtTA6rwSchiArNW0z1jCelYXUwzL9KZ9hXuuCDWQr+WRc/ X-Gm-Gg: ASbGncvYtU8jVMKtI0sXSQniicHPwnoQpwLgfTnerGWFqxo63pIfYlOBV14/NKFfJwM 5l4csqJxPWQ9YB0itoH3s0IU1bonE01pRhdS4bE7gYv4YhbWnw/WcW0fJrDhkZ/fSxwW/bdNo02 q+NN7OP5WCHFdSSnAURuP4enkaNNSDqWJcoNeqP/gG4mR/ntbj9yOLK2rmCnl0kK0axxNs3BQ0Y JP2vJSSB1ns0+86z/M9vwsq40IPz2eY18EHp9KUvXUlYCbbVVZLEsr8E073rbfZt3DfBo6mMUS0 w66rOzwfcRz8tcowpuX391slNyIPZ+5RlI8xO4v4UUCMNVS/gw8dS7LncUItHKBr6TWiPC8= X-Google-Smtp-Source: AGHT+IGez7ua1MjOYI6n7znYlTDOic7u+AeJwmL4eybBDdyUWTMQXNY6/oPSkwKQqV4Um4OxPg+Ebw== X-Received: by 2002:a05:6a00:450a:b0:740:41e4:e761 with SMTP id d2e1a72fcca58-7423c07be27mr19831759b3a.22.1747103554886; Mon, 12 May 2025 19:32:34 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a387a6sm6947460b3a.137.2025.05.12.19.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 19:32:34 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v2 8/9] services: Add vte-integration-service-type. Date: Tue, 13 May 2025 11:31:47 +0900 Message-ID: <40912ff35c97c933961c9d71e66369b8db9d94fe.1747103508.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> References: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 655eac6168d..591d42f82f5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47593,6 +47593,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 -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, gabriel@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 13 May 2025 02:32:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 12 22:32:46 2025 Received: from localhost ([127.0.0.1]:56332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uEfRl-0001gw-M4 for submit <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:46 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:58700) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uEfRf-0001ff-Bx for 78308 <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:40 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-742596d8b95so2660892b3a.1 for <78308 <at> debbugs.gnu.org>; Mon, 12 May 2025 19:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747103552; x=1747708352; 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=UTDWpJyyUOt3b/jDDYK2WtoZiOKFn6lvjIJd0edGsbc=; b=R199LNthuNvjQYzm4d2DuwbpenmrUyXYYs/6qLr8OFYcyrR5JY/a0iAx3/TVGZJXA6 0X3Lqzu/iQzaqN8V8kzgeTwtLc7ans64IurGaSsJRdF79hfJg3kNtCZ/UMhNAcALf1K8 NbryyKQ1BkgzuzDg9c/UVCS6qCSaYCDW+5UA5CspufSo14iRORyRehMc9S2xZNggwU0i fU13SQw++OeYA9KgwE5VPJ4Mk1y4YONXggi8evoiGv0l0H4P4sW2iwNfb/gKB+g2kcCy iuNiz4qo4eoVU7hYtlB6IlQVyMeRFbDyw4WOuSFdG+hupfc4PppacFLKrodkbydb459R KzGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747103552; x=1747708352; 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=UTDWpJyyUOt3b/jDDYK2WtoZiOKFn6lvjIJd0edGsbc=; b=MfpIypLUcam+A/x20oA6eyRHyNSfHj/Z6fb+qKHjKtsm3mJa8DHZlHkgg+PZzNe/OJ 192p7DykMowu0g3SOeBkWoCeRFMLZM0HiFOrut6noRhalMItbCECB8yBkcIfyNPxS3Jw 0mM5xRb5SJORmMw+3fPGAlmwdew+IXE2KhvzVdUEpBRbkWdjmu9v1CiYg141emSR0rM7 fQxvvUS1Vb1CnDImSf1Fcli6lnXuluvJKRc52y2JEVEfuDn6ikjiYGPPZbAGnbPLWRlj CSEqoBfPBOkg2/vYOxp+VHN+934HAfo365rDUwxAkKIXHBQznnx63OephIbfY5xIhpWg ECYw== X-Gm-Message-State: AOJu0Yw40WiYeU4dnXxMdCoTqkW9PMuixOE0lkkWaLXFuPgAeyi5+w9l 79pPPmTH+2659eqe6uI/rbpGPGE/6+9gZLdKwiq9yACbrwDiEXOlaOHC9VhX X-Gm-Gg: ASbGnctc9AtvL0wausgmWP6VMkJeMpd5KaBnboRSr6d13H7oeQjKuPtfPRYzZCX2ElL 7/JQtS6DLoxmXrBSDViSnIZK/SAqhteqDomLb5lvolfm42wSm3N/U/eVS8BGKifnHh912ldgBZY AnPp4WS9AG7cgqkPIcuosiZiJocyA8+7Z2JcduOLvGJQqkewiCqgD0MIEcBdXziwqFtqKCN4zcy zROUZg8efsh4ErGfOePJlRi+fUGy19SYV4al3l3AG63EIFUOLe6Y0LFO+cCi+UDu9LSdDsU1Vn1 b5c7Va9vCxeZT7GgSOD6bVejrhEFgzcZn74bffbFSLKC2nKKVx3yC0tJuVi0VvfN1sidvSg= X-Google-Smtp-Source: AGHT+IF4uGT9y1TvKja+6Gv7rovyKHueDoS60XvBP4MbnkeVB7atMSc5bBBqC4B/6eQ+JX+0fdzF3g== X-Received: by 2002:a05:6a00:1488:b0:730:95a6:3761 with SMTP id d2e1a72fcca58-7423ba87372mr24762943b3a.3.1747103551978; Mon, 12 May 2025 19:32:31 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a387a6sm6947460b3a.137.2025.05.12.19.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 19:32:31 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v2 7/9] system: Factorize bashrc default configuration. Date: Tue, 13 May 2025 11:31:46 +0900 Message-ID: <dad4d0f2feb7901678cf0e61392926871b41a1d0.1747103508.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> References: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Hilton Chain <hako@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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): <profile>: Guard against souring /etc/bashrc in non-interactive, SSH case. <bashrc>: 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 28ce18688e7..655eac6168d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47581,15 +47581,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 @@ -49215,8 +49215,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 @@ -49224,7 +49227,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 <home-bash-configuration>. +(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 dfb96b1f0cc..adf456dc99e 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -4135,7 +4135,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 50ac102707e..03af193f36f 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -146,8 +146,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. @@ -164,10 +167,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" "\ @@ -288,12 +292,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 edb7e9112ba..85e5b954b90 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))) @@ -593,14 +595,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)))) -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, andrew@HIDDEN, gabriel@HIDDEN, hako@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 13 May 2025 02:32:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 12 22:32:42 2025 Received: from localhost ([127.0.0.1]:56328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uEfRh-0001gZ-Vk for submit <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:42 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:47414) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uEfRb-0001fS-KO for 78308 <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:36 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7423fb98cb1so3285702b3a.3 for <78308 <at> debbugs.gnu.org>; Mon, 12 May 2025 19:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747103549; x=1747708349; 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=K1zgxA3JygQVWUgyv8FXtsicDjog+fJkdeoHSsxm4Fs=; b=kXNJdB5GuDP8lhNQ3jTXMw2zTYEJkOXamz80568bXPZsfcx93yHUdUtdjPZsIQow5t BtQ9/aZ+ePLKZFaFheOuLU7MnbgBq9QQ/knN0j1QXRc+7RLwvx/+HjIti2c4c77zV3dT g2yGPP7er1t9jPiyO/jXcr8XN7FoRokN534DxK9jb6W9YmftBpuoFVNEQj2MEi+ozzgB bZuZASBmu7ZaWVjx8taAH9i3jcEhdpMnK4/X4dvL1p5Zrqj1it2h33gdxsQCCN2ODfCr xbDezjSGAT50ONQhVOjaG7pAQXmqo3N1tSWMtD5badjmFRgK2gGngp/gkYgmfAh+EJEG 2+rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747103549; x=1747708349; 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=K1zgxA3JygQVWUgyv8FXtsicDjog+fJkdeoHSsxm4Fs=; b=TzYbliZly/jJ6/T+yOWiSaRS+Zv1Xu2N10MtUexNtqI/tWUa7kkokyNLEVAah4g1vs RaaHlhhg5yx8f0tiWaZz8SudSXWY4mc9ZPDhFDTzii46gKvSGVrtOBekgrqcDPXmEJXl 6yVYDJ9JALUir+qahlEtMM93HPKXfAd2ipfNIcq/Qt2O2RS+98Bn9phePsk7aF3iS23Z 1pWaKWWqmIrlsTjYeo6KxGi++AD+NitUT/b/0i7jILqyaYYKzJWsLQRA9tOytAGw12au OC5KbrMjq613xvtmz4yVmGhGE5ouIykSL9saVlSRKVDcYEbUMPLpwBGOQ9mLxbr0IaKo 04ew== X-Gm-Message-State: AOJu0Yxuvo6gj9PLawcK7Xa6y00xN9Nfu8pTdVGBZ9JSRQX8DEsQj2FF T6j9VKxLYe4yGh/o0CVbBGGUutZ7MJG4H9yfOSWZA0H8BWpzbPpdUiC4qa6t X-Gm-Gg: ASbGncs6KlejRd8Ol8A1BKZ6BSXF/Jy4zdobfBUPrgKxMX2LpUCjWhuR7fkz2vg1kjs YbbOBK8+4HWcVkEtmYZVXHkjaGVPvvnhEUOoyeEUXzLr/MMhkZNvda3Y5l3VL70HBG9wuDiZTQA o2XfH5bVfFzLvoSFGFp5nMzbHobxRNhsLRGLeLeuiHPuGDxGrbReVwTye1KCEuCj5AD8n2A3f4I 5DAs+i09i+82icdPetp2xOlH8V2zaQkkzrfcwcf05eW/VXDHInxzWtSARSC0PGdxIAlB6k7GBKl Am3i4drZeYY33L5OJyOtlnNelqWL23DPbhIR3NIp2xzW0upl1NmW7Mz6az/1glHfsp/emRX4JJv saybqXA== X-Google-Smtp-Source: AGHT+IF1azktO6i2DFDWSp85eyLw2wVR9qW/xqNHLp6WWKz9Hfkhi5hzcNNXk8VTu8rJto7HvI+33Q== X-Received: by 2002:a05:6a21:348b:b0:1f5:7b6f:f8e8 with SMTP id adf61e73a8af0-215abb51860mr22693913637.6.1747103549104; Mon, 12 May 2025 19:32:29 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a387a6sm6947460b3a.137.2025.05.12.19.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 19:32:28 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v2 6/9] system: Migrate sourcing bash_completion.sh to etc-bashrc-d-service-type. Date: Tue, 13 May 2025 11:31:45 +0900 Message-ID: <30d609e7beecdee13f99bbc2be247eaa02a72bcf.1747103508.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> References: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 559896ff3a1..28ce18688e7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47578,15 +47578,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 -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, gabriel@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 13 May 2025 02:32:37 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 12 22:32:37 2025 Received: from localhost ([127.0.0.1]:56325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uEfRd-0001gA-8P for submit <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:37 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:45521) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uEfRZ-0001fE-BC for 78308 <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:33 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-7426c44e014so1567050b3a.3 for <78308 <at> debbugs.gnu.org>; Mon, 12 May 2025 19:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747103546; x=1747708346; 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=Cvm1CPKNn9jHDNUZDZk3UuleRAtzamqhVw6D97Z+UUY=; b=b19eSBn0tk3lyreN0oVMC17z9/hmOiuiuND517MsOzp1Bf9aHZI20wd7EkFxNIFQQB szYBpXcHYJt1sbipKzWRXlxrNBckBiy91lm40mpdatJNG4esX7pHsiYRFI3uiIimzVKI adxRTTRDs9bnCKUCyiUfBaOGJfYvTxa+yKWID7ASenD33p/duVxi08COysXacLy5BMOE WzmqmLbbfPjP6F/jEXgeS5EWw/h8sb4RxrnGhCYJuOgjJyr2I5QymhLD/71AWWFCaCjy WnlwQ3GWQguA8JlVSewwfZFjP7RM+oYecm56Gxt/DVOO98noLd+Sew9e5KiOPV1Frjer mHCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747103546; x=1747708346; 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=Cvm1CPKNn9jHDNUZDZk3UuleRAtzamqhVw6D97Z+UUY=; b=H+qmfUpLyhQ9Iz+OAdlrRNMcKLcH/LnfqXGYUOH3RqTydcfdQNSmfALriCYnv8YCMO 9c2zjCBeFI8UeLxdFsjwA7meXoiZW82wEi7xqux1NE0m78I+qyNhLYgHStM+BJ4/48G2 K/k3md8u6NtgGWCsERY8JhANZLFvR9b21gsxFMs2KxW1ZGplI/GlmFYMOFIO3GY6Jnge E859dJiUfdbVLohZbs7a+NRJx7EhV8yTDYx9w+bWL6OuQQiWtlTsKAJO6ken1TmkcSL8 wg76ZkN1THelZRV87FFDrU56Gw7bZe3r4rtyTBafgO+dnCJCNswxYXw9nvxRGl3JSv46 qcHQ== X-Gm-Message-State: AOJu0YySeTZEpT8PzrQea6CM5cgcCDaUFR6uaJKoLyZCOPP9QjaYAQau fozkB8D0MwWpbYUpTCkmZGjsY3DmZ69qzsdcNNQVIG30drUqv7s8i5w/JnKa X-Gm-Gg: ASbGncvjanXrsDKdcIYXjs6jAr/PbztRWwXuPcT3elJde5dEFONKyX+oaL89YC5rZ6s xQqzkxV/1PjkAbq6IaP/eH/cgnSDNY0pDAekrWcakOgR/NHa6y2wkEME0fAMY6lIPHLDRbkSlIw RGavVFp1Pln6BEEz+94CnEpUE1LlTG89bizdg5SfrrMy+kfR103QXtHrCz51n6zY0PJj6EJ7aj9 HW4UDB19mfyqZEl1ksuocW4dFfyYvhXshzVT2KWQSdk6cC7et/EVUN0ImfnobVRvybq3eBYHgmp IraQU4FWzmnc7cIK97X5PpcUlRI6uy21muSvRdaSC3aIGkTaOfLgCTHBg1C9f5lZ4BD7R9g= X-Google-Smtp-Source: AGHT+IH47td4drjSFhri6FRy0SL03kWV/9WsLnf+8QHPMAz392115omO8oBvkoY3uaDY/DeeHic4xg== X-Received: by 2002:a05:6a21:3a8a:b0:1f5:87ea:2a10 with SMTP id adf61e73a8af0-215abacf107mr22052056637.9.1747103546153; Mon, 12 May 2025 19:32:26 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a387a6sm6947460b3a.137.2025.05.12.19.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 19:32:25 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v2 5/9] services: Add etc-bashrc-d-service-type. Date: Tue, 13 May 2025 11:31:44 +0900 Message-ID: <761645138055776938dc22fd9b78209b168cb00e.1747103508.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> References: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 2f80b2a0296..559896ff3a1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47572,6 +47572,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 988212b4a7a..edb7e9112ba 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 @@ -572,15 +585,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))) -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, gabriel@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 13 May 2025 02:32:37 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 12 22:32:37 2025 Received: from localhost ([127.0.0.1]:56323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uEfRc-0001g5-Gr for submit <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:37 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:61605) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uEfRV-0001f4-Tj for 78308 <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:31 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-7424ccbef4eso2532496b3a.2 for <78308 <at> debbugs.gnu.org>; Mon, 12 May 2025 19:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747103543; x=1747708343; 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=U7P3h7Qoa56mNR9rOI7I5BehcqHV36QNePK7+UGr1HQaLDE7Ud/Rdx2Tqj3EKgtbFq 8+A+5Qkgt524zsu1ucwvFaWXSUT8nkz8cvLJfpCeR8hGUT03V//sApZQQgFVL+a+PJxF HbZw6IgGGuJUF7feYtjC7Shahv5mHjsiodBTlDIGf/2WBSRX+xvDDiMGqiBX6XgphcCY Lf2ngoLkaSPqQuRKCtThGpcEyfMLkzjHU3r8Ju4+264y5Bs0KaTwOK+ANNtmD4JJsu53 VnEOQPwMToPvXGh/LIusuEVvVTtI6LR0PVAxBZJx15HZy7yOK8owRBy/YjQg/Ug8pI01 I59g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747103543; x=1747708343; 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=PcLF7VMVehal58iBN15Nzr1ZI+WqlHJrOnX54Hx/Poq+kTzRo8qXhMQekzZO5k92Ua VXqlXA36HNGjUJFzG5JXGcLlu0CoFLQHVNDCP8w3mz/osyJ5y/dIyKftFD8LOEntfNYL u1Pj9RppxJ7OYaT0DltchlmYD+dZzmvIoL6DDWaEPdQ0BVYsY9BjwYJYCfZqxcdy/4mT 4LeLiy6sAORuMFhI17Rrc8XTdx8/XuFFrpynJUB+zLrytXzYpAgJzmnrYvk89a6bO5Ga eRklo/boRFW/ehGNSl6cTScSSDsLdkEZfU0i5TGbwVJK4RghQU7JtEbWbvXNmz2koRxS GcnA== X-Gm-Message-State: AOJu0YzbtWwbQWRhy1Py9rH4LDd8kuN96Zeb9Nr4QLg83DxmCPsS19ej CmY2Mqk6IAhEO3mPfH4ev7o5BoVufR03g+uuGHW7lidBj78mxDGnYO0KeS81 X-Gm-Gg: ASbGncsdiyH4TUx1oETYWFKW9ymR1l5584bjSOFDGlJ/v45VYMcOYI/iYWmDSw8KWwc He+vsZFM2+GQkWLAFHuMFtPYZ0/s27jVbvTJqIEQ3QnknIe6DS+OWDNYNU7acjqVfHKKwW/qLwF PG5AC0GthDdC35Ec4oNyAQMwU23VwS5+ucmDn4+SpJ1J7OMSH+EQa2dVACOA3tAXavkj/31owCq qKUc7nrXAJEoDkxaCuohrNVjwqAKYsYSX53I6WSrKMHo65dT0sjMwxfLSG2roAV2iIvYpLHt7kW d9jRbIyiLCpdnur5HlbVF5RqgjyfFsezUizHB8vJjDY89kNasZE+yDuWdZucMDFePc8uOv84Q7N pXspLJA== X-Google-Smtp-Source: AGHT+IGIqLLA4mlbAKQ1UIl0f25O2dk3xZp3kotOD1VagclTjDT4yGD1VL0WLBHViBzNpxY8CwisOg== X-Received: by 2002:a05:6a00:4b53:b0:740:9c06:1cff with SMTP id d2e1a72fcca58-7423c0163dfmr22055757b3a.23.1747103543255; Mon, 12 May 2025 19:32:23 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a387a6sm6947460b3a.137.2025.05.12.19.32.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 19:32:22 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v2 4/9] system: Source scripts from the /etc/bashrc.d directory. Date: Tue, 13 May 2025 11:31:43 +0900 Message-ID: <19720935b288333559f31a7b4f818d8607923500.1747103508.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> References: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/system.scm (operating-system-etc-service): <bashrc>: 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 <dannym@HIDDEN> ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@HIDDEN> ;;; Copyright © 2020 Florian Pelz <pelzflorian@HIDDEN> -;;; Copyright © 2020, 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN> +;;; Copyright © 2020, 2022, 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <jannek@HIDDEN> ;;; Copyright © 2020, 2022, 2025 Efraim Flashner <efraim@HIDDEN> ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN> @@ -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")) -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 13 May 2025 02:32:36 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 12 22:32:36 2025 Received: from localhost ([127.0.0.1]:56321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uEfRb-0001fs-TU for submit <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:36 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:44116) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uEfRT-0001eu-1A for 78308 <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:27 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7423fb98c5aso2911679b3a.0 for <78308 <at> debbugs.gnu.org>; Mon, 12 May 2025 19:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747103540; x=1747708340; 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=0MLMMcxxWctW/jlInP2ZCILiRjJc3AJ1xuGwWzje7Pc=; b=jCuwMDHRw/Aly4/u4KvktMOdoIMC+76zPT9SVTCkGZs7x2SaXxvnqkGZ/PFELHWbpc DnHiWEgZwZl7L9soD1F7npXLp4mY6/jK1+gcXAHaQDOUGta9h0rrqDniDhfFsoX8w9Bb cUFyT8ec4iRUt0UOw6Y6B1x3vSxXZtuisZafHQgwbMqo5Mo8whvf8c7lTz//Qo6uFv3Y D/dLYXO8unXm+hTcLrL6+SeRigubxywxRqViacnEsPMFA9oP9u7zsuJeAXjQPM8y57fU u+5MZXQ109RDySB9RH/2ZRXybaBhreizPjnYsJ9JjXQRDo1en4jLeNNGcglAYB42C1qb SMIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747103540; x=1747708340; 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=0MLMMcxxWctW/jlInP2ZCILiRjJc3AJ1xuGwWzje7Pc=; b=TZEWh6Ls57CecyRfAzi/VbGDAVAqTNGhAaVPIMETvKM3KbiDPUnoETL1NgycX+RjIW gHPdBBz2MqlumGojlHsuqh63H5CrZ6Cgn9016rs2OkwD1uJc6pki6DTtOX2qZWbBOkrU wb1x6Z+JcY9KC61zvV3EcjcinsD1V3vVwTqN4nwns94vBwTgEsH7QNfs77TrvXJZLvOs WU8hNg1OM+1SAiaM/Gf09k8ePRNk45H2AR0D9M6FEYvNKjWx482ZaJQktqMmrqhdJOZM RW73ptXoX4PjcvWwrB6wq+0mtCf9IGwViMBlH7lOZnJ64g02o2V8g/qoGoH4nrtAXrj0 ncIQ== X-Gm-Message-State: AOJu0Yx4gvpr31GNQmTgjVFBMMd4MI7/gnb63QxBzUgFP/staql3XUOg DTXYKqui6/QLzodseYxPGw0QVbBJ5hD8aURcbTTu3GSr+9MBD7agvWXCNz1W X-Gm-Gg: ASbGnctZEOu+YqgK1I5KZwPUJPtYy/tQ7PmzsySn10P1MpXabb/Ox9/gr+ET6B4qb31 U+fxeVwl3Pf/+YSKpMZnu+5Y9my8Vt5HyIxjm4Kk6zCHqCHm7sUxqWavh6sKgxD0KcKEXZrn9Qt zcaIjPIeT1jb/73ZYDSOIvop7Y0grpNFbETzQdNNw+1x58SoK6uInKlPqsGA2x65Pes1Yp1BK6+ BAA/eOKcX2xxnO3kNe3s54MkdPOpUT0jtuDPHp/w9fQYepSWN82RGuS++WF00ZX/tU1bxNdj9Oc dgVyLn9KMN0pe8Tl5ylyEkRk0SKVBoo3gC1IpI+I4lQGKsVXciTaFzEuA2xzMOOPzu2TExYQklm YLkClrg== X-Google-Smtp-Source: AGHT+IE0CmbVYXfqbFg/v8BlcH8n2V73YbN7qjy1aS1wdPPRTb0OhLxnruWwE6eSNVQG6Q7fRo4ONg== X-Received: by 2002:a05:6a00:1253:b0:736:a82a:58ad with SMTP id d2e1a72fcca58-7423c054153mr21684228b3a.15.1747103540432; Mon, 12 May 2025 19:32:20 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a387a6sm6947460b3a.137.2025.05.12.19.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 19:32:19 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v2 3/9] gnu: bash: Define the SYS_BASHRC macro. Date: Tue, 13 May 2025 11:31:42 +0900 Message-ID: <58b6781fd2f0184f4f3c82bc85f84df9220acc43.1747103508.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> References: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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 <go.wigust@HIDDEN> ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@HIDDEN> ;;; Copyright © 2024 chris <chris@HIDDEN> +;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; ;;; 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 d0f1b6b2b14..50ac102707e 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -164,9 +164,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' -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 13 May 2025 02:32:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 12 22:32:35 2025 Received: from localhost ([127.0.0.1]:56317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uEfRW-0001fT-CE for submit <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:35 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:47419) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uEfRQ-0001er-Ea for 78308 <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:25 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-7423fb98cb1so3285550b3a.3 for <78308 <at> debbugs.gnu.org>; Mon, 12 May 2025 19:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747103538; x=1747708338; 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=sr8i9WlrVK6qoTRljMxFioJyNQBxdICkoH6x/AADZdw=; b=aFx3wvP0W3ob9fodA4OhikpfJiz1QW4LS2SqWBQLlYHNRvIb0s8ol6lRqzR0oYBo/V 3n0XR5E31whdBftW33YjL0t71ZLJjnxacpOJSV07+gRRwK/boRgl/i6seD9i6pWS0wUs RzA5GlKRn6lXWI76VHuqt6meGUfUXesVBnJyj1sB4uNSwwLAa3bxiyPdOL3HSBjXOc0t hVHPpF783NQAjosASVyfPPsRNqCosk8i33UsfBTJGC88NZ3Ni0HevWYT0a7wub2GTQy/ FyPDlkLv4vebDWHqbM+umoBMquznszX66v54t391N4ESQFygO0Vo/KhOcxXYafTatjLq 6tAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747103538; x=1747708338; 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=sr8i9WlrVK6qoTRljMxFioJyNQBxdICkoH6x/AADZdw=; b=mMLa7sIj9Tw3O2sMsHBtrWwG5o7eE8EISXaaiCZq3XmNpyqBRGG3mAgMoW1WSoC9Pk jm5i7oG7/o4u9thHPGkqDW++ZD60z6/GtwGIkwvuhNRbx5kOcb6L708jiEwrGWcKBLwE okF7JN46UoIa4TvyhRdLRmKOAUPldA6CH6B9Cy9VIGBPMxDuEp6hyhw7xy5WDEO8tcZS a/oFQq3g6Ukg9TDwoxWwapvC+Gwgij1o8AbgQWPWToNE+XY3Hz7rqgDAM5VNx2dOADPg AmeBlkVxBeWBiNki7sBmxoG9PPvIQnV50PsKcITHMmd3CMCsUsPIuSb3h/gzuD2+NRal 1+CQ== X-Gm-Message-State: AOJu0Yz3wpOTqzZ7XdzDcn5+q7pynsJkMUXkXCgLLWcG1vUDvCYBwddp AWhumATBU59lNZ2RouL+EbWFyWrK1XLfCMnBx49t6A2o3garv0mN4o/JnPf3 X-Gm-Gg: ASbGncv5JTKkCQn03vzlo1PhI4tlu+vYRoLmdz3PMAbfdkGurb20R5B3oDxPrFjsyYW LK4XPIOO5gPH99dGgpWa0StkT79v6xl26CWiSFnundrC08YzzPkW0pGi5uAMjgsB44YM/9mJha1 W8k4aks76yqu7fw6hpHcivPsW+wWnDY533ujAvQ/PKPceI8hO681rP2Ww8FdbJdiilEunxTsDtw HVr6YgvU6d/a/IXVleachnEnWx9bSwPQO4Tu/Rcp4WMM+hpWZpUUn/ELjd/b+zUDG12o9ntpPba mjOA6q0salQ2TiiK3+bHl07duZBFEGI1LoThmNqBESCMXAi3eithjpm6a8yCaC8sEoHfkKM= X-Google-Smtp-Source: AGHT+IGULyFZG4xvMPkKi3sars85caOzp5DlPZT43pUAIBycblHu2h1PuV/bnRo55J/Ylpww9HUghQ== X-Received: by 2002:a05:6a00:148b:b0:736:a540:c9ad with SMTP id d2e1a72fcca58-7423c073074mr21735549b3a.20.1747103537608; Mon, 12 May 2025 19:32:17 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a387a6sm6947460b3a.137.2025.05.12.19.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 19:32:17 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v2 2/9] services: Add etc-profile-d-service-type. Date: Tue, 13 May 2025 11:31:41 +0900 Message-ID: <1492757e33cc1159cde8a144cbaeca783c1012f1.1747103508.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> References: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 | 21 ++++++++++++++-- 3 files changed, 97 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 34092a2f735..2f80b2a0296 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47556,6 +47556,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 <me@HIDDEN> ;;; Copyright © 2023 Brian Cully <bjc@HIDDEN> ;;; Copyright © 2024 Nicolas Graves <ngraves@HIDDEN> +;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (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 20fc848e5ce..988212b4a7a 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016-2020, 2022, 2024-2025 Ludovic Courtès <ludo@HIDDEN> ;;; Copyright © 2018 Clément Lassieur <clement@HIDDEN> -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN> +;;; Copyright © 2022, 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; Copyright © 2022 Marius Bakke <marius@HIDDEN> ;;; Copyright © 2024 Dariqq <dariqq@HIDDEN> ;;; @@ -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 @@ -563,7 +571,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))) -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, gabriel@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 13 May 2025 02:32:27 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 12 22:32:27 2025 Received: from localhost ([127.0.0.1]:56313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uEfRR-0001f6-Ku for submit <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:27 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:42468) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uEfRN-0001eo-W9 for 78308 <at> debbugs.gnu.org; Mon, 12 May 2025 22:32:22 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-7398d65476eso4241952b3a.1 for <78308 <at> debbugs.gnu.org>; Mon, 12 May 2025 19:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747103535; x=1747708335; 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=guB94YjzLRAnXEpkwzP6Zr8Mr7TapzYXpUQz1D7PKe0=; b=aUzCb5QqavYjYBOHeRj06gQj/nZx3qk0WvsVEeYbE9grI5laTLEp3yinb8WnTwnRT/ x9IR3ySLaw6b0L2vMEkKNpOTzSCKzKHEBzy1Xy46ehB2Zl4X2X2fc8vWo5aAavz/iiaI TkteR/gxtq2X6spQ+f4KnV4DHr5eKT8UAfXg3zbXwY1BUWwK6qE2bzWUoioHrTzVYWGI /VDnQ0/GzX99pGQnAGbo4dBqOiLuKgLbq3+3GmeRXvob7305KCJxWL719gfCCRbOwR2A q1+5sxS2U49A7DffKRiFWeYIDy31a4c/Mda7lw8cQidsaauSqumGjqPS5kywdEFu/+zp 6UWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747103535; x=1747708335; 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=guB94YjzLRAnXEpkwzP6Zr8Mr7TapzYXpUQz1D7PKe0=; b=eCUS6EYjZ5VWnNdiPS5Ec7lfU7uKLSIyLA1cse/ZuUnpIRFopLK1/92kZDlcYz11KT qrsS9ieiGl9tV5Mx/wRueiUTMvLYl6oL9nQPVYdBuSxv2pfoaBpas3rAFuLxYRNCSzvF IcQe3od0jOxd/fL58Q0Gh80JoLFDcevmyCLUJmgR0W44xwwM2DJbhf3T6VH6x+SMQPfH ky2B6N6tPKoWv8xN+E2URiMfZiu0B3J3Zt6WbQ70fHfA0PNQ1p1muMRTscIEFYzsPCOF bTqCtzFNv+aOWlmgpiOQymuSRYPHGBuMKurl8LaSRD5RR7Q+X+wc7yJDjVvZFQmrYek5 33Kw== X-Gm-Message-State: AOJu0YwCxnMJ5hJGc0i1bg5Vb9og1OkWNY1zCK2HQkbrBR3JFHG6W7zA ON16a5n7v9e4oDZSqKyxJwb70nJ0qrrU+Bl7ehBzkipM0I0tOxtlrXgLEi+p X-Gm-Gg: ASbGncvcRPNAX+wtWYJmLh6awzaomYOLjZjY2n1/k6PsCQlfPkkoe/waN4KykkL8EdB PMnj1J4Bp5s4b8wZRmWUsv5OkSp+o8fFu2i/ImwPYGGbwQ7No5UsYrt1DUiGNaTxRMtHpR5xsU/ /Yn1DX0E5zoPEFWbZt9S8VPF0vx0g1iV8afr9gg33YekbEEpxY+OIaDUdL6yhz4Pj/lquDks36k Y0B7v8EOP1uMQJNM6A+YuTT3S9x3xDenuGGT+ez4X/NseSTML4PCU82E88jq6n42D8IBcXcATyY xkDDCdA7WukD+Id22DQF4wKzNXh01Q8wsdie9sQNaijU1lhBLc7CcQ3RIFmJxbDMLfDHPF8= X-Google-Smtp-Source: AGHT+IGtn51FEa9f4Uv6Ms83aLiyifTrgGZ0JEu+Zp/oZaqrqZ2fZxEDD2/YUvRI5aU6Cs2hRddzYw== X-Received: by 2002:a05:6a21:a45:b0:215:d1dd:df4c with SMTP id adf61e73a8af0-215eb7262eemr2516619637.6.1747103534670; Mon, 12 May 2025 19:32:14 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a387a6sm6947460b3a.137.2025.05.12.19.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 19:32:14 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH v2 1/9] system: Source scripts from the /etc/profile.d directory. Date: Tue, 13 May 2025 11:31:40 +0900 Message-ID: <5cf9f21c9626bb8c8357089caa747c2ae8ae2fca.1747103508.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Rutherther <rutherther@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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(+) 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. base-commit: 364694773ef1c61d4c9ec73e24f73642786486ca -- 2.49.0
maxim.cournoyer@HIDDEN, rutherther@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 12 May 2025 13:12:40 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 12 09:12:40 2025 Received: from localhost ([127.0.0.1]:51419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uESxT-00045W-Ng for submit <at> debbugs.gnu.org; Mon, 12 May 2025 09:12:40 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:59739) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uESxQ-000458-No for 78308 <at> debbugs.gnu.org; Mon, 12 May 2025 09:12:37 -0400 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-30a8cbddca4so4971743a91.3 for <78308 <at> debbugs.gnu.org>; Mon, 12 May 2025 06:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747055550; x=1747660350; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=/jLjge3cBBYEt3TdZbK25RgioLDylCcL2NxU7EpfNXo=; b=BVDJGFAcvw44KX28v2wjzNdruB7I/lpN0gxtzDeTmM2+SCOcfPHkSbq8hCbnumJrv0 SSKIv7IxJj852FlnJ5XDsdFFl1mhSwWSEWiDrOb4h8+oR04D2Gd6lkYQz+F050FM4Uv9 KVaIvNsf23IBiXGKl/zaU9UA/f85B37Aw25L1+V6ztYXRst1Pt35Npg0Cnu8Wz0+/oGp uFBBmlf1Z9PxVQUcQnYwUkSo8vJ7Lxt2qJrdZkuZMNSTj9e6qtBBNDI+CcM0PSlEf/sn tz/m6x3wSPx9Ona9RQiJZY/d5mkMa1U1G95C6gysNIy8nJo/rliMepvZhMdKWTjRTt0X liCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747055550; x=1747660350; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/jLjge3cBBYEt3TdZbK25RgioLDylCcL2NxU7EpfNXo=; b=IHpOiuE/5fDYEZ01CgFMQNMKL8mWT8IirX/UKQzG1xv0xwuRXQXNS1cJdJfkThTqaK 7PJWJPgM2T02wpzwu4EGFIrbffb3KI5FEznclA7iErmRNAiHDRNykgm6OmNIxbOHmOwn h5PX69VGTL+AUmUoKXSp1AD9vj1gXr6g5xhnIge6bWz6pgdD+zBDrG2y9nNjnW3mjjsf oh2Pm5210LKcQ5bQgvY0+N2Izgjhf78iqfsARagYmjQCNBmPocl+mjHCUcFIHyvZ7wo+ wIADNV00pxI5LxFi595+I5GD278FJiZNGxYBbTRSu9RtJHKRuSuscON9PNhXn3Mxl3c5 n6Kw== X-Gm-Message-State: AOJu0YzSX71Zggt29jQ+yLc6bcvKrbaN8cmW18SPtKBCSWi4s7n8qbWZ kDa8KpCZkUUB0S03RGnw4XhZ069BqWB/2ODNwIjRpr7ZDerYO0pvXtEn5t2n X-Gm-Gg: ASbGncvf6on59jx6LJwlhPh/EDIdxWCipyOoMP1Eb5BidsqxfQ3oiFM0uhoGGRnzutP 6lyQ+V/eBye96gTLqm2Zsv5n3wrfNEOKwMBk4OaIlSkc4BiYHoSR6ynPE+EHKDhY01C8k3jeIhO nG63UiOwRC/4C+0Ba/h5Fh6eebe2/zf/HgQ0qNmZBLytgSW/Ft+yRElLW3DqeEiAjZq9f+GJcHB fXScRLb1HuXSgGcKZEAUtRtSwSMAQNYF8j1NVFYnRilsJsv25chNbmV1kK1pEWmvbbqaptdR6VU rot4f8mNcJnLpWEuoKSOHlA3Z11zY41RNdoRTOwRBnNqb2ZkRQ== X-Google-Smtp-Source: AGHT+IEdFY02KOg+aXF/qoFL9oWI7Adjn/3cAzCewlJcfdeaFSGDR02sHYI5yj0j5b0D5u/B5ZszIQ== X-Received: by 2002:a17:90b:3510:b0:2ef:2f49:7d7f with SMTP id 98e67ed59e1d1-30c3d2e5224mr22630479a91.18.1747055549920; Mon, 12 May 2025 06:12:29 -0700 (PDT) Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-30ad4ffafdfsm8844987a91.43.2025.05.12.06.12.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 May 2025 06:12:29 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Rutherther <rutherther@HIDDEN> Subject: Re: [PATCH 0/9] VTE integration support / Shell startup files refactor In-Reply-To: <875xi6xlbz.fsf@HIDDEN> (rutherther@HIDDEN's message of "Mon, 12 May 2025 10:52:16 +0200") References: <875xi6xlbz.fsf@HIDDEN> Date: Mon, 12 May 2025 22:12:26 +0900 Message-ID: <87msbinfb9.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, Rutherther writes: > Hi Maxim, > > thank you for this. I think it's important for users to be able to > extend their system profile and bashrc files, currently it was hard to > do. Basically the only way was to modify e [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1036 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ditigal.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (maxim.cournoyer[at]gmail.com) X-Debbugs-Envelope-To: 78308 Cc: 78308 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) Hi, Rutherther <rutherther@HIDDEN> writes: > Hi Maxim, > > thank you for this. I think it's important for users to be able to > extend their system profile and bashrc files, currently it was hard to > do. Basically the only way was to modify etc-service-type in > essential-services, removing the profile and bashrc completely, and > adding your own contents. Glad to know that'll be useful! > I have a few comments that I am posting before I actually tested it just > based on the changes: > > I think that the docs for etc-profile-d-service-type could be more > specific about the files accepted - that only .sh files are going to > have some effect. Additionally the example plain-file is wrong, > plain-file accepts two arguments, name and content. Here the name is > quite important as it has to have the .sh extension for the file to be sourced. Thanks for spotting this. I'll fix it, and emphasize more that only files of the @file{.sh} extension are considered. > As for the bash modification, is is a good idea to go through grafts? > Aren't grafts mainly meant for security fixes as to no changes are > introduced? How can we make sure this change is not going to break any > of the packages using bash? I understand we cannot rebuild the whole > world via this patch series if it is to be applied to master, but this > doesn't feel right, maybe those changes to bash should go on a team branch? A full world rebuild seems very expensive for this change alone. The only thing this switch does is cause Bash to source /etc/bashrc when it also sources also ~/.bashrc. Since there is no /etc/bashrc in the build container, we shoud be good in terms of not breaking anything build wise. > It's not super important, but do you happen to know why bash-completion > package provides profile.d directory for bash_completion.sh that should > actually be bashrc? Maybe it should be in etc/bashrc.d output dir > instead - that the package should be adapted? That seems to come from Fedora, and maybe other distributions, that have this in their /etc/bashrc file: --8<---------------cut here---------------start------------->8--- # Only display echos from profile.d scripts if we are no login shell # and interactive - otherwise just process them to set envvars for i in /etc/profile.d/*.sh; do if [ -r "$i" ]; then if [ "$PS1" ]; then . "$i" else . "$i" >/dev/null fi fi done unset i --8<---------------cut here---------------end--------------->8--- So on these systems, /etc/profile.d/ is used to extend Bash too. That means these scripts are limited to be POSIX-compliant, as /etc/profile also source these, which seems an odd requirement to me for configuring Bash :-). In practice, what vte.sh does for example is check if the Shell is Bash or Zsh, and return early if it isn't. Not as clean as having a /etc/bashrc.d, I'd say. Let's start some new trend ;-). > I don't think removing the PS1 from guix home bashrc is appropriate. I think > the PS1 is mostly for foreign distros, not for Guix System, it's even > mentioned in the comment that it's for distros that don't provide a good PS1. It's not removed, but moved, as the change log says for the "system: Factorize bashrc default configuration." commit: --8<---------------cut here---------------start------------->8--- * gnu/home/services/shells.scm (add-bash-configuration): Do not set PS1, now part of %default-bashrc. --8<---------------cut here---------------end--------------->8--- Guix home uses the %default-bashrc, so it's covered. It's something I've tried paying attention to, it's good you saw that too. > Similar question goes to removing sourcing of /etc/bashrc. Was this > because of Guix System or because of foreign distros? I don't know here. Both, I think! The home-shell-service-type uses the bash package from Guix, so it's safe to assume /etc/bashrc will now be sourced anytime ~/.bashrc is. > Note that users not using %base-services are going to get no bash > completions after this update. Maybe there should be news entry about > the bashrc-d and profile-d services? Good idea too! I'll write one and send in a v2. -- Thanks, Maxim
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 12 May 2025 08:52:29 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 12 04:52:29 2025 Received: from localhost ([127.0.0.1]:50030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uEOth-0003oT-9G for submit <at> debbugs.gnu.org; Mon, 12 May 2025 04:52:29 -0400 Received: from ditigal.xyz ([2a01:4f8:1c1b:6a1c::]:47188 helo=mail.ditigal.xyz) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <rutherther@HIDDEN>) id 1uEOte-0003o0-Au for 78308 <at> debbugs.gnu.org; Mon, 12 May 2025 04:52:27 -0400 Received: by cerebrum (OpenSMTPD) with ESMTPSA id 1eb2b52a (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Mon, 12 May 2025 08:52:18 +0000 (UTC) From: Rutherther <rutherther@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: Re: [PATCH 0/9] VTE integration support / Shell startup files refactor In-Reply-To: <cad4115ef18b9c48219a8e8c3e62b2c1d284afd6.1746682207.git.maxim.cournoyer@HIDDEN> Date: Mon, 12 May 2025 10:52:16 +0200 Message-ID: <875xi6xlbz.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ditigal.xyz; i=@ditigal.xyz; q=dns/txt; s=20240917; t=1747039938; h=from : to : cc : subject : in-reply-to : date : message-id : mime-version : content-type : from; bh=1bBAKgYi1D+KkVecsmb+V38ovbDw7ac6cohXpF3Qr7I=; b=jkXw81TlAp7sdP53+4O10LSmPO0IC11QwxCnmPcxCwzsQTkBpDuNdSPQpf/dFDWYik5n6 56cTceGwmIP05VE8aByy/oKOcip/APCOet6uvjGerGpI7nPqxeOogTZpi+2oqsXWz5cdq/w ueT72U0FN3NseCMDRIrRub4RwIOPaVM= X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Maxim, thank you for this. I think it's important for users to be able to extend their system profile and bashrc files, currently it was hard to do. Basically the only way was to modify etc-service-type in e [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ditigal.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Maxim, thank you for this. I think it's important for users to be able to extend their system profile and bashrc files, currently it was hard to do. Basically the only way was to modify etc-service-type in e [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ditigal.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Hi Maxim, thank you for this. I think it's important for users to be able to extend their system profile and bashrc files, currently it was hard to do. Basically the only way was to modify etc-service-type in essential-services, removing the profile and bashrc completely, and adding your own contents. I have a few comments that I am posting before I actually tested it just based on the changes: I think that the docs for etc-profile-d-service-type could be more specific about the files accepted - that only .sh files are going to have some effect. Additionally the example plain-file is wrong, plain-file accepts two arguments, name and content. Here the name is quite important as it has to have the .sh extension for the file to be sourced. As for the bash modification, is is a good idea to go through grafts? Aren't grafts mainly meant for security fixes as to no changes are introduced? How can we make sure this change is not going to break any of the packages using bash? I understand we cannot rebuild the whole world via this patch series if it is to be applied to master, but this doesn't feel right, maybe those changes to bash should go on a team branch? It's not super important, but do you happen to know why bash-completion package provides profile.d directory for bash_completion.sh that should actually be bashrc? Maybe it should be in etc/bashrc.d output dir instead - that the package should be adapted? I don't think removing the PS1 from guix home bashrc is appropriate. I think the PS1 is mostly for foreign distros, not for Guix System, it's even mentioned in the comment that it's for distros that don't provide a good PS1. Similar question goes to removing sourcing of /etc/bashrc. Was this because of Guix System or because of foreign distros? I don't know here. Note that users not using %base-services are going to get no bash completions after this update. Maybe there should be news entry about the bashrc-d and profile-d services? Regards Rutherther
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 8 May 2025 06:36:22 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 08 02:36:22 2025 Received: from localhost ([127.0.0.1]:52887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uCurl-0000jh-SJ for submit <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:22 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:42488) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uCurg-0000iE-HC for 78308 <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:17 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-7398d65476eso595404b3a.1 for <78308 <at> debbugs.gnu.org>; Wed, 07 May 2025 23:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746686170; x=1747290970; 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=9aCtet6tmN6TIlxwercHuM6/PCXa4VXP0TX71clwZv4=; b=ILRSTxdRJrlHzKiwAJSg07Ii1zX4mE/mHG4SnoprJpQlIFk+yjoAKIuDIDHAVKwJqI z5n+FVAduwKd7VuTB9VtGgP1rKUSu2yOWn4Xn+JjIrLsOw/k+OF9VOxIhrbDeJSU8y4m NtxBYcjnmw9CjNHpgbHqLQ6rJWvr9q5j1DoVwiBoX6IRFWxv+9MrrnTlQ+NrClPJFi+L l1V/29C7jMmLIG8u9+T4yNtK6gEMn5OONSnJdWacyiTYgG/nvHBspn0krTbPDEn3P54h GECm8UqQwTHu2uJROgcuqVM4nETJ8TeXjkORgRNCwlrYXKE5BOOm2PKv+PlEPF9WxGn7 7ESQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746686170; x=1747290970; 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=9aCtet6tmN6TIlxwercHuM6/PCXa4VXP0TX71clwZv4=; b=Ue3da6n+TKWKgVxP9QHE1GvKhHl1eKTmbUvUsGfpe7GwWK04XcJoVGFW217kR0SYZv 17/Js2QOWVaEd0Ec5Pls0ULAuolMbvPJ3PvI1/HQG5JUDyVclHfOu9zz9Nq1Jh3mB+7f o0LIeApD7lh7y60X72TLx62JasqUFQ/5UZ5P13u+3FwjXaNb3hpngeld6mGsiMGT0GyT hV8UgEqZRBazEyaelpSx6l3TlyjWyTthM4qhjbIJEQJG4d+Gs7ZmJN0IREZerY0dLDNj 1rpwqRRh6UIBgrxtZVUa9zrAt/BzwBUa6NRK2zSzxp8ZfKEUSHuUKeuAD9XexKkFz1Vj jrNQ== X-Gm-Message-State: AOJu0Yx46j1sAAiJMjL2NGdL9iPhnbyXqQPtbTwt8TEIzypmEjPq/J6K EjgL+l70XKl2RdjAh6CsFjkvSXWU9ew239CKLDT4Yxz/lPC2U4otzC8PfQ== X-Gm-Gg: ASbGncvKxvBE0ixGaMwLHjBZyJD0GFSkc8bwbgQe5ZDK6Rh+TC1jl8KN9YJVfvD9cjc bVcCcZ47IQ3y3smJpha9B6pTGVphX0bNMrB9hJpgsvXcK1sx2QnQZZhX1YvBaV5vM2mrxISw8ck jOsn2438K6dCs/6iMt1Q5LXHwDCuedcPN+s/DCius/7UOwZkvgeioMep4eiSQ0V8yzowBl+K2+O 6ldLp3xyaXXtvJ+MIH421iyl1mS9lvPhMEnCvWyELKHyGGbHlg+khiNjfGW7avAkAjcfApjA3yS KsQj2qSvN8yTXB8qLagKR9aihCTA5KJp/deCqWefjvFDlhlb3YDrF/KHL8s3 X-Google-Smtp-Source: AGHT+IHh/0xoHFpE/7ciSeVDhdrNXJFcHfpbMLOCkbs5kxe9Vhp/bqcWqtp5tg5vlIUYOBedi0ZyDw== X-Received: by 2002:a05:6a00:ace:b0:736:b400:b58f with SMTP id d2e1a72fcca58-740a91d0efdmr4287778b3a.0.1746686170159; Wed, 07 May 2025 23:36:10 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74058dc45c7sm12452121b3a.71.2025.05.07.23.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 23:36:09 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH 9/9] services: Add vte-integration-service-type to %desktop-services. Date: Thu, 8 May 2025 15:02:25 +0900 Message-ID: <cad4115ef18b9c48219a8e8c3e62b2c1d284afd6.1746682207.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <cover.1746682206.git.maxim.cournoyer@HIDDEN> References: <cover.1746682206.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Liliana Marie Prikler <liliana.prikler@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Noé Lopez <noelopez@HIDDEN>, Vivien Kraus <vivien@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/services/desktop.scm (desktop-services-for-system): Fixes: <https://issues.guix.gnu.org/72172> 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 2127c2d389c..ffa02063514 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -2458,6 +2458,10 @@ (define* (desktop-services-for-system #:optional ;; to avoid GDM stale cache and permission issues. gdm-file-system-service + ;; Provides a nicer terminal emulator 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. -- 2.49.0
liliana.prikler@HIDDEN, maxim.cournoyer@HIDDEN, noelopez@HIDDEN, vivien@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 8 May 2025 06:36:22 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 08 02:36:21 2025 Received: from localhost ([127.0.0.1]:52884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uCurk-0000ja-UD for submit <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:21 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:50380) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uCurd-0000hx-HX for 78308 <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:16 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-73bf1cef6ceso749809b3a.0 for <78308 <at> debbugs.gnu.org>; Wed, 07 May 2025 23:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746686166; x=1747290966; 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=z21uB993j4dVdzMeYJS6QbrKs8VOIHz2SU8nhZCGE64=; b=FgvfYl6y4jCcBQNvJwFi5nnMYbqPzQHY9v4UGGtO6/b6FEhjnDhb9SNffFNt+NXH6U 4pWZavhJmprLG2SInuYqd0GyKLcoqAXfHJ7W+/CAm1YamSj2TzXm2dJ/3wVtQCpTgMzT BjDjiF2CD1K/i41Xyna205lJjDPLftr8YQ07fpPITNrXiJVAyrsCBl/yfgxT83NMZ5Wl kHMRc3fIWjoVtVoRyKmQnU3xb5MDlDRTQvNKjRpO/jLuIm/wukLccp0ertyiFXD1mvAg 6HvFsWk6TXZWZZAc60y4BWm4LpRKPSQ+JBW/dJEYxhEvyIThRFD5gmDTNW1cZoTjezGF vpMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746686166; x=1747290966; 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=z21uB993j4dVdzMeYJS6QbrKs8VOIHz2SU8nhZCGE64=; b=Cvtc85NdbPESKwNBchsbSEyyKMfde2BSmzQi7Xikn10p5f9kD7Q4igO39WpDy8Ha6L DzRUQlDIG057fBsPN7peQE6/f4432/agqahBnx1Hx6gYrranCTBa1HDf1MWQWUJW3G0N gByNa4NrUWJe8t/dx/XTWQXsg/i95D2xvj7NuPsaJnsfp3ZWIBELjRwguLNsI24tDdwI Zg5zIPi+xcQ72c937B2Zjfs4UySyaJSqRlTTlJgQe98GyQA4e7HCgOft6L3DIwbFUjNQ 0maahYqDLDnU+pLVACrgY7NV41F+BMEvYRtc7oYHJgosVJA2fX9UlqvrKE1++/jLURCR 9ZnQ== X-Gm-Message-State: AOJu0YyCVxjJew8KFXEsfikLYRlNYm0kBzVMM3lacDLBZ5Bydh0R7Lu9 INt2Wsgyy0k/aTHqNEk7RsllZ3cUXpCcpfLPx3Svr/1kQQZv2J7MfuHusg== X-Gm-Gg: ASbGncuIBBXadYNXxtaU1cOU4e+NXvYMjgJGglcOq/MIqG0XRlgdy2hnZpKSssOXn66 l17z2KVGeMQN+ZeNWdb/MVmeQhw8n0hd3/JnKY+qzcGJk4AQDexrklEzMN8SiCo0WSFPWjerqVh J9bJ5qHFtvrM+nm5CoqjiA7Md/gDHzaWQdZo312OCgb/X7RdwK5GsHNUPlz/V9SINWmSO2qWGdo Jva+Jg9ATqf+gynpWH2kxaupLD1RlbSmm5B2WcJceqdJfBAmhDnzG+/cWU9KoBAe6h2P6nMxZ7P gNQReHptZ1yWKH+hkjpybSvu8etERvJkxHpVKAWnnoC57bhJskr/Mh7oUhln X-Google-Smtp-Source: AGHT+IEt9fReQ/QLPKKTVvwenNAppJ/HgYh17GbBDvgTHee69DhBJkrkOvXsBlfv3L4Nwp1hXrR7Ew== X-Received: by 2002:a05:6a00:2c86:b0:740:6630:633f with SMTP id d2e1a72fcca58-7409cefc1c9mr9974399b3a.8.1746686166348; Wed, 07 May 2025 23:36:06 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74058dc45c7sm12452121b3a.71.2025.05.07.23.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 23:36:05 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH 7/9] system: Factorize bashrc default configuration. Date: Thu, 8 May 2025 15:02:23 +0900 Message-ID: <1cfd997e47da00b0647f46599bdbf7d7fb920af6.1746682206.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <cover.1746682206.git.maxim.cournoyer@HIDDEN> References: <cover.1746682206.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Andrew Tropin <andrew@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Hilton Chain <hako@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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): <profile>: Guard against souring /etc/bashrc in non-interactive, SSH case. <bashrc>: 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 c8d74a3c31b..3c80ed24679 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47543,15 +47543,15 @@ Service Reference @code{plain-file}, etc. 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 @@ -49177,8 +49177,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 @@ -49186,7 +49189,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 <home-bash-configuration>. +(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 dfb96b1f0cc..adf456dc99e 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -4135,7 +4135,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 d009a2036b0..ad37912f809 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 50ac102707e..03af193f36f 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -146,8 +146,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. @@ -164,10 +167,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" "\ @@ -288,12 +292,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 edb7e9112ba..85e5b954b90 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))) @@ -593,14 +595,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)))) -- 2.49.0
andrew@HIDDEN, gabriel@HIDDEN, hako@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, maxim.cournoyer@HIDDEN, tanguy@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 8 May 2025 06:36:21 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 08 02:36:20 2025 Received: from localhost ([127.0.0.1]:52882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uCurk-0000jX-FX for submit <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:20 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:47263) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uCure-0000i0-QJ for 78308 <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:15 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-739be717eddso563603b3a.2 for <78308 <at> debbugs.gnu.org>; Wed, 07 May 2025 23:36:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746686168; x=1747290968; 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=ozWAMZjEB0+EurLbIq1ifoXSP96oYM+YD19g3LSwD5s=; b=J521l/IJhHe8iDEcbFjw6KhyQ9J7e/jdoCXEX0VGZhxZGQ6ALRMEw1KMFVkiZYAJE1 KZLlLfPxuo9RR/oYIC0ZkApmhYi+r1GekYZrdiX1z9xLH6rHdQtgwuyCwDrdMhKQA+1O zottyFpobYgbSKuSPpnWVmeQvIYxmSEaP/pfBZRqHUjTCoCpA3pi8VIBDHUj9PYQFWvy umlG8yPmAEZ5qPzrToGi+GNaM4Hr+9UDtB1RVjIJhcbZBMxeib8X+IgwD+NtoM7097Fb Nti273JKyKmMtrkrYS7swKagvAQwo555euGlCaJL3wBqY9k74Icw2qvD6xI8gFCbFzU4 zSjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746686168; x=1747290968; 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=ozWAMZjEB0+EurLbIq1ifoXSP96oYM+YD19g3LSwD5s=; b=X5NnyTS3eayGO2KvenwCYftGxA3LKLWxD8HMV3kmrwUby+iZHqLCgfxWUxhf7wSE1m C01EYhOlq5tehckC6lvcr8VtGTNFFzFF5RVXXBTRAbeuMyJ/pmmzbBalKDcalh7+F1qr jrKGEP+WybfY5KuAKKVdnQanxh3WOx9nIXmmWByqwFpa1y/nuHxvG9Z5UzaL9NqlKldS PMJVNNQGH4U8XK91MFgu5vSNhz97/NIOZCTaXr4NIBGamlqwAMjAkjtHB/nYV3kntOhB r9yQhkoPjtv1ahSQhe2KpVEz34t5E7P+r4lfQHkTEVP//Uej1R/m26kbsmrGoX1nApuZ 54YA== X-Gm-Message-State: AOJu0YzFkDHJRGd0oMSaib3twioUU9sRcq3ThGyjz8trNo2DXTb3asZX S0oeDwHtp40s/ObA0QYI4VGmv4jeHFSyNcjuZkHeLrODtEbhyHQ76oeSvQ== X-Gm-Gg: ASbGncvReo83J0L3QGgCRPP66x+3V5/3wzPWtKJ6pN01Y0zlIv2iguweBAzzkgTR0Mv ruwlnT9RR470ua93y4fMvPmvX7LAoKk7j9LD2nEe8MyrmQ77/EtIm79FPd+RRWZi4nQWILxxLmP jOgWWvLroMshkfkCf1ch2yKO/w51jmEkzhNwzs/+PYJVkYFrDHghNtKaXxzaecDynS7WM7OFzMY J0ncRH0RRUJOZZE3sh0ZGfj4YU5HqMsWkwzPBkfCWJZFc0gK44ebC/b5Q8cbi/ZupALsJIsQ1mn LIkvhm+9lO7CAa3ql73r/5FYHjH3M/BsmGPIk2sBtT7XmX6FGsUGwbbgXRQD X-Google-Smtp-Source: AGHT+IE3Mvb74NKCXQRkn+FoBLtW+wZOE2aIS/xtEGNRRUxtUK729ojebCEeU5JA4suIR8V53IYAEQ== X-Received: by 2002:a05:6a00:ad8f:b0:739:4a30:b900 with SMTP id d2e1a72fcca58-7409cef9989mr7874463b3a.7.1746686168311; Wed, 07 May 2025 23:36:08 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74058dc45c7sm12452121b3a.71.2025.05.07.23.36.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 23:36:07 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH 8/9] services: Add vte-integration-service-type. Date: Thu, 8 May 2025 15:02:24 +0900 Message-ID: <c82f4afeac5c9ae44eb2570d185a5593c16b23a3.1746682206.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <cover.1746682206.git.maxim.cournoyer@HIDDEN> References: <cover.1746682206.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 3c80ed24679..1eafd4eaa0e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47555,6 +47555,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 -- 2.49.0
gabriel@HIDDEN, ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 8 May 2025 06:36:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 08 02:36:17 2025 Received: from localhost ([127.0.0.1]:52879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uCurg-0000j7-BQ for submit <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:17 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:57704) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uCurb-0000ho-K6 for 78308 <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:12 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-74019695377so518427b3a.3 for <78308 <at> debbugs.gnu.org>; Wed, 07 May 2025 23:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746686164; x=1747290964; 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=C2/+54oeSHiFL635iHL653QQVR3rS15iAVzE6Alm5A4=; b=AI3ERecqV8i1JPrcYroG0JtKicJy00pBYcFIARjIiwQY8+xkEChy/8gjWOjJ+QONMu aBcI+x/sfkC64BeZof2lb5MSJ5ymJo4l6B68v6MS2TVtj93ai+j0jjqPIEwx5NOf2d7K a3ehM8AsGeODc8E3Yf7N5DJoccilgTQ3hfE5rhD0b5GEWrfUxnO4UaInbstoYb67eBrP Nz+Ls3xfK9GRbxN5DiAsV/36HRq4N+cX3B9BaMJ9iWRU1ZiEFtSvJjmKubztT/uw+Yb/ de/ycPkYkKLqxTfdM3s/X+OgqqrWpyi+hMzckn7Rbh9/MtiVBqeF1HyOJZuMx/N8JIeH o8tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746686164; x=1747290964; 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=C2/+54oeSHiFL635iHL653QQVR3rS15iAVzE6Alm5A4=; b=fQQDsGgyXAS5vGTEQrGVZUh/kH/Cfr3JUZX7AOr+nfiXQanOJWyCdGvO8dd39w/guF JpL1XPMKyHudNqxNfu5VgVHg7R1P82Q68bv84gwgcn5lrpx0dbOadqSIhaCYRxlGhx+x fK5YvbwfZ2VMfbFrBehPm6mfj6bSIT4NRkET6reMmBdFjr5MnePivfcaU5IOMOQ3pXsR A6PC6jgmbHqyvMrozseja6LNNGozlofD6wp095LqZAlwI9YHJDqANpoP2ZdrXaxB3v3d 2hbTGvnrlt8/dM1ARu/AuVr+QH0DYYfJoZAdPsxdVEi3me4a+JAgTwDhLzbsvDtCuAbF dmxg== X-Gm-Message-State: AOJu0YzxAMccHpLyDkCgqvAJhTqhJEwYrId40aPyZniS95heSjps4VcL OfMNCY8KIcVmHajCQ2I4RnmCWl90uMVW6dCirfAqhrQtpBLCorwnZBcPAQ== X-Gm-Gg: ASbGncukYMWMBaEUQai5HFmjOIzOuAHCB6VHBZ7/77tsi7gIskIawFHc2hTQXW/RUXk /LvF6HFGNwxat58CCBGpOZsCEkNREmZ/oe4pU9C+ByICq/42ntLgN9QWu85Wigo+9m1La7NNE/x 6nPphiv2HPKCHHpTu2L0dyIIxfxSpy6fMFZ21WwIR7KCVmZ/TxLGKeboC7qYEMl43jJytUtQqiG dDjkN8HWzUHSbUIpyL7LJakULNAoEG+ezg82bmJvn7jbD0BgHfZYTZNZ/2qRVtRVAtgFoGKyXXN foTLXdPd+sUeSv3qaqzaO3iBUg3DPagdkh4ZAlhLh89MEVXuNFMsc0cT9wRq X-Google-Smtp-Source: AGHT+IF4BZNG+SASZnFMmu5gzRxwS6hfOFnIByN6bpjah0YN9hQrBbSIvoZ5NZ4HZPv6/227cJdOgw== X-Received: by 2002:a05:6a00:2c86:b0:740:a023:5d60 with SMTP id d2e1a72fcca58-740a9a68b3bmr2977671b3a.19.1746686160402; Wed, 07 May 2025 23:36:00 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74058dc45c7sm12452121b3a.71.2025.05.07.23.35.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 23:35:59 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH 4/9] system: Source scripts from the /etc/bashrc.d directory. Date: Thu, 8 May 2025 15:02:20 +0900 Message-ID: <f5555f16b988243dfbb11e89c6a3ec308c609be4.1746682206.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <cover.1746682206.git.maxim.cournoyer@HIDDEN> References: <cover.1746682206.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/system.scm (operating-system-etc-service): <bashrc>: 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 11ac22da5a0..70f341a495a 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2020 Danny Milosavljevic <dannym@HIDDEN> ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@HIDDEN> ;;; Copyright © 2020 Florian Pelz <pelzflorian@HIDDEN> -;;; Copyright © 2020, 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN> +;;; Copyright © 2020, 2022, 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <jannek@HIDDEN> ;;; Copyright © 2020, 2022 Efraim Flashner <efraim@HIDDEN> ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN> @@ -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")) -- 2.49.0
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 8 May 2025 06:36:16 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 08 02:36:16 2025 Received: from localhost ([127.0.0.1]:52877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uCurf-0000ix-Bp for submit <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:16 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:57460) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uCurb-0000hm-Db for 78308 <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:12 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-740b3a18e26so167006b3a.2 for <78308 <at> debbugs.gnu.org>; Wed, 07 May 2025 23:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746686164; x=1747290964; 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=Gny82GpAwaIhnGMjyhFSt4k7Ij6JBS+fmbuhPqYC7ek=; b=MpCUdpec/uGLUysMVvrSJ4kPW/wocO70z2diOr9jM9yv2ab436PJnRH37i4b//hfWG 7+n0+bN0X8eW6fLxiTGphvmxnI0DHUdI/PJovJ8PgGoTaLBjMtWwAH+yRk9QLzyNpAMy BcbqZeG4jDtBlNgln6bukdpJIzdpS7YCAOGmbfmH4bFxjtXeZ/3sHgUVU7TgSvxjtwer 6ZjxdrwB/qTwTZQXw+HcDw6ENTwwZyGxatblkGIs3IMvWNr9KrOswsrOhewAZFD8EB6b clW3Klm0kZqlasJ/WMJ4lVI8mVQs3BJjsIjN3OdbWQ9IqfAJB8NzylNZeWdP5FJ4rBXd uuGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746686164; x=1747290964; 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=Gny82GpAwaIhnGMjyhFSt4k7Ij6JBS+fmbuhPqYC7ek=; b=bCJrXNKr80BMwQ8CTUkDD8SlbCQAyoCdHv2Bz7m4VkI5QZYZqCqejREpjG791Uvtrz 2yUcCgI5Sz/nF3g40HlzD23ySmCCYNILJ7PB+pSODUQUvrQ2ZIQ6HUQKzogozR5CXMol 4dwr2teZ8n9+NVuQSiON8N4oT4L8wVjGxcPrcpdP6CkqVslPjv0xE8nICJmSpLHqLwbT wTMI0KjBuapFaLxNGFNjZT2WixQJz+SmEZMSrvPPv6RbEdHjEGvlaa+ntGU0LImMyVsn ENpwnFW4wbjrjbaEmVZP8gnxZ10phvtaGD0kM8pKjFsguUNLzDEG7UG8wx2n6hZY8Go3 apKA== X-Gm-Message-State: AOJu0Ywgm7sJAB2523995wFrqsQMDayKZYlPo+Lyi3kkYnCADO5NNhj4 0pVDv3wqbOTiePNt5gHO6GGcvPm99+ZPvnRlxGuDj8uBuw1uMgIN5dbA5A== X-Gm-Gg: ASbGncvVaI6rqhmhidb05QXUS8RGYO3AfReQsIDd7mJcKTGohR4H+dstqCSHc+I7iCG i/1CTvOYP5YvRylITsAkC9Hzw/ENke+PlpA3C0nr+YpL0WHTLA8vtPEWsR4fXO7usm4DcbRh+ic vEbMMUNS9FIiCcqAYWYb4YrYH2blk/Mdk3vb6qPqzdLTWXChJ+NqehMVN2Yfd0hHmIPTimpCjNg 76s6MoX+sIvKrtEOxMf8Mf/ceO6umhoPm9mN+cuBENFZTvogf3fy3StOUTsAwsxCVaB6iHA9Aua CMOsqetUW+9Rli7xMevnfxrYgIZq8mInnIi35p3XAgsuW2JSsCZFrt66LNC4 X-Google-Smtp-Source: AGHT+IETQuiBz3btq044tRk/vDJE32YzEFz/w2gz06wweshXvXeZlBMMnaZHxVIcdeGDo3O/D+IXQA== X-Received: by 2002:aa7:8e91:0:b0:740:afda:a742 with SMTP id d2e1a72fcca58-740afdaae73mr1325264b3a.0.1746686164301; Wed, 07 May 2025 23:36:04 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74058dc45c7sm12452121b3a.71.2025.05.07.23.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 23:36:03 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH 6/9] system: Migrate sourcing bash_completion.sh to etc-bashrc-d-service-type. Date: Thu, 8 May 2025 15:02:22 +0900 Message-ID: <93144b9f500318da89c3391ce68f453041fd6afc.1746682206.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <cover.1746682206.git.maxim.cournoyer@HIDDEN> References: <cover.1746682206.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 74503ce0e6c..c8d74a3c31b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47540,15 +47540,18 @@ Service Reference 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. Package objects can also be provided directly -to have their @file{etc/bashrc.d/*.sh} prefixed files added. An example -usage may look like: +@code{plain-file}, etc. 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 70f341a495a..d009a2036b0 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -959,7 +959,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 -- 2.49.0
gabriel@HIDDEN, ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 8 May 2025 06:36:13 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 08 02:36:13 2025 Received: from localhost ([127.0.0.1]:52873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uCurb-0000iI-QC for submit <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:13 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:47270) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uCurZ-0000hS-09 for 78308 <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:09 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-739be717eddso563566b3a.2 for <78308 <at> debbugs.gnu.org>; Wed, 07 May 2025 23:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746686162; x=1747290962; 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=QBCOY8S/64W086HeEkt/imKkTN3Sf3gXU+nRf8YyGOg=; b=K3NJLhUAEErsFzof4XL3DXm+mLr5TAmGdx+bk66UKQt9RVYInaRLxjWq6AqA8n15hj N8iMomfemLw75y9BfrmETkoI7NIkJMmUCS3O5/o6JK34p5KfB2zmxQRPMQi6KBKbx43H aKB0/QlLr5JbUu7wUizfS6wYmDNiUu1mkw3dZwvuc+OjSlqnrpy8yAOJXOT+0wkMFL7D vyJbpImaRJcZ5p27b1dxj2iskNmI0TSKgrgR/6Y22AuhDgHnR+awOOwT1cIMT7/bOS7A 21G9T8eqvOieNMRrvTqE3aLKjdZD3k94hQpheSQt9ITo81gJLiz84NY2bcwWOxpB8vTu oy+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746686162; x=1747290962; 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=QBCOY8S/64W086HeEkt/imKkTN3Sf3gXU+nRf8YyGOg=; b=oGLY0/zczJI+KHBpanK0Zk8EHF3j08sWVUGz4CcKR2tfPdlwCigW7Lc6+TmXEVXybA tNq1ivs1GA87BP/GHrCVMZcOUfbCG+4CCCwTgiGXWtzClNs9q1GnFpSu2ZmFTTRzWGNU bS+ZNbdwM2XxaTUhZ7T/k/j4teB386l37NHfVkxZvUM45L/yiznDyueWfUrcDe6Qw4oa 0h4EU7wLcGtIhDPHGgGi/P9Hhzns/ZpOEi145L2kNV+qTPD4TDdW9XyTzaEdVPpKkng6 LCwUCFfuGfeQmsU+gTFBqgTm0ASfdugHdFRyx5gTtrJcFhr2ZYOqVN5lXb9NmBQ8UPBA LliA== X-Gm-Message-State: AOJu0YyCqUkDVEAWXX/eZvV5kWuQd6H9wponPAAKz+jG73MkagHhnz65 lU+hD2A3SSlkivOQ7FKpBJgkaKGoYWOvKKQtKfQ0gCHb286L3D2Keb7JZw== X-Gm-Gg: ASbGnctW56nJatFHrBJBJ0NTSKJStJ7KvZf9kBqu8MOvplNg9FOn8Yl5+HhXn9rdQ9L kmuGJCrUOjYkQdc9Sy+hkrGfCypg8UT8ZW9RUsg8+klVDNdYXjt4XrRGasL0mdL3bBwWXeb3wH1 ZBt5ZmRGH7DPVdVwnyx/2jJTmx6pRbMcLdQ/GMzNM4amQzFv5a1HxNkb7tkR/ecD5YooKuNJ/92 ZTUfz8nbmdXRVreBl14pnRobnebmaiuTogxAeohRgaRZuPs4jAtXg84deS2eQBffafb5i7O7z39 8++4FgrJkecVVYfAYU1j9jLEKhHh4MPNrTPeQxGIWr8d2leG+UE/342g8u/y X-Google-Smtp-Source: AGHT+IH7BLLtzgZ9JhzSHnghdyrfzABzPWklAZwpZtaUlO5KLPpTQmpCmL4L+AuAHW51QUg2qiUx7w== X-Received: by 2002:a05:6a21:4581:b0:1f5:7ea8:a791 with SMTP id adf61e73a8af0-2148ba2577fmr8913211637.10.1746686162360; Wed, 07 May 2025 23:36:02 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74058dc45c7sm12452121b3a.71.2025.05.07.23.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 23:36:01 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH 5/9] services: Add etc-bashrc-d-service-type. Date: Thu, 8 May 2025 15:02:21 +0900 Message-ID: <55fa089568d524e9aaba9416fdddd441b2b06919.1746682206.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <cover.1746682206.git.maxim.cournoyer@HIDDEN> References: <cover.1746682206.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 | 16 ++++++++++++++++ gnu/services.scm | 14 ++++++++++++++ gnu/tests/base.scm | 39 ++++++++++++++++++++++++++++++--------- 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 05124e8ce6f..74503ce0e6c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47536,6 +47536,22 @@ 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. 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 988212b4a7a..edb7e9112ba 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 @@ -572,15 +585,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))) -- 2.49.0
gabriel@HIDDEN, ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 8 May 2025 06:36:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 08 02:36:09 2025 Received: from localhost ([127.0.0.1]:52869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uCurZ-0000hz-5q for submit <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:09 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:61869) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uCurU-0000h2-Vz for 78308 <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:05 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-73972a54919so673936b3a.3 for <78308 <at> debbugs.gnu.org>; Wed, 07 May 2025 23:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746686158; x=1747290958; 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=0MLMMcxxWctW/jlInP2ZCILiRjJc3AJ1xuGwWzje7Pc=; b=cJN6GoliJi+FCkPJVXhoBM/vFZh6iu/hicqs426cVML1UUg8v4G3xOl6IEzhwzNdWK 6tksmSbYebntvTds8Ic3JNHhnrpOzTnunwWskrkXKLlB5aUkfocHp1jc374FmDwSGsqq SlK9sImaBfqyNruH3CxXHHd28jG5Pw/qb/sKTN3n0MtGkGHvew1+/DLAA5fUDUZtseFz /ntVnHpo09eA6aCPCDnB5uzQS3b5+p25u4QM6wFBtPV/085aIYDZLxleY2aVMRXlwUVD 6mNCRSHDCFMP4ZwCDFL/xidsPzJoGF5wgmfMO2NakRXVirxUmnnoyEVI7G2jLQ1LcYUc fgQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746686158; x=1747290958; 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=0MLMMcxxWctW/jlInP2ZCILiRjJc3AJ1xuGwWzje7Pc=; b=nfTTR/cS5sk++EN81NEIYhI0tpcoCx79E4IZ9ul4D3+/Mhd2nxliTOj7DqX08rF1jo DO52I3bTcdzSVECnRMyy175ARKvjFwPWkiJlAgZfQBKmjzsy2S6ZvjEFpPi1vAisvWI3 4V7hoSYxNphI593v6AQOGqyvx6nDheVpfLBz8n0A7FD2VZYV1aUmbQBnHIMStzAssUIV 8KfU5/aY2a0nhgjo1qhaXMJXzIOZk6hso6JtuOb9ufhHT2+1dFM/K0oXBrr/fnqvZuHl a9FyOXyjKOSiTsgPTCBXGeBxcasL7RcHOlGMg5L4AnBKsdyMfVIqC5c+02zBXv2OQedN 3saw== X-Gm-Message-State: AOJu0YySAg1hPSQZeQcpWMRrSLmAkHwxuUx1YjO9l5vTcufHCRebOOdK TCeqjsV6PHonNkaDhHwQ8QRDeEgdGSzpHfmwwqIeH7kAo4nfWpcXl72aWg== X-Gm-Gg: ASbGncvwHupbqXqM/SsZFGOJvQMVuC51rqNGQ39UArxtSV5/qvIIi4i7Nd3oa3GcDuL yQ4MME0HqGy8hL7FG6BIyovj5HjtCF7O3z0cbOiFKiD5erG1LCr3DfJ6wnjLmQQBoPt6idQyihL 8HZiOrDD24yEzwPhTSiPjEJuPHr5N/m6vjz0CYORN+oyPJdnPglgobyAeC/3/ifhcJVcXRyEOkB Sb0nsieROm+uj2EuekScUCLlrRWIq5fXntuhIYngX0B4Hi3bu0WJxg4aDnlUoF8myuyajkBr5Ib BI2HvKOqKRJXJi2AKeEWsQFe/XSdf5QRTfCpLwUyoH0pae6doUIcE2Odi/1V X-Google-Smtp-Source: AGHT+IEhCWFlLV9ogBetNKiLWO5aAPUgHGelTgiUxooZ0PmNTjBulFWyUoj0AI924V/BEiBs0bd94g== X-Received: by 2002:a05:6a00:2791:b0:736:339b:8296 with SMTP id d2e1a72fcca58-740a9a589e4mr3326000b3a.18.1746686158495; Wed, 07 May 2025 23:35:58 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74058dc45c7sm12452121b3a.71.2025.05.07.23.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 23:35:57 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH 3/9] gnu: bash: Define the SYS_BASHRC macro. Date: Thu, 8 May 2025 15:02:19 +0900 Message-ID: <7e0d4c975862569cb0433e55e4ba9ebb7bdfc4d1.1746682206.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <cover.1746682206.git.maxim.cournoyer@HIDDEN> References: <cover.1746682206.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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 <go.wigust@HIDDEN> ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@HIDDEN> ;;; Copyright © 2024 chris <chris@HIDDEN> +;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; ;;; 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 d0f1b6b2b14..50ac102707e 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -164,9 +164,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' -- 2.49.0
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 8 May 2025 06:36:07 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 08 02:36:07 2025 Received: from localhost ([127.0.0.1]:52866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uCurW-0000hp-Dk for submit <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:07 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:46454) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uCurT-0000gf-1E for 78308 <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:04 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-736b98acaadso690160b3a.1 for <78308 <at> debbugs.gnu.org>; Wed, 07 May 2025 23:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746686156; x=1747290956; 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=NAuAEev3j6+ljyF5wKWcQu6KtEfQre7Sm97aiwdDhXI=; b=jH2SRHvaTjFrRJ6c5dfwciwy6nQzNHOMNRg+NEzUGJRvmuWRfGxQ2rvIJo2b86j8Xq xoKO0tO2+0WKbdb5WeFrfTA4d/rWIv0GzuRM5+XrTtXqYjNtcc+/kuBjocfwod46MycL swR7ZOBH7obt25uTMwNTuD5zqaDjw9ziCEFd1L18ueO0xYRAcTKq9/8LRr086ovmCglG 8liAKl62tqtJsARYB2bO8xr3QwyGl5gvBp+f2INR/M5STQmaAHT4iZVr+WjlcCEzH6l2 i5QreMB0keJCLuscgUbR/bJEP43pvLXK91/2eZik6cc9frUwU3qRZmOAz28alFECcRle 2+9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746686156; x=1747290956; 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=NAuAEev3j6+ljyF5wKWcQu6KtEfQre7Sm97aiwdDhXI=; b=ABcB9xng4jFmXDLJwSG/+H5J/U1pNQu7hOHMcUngdrMEZi8QWF0yamEZajaKJ9pttO xTNRnFuOD2E+O1BthwH6J2IkaYLhi6tK3hxAxwBun49SxxyGFRA/eLoj3kJH2gYb3+qD iv96deZWJsWSignkTggfBjEN2Il4pGc2H1NhHDFKRMuQBNNZnyE9H7uN0EOH+MccA5cQ IOGyc6kZ7KS3cB7MpEVo1YzlycpjZg9ePF6/HGj7JiEVDT+FqnwFLfZWnja3w0fkRlyv d2jSMgIU6cBoRWZ3Cc4B0qrV1UpaHhl55m8PR2u06OKXBqH4AbH/GhkGUryMUtH6De1w ErmA== X-Gm-Message-State: AOJu0YxOEaQxTsRZOiLRHy/rjKOrNsmjeFv96fDOMjpt9hrNVNboqzu+ o8w1tmurmHq3qBe9oe7VJnsu0Pw3Cvh3NyxyMS61L0F0rkGBpFRFDOGZZQ== X-Gm-Gg: ASbGncupFKgCOqHRI9YvYDrgQcQ5QxmGl0LGLuah96bKFRX+GplrF8w7KK3IvqxM6+o xIYqnWIJSHJ8q/RJ8hD51oEpdJe4hSnHaApiH87laOq2vPIRqiKvaiBIy2Z1OgebD+MXwMtbH5Y xeKcfZxkOMuPHY+UHZ+GJZ7KsanRVg5mcgsZgevLM0XvqQ5hLxPIKt9OPDxtYPR7XbxR5MI28BN x2UIDMtwHAZ2raO4PGWBkhRptbYnEcc9xdeM2OVxHNtD7YkuKwr/bSOxe6NX51C8MuPA5QRN1Rg SRVrKRwipRWmSiH7mi5X5bz3af0ny50fDPN18HSfHPnZOChYuwhSh0NvfTS9 X-Google-Smtp-Source: AGHT+IF+NlHRTPhpz0r7g4lDG1pFu+mplR6GiXfABxlV83TYPXDlgB65l0/vFgpvlytnqOLXQl6SOg== X-Received: by 2002:a05:6a21:9002:b0:1f5:7873:3041 with SMTP id adf61e73a8af0-2148bc0fccamr9907046637.18.1746686156436; Wed, 07 May 2025 23:35:56 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74058dc45c7sm12452121b3a.71.2025.05.07.23.35.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 23:35:55 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH 2/9] services: Add etc-profile-d-service-type. Date: Thu, 8 May 2025 15:02:18 +0900 Message-ID: <96db80de431149cb07171ce517d37330719fbbba.1746682206.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <cover.1746682206.git.maxim.cournoyer@HIDDEN> References: <cover.1746682206.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Gabriel Wicki <gabriel@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * 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 | 14 +++++++++++ gnu/services.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++ gnu/tests/base.scm | 21 ++++++++++++++-- 3 files changed, 95 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 889eab2ab35..05124e8ce6f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47522,6 +47522,20 @@ 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. 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 "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 <me@HIDDEN> ;;; Copyright © 2023 Brian Cully <bjc@HIDDEN> ;;; Copyright © 2024 Nicolas Graves <ngraves@HIDDEN> +;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (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 20fc848e5ce..988212b4a7a 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016-2020, 2022, 2024-2025 Ludovic Courtès <ludo@HIDDEN> ;;; Copyright © 2018 Clément Lassieur <clement@HIDDEN> -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN> +;;; Copyright © 2022, 2025 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; Copyright © 2022 Marius Bakke <marius@HIDDEN> ;;; Copyright © 2024 Dariqq <dariqq@HIDDEN> ;;; @@ -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 @@ -563,7 +571,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))) -- 2.49.0
gabriel@HIDDEN, ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at 78308) by debbugs.gnu.org; 8 May 2025 06:36:04 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 08 02:36:04 2025 Received: from localhost ([127.0.0.1]:52862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uCurU-0000hU-1y for submit <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:04 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:55394) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uCurR-0000gU-RU for 78308 <at> debbugs.gnu.org; Thu, 08 May 2025 02:36:02 -0400 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-7fd35b301bdso633308a12.2 for <78308 <at> debbugs.gnu.org>; Wed, 07 May 2025 23:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746686154; x=1747290954; 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=vA14hzINEgdqOgPgEkiOmDWluI5LepMv2OVJy1WI8Js=; b=btBGfAh/S24VCVdA1t6kahG4cIKPs11u+GAE2kdMEVxxEQHeEA6tlQargE7UwSS2xx wnT8UFvaehFcf+bKJ3J8bs4JrV3Ff53XOGp0SIXdODsIziwIsEf3k4E5INiIDcwgLsEW 3skZProN5qZNXcuBXzKsqHwubpoBVRdnPdgqxSG49oQSkUuqu+cCpYSAQM1dKqZhAe5b UCWAZPWOX12rl1RSzpBtoUSCYm2P2JbnlUYdraC4eKCrUC/CTa4hmpenEnrvKTSKOavJ UUggbJHpX2ABqMAWi8QJulF5e7J7LJ9yr/gRZEKBVkPbsEmB0UTezZ0AXCOoNKe8F5Lk NIRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746686154; x=1747290954; 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=vA14hzINEgdqOgPgEkiOmDWluI5LepMv2OVJy1WI8Js=; b=qla1MrTY6nTE/X4WZ9PJQ9NiZBL1G7QEEuRcfiqMlng/d2UdwgGgcioyw6LN6bzXkl Q4A9XZoEFkssRNnMNQrfwVOwYXApMqsFokAl9hWOg5hfTuUFetCzVJ6hT+ZojvuCIrCl Y9P2I8OoULsVGHUn8Spm38ig6M2YabOgA6+6tWOYSQWZDtpQjyyzfqWEnK6sj4zGW3Lf +PPLMy8iC1M45dKYmOdnVSSF9+/31ahYUgZjUiaxB2KpniI7kpcxHg1jXxBt4ffmhL3l 61xRxnBQwgpsY8QMgsJ3JGSmemyNMFnKcaMDhWo9C7V7yRzGqUQIV2nnmf7XfX3MTW8t 9tYg== X-Gm-Message-State: AOJu0Yz4s9gpRjfuaJE5K+LH3+jl/eUiPYMRTNp77ttmWRd0ieSYcxQx 11Fbzv4H990HuMSIeNekVwu/JbAsbAHkYkLuuKtK1tGPSW/Gmu46KdkDgQ== X-Gm-Gg: ASbGnctwmSJ5CtDY7gQRi1WCglGJuMcgiIK3iaHvE/3z4E3RLwwQD5tr1J/S5S8xj6Z 9HP983ytuNFsbHXSaGR8xud8e0ahyQjgS+apfcfMBSaUIOxqNK2pf6Rak8WfZGG4ue5f/by9Ebp n7hYBy+9JlgjKJITGT0BYVz5NCiG2iYBibv6ezJ7KsXc9sg2lLgW9QvYh7x0o9+VAbsjIbIGln1 61ePbfw7c7zClqHQsiYJ960YnW7x729iWvJuJ8S0YAP1zH0PwjB9bjer/GZM5RlGhRK4PIqo6ik Gm6va5uskVSAMg7oZzj6vXwSE7fCNUuqr3brYeOjizGnYiqW+LV7nG8Y4NzA X-Google-Smtp-Source: AGHT+IGTQoSz6OxjCFF3g8LxBxzN1kTJ8k5LHedWM48uTMITvZ82ajRq7S4SpFGDjOpfI5mXfn0MuQ== X-Received: by 2002:a05:6a21:32a9:b0:1f5:58b9:6d9b with SMTP id adf61e73a8af0-2148b81ecadmr9220608637.12.1746686154480; Wed, 07 May 2025 23:35:54 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74058dc45c7sm12452121b3a.71.2025.05.07.23.35.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 23:35:53 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 78308 <at> debbugs.gnu.org Subject: [PATCH 1/9] system: Source scripts from the /etc/profile.d directory. Date: Thu, 8 May 2025 15:02:17 +0900 Message-ID: <d5140275d1f166b9ca890fceb4805e48a8b5c975.1746682206.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 In-Reply-To: <cover.1746682206.git.maxim.cournoyer@HIDDEN> References: <cover.1746682206.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78308 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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(+) diff --git a/gnu/system.scm b/gnu/system.scm index bc652b1ce59..11ac22da5a0 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. -- 2.49.0
guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 8 May 2025 05:48:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 08 01:48:17 2025 Received: from localhost ([127.0.0.1]:52509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uCu7E-00069k-TP for submit <at> debbugs.gnu.org; Thu, 08 May 2025 01:48:17 -0400 Received: from lists.gnu.org ([2001:470:142::17]:56704) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uCu7C-00069U-4s for submit <at> debbugs.gnu.org; Thu, 08 May 2025 01:48: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 <maxim.cournoyer@HIDDEN>) id 1uCu76-0005Z1-2x for guix-patches@HIDDEN; Thu, 08 May 2025 01:48:08 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <maxim.cournoyer@HIDDEN>) id 1uCu74-0004yU-Db for guix-patches@HIDDEN; Thu, 08 May 2025 01:48:07 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-22e8e4423ecso5878625ad.0 for <guix-patches@HIDDEN>; Wed, 07 May 2025 22:48:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746683283; x=1747288083; darn=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=o8zMLNW917iqHFsrrdE0CPOwvuRCRJVVtF8t2BqXzPU=; b=PlnVSvRZJYGbhaC1DBVmgLVM1kusxEUvgd0qrIopgf6U/3wqDcHlpUEcsllpHnDj4a lBonazspwgi4lEnKR9YO7fY63IXZXJzJ20VfN/45ZJgOAe5EZIiTOL5mZXCoRfR7hB17 5gbm86CQnALyl9C4gyh4oeGTQXBy/8JUcma3cdfn5Pl1xgyUil5oB+IklF9RhhKtyCie jCdxZpm+0GHh8OQnHhcUB6ruLW56lizcRa7lSiV0FUJjhtFbsIHXsojAxQGGXvKB4l9o OxkhwwWfvN8HCcvSqH/JSvR5QdzoXid/jLf8HFDllaY3D4ArTmaXfFxCjgMlqmEUZA+t fIMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746683283; x=1747288083; 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=o8zMLNW917iqHFsrrdE0CPOwvuRCRJVVtF8t2BqXzPU=; b=HlY1aROxESxsJQ+XRnUydwa4ilAlye5Op6FdkljF768ANJhATNJwrGAI5aWVBG5Pau 2cxWh/hBiTmr8c8Oj7L7YWUR29v8FoCTQja/MVqmaPtKeNvMS3qGxub4QkiR5vvcN887 AGhmX2DCKIdQMgfB91+v4izmjcu9siB2MAUjO/wII+9BwYCoKfD3msqo8iNCyJTnfJ5D SlOnsGttmjHvteePwbxJcPq+WZQ+nxm5gReCxuRPLt0IPcFuJfj9Xo2EeAHt0RN8WGqG JG46mvnI/PAiDCgSFw2/oBFugY1pGFsOT2eAlbFAwlGEkN591DvpbjkKssH920F+6w8P JHCA== X-Gm-Message-State: AOJu0Yws/1tJZK3CupXHawYE4sWc5fS5pCAJX5gi70RX46KtxXdjSpeW 2DlKUWMCcYJCKwt+B4eJQbcxSvZXb2fbJbI6+hDgXtmiw5LQQBQlJNMnvA== X-Gm-Gg: ASbGnct2yoDHK/c/iKF1C69XC+SfML6LuiYD1UUZjcmObjDY2NfNtUlzObUWDoc/peB mUGXbQ8dgNgGK+fAzrS80w4oLCp6AQ/tERVkGE8BoTSo/2k68etrVF6vJAB9Td0HKY7stcLbWOR vu7CiLK9tGj3eLea/7sB2xkZTV3KadEMAaTJD85nyApKFI72dy09QDNasTcY62/PsdEUTwEcxc6 OB5BYk7ZQqArSOBJPzFTaPRm8F/Vph18IGfjxEOJJJ67cUw1cB/XSyJ7KHkEQsnaII35YNfMPWs TL678Jrn9IeIko8hUyT8D5KPBxnyFTOOMbUjfd35IR/oSSh1vDcpTffclZ+M X-Google-Smtp-Source: AGHT+IE25+pCHJfCPDaJeZnTAg5KlQsNewj3qVDYKOpp4L8xkcD2JYX9YfoOo9u4kEeLQXOqxZ8xMA== X-Received: by 2002:a17:903:3bcb:b0:220:ec62:7dc8 with SMTP id d9443c01a7336-22e85614060mr28878545ad.2.1746683283309; Wed, 07 May 2025 22:48:03 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-30ad4d2f15dsm1453426a91.18.2025.05.07.22.48.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 22:48:02 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH 0/9] VTE integration support / Shell startup files refactor Date: Thu, 8 May 2025 14:47:54 +0900 Message-ID: <cover.1746682206.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Debbugs-Cc: Liliana Marie Prikler <liliana.prikler@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Noé Lopez <noelopez@HIDDEN>, Vivien Kraus <vivien@HIDDEN> Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=maxim.cournoyer@HIDDEN; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) The aim of this series was ultimately to add VTE integration support out of the box, resolving <https://issues.guix.gnu.org/72172>. In order to do so, I introduce the new etc-profile-d-service-type and etc-bashrc-d-service-type service types. While at it, define SYS_BASHRC in our Bash package to treat /etc/bashrc as a first class startup file, and get rid of /etc/skel/.bashrc, whose functionality is moved to /etc/bashrc or /etc/bashrc.d/aliases.sh and /etc/bashrc.d/bash_completion.sh. To test, I've used: --8<---------------cut here---------------start------------->8--- make check-system TESTS='basic openssh dropbear' --8<---------------cut here---------------end--------------->8--- as well as live testing in a GNOME desktop VM to validate the VTE integration. Thank you, Maxim Cournoyer (9): system: Source scripts from the /etc/profile.d directory. services: Add etc-profile-d-service-type. gnu: bash: Define the SYS_BASHRC macro. system: Source scripts from the /etc/bashrc.d directory. services: Add etc-bashrc-d-service-type. system: Migrate sourcing bash_completion.sh to etc-bashrc-d-service-type. system: Factorize bashrc default configuration. services: Add vte-integration-service-type. services: Add vte-integration-service-type to %desktop-services. doc/guix.texi | 57 ++++++++++++++++- gnu/home/services/shells.scm | 14 ++--- gnu/packages/bash.scm | 20 ++++++ gnu/services.scm | 116 +++++++++++++++++++++++++++++++++++ gnu/services/base.scm | 5 +- gnu/services/desktop.scm | 4 ++ gnu/system.scm | 43 ++++++------- gnu/system/shadow.scm | 21 +++---- gnu/tests/base.scm | 45 +++++++++++++- 9 files changed, 278 insertions(+), 47 deletions(-) base-commit: 9d9a6291c4e61f3af71e94e549926bd9905e99db -- 2.49.0
Maxim Cournoyer <maxim.cournoyer@HIDDEN>
:liliana.prikler@HIDDEN, maxim.cournoyer@HIDDEN, noelopez@HIDDEN, vivien@HIDDEN, guix-patches@HIDDEN
.
Full text available.liliana.prikler@HIDDEN, maxim.cournoyer@HIDDEN, noelopez@HIDDEN, vivien@HIDDEN, guix-patches@HIDDEN
:bug#78308
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.