public inbox for goredo-devel@lists.stargrave.org
Atom feed
* [PATCH] REDO_SHELL sets which shell goredo uses
@ 2026-10-13 16:02 ser.goredo=ser1.net via
  2026-10-13 16:02 ` [PATCH] REDO_SHELL sets which shell goredo uses. Some OSes change which shell /bin/sh points to; on Arch, it's bash. On Debian (on some forks, at least), it's dash. These shells are incompatible, esp about topics like variable expansion. With REDO_SHELL, users can set which shell goredo forks and ensure builds run ser.goredo=ser1.net via
  2026-10-14 14:05 ` [PATCH] REDO_SHELL sets which shell goredo uses Sergey Matveev (stargrave=stargrave.org) via
  0 siblings, 2 replies; 8+ messages in thread
From: ser.goredo=ser1.net via @ 2026-10-13 16:02 UTC (permalink / raw)
  To: goredo-devel

Hi,

/bin/sh is not the same shell on all systems, and this can lead to non-trivial
`do` files failing on different machines. On Arch, /bin/sh is a symlink to bash;
on FuriOS (a mobile Debian distribution) it's symlinked to dash; on many
embedded systems, it's busybox (ash). dash and bash are not compatible,
especially in variable expansion, which can cause builds to fail across systems.

This patch adds a `REDO_SHELL` environment variable. If set, goredo will use
that executable as the shell it forks; otherwise, it will default to `/bin/sh`.
That is, this patch should be backwards compatible while allowing builds to
function without distribution-specific modification.

I didn't see anywhere in the repos where the environment variables are
documented, so there's no change that adds documentation. I think it's
documented only on the website?

 main.go | 3 +++
 run.go  | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

--- SER

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-10-17  7:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-13 16:02 [PATCH] REDO_SHELL sets which shell goredo uses ser.goredo=ser1.net via
2026-10-13 16:02 ` [PATCH] REDO_SHELL sets which shell goredo uses. Some OSes change which shell /bin/sh points to; on Arch, it's bash. On Debian (on some forks, at least), it's dash. These shells are incompatible, esp about topics like variable expansion. With REDO_SHELL, users can set which shell goredo forks and ensure builds run ser.goredo=ser1.net via
2026-10-14 14:05 ` [PATCH] REDO_SHELL sets which shell goredo uses Sergey Matveev (stargrave=stargrave.org) via
2026-10-14 16:08   ` "Sean E. Russell" (ser.goredo=ser1.net) via
2026-10-16  8:43     ` Sergey Matveev (stargrave=stargrave.org) via
2026-10-16  9:37     ` Authenticating the tarballs and website Sergey Matveev (stargrave=stargrave.org) via
2026-10-16 23:20       ` "Sean E. Russell" (ser=ser1.net) via
2026-10-17  7:02         ` Sergey Matveev (stargrave=stargrave.org) via