ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: Joel Fernandes <joelaf@google.com>,
	Barret Rhoden <brho@google.com>,
	ksummit <ksummit-discuss@lists.linuxfoundation.org>,
	Dmitry Torokhov <dtor@chromium.org>,
	Jonathan Nieder <jrn@google.com>,
	Tomasz Figa <tfiga@chromium.org>,
	Han-Wen Nienhuys <hanwen@google.com>,
	Theodore Tso <tytso@google.com>,
	David Rientjes <rientjes@google.com>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [Ksummit-discuss] Allowing something Change-Id (or something like it) in kernel commits
Date: Sun, 25 Aug 2019 05:11:43 +0200	[thread overview]
Message-ID: <20190825031143.GA2590@kroah.com> (raw)
In-Reply-To: <20190824230447.GA5163@mit.edu>

[-- Attachment #1: Type: text/plain, Size: 2320 bytes --]

On Sat, Aug 24, 2019 at 07:04:47PM -0400, Theodore Y. Ts'o wrote:
> On Sat, Aug 24, 2019 at 11:11:32AM -0700, Linus Torvalds wrote:
> > The first time it gets magically and reliably created for you without
> > you having to do a single thing. The second time, you just look it up.
> 
> Also, if you don't want to look it up, and want to have it generated
> "locally", the Message-Id is generated locally by git send-email.
> (That's right, Message-Id's are just as easy to generate locally as
> UUID's.)  It will look like this:
> 
>      Message-Id: <20190824223355.12947-1-tytso@mit.edu>

I know we are getting "off-topic" here, but as people are sharing
scripts, it turns out that I have been generating my own "message-ids"
for the emails my scripts send out for accepted patches for years with
the attached simple script.

Odds are it was based on a bash script from akpm, but maybe it came from
somewhere else, I've had it around for so long the history of it is
long-lost.

> So if someone wants to make life easier for people who want to send
> out the V2 version of the patch, it would be possible for someone to
> write some tooling which saves the generated Message-Id by git
> send-email (and if you generate the message id and drop it into the
> files generated by git format-patch, git send-email will use the
> generated message id), so that can get used for the git commit
> description for the next version of the commit, this can be done in a
> completely automated way, without having to do any kind of lookups.

When accepting patches from people, my old scripts used to do this
properly and reply to the sent message-id.  Now that I use git, that's
lost, except that I now am generating Link: tags in the commit message
itself, like:
	Link: https://lore.kernel.org/r/20190822213659.5501-1-hsiangkao@aol.com

Hm, I guess I do now keep that info, and I can fix my scripts to
properly thread things, let me go work on that later today...

> As far as I'm concerned, Message-Id's or Link's are both strictly
> superior than a random 16-byte Change-Id UUID.

I totally agree, there's more data in a message-id than a change-id by
far.

Sorry Doug, but this thread turned out kind of like I expected it to,
hopefully you have been convinced better than I did when we spoke in
person :)

thanks,

greg k-h

[-- Attachment #2: make_message_id --]
[-- Type: text/plain, Size: 659 bytes --]

#!/usr/bin/perl

# we make a "fake" message id by taking the current number of seconds
# since the beginning of Unix time and tacking on two random numbers to
# the end, in case we are called quicker than 1 second since the last
# time we were called.

use strict;

my $date = `date "+\%s"`;
my $hostname = `hostname -d`;
chomp($date);
chomp($hostname);

my $pseudo_rand;

open FILE, "<:raw", "/dev/urandom" or die "Couldn't open /dev/urandom !";

sysread(FILE, $pseudo_rand, 1);
my $rand1 = ord($pseudo_rand);

sysread(FILE, $pseudo_rand, 1);
my $rand2 = ord($pseudo_rand);

my $message_id = "$date$rand1$rand2\@$hostname";
print "$message_id";

close FILE;

  reply	other threads:[~2019-08-25  3:11 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 23:39 [Ksummit-discuss] Allowing something Change-Id (or something like it) in kernel commits Doug Anderson
2019-08-23  0:03 ` Brendan Higgins
2019-08-23  0:17 ` Linus Torvalds
2019-08-23  0:30   ` Olof Johansson
2019-08-23  0:43     ` Guenter Roeck
2019-08-23  0:45       ` Olof Johansson
2019-08-23  1:05         ` Olof Johansson
2019-08-23  1:09           ` Dmitry Torokhov
2019-08-23  1:36         ` Theodore Y. Ts'o
2019-08-23  2:58           ` Linus Torvalds
2019-08-23  3:03             ` Linus Torvalds
2019-08-23 13:15               ` Sean Paul
2019-08-23 15:18                 ` Theodore Y. Ts'o
2019-08-23 15:31                   ` Sean Paul
2019-08-23 15:48                     ` Thomas Gleixner
2019-08-23 16:19                       ` Dmitry Torokhov
2019-08-23 16:35                         ` Joel Fernandes
2019-08-23 16:45                           ` Doug Anderson
2019-08-23 16:54                             ` Joel Fernandes
2019-08-23 18:00                               ` Doug Anderson
2019-08-23 19:08                                 ` Joel Fernandes
2019-08-23 19:15                                   ` Joel Fernandes
2019-08-23 19:23                                     ` Thomas Gleixner
2019-08-23 19:31                                       ` Joel Fernandes
2019-08-24 16:53                                   ` Doug Anderson
2019-08-23 16:46                           ` Dmitry Torokhov
2019-08-23 19:17                             ` Thomas Gleixner
2019-08-23 19:38                               ` Laurent Pinchart
2019-08-23 21:15                                 ` Thomas Gleixner
2019-08-23 21:25                                   ` Mark Brown
2019-08-24 23:13                                   ` Theodore Y. Ts'o
2019-08-25  7:09                                     ` Thomas Gleixner
2019-08-26 22:05                                       ` Thomas Gleixner
2019-08-28  8:50                                         ` Thomas Gleixner
2019-08-23 20:02                               ` Christian Brauner
2019-08-24 16:34                                 ` Doug Anderson
2019-08-24 18:11                                   ` Linus Torvalds
2019-08-24 23:04                                     ` Theodore Y. Ts'o
2019-08-25  3:11                                       ` Greg Kroah-Hartman [this message]
2019-08-27 10:51                                         ` Mark Brown
2019-09-09  8:14                                           ` Michael Ellerman
2019-09-09 12:09                                             ` Mark Brown
2019-08-26 17:13                                     ` Doug Anderson
2019-08-26 17:30                                       ` Joel Fernandes
2019-08-26 21:35                                         ` Doug Anderson
2019-08-26 21:51                                           ` Thomas Gleixner
2019-08-26 22:06                                             ` Doug Anderson
2019-08-26 22:19                                               ` Thomas Gleixner
2019-08-26 23:02                                           ` Theodore Y. Ts'o
2019-08-26 23:11                                             ` Doug Anderson
2019-09-16 14:11                                               ` Christian Brauner
2019-09-16 17:43                                               ` Al Viro
2019-09-16 18:05                                                 ` Doug Anderson
2019-08-26 23:43                                             ` Thomas Gleixner
2019-08-28 12:34                                               ` Christian Brauner
2019-08-27  0:29                                             ` Dmitry Vyukov
2019-08-27  6:06                                               ` Thomas Gleixner
2019-08-27 13:24                                                 ` Dmitry Vyukov
2019-08-27 13:48                                                   ` Greg Kroah-Hartman
2019-08-27 14:01                                                     ` Guenter Roeck
2019-08-27 14:09                                                       ` Thomas Gleixner
2019-08-27 15:33                                                         ` Greg Kroah-Hartman
2019-08-27 15:42                                                           ` Thomas Gleixner
2019-08-27 18:55                                                           ` Konstantin Ryabitsev
2019-08-27 19:53                                                             ` Greg Kroah-Hartman
2019-08-27 21:34                                                               ` Joel Fernandes
2019-08-27 21:38                                                                 ` Joel Fernandes
2019-08-28  9:08                                                                 ` Greg Kroah-Hartman
2019-08-28  9:25                                                                   ` Jani Nikula
2019-08-28 10:04                                                                   ` Martin K. Petersen
2019-08-28 10:53                                                                     ` Thomas Gleixner
2019-08-28 12:46                                                                       ` Martin K. Petersen
2019-08-28 10:42                                                                   ` Mark Brown
2019-08-28 11:41                                                                     ` Greg Kroah-Hartman
2019-08-28 12:22                                                                   ` Christian Brauner
2019-08-28 12:38                                                                   ` Joel Fernandes
2019-08-28 13:58                                                                     ` Theodore Y. Ts'o
2019-08-28 20:39                                                                       ` Doug Anderson
2019-08-28 20:46                                                                         ` Johannes Berg
2019-08-28 21:00                                                                           ` Doug Anderson
2019-08-28 22:15                                                                         ` Rob Herring
2019-08-27 17:34                                                       ` Geert Uytterhoeven
2019-08-27 18:50                                                         ` Guenter Roeck
2019-08-27 14:06                                                   ` Thomas Gleixner
2019-08-27  7:33                                               ` Geert Uytterhoeven
2019-08-27 13:30                                                 ` Dmitry Vyukov
2019-08-27 14:28                                                   ` Paul E. McKenney
2019-08-27 15:06                                                     ` Thomas Gleixner
2019-08-27 15:25                                                       ` Paul E. McKenney
2019-08-28  8:57                                                         ` Dan Carpenter
2019-08-23 15:49                     ` Doug Anderson
2019-08-23 15:54                       ` Thomas Gleixner
2019-08-23 15:59                         ` Thomas Gleixner
2019-08-23 16:38                           ` Doug Anderson
2019-08-23 16:50                             ` Andrew Lunn
2019-08-23 17:50                               ` Doug Anderson
2019-08-23 18:10               ` Konstantin Ryabitsev
2019-08-26 22:19               ` Paul Mackerras
2019-08-27  7:02                 ` Stephen Rothwell
2019-08-23  9:09             ` Vlastimil Babka
2019-08-23 12:48               ` Bhaskar Chowdhury
2019-08-23  1:01   ` Dmitry Torokhov
2019-08-23  1:07   ` Doug Anderson
2019-08-23  1:18     ` Joel Fernandes
2019-09-05  8:12 ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190825031143.GA2590@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=brho@google.com \
    --cc=dtor@chromium.org \
    --cc=dvyukov@google.com \
    --cc=hanwen@google.com \
    --cc=joelaf@google.com \
    --cc=jrn@google.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=rientjes@google.com \
    --cc=tfiga@chromium.org \
    --cc=tytso@google.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).