Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1302748rwb; Wed, 14 Dec 2022 08:38:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf4gsatkHi6N/KTbDhSBWMUIqKkWBH4VywQxf8JLC+GivNhCJT9XR/co3746xpR1uMAgKzei X-Received: by 2002:a05:6a20:a688:b0:ae:661c:5553 with SMTP id ba8-20020a056a20a68800b000ae661c5553mr4746854pzb.4.1671035915598; Wed, 14 Dec 2022 08:38:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671035915; cv=none; d=google.com; s=arc-20160816; b=yUQWjdzACWoLTK6/QnrCuiW/1ZZtj5IyMPaLcH9+hiXBks9V+LWe8UKMzxrDHNdbAr 51G5aoadRIBVx81f61noGxfXLgoEfx4KFhrA3FEZy4dteqihQCTuufuObRvhFIWEbxDw 7gJ9mJRbpQruY0FfJjRRaML3VFSXzq/EaJuE19NJxM5O+7bVSNGHHWRGdBFtnNgVoohx rnze3O/yxgDNGaFE+d739kGHp8Eb9ER/zj7T3aNQ7T2kW3AIqq9Q2Dwz88fC0GeXn8s+ Sz4wV39QxjqB6Bqi0U9BVLm8ine/d3G/GUzRrCZT15U1IE8bn0+g13H7zeZJ/+JU9/fU o2UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SVFWBaacCZYEY2RG3kIBiN2ZTSp4rnxFmjMTv470fAo=; b=N/KYQ4GbrMoDxt+5eD6xRqHc9/bqn8SXtpEWRISzDqvc0MKNlvbN7Xh9G688b4zYFX C8fkcgqy/gimjJf+TVcHzNJTaYtDwPa3xEUjnWezVQ3bPsTB6LpG9NboIcw1l5f/1K/3 i/91i+d0jLdlKbjBM190WjBjZOfw6UykwQmLqBvwlLRnnBh4UCfk1cgym+NdaxaM2F0f Hl3s6F1OJKFPwiYIhQyfsrcdO4xcDrMuqi0MRogCcSzQ8MTICvz+V3WGLGfwg9Hz3602 YjruwmOlQ3Hkd840hGnyoJ/3SWpiD2FGpIkUhkG/hSJtoBDxZ2Mt+MMcP0bW9GCV39gd CogA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ocgdoyR0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l191-20020a633ec8000000b0047ca55a11eesi218280pga.297.2022.12.14.08.38.25; Wed, 14 Dec 2022 08:38:35 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ocgdoyR0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238961AbiLNQ1q (ORCPT + 70 others); Wed, 14 Dec 2022 11:27:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238774AbiLNQ1p (ORCPT ); Wed, 14 Dec 2022 11:27:45 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A32195F98; Wed, 14 Dec 2022 08:27:42 -0800 (PST) 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 3B57661B45; Wed, 14 Dec 2022 16:27:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AA2EC433D2; Wed, 14 Dec 2022 16:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671035261; bh=sJ2dZlXlxbHZMLCuBdc37LA6k6jU4IYfv3YtQbdOTxw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ocgdoyR03oml0AaBujgZuxX24w3KfCJBJBtRhcGRkOM71IEswAY7PsZUiZ5hGTI7X AxPuWvAwN8nOAJzT9VxaMMtNIwLXR3qMsfJerjzkMM7g3dxg4QG7vS7kSfzVrDXAep yh2ZpQdpghtbnmE8IDFPMV9AdM016IP0jLocXdmdBejeFpebKythqNPw06OfsaQTVH TDtM45gPZWpXPrkHuF1QEtxcl8rwmP0jrGPBWp6ptWTLiaE1mnw6P/pO2P/D77UPOS D3djAjY4oMrIZ8P3R+YegTOR4+8ETiOV0ox8aqnJMs/DqW9Wu1AF0ASjyssNKBnyHD Qq9qhL+G5yO/A== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id A591A40367; Wed, 14 Dec 2022 13:27:38 -0300 (-03) Date: Wed, 14 Dec 2022 13:27:38 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Tiezhu Yang , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH] tools: perf: Use "grep -E" instead of "egrep" Message-ID: References: <1668762999-9297-1-git-send-email-yangtiezhu@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 Em Mon, Nov 21, 2022 at 08:52:47AM -0800, Ian Rogers escreveu: > On Sun, Nov 20, 2022 at 6:59 PM Tiezhu Yang wrote: > > > > > > > > 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 > > Thanks Tiezhu, > > My grep is 3.7 and has -E support. In the changelog I see: > > ``` > 2021-08-14 Jim Meyering > > version 3.7 > * NEWS: Record release date. > ``` > > So I'm guessing 3.8 is newer than is necessary for this change, but > demonstrates the warning issue your change addresses. Arnaldo's build > compatibility scripts should be able to spot further issues. > > Acked-by: Ian Rogers Thanks, applied. - Arnaldo