make install fails as it tries to write in /tmp

Viktor Dukhovni openssl-users at dukhovni.org
Wed Oct 28 15:08:17 UTC 2020


On Wed, Oct 28, 2020 at 09:48:37AM +0100, Thibaut Appel wrote:

> I uncovered a potential issue affecting the installation of OpenSSL from 
> source, in the case the user is not allowed to write in the /tmp folder.

This build environment was not anticipated by the build system, which
employs:

    $ git grep -A10 /tmp/ar
    unix-Makefile.tmpl:              if [ -f "$$a" ]; then ( trap "rm -rf /tmp/ar.$$$$" INT 0; \
    unix-Makefile.tmpl:                      mkdir /tmp/ar.$$$$; ( cd /tmp/ar.$$$$; \
    unix-Makefile.tmpl-                      cp -f "$$a" "$$a.new"; \
    unix-Makefile.tmpl-                      for so in `$(AR) t "$$a"`; do \
    unix-Makefile.tmpl-                              $(AR) x "$$a" "$$so"; \
    unix-Makefile.tmpl-                              chmod u+w "$$so"; \
    unix-Makefile.tmpl-                              strip -X32_64 -e "$$so"; \
    unix-Makefile.tmpl-                              $(AR) r "$$a.new" "$$so"; \
    unix-Makefile.tmpl-                      done; \
    unix-Makefile.tmpl-              )); fi; \
    unix-Makefile.tmpl-              $(AR) r "$$a.new" "$$s1"; \
    unix-Makefile.tmpl-              mv -f "$$a.new" "$$a"; \

The hard-coded /tmp there is not essential, it could be replaced with
mkdir -p .tmp/ar.$$$$, or some other appropriate path.

-- 
    Viktor.


More information about the openssl-users mailing list