From e93668ae5bcca7888a4f8d3a58463e1a4a738fdb Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Mon, 14 Apr 2025 09:04:00 +0000 Subject: [PATCH] rust/Makefile: Fix file permissions for shell completion files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While at it, preserve the timestamps as well because it's recommended. See https://docs.fedoraproject.org/en-US/packaging-guidelines/ShellCompletions/. Fixes: b3055154dbfe ("rust/Makefile: Add 'install-(bash|zsh)-completion' targets") Reviewed-by: Steffen Eiden Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- rust/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/Makefile b/rust/Makefile index 19255d12..adcdd076 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -119,12 +119,12 @@ install-man: install-bash-completion: $(PV_TARGETS) $(INSTALL) -d -m 755 $(DESTDIR)$(BASHCOMPLETIONDIR) $(foreach target,$(PV_TARGETS),\ - $(INSTALL) $(shell find $(shell ls --sort=time --reverse --directory target/release/build/$(target)-*/out/ |tail -n1) -name '*.bash') $(DESTDIR)$(BASHCOMPLETIONDIR);) + $(INSTALL) -m 0644 --preserve-timestamps -- $(shell find $(shell ls --sort=time --reverse --directory target/release/build/$(target)-*/out/ |tail -n1) -name '*.bash') $(DESTDIR)$(BASHCOMPLETIONDIR);) install-zsh-completion: $(PV_TARGETS) $(INSTALL) -d -m 755 $(DESTDIR)$(ZSHCOMPLETIONDIR) $(foreach target,$(PV_TARGETS),\ - $(INSTALL) $(shell find $(shell ls --sort=time --reverse --directory target/release/build/$(target)-*/out/ |tail -n1) -regex '.*/_[a-zA-Z0-9]+') $(DESTDIR)$(ZSHCOMPLETIONDIR);) + $(INSTALL) -m 0644 --preserve-timestamps -- $(shell find $(shell ls --sort=time --reverse --directory target/release/build/$(target)-*/out/ |tail -n1) -regex '.*/_[a-zA-Z0-9]+') $(DESTDIR)$(ZSHCOMPLETIONDIR);) .PHONY: all install clean skip-build install-rust-tools print-rust-targets install-man rust-test install-bash-completion install-zsh-completion