From patchwork Fri Apr 29 16:28:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Bristot de Oliveira X-Patchwork-Id: 12832444 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BB31C433EF for ; Fri, 29 Apr 2022 16:28:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379181AbiD2QcL (ORCPT ); Fri, 29 Apr 2022 12:32:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379206AbiD2Qbv (ORCPT ); Fri, 29 Apr 2022 12:31:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E90EDAA05; Fri, 29 Apr 2022 09:28:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 05E0362338; Fri, 29 Apr 2022 16:28:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0C48C385AF; Fri, 29 Apr 2022 16:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651249703; bh=i2s8MXletVaqxsQHutApX0kGzV6e20Tl+T1LrZsiZdQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XFJez6aLSagPmG2NVQ5jtfNBfUi4S0LFeqMFKDv31dtv+nkVDvCVCcGdgAiDf0WZk /B+k0/QsWPxQGcVyHXjYMuP1keP1r+z8gz7acwVc/vDGoBAzqI5AKdiXUmfjyFmgRg ffLaJylc1o83tF5p0Cx9cOmDONbI0bT6djg6/rI0uNIY0umJ0knA5fAnhLtfB0DQqX YeWf/WRBcGWSYoYHoGZGGV7oA+hqUmIMqWwrvKNL+9+CBs+XpaK5u43XSvVSKGmfRV TISokVBNQSXe0ozvzfPrUgMxLEJ2qFiYMycPkr2I4DQM2Wwy44tPANJt+mIi1/+1XS tyyXLqCjxXQGg== From: Daniel Bristot de Oliveira To: Steven Rostedt , linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Bristot de Oliveira , John Kacur , Daniel Bristot de Oliveria Subject: [PATCH 2/4] rtla: Don't overwrite existing directory mode Date: Fri, 29 Apr 2022 18:28:11 +0200 Message-Id: <8c294a6961080a1970fd8b73f7bcf1e3984579e2.1651247710.git.bristot@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: John Kacur 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://lore.kernel.org/r/20220402043939.6962-1-jkacur@redhat.com Cc: Steven Rostedt Cc: Daniel Bristot de Oliveria Fixes: 79ce8f43ac5a ("rtla: Real-Time Linux Analysis tool") Acked-by: Daniel Bristot de Oliveira Signed-off-by: John Kacur Signed-off-by: Daniel Bristot de Oliveira --- tools/tracing/rtla/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile index 11fb417abb42..5a3226e436ef 100644 --- a/tools/tracing/rtla/Makefile +++ b/tools/tracing/rtla/Makefile @@ -23,6 +23,7 @@ $(call allow-override,LD_SO_CONF_PATH,/etc/ld.so.conf.d/) $(call allow-override,LDCONFIG,ldconfig) INSTALL = install +MKDIR = mkdir FOPTS := -flto=auto -ffat-lto-objects -fexceptions -fstack-protector-strong \ -fasynchronous-unwind-tables -fstack-clash-protection WOPTS := -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized @@ -68,7 +69,7 @@ static: $(OBJ) .PHONY: install install: doc_install - $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR) + $(MKDIR) -p $(DESTDIR)$(BINDIR) $(INSTALL) rtla -m 755 $(DESTDIR)$(BINDIR) $(STRIP) $(DESTDIR)$(BINDIR)/rtla @test ! -f $(DESTDIR)$(BINDIR)/osnoise || rm $(DESTDIR)$(BINDIR)/osnoise