Received: by 10.223.164.202 with SMTP id h10csp2177916wrb; Mon, 27 Nov 2017 13:04:23 -0800 (PST) X-Google-Smtp-Source: AGs4zMZxc+npYhwZTZYtznSRZx9GCNAv9T9M1FSV0ObCRRM0m7fdl0vveGc7hA662AFU+yvtgpHI X-Received: by 10.98.248.67 with SMTP id c3mr3226543pfm.205.1511816663093; Mon, 27 Nov 2017 13:04:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511816663; cv=none; d=google.com; s=arc-20160816; b=pWTUu3MrBLwlMhWrAO1MP1dkOBNtw/BjtUQ3ka7TQuua9nnLNku5Qk3m6fEO5VMnHB m6ilLHQJ7dRTjWBFUcH1kFHh9kAT9f3YuQrTpL6HiPzXG5QGjlZ8okbfECT+YMj1d+3e R101h+JQnPL4ujl11oWYi+JxH4hi4CHs18Yf+NG2nmD18NMpGMfNmF3ODzED4Id2DMn4 9XW1frj/imAKP3wOLlY/6xpwrm16WENFKzBv/2YMVl0AOM9ThZH4RBbk8aLzyQHCZZIa KZRgepVfi/JLV6VsmsBUP8MwpK4qnBV2TBirQUJpN/EXsusKS6A5CPkjgWWTeG8Pgdrr GcEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=/XizypMyQpXX69hloy6ntJMReSPdwTONIxZU3BlhrW8=; b=oGl7ksH09n5wQe6Nr/5NMmCSFvKVZgXSZn/eiLm0Zb2VdxIBfde9DDYSw5aX+g2L+m etnnHI5go5akeuZt8h4IqXL163TEseg5cQhazr398VAxx0nbGZrB1pCS/bzr3euJsrA8 EWk81Go+xcQl3RtfBAKkkh5suJt8mCFVuwWTcG1H8FBFI3FE51GJ2wm95eF5aoM2tVzA obXlOtdEIa10qHfj2fHH/ieh9Te/4CZUl4iytmY30LgUwB8CtiT+GrmlLFTP2Ep7avB4 k6y/28o7IRF6xLPQbxMqog4ixKZCj70zQMk/kLfgSlcO5gJj+FiIItglFrrBUIZrmxzU gKww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f185si10231821pgc.172.2017.11.27.13.04.05; Mon, 27 Nov 2017 13:04:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932154AbdK0VBk (ORCPT + 78 others); Mon, 27 Nov 2017 16:01:40 -0500 Received: from osg.samsung.com ([64.30.133.232]:53664 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932129AbdK0VBi (ORCPT ); Mon, 27 Nov 2017 16:01:38 -0500 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 3EF4A25160; Mon, 27 Nov 2017 13:01:37 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VXsyX7TQKeVY; Mon, 27 Nov 2017 13:01:29 -0800 (PST) Received: from vento.lan (177.205.79.22.dynamic.adsl.gvt.net.br [177.205.79.22]) by osg.samsung.com (Postfix) with ESMTPSA id AD45C25155; Mon, 27 Nov 2017 13:01:26 -0800 (PST) Date: Mon, 27 Nov 2017 19:01:23 -0200 From: Mauro Carvalho Chehab To: "Tobin C. Harding" Cc: Greg Kroah-Hartman , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds , Ulf Hansson , Jani Nikula , Dan Williams Subject: Re: [PATCH v2] doc: add maintainer book Message-ID: <20171127190123.47a7cad5@vento.lan> In-Reply-To: <20171127205303.GO17858@eros> References: <1511559870-31111-1-git-send-email-me@tobin.cc> <20171127165730.39e2c11e@vento.lan> <20171127205303.GO17858@eros> Organization: Samsung X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, 28 Nov 2017 07:53:03 +1100 "Tobin C. Harding" escreveu: > On Mon, Nov 27, 2017 at 04:57:30PM -0200, Mauro Carvalho Chehab wrote: > > Em Sat, 25 Nov 2017 08:44:19 +1100 > > "Tobin C. Harding" escreveu: > > > > > There is currently very little documentation in the kernel on maintainer > > > level tasks. In particular there are no documents on creating pull > > > requests to submit to Linus. > > > > > > Quoting Greg Kroah-Hartman on LKML: > > > > > > Anyway, this actually came up at the kernel summit / maintainer > > > meeting a few weeks ago, in that "how do I make a > > > good pull request to Linus" is something we need to document. > > > > > > Here's what I do, and it seems to work well, so maybe we should turn > > > it into the start of the documentation for how to do it. > > > > > > (quote references: kernel summit, Europe 2017) > > > > > > Create a new kernel documentation book 'how to be a maintainer' > > > (suggested by Jonathan Corbet). Add chapters on 'configuring git' and > > > 'creating a pull request'. > > > > > > Most of the content was written by Linus Torvalds and Greg Kroah-Hartman > > > in discussion on LKML. This is stated at the start of one of the > > > chapters and the original email thread is referenced in > > > 'pull-requests.rst'. > > > > > > Signed-off-by: Tobin C. Harding > > > --- > > > > > > v2: > > > - Change title of book, suggested by Dan Williams. > > > > > > thanks, > > > Tobin. > > > > > > Documentation/index.rst | 1 + > > > Documentation/maintainer/conf.py | 10 ++ > > > Documentation/maintainer/configure-git.rst | 34 ++++++ > > > Documentation/maintainer/index.rst | 10 ++ > > > Documentation/maintainer/pull-requests.rst | 178 +++++++++++++++++++++++++++++ > > > 5 files changed, 233 insertions(+) > > > create mode 100644 Documentation/maintainer/conf.py > > > create mode 100644 Documentation/maintainer/configure-git.rst > > > create mode 100644 Documentation/maintainer/index.rst > > > create mode 100644 Documentation/maintainer/pull-requests.rst > > > > > > diff --git a/Documentation/index.rst b/Documentation/index.rst > > > index cb7f1ba5b3b1..a4fb34dddcf3 100644 > > > --- a/Documentation/index.rst > > > +++ b/Documentation/index.rst > > > @@ -52,6 +52,7 @@ merged much easier. > > > dev-tools/index > > > doc-guide/index > > > kernel-hacking/index > > > + maintainer/index > > > > > > Kernel API documentation > > > ------------------------ > > > diff --git a/Documentation/maintainer/conf.py b/Documentation/maintainer/conf.py > > > new file mode 100644 > > > index 000000000000..81e9eb7a7884 > > > --- /dev/null > > > +++ b/Documentation/maintainer/conf.py > > > @@ -0,0 +1,10 @@ > > > +# -*- coding: utf-8; mode: python -*- > > > + > > > +project = 'Linux Kernel Development Documentation' > > > + > > > +tags.add("subproject") > > > + > > > +latex_documents = [ > > > + ('index', 'maintainer.tex', 'Linux Kernel Development Documentation', > > > + 'The kernel development community', 'manual'), > > > +] > > > diff --git a/Documentation/maintainer/configure-git.rst b/Documentation/maintainer/configure-git.rst > > > new file mode 100644 > > > index 000000000000..78bbbb0d2c84 > > > --- /dev/null > > > +++ b/Documentation/maintainer/configure-git.rst > > > @@ -0,0 +1,34 @@ > > > +.. _configuregit: > > > + > > > +Configure Git > > > +============= > > > + > > > +This chapter describes maintainer level git configuration. > > > + > > > +Tagged branches used in :ref:`Documentation/maintainer/pull-requests.rst > > > +` should be signed with the developers public GPG key. Signed > > > +tags can be created by passing the ``-u`` flag to ``git tag``. However, > > > +since you would *usually* use the same key for the same project, you can > > > +set it once with > > > +:: > > > + > > > + git config user.signingkey "keyname" > > > + > > > +Alternatively, edit your ``.git/config`` or ``~/.gitconfig`` file by hand: > > > +:: > > > + > > > + [user] > > > + name = Jane Developer > > > + email = jd@domain.org > > > + signingkey = jd@domain.org > > > + > > > +You may need to tell ``git`` to use ``gpg2`` > > > +:: > > > + > > > + [gpg] > > > + program = /path/to/gpg2 > > > + > > > +You may also like to tell ``gpg`` which ``tty`` to use (add to your shell rc file) > > > +:: > > > + > > > + export GPG_TTY=$(tty) > > > diff --git a/Documentation/maintainer/index.rst b/Documentation/maintainer/index.rst > > > new file mode 100644 > > > index 000000000000..fa84ac9cae39 > > > --- /dev/null > > > +++ b/Documentation/maintainer/index.rst > > > @@ -0,0 +1,10 @@ > > > +========================== > > > +Kernel Maintainer Handbook > > > +========================== > > > + > > > +.. toctree:: > > > + :maxdepth: 2 > > > + > > > + configure-git > > > + pull-requests > > > + > > > diff --git a/Documentation/maintainer/pull-requests.rst b/Documentation/maintainer/pull-requests.rst > > > new file mode 100644 > > > index 000000000000..0ca9f9bfd679 > > > --- /dev/null > > > +++ b/Documentation/maintainer/pull-requests.rst > > > @@ -0,0 +1,178 @@ > > > +.. _pullrequests: > > > + > > > +Creating Pull Requests > > > +====================== > > > + > > > +This chapter describes how maintainers can create and submit pull requests > > > +to other maintainers. This is useful for transferring changes from one > > > +maintainers tree to another maintainers tree. > > > + > > > +This document was written by Tobin C. Harding (who at that time, was not an > > > +experienced maintainer) primarily from comments made by Greg Kroah-Hartman > > > +and Linus Torvalds on LKML. Suggestions and fixes by Jonathan Corbet. > > > +Misrepresentation was unintentional but inevitable, please direct abuse to > > > +Tobin C. Harding . > > > + > > > +Original email thread:: > > > + > > > + http://lkml.kernel.org/r/20171114110500.GA21175@kroah.com > > > + > > > + > > > +Create Branch > > > +------------- > > > + > > > +To start with you will need to have all the changes you wish to include in > > > +the pull request on a separate branch. Typically you will base this branch > > > +off of the developers tree whom you intend to send the pull request to. > > > + > > > +Name your branch in a semi-useful manner, some developers like to use > > > +``for-linus`` for patches that are going to Linus. Greg uses > > > +``char-misc-next`` for his ``char/misc`` driver patches to be merged into > > > +``linux-next``. > > > > The name of the branch doesn't really matter. At the Linux media tree, I just > > use "master" and "fixes" at the public maintainer's repository: > > https://git.linuxtv.org/media_tree.git/ > > > > I don't care much on pushing branches from the tree at kernel.org, from > > where Linus pick my work: > > https://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git/ > > > > I still push some branches there from time to time, but just because I > > was lazy enough to remove something from my scripts :-) > > > > Also, Linus also uses "master" on his public tree ;-) > > > > Locally, I actually use different names for my work branch (patchwork) > > and I have a "v4l_for_linus" branch from where I generate pull requests > > (with can either have a snapshot of "patchwork" or "fixes" branch, > > depending if the pull request is for a merge window or not). My internal > > names are mapped into the public ones via .git/config, like: > > > > [remote "media_tree"] > > push = refs/heads/patchwork:refs/heads/master > > ... > > > > In the past, I was using a different naming there, with the Kernel > > version on it, but somewhere in the past I opted to just use "master". > > The rationale is that people usually expect that the main development > > stuff to be on a "master" repository of a random git tree. Also, when > > I need, I create topic branches. > > > > Anyway, the point is that the branch name actually depends on how > > each maintainer/each subsystem works. > > > > So, I would remove the above paragraph, as I doubt there is a general > > rule for developer/maintainer's tree branches, and the name there > > doesn't matter much - except on subsystems that use topic branches. > > > > > +In order to create the pull request you must first tag the branch that you > > > +have just created. Name the tag with something useful that you can > > > +understand if you run across it in a few weeks, and something that will be > > > +"unique". Continuing Greg's example of the ``char-misc`` tree, for the > > > +patches to be sent to Linus for the 4.15-rc1 merge window (as stated in the > > > +above linked thread) he would name the tag 'char-misc-4.15-rc1'. > > > +:: > > > + > > > + git tag -s char-misc-4.15-rc1 char-misc-next > > > + > > > > Now, the tag is what really matter, as this is what everybody sees on > > merges, on every clone of upstream's tree. > > > > In the past, most maintainers were using something like for-linus or for_linus. > > > > IMHO, not mentioning the subsystem's origin at the tag's name is a bad > > practice, as it makes harder to identify what tree was merged, specially > > during the merge window, where a lot merges happen on the first days. If > > you take a look at the recent logs, most maintainers add the name of the > > subsystem at their pull request branch/tag nowadays: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?qt=grep&q=merge+branch > > > > (still, you would see some using tags/branches named "for_linus", > > "fixes" , etc) > > > > So, I would change it to something like that: > > > > "In order to create the pull request you must first tag the branch that you > > have just created. It is recommended to choose a meaningful tag name, > > in a way that you and others can understand, even after some time. > > A good practice is to always include a name that will remind the > > subsystem of origin and the Kernel version the pull request's aiming. > > So, for example, a pull request with miscelaneous stuff for drivers/char, > > to be applied at the Kernel version 4.15-rc1 could be named as: > > ``char-misc-4.15-rc1``. > > > > If such tag would be produced from a branch named ``char-misc-next``, > > you would be using the following command:: > > > > git tag -s char-misc-4.15-rc1 char-misc-next" > > > > - > > > > On a side note, in the case of media, I opt to name the tags with > > a sequencial number that it is unrelated to the rc version: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git/refs/tags > > > > Internally, I use a script that checks the last tag, and increments 1, > > if the upstream Kernel version is the same as the one at the last tag. > > > > The reason is that it I don't submit pull requests for every single > > -rc kernel, and, sometimes, I end by submitting more than one pull > > request for a single -rc version (usually for -rc1). > > > > Regards, > > Mauro > > Thanks for your suggestions Mauro. Unless any other comments come in on > this I'll work your changes into the next version. Ok. > Is there a _correct_ spelling of 'kernel'? Should it be capitalized or > not? You use 'Kernel' but the rest of the document uses 'kernel', I > think we should have a single spelling (at least inside a single > document). I always use Kernel when referring to The Linux Kernel, as I'm not talking about any other kernel, but about a particular one. For me, "Kernel" is a shortcut for its full name (as "Linux" would be another shortcut - but I prefer Kernel, because it leads no doubts that I'm talking about only its core). IMO, that is the proper way to refer to it, in English. Yet, I saw others that don't capitalize it. Regards, Mauro From 1585254044320812368@xxx Mon Nov 27 20:54:27 +0000 2017 X-GM-THRID: 1584717204310558739 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread