From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roel Janssen Subject: bug#29337: Bash reads system-wide bashrc unconditionally. Date: Fri, 17 Nov 2017 13:16:13 +0100 Message-ID: <878tf5ksmq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFfa0-0000tG-Cx for bug-guix@gnu.org; Fri, 17 Nov 2017 07:17:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFfZu-0001AY-PH for bug-guix@gnu.org; Fri, 17 Nov 2017 07:17:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:35683) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eFfZu-0001AN-M9 for bug-guix@gnu.org; Fri, 17 Nov 2017 07:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eFfZu-0003om-CM for bug-guix@gnu.org; Fri, 17 Nov 2017 07:17:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFfZK-0000QK-2W for bug-guix@gnu.org; Fri, 17 Nov 2017 07:16:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFfZE-0000aI-UP for bug-guix@gnu.org; Fri, 17 Nov 2017 07:16:26 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFfZE-0000a2-Qi for bug-guix@gnu.org; Fri, 17 Nov 2017 07:16:20 -0500 Received: from ip-80-113-14-101.ip.prioritytelecom.net ([80.113.14.101]:25613 helo=yellowstone) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eFfZE-0003bg-7k for bug-guix@gnu.org; Fri, 17 Nov 2017 07:16:20 -0500 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 29337@debbugs.gnu.org Dear Guix, This is more of an issue for GuixSD. Our 'bash' package seems to behave differently from other distributions (like CentOS 7), and it behaves differently from the way described in its manual page. I added the following line to /etc/bashrc: echo "Hello, world" Here's the command to reproduce the problem: $ env - bash --init-file <(echo "echo \"Goodbye, world\"") -i Hello, world Goodbye, world >From the manpage: ... -i If the -i option is present, the shell is interactive. ... --init-file file --rcfile file Execute commands from file instead of the standard personal initialization file ~/.bashrc if the shell is interactive (see INVOCATION below). ... So, what should happen, is that it ignores the system-wide initialization file (and the user's initialization file). On CentOS 7, the following happens (yes, I added the echo-statement to /etc/bashrc on CentOS as well): $ env - bash --init-file <(echo "echo \"Goodbye, world\"") -i Goodbye, world On GuixSD: $ env - bash --init-file <(echo "echo \"Goodbye, world\"") -i Hello, world Goodbye, world Where does this difference come from? And could we make its behavior similar to CentOS 7, and more importantly, to the description in the manpage? Kind regards, Roel Janssen