* Noteworthy changes in release ?.? (????-??-??) [?]
+** Bug fixes
+
+ install --strip now supports installing to files with a leading hyphen.
+ Previously such file names would have caused the strip process to fail.
+ [This bug was present in "the beginning".]
+
* Noteworthy changes in release 9.3 (2023-04-18) [stable]
error (0, errno, _("fork system call failed"));
break;
case 0: /* Child. */
- execlp (strip_program, strip_program, name, NULL);
- die (EXIT_FAILURE, errno, _("cannot run %s"), quoteaf (strip_program));
+ {
+ char const *safe_name = name;
+ if (name && *name == '-')
+ safe_name = file_name_concat (".", name, NULL);
+ execlp (strip_program, strip_program, safe_name, NULL);
+ die (EXIT_FAILURE, errno, _("cannot run %s"), quoteaf (strip_program));
+ }
default: /* Parent. */
if (waitpid (pid, &status, 0) < 0)
error (0, errno, _("waiting for strip"));
EOF
chmod a+x b || framework_failure_
-
echo abc > src || framework_failure_
echo aBc > exp || framework_failure_
ginstall src dest -s --strip-program=./b || fail=1
returns_ 1 ginstall src dest2 -s --strip-program=./FOO || fail=1
test -e dest2 && fail=1
+# Ensure naked hyphens not passed
+cat <<EOF > no-hyphen || framework_failure_
+#!$SHELL
+printf -- '%s\\n' "\$1" | grep '^[^-]'
+EOF
+chmod a+x no-hyphen || framework_failure_
+
+ginstall -s --strip-program=./no-hyphen -- src -dest || fail=1
+
Exit $fail