Skip to contentSkip to conversation

trace-cmd: Do not install trace-cmd.h as executable

PATCH New Steven Rostedt 1 participant 1 message Dec 23, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-cmd: Do not install trace-cmd.h as executable

From: "Steven Rostedt (VMware)" <[email protected]>

The trace-cmd.h file is being installed via "install" which by default sets the mode to rwxr-xr-x, but a header file should be set to rw-r--r-- instead.

---
 lib/trace-cmd/Makefile | 2 +-
 scripts/utils.mk       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
lib/trace-cmd/Makefile +1 -1
index ec6ab299..841c84f1 100644
@@ -93,7 +93,7 @@ install_libs: install_pkgconfig
 	$(Q)cp -fpR $(LIBTRACECMD_SHARED_VERSION) $(DESTDIR)$(libdir_SQ)
 	$(Q)$(call print_install,$(LIBTRACECMD_SHARED_SO),$(DESTDIR)$(libdir_SQ))
 	$(Q)cp -fpR $(LIBTRACECMD_SHARED_SO) $(DESTDIR)$(libdir_SQ)
-	$(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ)/trace-cmd)
+	$(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ)/trace-cmd,644)
 	$(Q)$(call install_ld_config)
 
 dep_includes := $(wildcard $(DEPS))
scripts/utils.mk +1 -1
index 03389126..7372d76f 100644
@@ -136,7 +136,7 @@ define do_install
 	if [ ! -d '$(DESTDIR_SQ)$2' ]; then		\
 		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2';	\
 	fi;						\
-	$(INSTALL) $1 '$(DESTDIR_SQ)$2'
+	$(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2'
 endef
 
 define do_install_data
Signature · 1 line
2.25.4