spack/lib
Diego Magdaleno d640bf899a
autotools: set FORCE_UNSAFE_CONFIGURE to 1 in autotools.py (#16132)
This commit sets the `FORCE_UNSAFE_CONFIGURE` environment variable to 1 in autotools builds.

We see a lot of builds popping up and complaining about `FORCE_UNSAFE_CONFIGURE`.  This behavior is not actually part of `autoconf` per se.  It comes from this patch to `mknod.m4`, which is used by a lot of autoconf builds:

    * https://lists.gnu.org/archive/html/bug-gnulib/2010-07/msg00282.html

Which originated from this problem that someone had on AIX:

    * https://lists.gnu.org/archive/html/bug-gnulib/2010-07/msg00279.html

The gist of the problem seems to be that they want to check whether `mknod` can do something as root, but instead of checking whether they're running as root and using `su` or something to test this, they just made it harder to run `configure` as root.

This seems very ad hoc and this is one of many checks that are run as root in `configure`.  Many of them run before this check, so it's not clear that the `FORCE_UNSAFE_CONFIGURE` thing is even preventing bad things from happening.

So:
1. This only happens in `autotools` builds, so we should go ahead and put it into `autotools.py` instead of in the global build environment, and

2. The variable does too little and provides a false sense of security in the first place, so we'll just disable it and avoid the nuisance.  If we really feel strongly about this we can put some warnings in Spack about running as root, but at the top level, not in the middle of an already running script like `configure`.
2020-04-18 14:25:19 -07:00
..
spack autotools: set FORCE_UNSAFE_CONFIGURE to 1 in autotools.py (#16132) 2020-04-18 14:25:19 -07:00