https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268686
Bug ID: 268686
Summary: freebsd-update cannot handle spaces in file paths
Product: Base System
Version: 13.1-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
Created attachment 239169
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=239169&action=edit
Modifications to freebsd-update to make it work with spaces in the file paths
If freebsd-update is run with the -b -d or -f options followed by a path with a
space, freebsd-update prints its usage and exits instead of updating. This is
because it further splits arguments by spaces into more arguments internally,
causing it to incorrectly parse them. There are also problems with the internal
handling of the $BASEDIR and other path variables. This makes it difficult to
update certain installations, for example a jail located at a non-root location
with a space in its path.
This can be fixed by simply adding quotes to the necessary locations in the
script, and changing the use of xargs in one location. I have attached a diff
of what I had to do to get it to work for my usage (fetch, upgrade, and
install). certctl, which is run by freebsd-update, also has a problem with
spaces and would also need to be fixed in a similar manner.
The script also doesn't return a nonzero error code upon failure to parse its
arguments.
--
You are receiving this mail because:
You are the assignee for the bug.