[squid-dev] handling spaces in path to sources

Alex Rousskov rousskov at measurement-factory.com
Tue Feb 18 16:53:08 UTC 2020


On 2/18/20 4:46 AM, Francesco Chemolli wrote:

> TL;DR: it's pointless. Spaces in paths are not safe and do not work.

A single failure on MacOS does not prove much, but, AFAICT, we should
indeed avoid spending time on supporting spaces in bootstrap.sh because
autoconf explicitly prohibits file names with spaces[1]:

```
Autoconf uses shell-script processing extensively, so the file names
that it processes should not contain characters that are special to the
shell. Special characters include space, tab, ...
```

[1]
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/File-System-Conventions.html#File-System-Conventions


Since regular users do not bootstrap, we do not need to make
bootstrap.sh space-safe at least until autoconf/configure becomes
space-safe (or we stop using autoconf and similar space-unsafe tools).


Thank you,

Alex.

> On Tue, Feb 18, 2020 at 8:40 AM Francesco Chemolli wrote:
> 
>     Hi all,
>       as a followup to discussion on PR 555, I was looking into safely
>     handling source code paths with spaces.
> 
>     Turns out worrying is pointless: after doing the needed changes,
>     doing a test build with
>     builddir = "/Users/kinkie/src/test build with space"
>     srcdir = "/Users/kinkie/src/squid dir with space"
>     on MacOS catalina with homebrew
> 
>     resulted in configure failing with error:
>     checking whether build environment is sane... configure: error:
>     unsafe srcdir value: '/Users/kinkie/src/squid dir with
>     space/test-suite/..'
> 
>     If there is no regression with my changes, I'll submit the PR
>     anyway, but its benefits will be limited.
> 


More information about the squid-dev mailing list