mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-06-19 02:56:07 -05:00
Linux: fix install on merged usr systems
Install staged /usr child directories by merging their contents into existing destination directories instead of replacing them. This preserves /usr/sbin symlinks to bin on merged-/usr distributions while keeping traditional layouts working. Fixes issue: https://github.com/veracrypt/VeraCrypt/issues/1764
This commit is contained in:
+19
-2
@@ -569,9 +569,26 @@ endif
|
||||
|
||||
install: prepare
|
||||
ifneq "$(DESTDIR)" ""
|
||||
mkdir -p $(DESTDIR)
|
||||
mkdir -p "$(DESTDIR)"
|
||||
endif
|
||||
cp -R $(BASE_DIR)/Setup/Linux/usr $(DESTDIR)/
|
||||
# Merge directory contents so /usr/sbin -> bin layouts are not replaced.
|
||||
@set -e; \
|
||||
mkdir -p "$(DESTDIR)/usr"; \
|
||||
for _src in "$(BASE_DIR)/Setup/Linux/usr"/*; do \
|
||||
[ -e "$$_src" ] || continue; \
|
||||
_name=$$(basename "$$_src"); \
|
||||
_dst="$(DESTDIR)/usr/$$_name"; \
|
||||
if [ -d "$$_src" ]; then \
|
||||
if [ -e "$$_dst" ] || [ -L "$$_dst" ]; then \
|
||||
mkdir -p "$$_dst"; \
|
||||
cp -R "$$_src/." "$$_dst/"; \
|
||||
else \
|
||||
cp -R "$$_src" "$(DESTDIR)/usr/"; \
|
||||
fi; \
|
||||
else \
|
||||
cp -P "$$_src" "$(DESTDIR)/usr/"; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
ifeq "$(TC_BUILD_CONFIG)" "Release"
|
||||
package: prepare
|
||||
|
||||
Reference in New Issue
Block a user