mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
Fix staging error on systems where security/sudo is present
PR: 207930 Reported by: pete@hayes.id.au, kib (via mail)
This commit is contained in:
parent
3df75ab8e3
commit
aa3056e413
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=411998
28
lang/rust/files/patch-mk_install.mk
Normal file
28
lang/rust/files/patch-mk_install.mk
Normal file
@ -0,0 +1,28 @@
|
||||
--- mk/install.mk.orig 2016-03-01 19:18:54 UTC
|
||||
+++ mk/install.mk
|
||||
@@ -15,12 +15,7 @@ RUN_INSTALLER = cd tmp/empty_dir && \
|
||||
--mandir="$(DESTDIR)$(CFG_MANDIR)"
|
||||
|
||||
install:
|
||||
-ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
|
||||
-# Build the dist as the original user
|
||||
- $(Q)sudo -u "$$SUDO_USER" $(MAKE) prepare_install
|
||||
-else
|
||||
$(Q)$(MAKE) prepare_install
|
||||
-endif
|
||||
ifeq ($(CFG_DISABLE_DOCS),)
|
||||
$(Q)$(call RUN_INSTALLER,$(DOC_PKG_NAME)-$(CFG_BUILD)) --disable-ldconfig
|
||||
endif
|
||||
@@ -33,12 +28,7 @@ endif
|
||||
prepare_install: dist-tar-bins | tmp/empty_dir
|
||||
|
||||
uninstall:
|
||||
-ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
|
||||
-# Build the dist as the original user
|
||||
- $(Q)sudo -u "$$SUDO_USER" $(MAKE) prepare_uninstall
|
||||
-else
|
||||
$(Q)$(MAKE) prepare_uninstall
|
||||
-endif
|
||||
ifeq ($(CFG_DISABLE_DOCS),)
|
||||
$(Q)$(call RUN_INSTALLER,$(DOC_PKG_NAME)-$(CFG_BUILD)) --uninstall
|
||||
endif
|
Loading…
Reference in New Issue
Block a user