Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3666225rwb; Sun, 20 Nov 2022 19:27:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Ic9qoXdYyrxUZllw0ia8hrPH98gyk8U355bIAq9CYsI/A0z6W2O6aIfFc67L5s7ImBIN/ X-Received: by 2002:a62:79c8:0:b0:56e:827d:dcce with SMTP id u191-20020a6279c8000000b0056e827ddccemr5709732pfc.51.1669001256385; Sun, 20 Nov 2022 19:27:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669001256; cv=none; d=google.com; s=arc-20160816; b=EyFRZ5gU0tw3w8DfR0kPtkPMjWN/44jkrqlH2tlskAycEU9bw0znKsNTvMfL4a3ron BjAIGPlHa0uG9qAfVRdHq29mtLKNa8xrasjZ8spKOG299hCJa9Xt2gbhzIMJk3zjJU5u 0UFc90huJqYVKjFSMN88c+RxeztvHSCJNaJZIYBdJuxwe7zyOhYY9Ku+wyvVEh6AwvRu 2zRkud9tmWeqhebcGEXS6LsE1bRWb3CZ2r3w4B/YXqsWrTXzPcl6lf8kLXsl35RRNffi ZMLqo2uiME75YaPtSdGLjN5Erh4juudvRp1bdkaw7C2McWkfj4FcQFUaMpFDN26Vqm0w 0vvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=LzmU+Aw8Xp36oPHaxoZObkytvcrx6nvPPsQ6ln5aQNo=; b=mnTNGh21GbyLLtlGHvQnnDFucctKc0dBIxwuxGrVFIX94BcdI7qEcMG2hVBuVd0Z+x 567JLtarcP4XEExjjnpop22c++GjkHQGCVbddEWQn8pdG5cdWcz0gHlrPvli7o2gVEoL cnD47So3EJe0c8Y/7ORGmMwZC3OCeZ5RA5f5xDAClpATFISs94pBGVALRpudo0ry3qLN NkcrJyQMMkbRSBvAWX1aSXgxKHjqZzb1BdS34WPou02ku6/QRF/T6eKb9h/InPTMQGWU bOoVnQ9X/eyo5TC7CffjVZFR3k7oPK6QRE1AJPs2JyuNMkFxs2kMhhIw7TrqQcJg1ovG t7WQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a63ea47000000b0043adff6d43dsi10774299pgk.583.2022.11.20.19.27.25; Sun, 20 Nov 2022 19:27:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbiKUC7L (ORCPT + 90 others); Sun, 20 Nov 2022 21:59:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiKUC7I (ORCPT ); Sun, 20 Nov 2022 21:59:08 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C7A752F3A6; Sun, 20 Nov 2022 18:59:04 -0800 (PST) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8Bx3Nh26Xpj4AgJAA--.25036S3; Mon, 21 Nov 2022 10:59:02 +0800 (CST) Received: from [10.130.0.135] (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dx9VZv6XpjyWgXAA--.42783S3; Mon, 21 Nov 2022 10:58:56 +0800 (CST) Subject: Re: [PATCH] tools: perf: Use "grep -E" instead of "egrep" To: Ian Rogers References: <1668762999-9297-1-git-send-email-yangtiezhu@loongson.cn> Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org From: Tiezhu Yang Message-ID: Date: Mon, 21 Nov 2022 10:58:55 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf8Dx9VZv6XpjyWgXAA--.42783S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7Cw4xAr48JFWfKw4fuF45Wrg_yoW8ZFWDpa 4YkFWUtrn5Jry8Aan7JF4aqF1Syrs3tayrJrWrtF1UZFZ8JasYgr1xXF4jyFZxZrZ7Zr4r u39a9Fy8Cr45Z3DanT9S1TB71UUUUj7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bqxYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1l n4kS14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6x ACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E 87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0V AS07AlzVAYIcxG8wCY1x0262kKe7AKxVWUAVWUtwCF04k20xvY0x0EwIxGrwCFx2IqxVCF s4IE7xkEbVWUJVW8JwCFI7km07C267AKxVWUAVWUtwC20s026c02F40E14v26r1j6r18MI 8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41l IxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIx AIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2 jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8Dl1DUUUUU== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS autolearn=ham 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 On 11/20/2022 02:17 AM, Ian Rogers wrote: > On Fri, Nov 18, 2022 at 1:17 AM Tiezhu Yang wrote: >> >> The latest version of grep claims the egrep is now obsolete so the build >> now contains warnings that look like: >> egrep: warning: egrep is obsolescent; using grep -E >> fix this up by moving the related file to use "grep -E" instead. >> >> sed -i "s/egrep/grep -E/g" `grep egrep -rwl tools/perf` >> >> Here are the steps to install the latest grep: >> >> wget http://ftp.gnu.org/gnu/grep/grep-3.8.tar.gz >> tar xf grep-3.8.tar.gz >> cd grep-3.8 && ./configure && make >> sudo make install >> export PATH=/usr/local/bin:$PATH >> >> Signed-off-by: Tiezhu Yang > > Hi Tiezhu, > > installing a newer grep tool in order to build/test perf is somewhat > burdensome, as such I don't think we should merge this change. Looking > at my Debian derived distro. I have grep 3.7, so I'd need to do this. > I imagine the majority of people are using a grep earlier than 3.8. I > agree there is a problem perhaps we can: > - rewrite to just need grep and not egrep; > - rewrite in a stable language with regex support, perhaps python; > - have a grep/egrep wrapper that selects based on version number. > Hi Ian, I found this issue on Linux From Scratch system which uses grep 3.8 [0], we can see the following NEWS in grep-3.8 release announcement [1]: "The egrep and fgrep commands, which have been deprecated since release 2.5.3 (2007), now warn that they are obsolescent and should be replaced by grep -E and grep -F." Additionally, the next grep rpm/deb version is 3.8 on Fedora [2] and Debian [3], so use "grep -E" instead of "egrep" so we won't see the warning for various versions of grep. [0] https://linuxfromscratch.org/~thomas/multilib/chapter06/grep.html [1] https://savannah.gnu.org/forum/forum.php?forum_id=10227 [2] https://packages.fedoraproject.org/pkgs/grep/grep/fedora-rawhide.html [3] https://packages.debian.org/sid/grep Thanks, Tiezhu