Artifacts Associated With Ticket 46291ba24dc85c0e
Ticket change [ba2605f5df] (rid 196608) by anonymous on 2021-11-17 08:47:34:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
win/Makefile.in has bashism during install, when zipfs=no. This can be encountered during `make install` after configuring without zipfs. The following patch fixes it at core-8-branch, but the same fix should also be applied to main: ``` From bf4a7c32971a3a56a96298875e754ca79334dfa8 Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" <[email protected]> Date: Wed, 17 Nov 2021 10:33:14 +0200 Subject: [PATCH] win: install: avoid bashism with zipfs=no The expansion form *foo.{ext1,ext2} is bash-specific, and if zipfs is disabled and the shell is not bash (e.g. on Debian when cross compiling to windows) then this line fails. Replace it with standard posix glob. --- win/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/win/Makefile.in b/win/Makefile.in index 1e4b82299c..649f452324 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -856,7 +856,8 @@ install-libraries: libraries install-tzdata install-msgs $(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)"; \ done; @echo "Installing package cookiejar 0.2" - @for j in $(ROOT_DIR)/library/cookiejar/*.{tcl,gz}; \ + @for j in $(ROOT_DIR)/library/cookiejar/*.tcl \ + $(ROOT_DIR)/library/cookiejar/*.gz; \ do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/cookiejar0.2"; \ done; -- 2.25.1 ```
- foundin initialized to: "8.7+ (main, core-8-branch)"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "53. Configuration and Build Tools"
- title initialized to: "win: install: bashism in Makefile.in"
- type initialized to: "Bug"
Ticket change [9d6fdf2b92] (rid 196617) by jan.nijtmans on 2021-11-17 10:22:55:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2459535.93258196"
- closer changed to: "jan.nijtmans"
- icomment:
Fixed [7f97316fe4b66b9a|here]. Thanks for the report and for the patch!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [d173d13e5c] (rid 196622) by anonymous on 2021-11-17 10:40:28:
- closedate changed to: "2459535.94477164"
- closer changed to: "anonymous"
- icomment:
Thanks. Do note that these globs can result in an error if there are no *.tcl files (or no *.gz files), as e.g. `*.gz` "expands" to `*.gz` (i.e. unmodified) if there are no matches. In some shells, like bash, the `nullglob` option can handle it, but that's not standardized. A standard approach would be to check that the file exists before using it, e.g. ``` for i in path/to/*.gz; do [ -e "$i" ] || continue # do something with $i done ``` - login: "anonymous"
- mimetype: "text/plain"