From mboxrd@z Thu Jan 1 00:00:00 1970 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 6C957C433FE for ; Mon, 21 Nov 2022 02:59:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229677AbiKUC7J (ORCPT ); Sun, 20 Nov 2022 21:59:09 -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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cVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIx AIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2 jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8Dl1DUUUUU== Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@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