From: Philip McGrath <philip@philipmcgrath.com>
To: "Ludovic Courtès" <ludo@gnu.org>,
"Liliana Marie Prikler" <liliana.prikler@gmail.com>
Cc: guix <guix-devel@gnu.org>, Maxime Devos <maximedevos@telenet.be>
Subject: Re: What 'sh' should 'system' use?
Date: Sun, 16 Oct 2022 03:56:33 -0400 [thread overview]
Message-ID: <5928822.lOV4Wx5bFT@bastet> (raw)
In-Reply-To: <7d61f502c9907fd9564e4052c8100aabd4d2828c.camel@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3810 bytes --]
On Sunday, October 16, 2022 3:04:45 AM EDT Liliana Marie Prikler wrote:
> Am Samstag, dem 15.10.2022 um 19:23 -0400 schrieb Philip McGrath:
> > On Saturday, October 1, 2022 12:54:27 PM EDT Ludovic Courtès wrote:
> > > Hello!
> > >
> > > Philip McGrath <philip@philipmcgrath.com> skribis:
> > > > 1) If we want to continue to hard-code a specific shell into
> > > > Glibc, I
> > > > think we should document the decision (for example, why 'bash-
> > > > static' vs.
> > > > 'bash- minimal'?) […]
> > >
> > > The choice of ‘bash-static’ rather than ‘bash-minimal’ is motivated
> > > by
> > > the fact that, in (gnu packages commencement), we want to make sure
> > > ‘glibc-final’ does not retain references to its build-time
> > > environment.
> > > See #:allowed-references in ‘glibc-final’.
> >
> > This makes sense as far as using 'bash-static' in Glibc. The aspects
> > I'm unsure of are:
> >
> > 1. If I'm packaging software that implements a function like
> >
> > 'system' (e.g. Racket, SML/NJ, Chez Scheme, etc.), should I use
> > 'bash-minimal' or 'bash-static'?
> >
> > 2. Do we really need 'bash-minimal' at all? Why not just replace it
> >
> > with 'bash-static'?
>
> We already explained those two to you. Racket, SML/NJ, Chez Scheme et
> al. are not bootstrap-relevant, thus they can use bash-minimal. Unlike
> bash-static, bash-minimal can be grafted, i.e. a security bug in bash(-
> minimal) that necessitates a version bump or similar does not cause a
> world rebuild. A security bug in bash-static does.
>
I don't think I understand this. Does it mean that, in the following, I am
running a Bash that wouldn't have security bugs fixed? If so, that seems quite
bad!
--8<---------------cut here---------------start------------->8---
philip@bastet:/tmp$ cat run-bshell.scm
(use-modules
(guix build-system gnu)
(guix gexp)
((guix licenses) #:prefix license:)
(guix packages))
(define src
(plain-file "run-bshell.c"
"
#include <stdlib.h>
#include <unistd.h>
#include <paths.h>
int main(void)
{
execl(_PATH_BSHELL,
_PATH_BSHELL,
\"-c\",
\"echo \" _PATH_BSHELL,
(char *)NULL);
}
"))
(package
(name "run-bshell")
(version "0")
(source src)
(build-system gnu-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(delete 'configure)
(replace 'build
(lambda args
(invoke "gcc" "-o" "run-bshell" #$src)))
(delete 'check)
(replace 'install
(lambda args
(install-file "run-bshell" (string-append #$output "/bin")))))))
(home-page #f)
(synopsis #f)
(description #f)
(license license:cc0))
philip@bastet:/tmp$ guix shell --rebuild-cache --container --no-cwd -f run-
bshell.scm -- run-bshell
substitute: updating substitutes from 'https://bordeaux-us-east-mirror.cbaines.nsubstitute: updating substitutes from 'https://bordeaux-us-east-mirror.cbaines.net'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'...
100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations will be built:
/gnu/store/q5bib9dgaxzag29a2l4b833mm5l12dx3-profile.drv
/gnu/store/r45khn1mq17fc0xsab1yszii85ynsm2j-run-bshell-0.drv
building /gnu/store/r45khn1mq17fc0xsab1yszii85ynsm2j-run-bshell-0.drv...
building CA certificate bundle...
listing Emacs sub-directories...
building fonts directory...
building directory of Info manuals...
building profile with 1 package...
/gnu/store/720rj90bch716isd8z7lcwrnvz28ap4y-bash-static-5.1.8/bin/sh
philip@bastet:/tmp$
--8<---------------cut here---------------end--------------->8---
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-10-16 7:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 0:13 What 'sh' should 'system' use? Philip McGrath
2022-09-19 7:07 ` Liliana Marie Prikler
2022-09-26 8:07 ` Philip McGrath
2022-09-26 10:04 ` Liliana Marie Prikler
2022-09-19 12:55 ` Maxime Devos
2022-09-26 7:04 ` Philip McGrath
2022-09-26 9:41 ` Liliana Marie Prikler
2022-09-26 12:24 ` Maxime Devos
2022-10-01 16:54 ` Ludovic Courtès
2022-10-15 23:23 ` Philip McGrath
2022-10-16 7:04 ` Liliana Marie Prikler
2022-10-16 7:56 ` Philip McGrath [this message]
2022-10-16 8:23 ` Liliana Marie Prikler
2022-10-19 15:30 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5928822.lOV4Wx5bFT@bastet \
--to=philip@philipmcgrath.com \
--cc=guix-devel@gnu.org \
--cc=liliana.prikler@gmail.com \
--cc=ludo@gnu.org \
--cc=maximedevos@telenet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).