Message ID | 20230803090711.2261876-1-linux@rasmusvillemoes.dk |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1066461vqx; Thu, 3 Aug 2023 04:06:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvJDHYvlwLxoQmpRSlUnyi165mcRa+yM9dByj7c6LC59Y27vId7uANn4Fpcy55h9oSWdkc X-Received: by 2002:a17:90a:8905:b0:268:6e77:2024 with SMTP id u5-20020a17090a890500b002686e772024mr14482782pjn.22.1691060772400; Thu, 03 Aug 2023 04:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691060772; cv=none; d=google.com; s=arc-20160816; b=Ei8i+16Ko/RF9V/QIVmsFdmD3PdGLYxw2lKF1VfqTBgaGkBvxsmslssnmwW5anvZpJ 9iuOvjf0RHjdFLYqrCBlPJr6J1nzXh5gD/2URU9oCpVsb8DHU1mmSy2HzLuCsPz1/kqs SUHPDenfh/cRl7z9wVp3a9DW41sM678UnHDqjESUyD28NBOrs9Tnl4O+XejuavTGwZmg NNcGkD3RdbqWAvnKLLUhxLpjvvoc2atu3erEG8WTCXTM/iYFyG7vBO53UUByxQGqlDQs v4HPDBIJVR5hChV8D6xyOuYbhQDgkU8hd+wQfEVDjBbWEOewTzqLs0oFY1HRwIP50xB+ 6Uhw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=E+vK4CDRp2kRR+ETGhQNSzYi1bWA+u6yABASACTrU9k=; fh=k6wVRAtQUpyeaU2zMdoA1RveweKbRMzkmI7/0LA8BmM=; b=cNBkQQ4OC0qEpGMOa0YJP/Sohdz4Ugs8I5zogZctNmitKxuNPmbHPSb8A57XOnt0pW kAHoWztt2vJpLzZw+y4JzQheM4GfR/YSbvUehlTQNAsD8isjCtoXVIcW3xc6jAjMUgc0 Tl8S1yEG5bb12mK9ohvNyv6e62aYfdz54WzNkrfZ3hxJxA/TKo2NB7dTy97JKXgr/0EN KbkPOJNHBDrjWa5VyrXa4q/+DQxmM5xMvTZH5YKz92hyMJdpYqwFLdUxHhoZ+hNPmdut OYw0U+ta0zidkGRgTMeF/Y04H7YKSB3AqYaC1MrQmhoj4AkUghOreeT2jUror7o3Rjw4 iRww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=emuunKVY; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j24-20020a635518000000b005633d4ca6dcsi3286846pgb.849.2023.08.03.04.05.58; Thu, 03 Aug 2023 04:06:12 -0700 (PDT) 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=@rasmusvillemoes.dk header.s=google header.b=emuunKVY; 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 S234955AbjHCJHa (ORCPT <rfc822;jeff.pang.chn@gmail.com> + 99 others); Thu, 3 Aug 2023 05:07:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234948AbjHCJH1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 3 Aug 2023 05:07:27 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B07AE7 for <linux-kernel@vger.kernel.org>; Thu, 3 Aug 2023 02:07:26 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-99c1c66876aso99100366b.2 for <linux-kernel@vger.kernel.org>; Thu, 03 Aug 2023 02:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; t=1691053644; x=1691658444; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=E+vK4CDRp2kRR+ETGhQNSzYi1bWA+u6yABASACTrU9k=; b=emuunKVYRmeCC0tRn2vc1hgX2tLz6iD+0kBQj7pqTEzjq+W7fuGuEu4LwszX6f41lE HRKYhJUb2J3HCzfeNaxPRX1dBur+wgf2ZsOWP/wUwJ2ItNcQjYNd8P6QHM5yppEr5yZl xEcG10wMNJSZo1czk+TbdCM+M7U7b5Mpc51S0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691053644; x=1691658444; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=E+vK4CDRp2kRR+ETGhQNSzYi1bWA+u6yABASACTrU9k=; b=Sev3CDRI4vVYzJ9BiLRptjutlby/A3WiBd7wHhVEs88dm2rBH+vV4HPO/x2meZug7Z YHJvzqoyogvdN37l0qNrTXyWATjxvKp/lV5yB5lEKnNs0a6oMI8tfP7U+srpSeASLDOS xoVQutk72ruUYpsjTda5p3kCGab6MQAVmnc64s3f6Cu8Zx6Ahk3KYSrl+N+KXPBasyCW 4J4b+63DuO/4NPWz8RVBdGJAlY/yLI8mkCXRwvdGHB7Z1Xm29mlKCxT5MJ5gB/dFSCSy H2dMm9ycqC13UbZklodNrY4fysFfBKoC7Mpx661oZcYedUF1bv1nf7nWY2a8loRLlYKq IeDg== X-Gm-Message-State: ABy/qLavYqwE/OvvvlizPAM5Owr2/nq4qnevNAQs4PvpildRpfSTndh5 rLQxILxv7r/Rv+sIm6UUmj5wtA== X-Received: by 2002:a17:907:a058:b0:987:5761:2868 with SMTP id gz24-20020a170907a05800b0098757612868mr6742281ejc.11.1691053644472; Thu, 03 Aug 2023 02:07:24 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id ga15-20020a170906b84f00b00997c1d125fasm10305033ejb.170.2023.08.03.02.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 02:07:24 -0700 (PDT) From: Rasmus Villemoes <linux@rasmusvillemoes.dk> To: Jonathan Corbet <corbet@lwn.net> Cc: Masahiro Yamada <masahiroy@kernel.org>, Linus Torvalds <torvalds@linux-foundation.org>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Documentation: changes.rst: add entry for git Date: Thu, 3 Aug 2023 11:07:10 +0200 Message-Id: <20230803090711.2261876-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773205740650209040 X-GMAIL-MSGID: 1773205740650209040 |
Series |
Documentation: changes.rst: add entry for git
|
|
Commit Message
Rasmus Villemoes
Aug. 3, 2023, 9:07 a.m. UTC
git is obviously used for development, directly and also
indirectly (via checkpatch, get_maintainer and other helper
scripts). But it is also invoked during the build to produce the
`uname -r` string.
It's useful to have some minimal git version one can expect people to
use. For now, set a somewhat conservative minimum of 1.8.0, which is
already more then ten years old.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
Documentation/process/changes.rst | 8 ++++++++
1 file changed, 8 insertions(+)
Comments
On Thu, Aug 03, 2023 at 11:07:10AM +0200, Rasmus Villemoes wrote: > git is obviously used for development, directly and also > indirectly (via checkpatch, get_maintainer and other helper > scripts). But it is also invoked during the build to produce the > `uname -r` string. > > It's useful to have some minimal git version one can expect people to > use. For now, set a somewhat conservative minimum of 1.8.0, which is > already more then ten years old. > > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> > --- > Documentation/process/changes.rst | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst > index 5561dae94f85..a82c619f4bb2 100644 > --- a/Documentation/process/changes.rst > +++ b/Documentation/process/changes.rst > @@ -62,6 +62,7 @@ Sphinx\ [#f1]_ 1.7 sphinx-build --version > cpio any cpio --version > GNU tar 1.28 tar --version > gtags (optional) 6.6.5 gtags --version > +git 1.8.0 git --version > ====================== =============== ======================================== > > .. [#f1] Sphinx is needed only to build the Kernel documentation > @@ -189,6 +190,13 @@ The kernel build requires GNU GLOBAL version 6.6.5 or later to generate > tag files through ``make gtags``. This is due to its use of the gtags > ``-C (--directory)`` flag. > > +git > +--- > + > +When building with CONFIG_LOCALVERSION_AUTO=y, the build system uses > +git to produce a version string of the form > +6.4.6-00128-gd78b7f406397, which will be shown e.g. by running `uname -r`. Isn't this optional? If git is not installed it just will not use git to determine the local version. So you should put "(optional)" above on the list of tools. And also, don't pick a specific version like this unless it is that way for a reason. Why not pick a newer one? Or the last one that the local version script can handle properly? thanks, greg k-h
On Thu, Aug 3, 2023 at 7:19 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > On Thu, Aug 03, 2023 at 11:07:10AM +0200, Rasmus Villemoes wrote: > > git is obviously used for development, directly and also > > indirectly (via checkpatch, get_maintainer and other helper > > scripts). But it is also invoked during the build to produce the > > `uname -r` string. > > > > It's useful to have some minimal git version one can expect people to > > use. For now, set a somewhat conservative minimum of 1.8.0, which is > > already more then ten years old. > > > > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> > > --- > > Documentation/process/changes.rst | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst > > index 5561dae94f85..a82c619f4bb2 100644 > > --- a/Documentation/process/changes.rst > > +++ b/Documentation/process/changes.rst > > @@ -62,6 +62,7 @@ Sphinx\ [#f1]_ 1.7 sphinx-build --version > > cpio any cpio --version > > GNU tar 1.28 tar --version > > gtags (optional) 6.6.5 gtags --version > > +git 1.8.0 git --version > > ====================== =============== ======================================== > > > > .. [#f1] Sphinx is needed only to build the Kernel documentation > > @@ -189,6 +190,13 @@ The kernel build requires GNU GLOBAL version 6.6.5 or later to generate > > tag files through ``make gtags``. This is due to its use of the gtags > > ``-C (--directory)`` flag. > > > > +git > > +--- > > + > > +When building with CONFIG_LOCALVERSION_AUTO=y, the build system uses > > +git to produce a version string of the form > > +6.4.6-00128-gd78b7f406397, which will be shown e.g. by running `uname -r`. > > Isn't this optional? If git is not installed it just will not use git > to determine the local version. Right. Without git, the suffix "-00128-gd78b7f406397" is not appended, but you can build the kernel. > > So you should put "(optional)" above on the list of tools. > > And also, don't pick a specific version like this unless it is that way > for a reason. Why not pick a newer one? Or the last one that the local > version script can handle properly? CentOS 7 (plans to retire in 2024) unfortunately uses a ten-year-old git version. In CentOS 7, $ git --version git version 1.8.3.1 Tagger: Junio C Hamano <gitster@pobox.com> Date: Mon Jun 10 12:34:56 2013 -0700 Git 1.8.3.1 If we are allowed to abandon conservative distros, I prefer git >= 2.14.0 That supports 'git status --no-optional-locks'
On Fri, Aug 04, 2023 at 06:41:54PM +0900, Masahiro Yamada wrote: > On Thu, Aug 3, 2023 at 7:19 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > > > On Thu, Aug 03, 2023 at 11:07:10AM +0200, Rasmus Villemoes wrote: > > > git is obviously used for development, directly and also > > > indirectly (via checkpatch, get_maintainer and other helper > > > scripts). But it is also invoked during the build to produce the > > > `uname -r` string. > > > > > > It's useful to have some minimal git version one can expect people to > > > use. For now, set a somewhat conservative minimum of 1.8.0, which is > > > already more then ten years old. > > > > > > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> > > > --- > > > Documentation/process/changes.rst | 8 ++++++++ > > > 1 file changed, 8 insertions(+) > > > > > > diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst > > > index 5561dae94f85..a82c619f4bb2 100644 > > > --- a/Documentation/process/changes.rst > > > +++ b/Documentation/process/changes.rst > > > @@ -62,6 +62,7 @@ Sphinx\ [#f1]_ 1.7 sphinx-build --version > > > cpio any cpio --version > > > GNU tar 1.28 tar --version > > > gtags (optional) 6.6.5 gtags --version > > > +git 1.8.0 git --version > > > ====================== =============== ======================================== > > > > > > .. [#f1] Sphinx is needed only to build the Kernel documentation > > > @@ -189,6 +190,13 @@ The kernel build requires GNU GLOBAL version 6.6.5 or later to generate > > > tag files through ``make gtags``. This is due to its use of the gtags > > > ``-C (--directory)`` flag. > > > > > > +git > > > +--- > > > + > > > +When building with CONFIG_LOCALVERSION_AUTO=y, the build system uses > > > +git to produce a version string of the form > > > +6.4.6-00128-gd78b7f406397, which will be shown e.g. by running `uname -r`. > > > > Isn't this optional? If git is not installed it just will not use git > > to determine the local version. > > Right. > Without git, the suffix "-00128-gd78b7f406397" is not > appended, but you can build the kernel. > > > > > > So you should put "(optional)" above on the list of tools. > > > > And also, don't pick a specific version like this unless it is that way > > for a reason. Why not pick a newer one? Or the last one that the local > > version script can handle properly? > > > > CentOS 7 (plans to retire in 2024) unfortunately > uses a ten-year-old git version. > > In CentOS 7, > > $ git --version > git version 1.8.3.1 I doubt CentOS 7 can build a modern-day kernel anyway, so why is this a requirement? We shouldn't be beholden to the necro-distros just because they have not moved into this decade :) > If we are allowed to abandon conservative distros, > I prefer git >= 2.14.0 > > That supports 'git status --no-optional-locks' That makes sense, and is a valid reason to require this. thanks, greg k-h
On Fri, Aug 4, 2023 at 7:17 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > On Fri, Aug 04, 2023 at 06:41:54PM +0900, Masahiro Yamada wrote: > > On Thu, Aug 3, 2023 at 7:19 PM Greg KH <gregkh@linuxfoundation.org> wrote: > > > > > > On Thu, Aug 03, 2023 at 11:07:10AM +0200, Rasmus Villemoes wrote: > > > > git is obviously used for development, directly and also > > > > indirectly (via checkpatch, get_maintainer and other helper > > > > scripts). But it is also invoked during the build to produce the > > > > `uname -r` string. > > > > > > > > It's useful to have some minimal git version one can expect people to > > > > use. For now, set a somewhat conservative minimum of 1.8.0, which is > > > > already more then ten years old. > > > > > > > > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> > > > > --- > > > > Documentation/process/changes.rst | 8 ++++++++ > > > > 1 file changed, 8 insertions(+) > > > > > > > > diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst > > > > index 5561dae94f85..a82c619f4bb2 100644 > > > > --- a/Documentation/process/changes.rst > > > > +++ b/Documentation/process/changes.rst > > > > @@ -62,6 +62,7 @@ Sphinx\ [#f1]_ 1.7 sphinx-build --version > > > > cpio any cpio --version > > > > GNU tar 1.28 tar --version > > > > gtags (optional) 6.6.5 gtags --version > > > > +git 1.8.0 git --version > > > > ====================== =============== ======================================== > > > > > > > > .. [#f1] Sphinx is needed only to build the Kernel documentation > > > > @@ -189,6 +190,13 @@ The kernel build requires GNU GLOBAL version 6.6.5 or later to generate > > > > tag files through ``make gtags``. This is due to its use of the gtags > > > > ``-C (--directory)`` flag. > > > > > > > > +git > > > > +--- > > > > + > > > > +When building with CONFIG_LOCALVERSION_AUTO=y, the build system uses > > > > +git to produce a version string of the form > > > > +6.4.6-00128-gd78b7f406397, which will be shown e.g. by running `uname -r`. > > > > > > Isn't this optional? If git is not installed it just will not use git > > > to determine the local version. > > > > Right. > > Without git, the suffix "-00128-gd78b7f406397" is not > > appended, but you can build the kernel. > > > > > > > > > > So you should put "(optional)" above on the list of tools. > > > > > > And also, don't pick a specific version like this unless it is that way > > > for a reason. Why not pick a newer one? Or the last one that the local > > > version script can handle properly? > > > > > > > > CentOS 7 (plans to retire in 2024) unfortunately > > uses a ten-year-old git version. > > > > In CentOS 7, > > > > $ git --version > > git version 1.8.3.1 > > I doubt CentOS 7 can build a modern-day kernel anyway, so why is this a > requirement? We shouldn't be beholden to the necro-distros just because > they have not moved into this decade :) The default GCC on CentOS 7 is GCC 4.8, which is too old to build the kernel. I am not so sure how RHEL/CentOS 7 users are working on the kernel development, but it is possible to install a newer gcc version from Developer Toolset. FWFW, this is how to set up GCC 11 on CentOS 7 so you can build the kernel. # yum install centos-release-scl # yum install devtoolset-11-gcc $ PATH=/opt/rh/devtoolset-11/root/usr/bin:$PATH $ gcc --version gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9) Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Recently, I got a regression report on RHEL/CentOS 7. So, some people might still care about this. commit f5983dab0ead92dc2690d147f0604a0badcac6a8 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Wed Jun 28 01:32:05 2023 +0900 modpost: define more R_ARM_* for old distributions On CentOS 7, the following build error occurs.
On 2023/08/05 17:02, Masahiro Yamada wrote: >>>>> It's useful to have some minimal git version one can expect people to >>>>> use. For now, set a somewhat conservative minimum of 1.8.0, which is >>>>> already more then ten years old. No problem with requiring git >= 1.8.0. > > The default GCC on CentOS 7 is GCC 4.8, > which is too old to build the kernel. > > I am not so sure how RHEL/CentOS 7 users are working > on the kernel development, but it is possible to > install a newer gcc version from Developer Toolset. CentOS 7 users can install a newer git version as well as gcc. > commit f5983dab0ead92dc2690d147f0604a0badcac6a8 > Author: Masahiro Yamada <masahiroy@kernel.org> > Date: Wed Jun 28 01:32:05 2023 +0900 > > modpost: define more R_ARM_* for old distributions > > On CentOS 7, the following build error occurs. It is glibc-headers-2.17-326.el7_9 package. Neither gcc nor git problem.
diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst index 5561dae94f85..a82c619f4bb2 100644 --- a/Documentation/process/changes.rst +++ b/Documentation/process/changes.rst @@ -62,6 +62,7 @@ Sphinx\ [#f1]_ 1.7 sphinx-build --version cpio any cpio --version GNU tar 1.28 tar --version gtags (optional) 6.6.5 gtags --version +git 1.8.0 git --version ====================== =============== ======================================== .. [#f1] Sphinx is needed only to build the Kernel documentation @@ -189,6 +190,13 @@ The kernel build requires GNU GLOBAL version 6.6.5 or later to generate tag files through ``make gtags``. This is due to its use of the gtags ``-C (--directory)`` flag. +git +--- + +When building with CONFIG_LOCALVERSION_AUTO=y, the build system uses +git to produce a version string of the form +6.4.6-00128-gd78b7f406397, which will be shown e.g. by running `uname -r`. + System utilities ****************