general high-level discussion about spectrum
 help / color / mirror / Atom feed
From: Dan Connolly <dckc@madmode.com>
To: discuss@spectrum-os.org
Subject: Re: make run fails: make-gpt.sh: 9: set: Illegal option -o pipefail
Date: Mon, 30 Mar 2026 22:17:44 -0500	[thread overview]
Message-ID: <CAD2YivZ3RNKOxzRwH=U_kTtt0Vt75=RaE0N837YORu0y7hx7Yg@mail.gmail.com> (raw)
In-Reply-To: <CAD2YivbRwDUzgXv32A2Otetunny1MXsbuROj7VV8C7EYrAdNiw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 677 bytes --]

On Mon, Mar 30, 2026 at 7:44 PM Dan Connolly <dckc@madmode.com> wrote:

> ../../scripts/make-gpt.sh build/live.img.tmp \
>     build/rootfs.verity.superblock:verity:$(../../scripts/format-uuid.sh
> "$(dd if=build/rootfs.verity.roothash bs=32 skip=1 count=1
> status=none)"):Spectrum_'0.0.0.verity' \
>     build/rootfs:root:$(../../scripts/format-uuid.sh "$(head -c 32
> build/rootfs.verity.roothash)"):Spectrum_'0.0.0'
> ../../scripts/make-gpt.sh: 9: set: Illegal option -o pipefail
>

A small fix (attached) worked for me.

Then I got a permission error, so I had to do:

sudo usermod -aG kvm $USER
newgrp kvm

-- 
Dan Connolly
https://www.madmode.com

[-- Attachment #1.2: Type: text/html, Size: 1194 bytes --]

[-- Attachment #2: 0001-fix-don-t-rely-on-bash-isms-in-bin-sh-scripts.patch --]
[-- Type: text/x-patch, Size: 1114 bytes --]

From 082882cc981566891ec17ccedd291b930502c91e Mon Sep 17 00:00:00 2001
From: Dan Connolly <dckc@madmode.com>
Date: Mon, 30 Mar 2026 22:11:39 -0500
Subject: [PATCH] fix: don't rely on bash-isms in /bin/sh scripts

---
 scripts/genfiles.sh | 3 ++-
 scripts/make-gpt.sh | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/genfiles.sh b/scripts/genfiles.sh
index 0a5647a..c7e89c6 100755
--- a/scripts/genfiles.sh
+++ b/scripts/genfiles.sh
@@ -1,7 +1,8 @@
 #!/bin/sh --
 # SPDX-License-Identifier: EUPL-1.2+
 # SPDX-FileCopyrightText: 2025 Demi Marie Obenour <demiobenour@gmail.com>
-set -euo pipefail
+set -eu
+(set -o pipefail) 2>/dev/null && set -o pipefail
 export LC_ALL=C LANGUAGE=C
 dir=$(git rev-parse --show-toplevel)
 cd -- "$dir"
diff --git a/scripts/make-gpt.sh b/scripts/make-gpt.sh
index 998a54d..d1bea41 100755
--- a/scripts/make-gpt.sh
+++ b/scripts/make-gpt.sh
@@ -6,7 +6,8 @@
 #
 # usage: make-gpt.sh GPT_PATH PATH:PARTTYPE[:PARTUUID[:PARTLABEL[:PARTMiB]]]...
 
-set -euo pipefail
+set -eu
+(set -o pipefail) 2>/dev/null && set -o pipefail
 
 ONE_MiB=1048576
 
-- 
2.49.0


  reply	other threads:[~2026-04-29  6:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31  0:44 make run fails: make-gpt.sh: 9: set: Illegal option -o pipefail Dan Connolly
2026-03-31  3:17 ` Dan Connolly [this message]
2026-04-29 13:57   ` Alyssa Ross
2026-05-01  3:26     ` Dan Connolly

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD2YivZ3RNKOxzRwH=U_kTtt0Vt75=RaE0N837YORu0y7hx7Yg@mail.gmail.com' \
    --to=dckc@madmode.com \
    --cc=discuss@spectrum-os.org \
    /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.
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 NNTP newsgroup(s).