Skip to content
Snippets Groups Projects
Commit 45e5b4ef authored by Robert Haas's avatar Robert Haas
Browse files

Don't try to create a temp install without abs_top_builddir.

Otherwise, we effectively act as if abs_top_builddir were the root
directory, which is quite dangerous if the user happens to have
permissions to do things there.  This can crop up in PGXS builds,
for example.

Report by Sandro Santilli, patch by me, review by Noah Misch.
parent 883af819
No related branches found
No related tags found
No related merge requests found
...@@ -320,6 +320,7 @@ check: temp-install ...@@ -320,6 +320,7 @@ check: temp-install
.PHONY: temp-install .PHONY: temp-install
temp-install: temp-install:
ifndef NO_TEMP_INSTALL ifndef NO_TEMP_INSTALL
ifneq ($(abs_top_builddir),)
ifeq ($(MAKELEVEL),0) ifeq ($(MAKELEVEL),0)
rm -rf '$(abs_top_builddir)'/tmp_install rm -rf '$(abs_top_builddir)'/tmp_install
$(MKDIR_P) '$(abs_top_builddir)'/tmp_install/log $(MKDIR_P) '$(abs_top_builddir)'/tmp_install/log
...@@ -327,6 +328,7 @@ ifeq ($(MAKELEVEL),0) ...@@ -327,6 +328,7 @@ ifeq ($(MAKELEVEL),0)
endif endif
$(if $(EXTRA_INSTALL),for extra in $(EXTRA_INSTALL); do $(MAKE) -C '$(top_builddir)'/$$extra DESTDIR='$(abs_top_builddir)'/tmp_install install >>'$(abs_top_builddir)'/tmp_install/log/install.log || exit; done) $(if $(EXTRA_INSTALL),for extra in $(EXTRA_INSTALL); do $(MAKE) -C '$(top_builddir)'/$$extra DESTDIR='$(abs_top_builddir)'/tmp_install install >>'$(abs_top_builddir)'/tmp_install/log/install.log || exit; done)
endif endif
endif
PROVE = @PROVE@ PROVE = @PROVE@
PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/ PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment