From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: Problems with handicapped 'bash' from glibc package Date: Wed, 12 Feb 2014 17:39:35 +0000 Message-ID: <87vbwkmdrc.fsf@netris.org> References: <871tz8oldk.fsf@netris.org> <87ob2c1njb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDdnR-00028n-HI for guix-devel@gnu.org; Wed, 12 Feb 2014 12:40:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDdnM-0001Gm-70 for guix-devel@gnu.org; Wed, 12 Feb 2014 12:40:29 -0500 In-Reply-To: <87ob2c1njb.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 12 Feb 2014 14:14:00 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Mark H Weaver skribis: > >> The 'bash' in the glibc package is handicapped in at least two ways: >> >> * It can't set the locale, because it looks for locales in >> /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-intermediate-2.18-lo= cales >> >> * It can't look up anything from NSS, such as passwd data, because it >> tries to load the modules from >> /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-intermediate-2.18 >> >> There are two problems that need to be addressed, I think: >> >> * Users could easily end up with this handicapped 'bash' as their >> primary bash, if they installed (or upgraded?) 'glibc' since the last >> time I installed 'bash'. This happened to me, for example. >> >> * Some (most?) programs in Guix that launch subprocesses with the shell >> use this handicapped one. For example, every time I run 'w3m', it >> prints two warnings about 'sh' being unable to set the locale. >> >> Any suggestions about how we should address these problems? > > Indeed, that=E2=80=99s a problem. > > For the record, the handicaped bash comes from the removal of /bin/sh > [0]. It is used by =E2=80=98system=E2=80=99 and =E2=80=98popen=E2=80=99. > > Looks like solving this would require either rewriting glibc references > in the static bash binary (tricky, especially since the glibc directory > names have different lengths currently), or building Bash directly in > the glibc-final derivation so that it refers to the right libc with all > its bells and whistles. > > The latter sounds best, but it would require to sort of duplicate the > build recipe of Bash internally. FWIW, I think this latter option is the least bad of the ones you suggested, and I can't think of a better solution. While we're on the subject of 'bash', should we be applying the patches in http://ftp.gnu.org/gnu/bash/bash-4.2-patches/ ? Mark