GNU bug report logs - #42752
[PATCH core-updates] gnu: bash: Make completions work in non-login shells.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Jakub Kądziołka <kuba@HIDDEN>; Keywords: patch; dated Fri, 7 Aug 2020 22:15:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 42752 <at> debbugs.gnu.org:


Received: (at 42752) by debbugs.gnu.org; 10 Aug 2020 14:41:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 10 10:41:48 2020
Received: from localhost ([127.0.0.1]:37091 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k58zj-0006YP-Ou
	for submit <at> debbugs.gnu.org; Mon, 10 Aug 2020 10:41:47 -0400
Received: from pat.zlotemysli.pl ([37.59.186.212]:38410)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kuba@HIDDEN>) id 1k58zg-0006YF-II
 for 42752 <at> debbugs.gnu.org; Mon, 10 Aug 2020 10:41:46 -0400
Received: (qmail 31031 invoked by uid 1009); 10 Aug 2020 16:41:42 +0200
Received: from nat-0.staszic.waw.pl (kuba@HIDDEN@nat-0.staszic.waw.pl)
 by pat.zlotemysli.pl (envelope-from <kuba@HIDDEN>,
 uid 1002) with qmail-scanner-2.08st 
 (clamdscan: 0.98.6/25899. spamassassin: 3.4.0. perlscan: 2.08st.  
 Clear:RC:1(94.240.45.201):. 
 Processed in 0.05902 secs); 10 Aug 2020 14:41:42 -0000
Received: from nat-0.staszic.waw.pl (HELO gravity)
 (kuba@HIDDEN@94.240.45.201)
 by pat.zlotemysli.pl with SMTP; 10 Aug 2020 16:41:42 +0200
Date: Mon, 10 Aug 2020 16:41:41 +0200
From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= <kuba@HIDDEN>
To: Mathieu Othacehe <othacehe@HIDDEN>
Subject: Re: [bug#42752] [PATCH core-updates] gnu: bash: Make completions
 work in non-login shells.
Message-ID: <20200810144141.52fpzv6m4kqp3jix@gravity>
References: <20200807221439.729-1-kuba@HIDDEN> <87k0y6hmyv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="7vfnulwkbhqc3sw6"
Content-Disposition: inline
In-Reply-To: <87k0y6hmyv.fsf@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 42752
Cc: 42752 <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 (-)


--7vfnulwkbhqc3sw6
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 10, 2020 at 11:25:12AM +0200, Mathieu Othacehe wrote:
>=20
> Hey Jakub,
>=20
> > Currently, /etc/bashrc is only loaded by /etc/profile. Because the
> > former is responsible for setting up command-specific completions, they
> > currently only work in login shells. This patch configures bash to load
> > /etc/bashrc in interactive non-login shells, as by default no
> > system-wide configuration is loaded.
>=20
> /etc/bashrc is also loaded by ~/.bashrc in "default-skeletons". So your
> patch would cover the case of an interactive, non-login shell run by a
> logged in user without the default ~/.bashrc file, right?

Oh! It seems I overwrote it with my own .bashrc when I migrated my
dotfiles. I still think this patch is a good idea - I think we should
make /etc/skel/.bashrc contain only nice-to-have defaults, such as
changing the prompt based on $GUIX_ENVIRONMENT, and move the essential
things to /etc/bashrc. That way, overwriting the .bashrc won't break
anything important.

I guess I should follow this patch up with an adjustment to
/etc/skel/.bashrc, removing the 'source /etc/bashrc' line?

Regards,
Jakub K=C4=85dzio=C5=82ka

--7vfnulwkbhqc3sw6
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl8xXKAACgkQ4xWnWEYT
FWRRdg/9G45UuvM3NwhmGMMZchWRsJDLCUfWczIrfOKp7LVhFRCWzZALTe5NntOd
p7NufYD2dgMFfnw2RaWBYHf7k1rE8EIEoGp1C4f1UF92X+G/+TAZEO95c/yk89MM
Z4LsGz7hn9ceLFeo11k5mxqwEhj0KVxtbzC2NRg2SeTYPIcG+Sb4Eo79fnEANZa2
2SsJ5oWQnDIYDG/JqLhOZEk3QxTmNp0Orzlx7yte0K/XbkLUt05ETFZuDNDHvHhs
8PaVobUHSH5Mjm9xukqgLLQ8A24LcsZbXgSslAafydKRphkzKn7HN4tl9Ug2qn+6
ntFCUxGqwNmicW8EzoOWFClL1WsDYCAX2BpttI7NCl1qdBrPnpCIC2R8esOJv/ew
V7qL1QAIl8FZIZtehBmQ0qukDAz0sSHWUfnbKV6zLi8m9OvU5fguot7HqxFGKU3B
+F1Xu7GUgetIScNpLeT+Rsb4PYAfJmWSGoF+qMEOCcuJCtR/q9Z6MAe1iYkV9wa6
kh6Ehx5dBjUNkSJBOwH+YqrHA1IwfDnPe55kTgl4zyAy0C/jnqUcBO0zobhB/Eul
VYNGL2O/APbkJME/CzlgZ3N+MniBeDx9t8TCANHg1yyuagJtdsghtHSfI2l2qUyS
kNk7a/z89j8gT99VSGAecp1McuKWsvu4PKAE4UnZsBgbSdejbZY=
=zA6M
-----END PGP SIGNATURE-----

--7vfnulwkbhqc3sw6--




Information forwarded to guix-patches@HIDDEN:
bug#42752; Package guix-patches. Full text available.

Message received at 42752 <at> debbugs.gnu.org:


Received: (at 42752) by debbugs.gnu.org; 10 Aug 2020 09:25:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 10 05:25:30 2020
Received: from localhost ([127.0.0.1]:34375 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k543e-0000Jv-5j
	for submit <at> debbugs.gnu.org; Mon, 10 Aug 2020 05:25:30 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48754)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <othacehe@HIDDEN>) id 1k543c-0000Jj-J1
 for 42752 <at> debbugs.gnu.org; Mon, 10 Aug 2020 05:25:28 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46284)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <othacehe@HIDDEN>)
 id 1k543W-00008i-NP; Mon, 10 Aug 2020 05:25:22 -0400
