Re: [squid-dev] handling spaces in path to sources

2020-02-18 Thread Alex Rousskov
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.
> 
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


Re: [squid-dev] handling spaces in path to sources

2020-02-18 Thread Francesco Chemolli
Following up.

TL;DR: it's pointless. Spaces in paths are not safe and do not work. Even
if we were to make our own scripts safe - which the feature tree above does
- configure will barf if there are spaces in the source tree path, and
libtool will fail assembling a safe compile command if there are spaces in
the build path.

The feature branch is at
https://github.com/kinkie/squid/tree/securify-test-builds

This was tested on MacOS Catalina with
- autoconf 2.69
- libtool 2.4.6
- gmake 3.81
- clang 11


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.
>
> --
> Francesco
>


-- 
Francesco
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev


[squid-dev] handling spaces in path to sources

2020-02-18 Thread Francesco Chemolli
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.

-- 
Francesco
___
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev