Skip to content

Commit 39c3d84

Browse files
John Kacurrostedt
authored andcommitted
rtla: Don't overwrite existing directory mode
The mode on /usr/bin is often 555 these days, but make install on rtla overwrites this with 755 Fix this by preserving the current directory if it exists. Link: https://lkml.kernel.org/r/8c294a6961080a1970fd8b73f7bcf1e3984579e2.1651247710.git.bristot@kernel.org Link: https://lore.kernel.org/r/20220402043939.6962-1-jkacur@redhat.com Cc: Daniel Bristot de Oliveria <bristot@redhat.com> Fixes: 79ce8f4 ("rtla: Real-Time Linux Analysis tool") Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 2a6b52e commit 39c3d84

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/tracing/rtla/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ $(call allow-override,LD_SO_CONF_PATH,/etc/ld.so.conf.d/)
2323
$(call allow-override,LDCONFIG,ldconfig)
2424

2525
INSTALL = install
26+
MKDIR = mkdir
2627
FOPTS := -flto=auto -ffat-lto-objects -fexceptions -fstack-protector-strong \
2728
-fasynchronous-unwind-tables -fstack-clash-protection
2829
WOPTS := -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized
@@ -103,7 +104,7 @@ static: $(OBJ)
103104

104105
.PHONY: install
105106
install: doc_install
106-
$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)
107+
$(MKDIR) -p $(DESTDIR)$(BINDIR)
107108
$(INSTALL) rtla -m 755 $(DESTDIR)$(BINDIR)
108109
$(STRIP) $(DESTDIR)$(BINDIR)/rtla
109110
@test ! -f $(DESTDIR)$(BINDIR)/osnoise || rm $(DESTDIR)$(BINDIR)/osnoise

0 commit comments

Comments
 (0)