Received: from [2a01:e0a:19b:d9a0:3107:b202:556:bd51] (port=46052 helo=cervin)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <othacehe@HIDDEN>)
 id 1k543O-0006hN-Gw; Mon, 10 Aug 2020 05:25:16 -0400
From: Mathieu Othacehe <othacehe@HIDDEN>
To: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= <kuba@HIDDEN>
Subject: Re: [bug#42752] [PATCH core-updates] gnu: bash: Make completions work
 in non-login shells.
References: <20200807221439.729-1-kuba@HIDDEN>
Date: Mon, 10 Aug 2020 11:25:12 +0200
In-Reply-To: <20200807221439.729-1-kuba@HIDDEN> ("Jakub
 \=\?utf-8\?B\?S8SFZHppb8WCa2EiJ3M\=\?\=
 message of "Sat, 8 Aug 2020 00:14:39 +0200")
Message-ID: <87k0y6hmyv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 42752
Cc: 42752 <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: -3.3 (---)


Hey Jakub,

> Currently, /etc/bashrc is only loaded by /etc/profile. Because the
> former is responsible for setting up command-specific completions, they
> currently only work in login shells. This patch configures bash to load
> /etc/bashrc in interactive non-login shells, as by default no
> system-wide configuration is loaded.

/etc/bashrc is also loaded by ~/.bashrc in "default-skeletons". So your
patch would cover the case of an interactive, non-login shell run by a
logged in user without the default ~/.bashrc file, right?

Thanks,

Mathieu




Information forwarded to guix-patches@HIDDEN:
bug#42752; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Aug 2020 22:15:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 18:15:01 2020
Received: from localhost ([127.0.0.1]:57703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k4Adh-00012f-1b
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2020 18:15:01 -0400
Received: from lists.gnu.org ([209.51.188.17]:41978)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kuba@HIDDEN>) id 1k4Add-00012U-3r
 for submit <at> debbugs.gnu.org; Fri, 07 Aug 2020 18:14:59 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48962)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <kuba@HIDDEN>)
 id 1k4Adc-0006Ge-Uf
 for guix-patches@HIDDEN; Fri, 07 Aug 2020 18:14:56 -0400
Received: from pat.zlotemysli.pl ([37.59.186.212]:60838)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <kuba@HIDDEN>) id 1k4Ada-0006yb-Jn
 for guix-patches@HIDDEN; Fri, 07 Aug 2020 18:14:56 -0400
Received: (qmail 1755 invoked by uid 1009); 8 Aug 2020 00:14:45 +0200
Received: from 188.123.215.55 (kuba@HIDDEN@188.123.215.55) by
 pat.zlotemysli.pl (envelope-from <kuba@HIDDEN>,
 uid 1002) with qmail-scanner-2.08st 
 (clamdscan: 0.98.6/25896. spamassassin: 3.4.0. perlscan: 2.08st.  
 Clear:RC:1(188.123.215.55):. 
 Processed in 0.010206 secs); 07 Aug 2020 22:14:45 -0000
Received: from unknown (HELO localhost.localdomain)
 (kuba@HIDDEN@188.123.215.55)
 by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 8 Aug 2020 00:14:45 +0200
From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= <kuba@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH core-updates] gnu: bash: Make completions work in non-login
 shells.
Date: Sat,  8 Aug 2020 00:14:39 +0200
Message-Id: <20200807221439.729-1-kuba@HIDDEN>
X-Mailer: git-send-email 2.28.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Qmailux-2.08st: added fake Content-Type header
Content-Type: text/plain
Received-SPF: none client-ip=37.59.186.212; envelope-from=kuba@HIDDEN;
 helo=pat.zlotemysli.pl
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/07 18:14:45
X-ACL-Warn: Detected OS   = Linux 3.11 and newer
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001,
 SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
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: -3.3 (---)

Currently, /etc/bashrc is only loaded by /etc/profile. Because the
former is responsible for setting up command-specific completions, they
currently only work in login shells. This patch configures bash to load
/etc/bashrc in interactive non-login shells, as by default no
system-wide configuration is loaded.

* gnu/packages/bash.scm (bash): Set SYS_BASHRC to /etc/bashrc.
---
 gnu/packages/bash.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 47ca625d9a..9784e2ccc1 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -108,7 +108,8 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
   (let* ((cppflags (string-join '("-DDEFAULT_PATH_VALUE='\"/no-such-path\"'"
                                   "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'"
                                   "-DNON_INTERACTIVE_LOGIN_SHELLS"
-                                  "-DSSH_SOURCE_BASHRC")
+                                  "-DSSH_SOURCE_BASHRC"
+                                  "-DSYS_BASHRC='\"/etc/bashrc\"'")
                                 " "))
          (configure-flags
           ``("--with-installed-readline"
-- 
2.28.0





Acknowledgement sent to Jakub Kądziołka <kuba@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#42752; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 10 Aug 2020 14:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.