From a138cdb39f9dcc6d949aea3456b4d98aa90edeb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 25 Jul 2025 23:10:47 +0200 Subject: [PATCH] gnu: dico: Hard-code file name of the default shell. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a regression introduced in a33e152f2eb9927be5942b00bdaaecba737c650f whereby the ‘dicod’ Shepherd service would fail to start with: dicod[2]: /gnu/store/…-m4-1.4.19/bin/m4 -s exited with status 127 … due to /bin/sh missing in its least-authority environment and ‘SHELL’ being unset. * gnu/packages/dico.scm (dico)[arguments]: Add ‘set-shell-file-name’ phase. [inputs]: Add ‘bash-minimal’. Change-Id: Ie6f8a7a462a2dedcbf7ea049e385e121da06e741 --- gnu/packages/dico.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/dico.scm b/gnu/packages/dico.scm index 38f57dc24f516c3e3d10f7353f49e538d4fde7b2..16cd2ebd831bf3c5da66d27cdb7b3909edc8b4a7 100644 --- a/gnu/packages/dico.scm +++ b/gnu/packages/dico.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015-2016, 2018, 2024 Ludovic Courtès +;;; Copyright © 2015-2016, 2018, 2024-2025 Ludovic Courtès ;;; Copyright © 2016, 2018 Efraim Flashner ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2020 Vincent Legoll @@ -27,6 +27,7 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages bash) #:use-module (gnu packages crypto) #:use-module (gnu packages readline) #:use-module (gnu packages m4) @@ -56,6 +57,14 @@ "/share/guile/site/2.0") "--disable-static") #:phases (modify-phases %standard-phases + (add-before 'build 'set-shell-file-name + (lambda* (#:key inputs #:allow-other-keys) + ;; This code invokes "/bin/sh -c 'm4 -s ...'". + (substitute* "grecs/src/grecs-lex.c" + (("\"/bin/sh\"") + (string-append "\"" + (search-input-file inputs "/bin/sh") + "\""))))) (add-before 'check 'silence-guile (lambda _ ;; Guile is too talkative, which disturbs the test @@ -65,6 +74,7 @@ (native-inputs (list groff)) (inputs (list m4 ;used at run time + bash-minimal ;likewise pcre python-wrapper guile-2.2