Comments (12)
Yep, I have bash 5 already on my machine. It fixes the issue. Thx.
from custompios.
Not sure what is going on. Will try and reoroduce.
from custompios.
i cannot reproduce (on Debian/sid).
it might be interesting which bash
you are using.
$ which bash
/usr/bin/bash
$ bash --version
GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)
having said that: the ${MULTIPLE}
variable seems to be unused, except for the problematic line
CustomPiOS/src/make_custom_pi_os
Line 34 in 63da54b
so it probably is safe to remove that part of the script
from custompios.
i got hands of a macOS/BigSur machine, and i can now reproduce the problem.
$ which bash
/bin/bash
$ bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)
in the bash changelogs i find
[...]
This document details the changes between this version, bash-5.2-alpha, and
the previous version, bash-5.1-release.
[...]
3. New Features in Bash
[...]
bb. Array references using `@' and `*' that are the value of nameref variables
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
set -u is enabled and the array (v) is unset.
so maybe this is just requiring a too-new-for-macOS bash version (for something that doesn't get used anyhow...)
OTOH, the incriminated lines where added in 2017, when the current release of bash was bash-4.4
.
probably the relevant changelog entry is therefore:
This document details the changes between this version, bash-4.4-rc2, and
the previous version, bash-4.4-beta2.
[...]
3. New Features in Bash
a. Using ${a[@]} or ${a[*]} with an array without any assigned elements when
the nounset option is enabled no longer throws an unbound variable error.
from custompios.
My current bash 3.2.57, I make a clean setup and attech all my logs here:
➜ hacklab git clone https://github.com/guysoft/CustomPiOS.git
Cloning into 'CustomPiOS'...
remote: Enumerating objects: 4837, done.
remote: Counting objects: 100% (810/810), done.
remote: Compressing objects: 100% (272/272), done.
remote: Total 4837 (delta 590), reused 594 (delta 524), pack-reused 4027
Receiving objects: 100% (4837/4837), 1000.27 KiB | 4.15 MiB/s, done.
Resolving deltas: 100% (2589/2589), done.
➜ hacklab cd CustomPiOS
➜ CustomPiOS git:(devel) which bash
/bin/bash
➜ CustomPiOS git:(devel) bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin23)
Copyright (C) 2007 Free Software Foundation, Inc.
➜ CustomPiOS git:(devel) ./src/make_custom_pi_os -g test
Settings:
making dstro in test
variant: raspios_lite_armhf
./src/make_custom_pi_os: line 36: MULTIPLE[@]: unbound variable
➜ CustomPiOS git:(devel)
from custompios.
@umlaeute you right, the error throws because i use the old version of bash, currently I update my bash and has the following output. Does the output correct ?
➜ CustomPiOS git:(devel) bash --version
GNU bash, version 5.2.15(1)-release (x86_64-apple-darwin23.0.0)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
➜ CustomPiOS git:(devel) ./src/make_custom_pi_os -g test
Settings:
making dstro in test
variant: raspios_lite_armhf
sed: 1: "config": command c expects \ followed by text
➜ CustomPiOS git:(devel) ✗
from custompios.
hmm, the new failure (assuming that i correctly read your output as a failure), appears to be somewhere in
CustomPiOS/src/dist_generators/dist_example_script
Lines 22 to 23 in 63da54b
i don't see any obvious invocations of the c
command of sed (and the ${DIST_NAME}
variable should expand to test
, so nothing wrong here either...)
do you have gsed
installed? if not, can you also install it (brew install gnu-sed
)?
from custompios.
Thx, the problem fix, after I install gnu-sed
.
Now I have problem, with execute sudo ./test/src/build_dist
, I have the following error, in build.log
++++ realpath -s /Users/vovastelmashchuk/Desktop/hacklab/CustomPiOS/src/build
realpath: illegal option -- s
usage: realpath [-q] [path ...]
+++ dirname
usage: dirname string [...]
++ BUILD_SCRIPT_PATH=
You have new mail in /var/mail/vovastelmashchuk
It's look like a new issue, can we discuss the issue here or close current discussion and open new github issue ?
Also I think about pull request to project readme with MacOs specific instraction, some think like a pre-condition, min version of bash and gnu-sed
from custompios.
i agree it's probably a new issue.
otoh, it seems that CustomPiOS is probably just not usable on macOS right now.
from custompios.
Indeed, you could use it via Docker. In general Docker tends to work better if you are on MacOS.
from custompios.
You could install bash 5 using homebrew.
brew install bash
But then you need to put bash in your path:
/opt/homebrew/bin/bash --version
from custompios.
Thanks! If you have the time to document or post here in the wiki how to gets stuff working on mac that could help people in the future (or yourself too):
https://github.com/guysoft/CustomPiOS/wiki/Building#building-from-os-x
from custompios.
Related Issues (20)
- `qemu: uncaught target signal 11 (Segmentation fault) - core dumped` HOT 16
- Error while building 64-bit image HOT 12
- Change repo branch on nightly build HOT 6
- Fails building on DietPi - no sshd_config HOT 1
- Fails to resize partition after April 24 release HOT 5
- RPM based distro support HOT 3
- BTRFS needs to resize correctly
- Bug /dev/loop0 Partition don't follow the config to resize HOT 5
- Add secondary root partition HOT 1
- qemu_boot requires xz-compressed images to live in /tmp HOT 6
- use POSIX parameter expansion for assigning default values HOT 2
- dangling files after build eat diskspace. HOT 1
- allow out-of-tree builds HOT 2
- allow distro-relative paths in custompios_path HOT 7
- allow one to alter the user(name) without setting a default password HOT 3
- Build within container abruptly stops on current `devel` image HOT 3
- permissions of the generated image file HOT 3
- CustomPiOS v2 - support for remote modules and meta modules and more HOT 14
- docker build: failed to set up loop device: No such file or directory HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from custompios.