Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2195002iof; Tue, 7 Jun 2022 22:50:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5JGbAmMfZiSQ4tSrFA3fzRz55e5WIUDlspV9Ym2Q878JSnI+1rPYjLup7G3r6Sm5nvow4 X-Received: by 2002:a17:90b:1809:b0:1e8:7495:3c6d with SMTP id lw9-20020a17090b180900b001e874953c6dmr17782208pjb.193.1654667438485; Tue, 07 Jun 2022 22:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667438; cv=none; d=google.com; s=arc-20160816; b=Qae8wORks6s+4S/Yxj3LMsEpf5lgoQU54hsXRhJAJWWqVTInFcyzV14Vz5I0xH1/oa 9v4/zL+dnDVzaRxwRotUZH3o3jC87WXhucIgwuoFRVUvRAquIk5dnqANcOjq7sdlWumc NWwYbxcneSQHWtWuyDHWnLVj8/gZc6BZrtAiqjwepeUipDwfYGGcmF593eSkzw6mwMyC vRuLBY+utYqMt7Po0vENIXz2rORxmTYkcDRYawoPu0kxFSG/mxlaTuTxLyfmaR7AnW3K ZKmONQjGz2mKXQSKQ7zjYgYLYrAYv3KqujjxwV37cMFHdgwI2/kHEhQbqYWPmPra9y0M k1wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2DDNqqX9EFgS+gChm9TMFPJg5JrSE8dpd1KvN/UAsM8=; b=QdaFkF6CJgLhWh5U14CKVBslnjdMGxTP8r/XdA/hCDCeVwSOdD7/FKjeZBUkmX3wBj q/xay+3aRvvSXqy8m4Lqe7TmgpJ2Q0gn791Ksy2NSMj3c3axA37TCm+SfWMQA6VdEghu fdLrSpyXqJP2apJ5iOIb/M+NTg5K2hZhCgUjTV7x3/9eBOawiQMK4anA1oTDCfiGsv60 tLneNETnYFKPZO3S7uOQLko6m2yLOAPHA0rsilYyN80B7KgnBm1515V1lfMydcs/D3ZP xn3vrRt19Y0BV+eDgTQZOjmpsjLKWsxx8AQM/AA3khEJm3E8Aec5LadDZrU24YT5P6g0 Abhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2K0KKnG7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lp8-20020a17090b4a8800b001e073312c32si21554063pjb.8.2022.06.07.22.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:50:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2K0KKnG7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 77CD73D6718; Tue, 7 Jun 2022 22:17:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391431AbiFHAmJ (ORCPT + 99 others); Tue, 7 Jun 2022 20:42:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383780AbiFGWGY (ORCPT ); Tue, 7 Jun 2022 18:06:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 010FF2514B7; Tue, 7 Jun 2022 12:17:41 -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 909D861929; Tue, 7 Jun 2022 19:17:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C750C385A2; Tue, 7 Jun 2022 19:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629461; bh=NrAeKNkxmSE5W5CrvSELKazV+if6cVxvBs1EbjA7sm0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2K0KKnG7ODsGXjeopDzHxjWsZKPM8m76z5vJ1KFWzyBgNpA5t7IUPKegFrdhBHulk q8MzgHjdHj1yDhMSo1nMXEDml3odqqGEox1dV3mUhrn8W2sTOzwyny7ho0CVy/OGV9 LzPZRywOM48s2armHKcOfTlz4yLoNpGTgMedi7gA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Bristot de Oliveria , Daniel Bristot de Oliveira , John Kacur , "Steven Rostedt (Google)" , Sasha Levin Subject: [PATCH 5.18 699/879] rtla: Dont overwrite existing directory mode Date: Tue, 7 Jun 2022 19:03:37 +0200 Message-Id: <20220607165023.137393581@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Kacur [ Upstream commit 39c3d84cb5b52792a7323a338334d8d65b2dbe3f ] 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 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 Signed-off-by: Steven Rostedt (Google) Signed-off-by: Sasha Levin --- 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 -- 2.35.1