From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 9j4dGsEG2mA5EQAAWB0awg (envelope-from ) for ; Mon, 28 Jun 2021 13:28:33 -0400 Received: by simark.ca (Postfix, from userid 112) id 62B5B1F1F2; Mon, 28 Jun 2021 13:28:33 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C386A1E939 for ; Mon, 28 Jun 2021 13:28:31 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7679139B946C for ; Mon, 28 Jun 2021 17:28:31 +0000 (GMT) Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id 4B91F386FC1B for ; Mon, 28 Jun 2021 17:28:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4B91F386FC1B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-pj1-x1032.google.com with SMTP id bb10-20020a17090b008ab029016eef083425so13378933pjb.5 for ; Mon, 28 Jun 2021 10:28:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+SkbSBORellYCM4euO23wnzryBbbRMCNy88xQ2XiBjo=; b=OvDvPfya3jGL7NKRuUJy65qTVxelTfR1ZHljVCnNEcj069/72oFZTxhwYF7QG50tqf pG5U6PJWPojfUemNfFXyjPRBzX2dvsL8XtBU8du8vE1pwEJyZFzPq9vkBHAJlxD0/WtT NOPAfluRLiYy78EArYkqc1A+6b8+tiEsr0Nzuc5Ok0oTUGBJ3IjNvbhlR2ljTlQo/ixb 7aTl/SUgszP61XznJn3wY1MQAIqYi0V3d1HqNcRISXiXRAQpu+w6OIDyZmJujI0oBZ8t XbihLBIXenGp5vG70dBzCJYmaiMW2Wrx7LeQJvHkeKW2BzdNWxq1IymfV271CcLnoeUq d9YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+SkbSBORellYCM4euO23wnzryBbbRMCNy88xQ2XiBjo=; b=kAAeOlAnzFSMS3ZW2GBh4KvefRK8YN/7sCD7rB7i+smJ3PQFwskuI09aTSqY+TrPMk GgY07+80lP8M9Ly8BkbC7YZOvsRSLtozSQDOOBrlK/hbdWC1ynqJuGb1jHrPBcgqKO92 c9QwLidwf9puiCrPHsyHRuOdK8z/rcdBkADbunQ0t1DAhyg6lDEuu+nmlxTzxKkGxCzo /p3DYa/kpS3iSYfstwWazS7uAcwa9CKd+GcxRTNI85pvT6yIZnF0CYp2zSfKH2z/DvP2 FAmL6nUHi1+ede/hKmkIvn60Bz4Yrt3KKOyEz7tq7H3JWzSNH13996nse33pfuyDaWYT LRAA== X-Gm-Message-State: AOAM5334HOMWLVGDvDkV1iL18sKKiThdOjew/c4YrsUYUqW2WjHKa9mn WaQPhJWGoGwUjw09ljVjaxagJ1CDi2W/ X-Google-Smtp-Source: ABdhPJxaR6+4QmzsL6csX9U7qVZHPdZ7So3in1z4yE72Fjh7QKMAFex146eJjfo2P/cpmHJy5XZykA== X-Received: by 2002:a17:902:7615:b029:128:af2b:ffac with SMTP id k21-20020a1709027615b0290128af2bffacmr13595657pll.60.1624901298433; Mon, 28 Jun 2021 10:28:18 -0700 (PDT) Received: from takamaka.home ([184.69.131.86]) by smtp.gmail.com with ESMTPSA id v9sm16115214pgq.54.2021.06.28.10.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jun 2021 10:28:17 -0700 (PDT) Received: by takamaka.home (Postfix, from userid 1000) id D15F389B6D; Mon, 28 Jun 2021 10:28:16 -0700 (PDT) Date: Mon, 28 Jun 2021 10:28:16 -0700 From: Joel Brobecker To: Simon Marchi Subject: Re: ANNOUNCEMENT: ChangeLog policy change after GDB 11 Message-ID: <20210628172816.GC550682@adacore.com> References: <20210613151051.GA1620040@adacore.com> <0a45d93b-a293-0a2e-91ad-0ad88cb1747e@polymtl.ca> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline In-Reply-To: <0a45d93b-a293-0a2e-91ad-0ad88cb1747e@polymtl.ca> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gdb-patches@sourceware.org, Joel Brobecker Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > On 2021-06-13 11:10 a.m., Joel Brobecker wrote: > > - For patches with multiple authors, we ask that commits with > > multiple authors have a... > > > > Co-Authored-By: xxx > > > > ... git-trailer, so that complete author information be kept. > > Similar to that, I was wondering if we should define a standard method > to refer to a bug/PR number in a git trailer. For example, for a commit > fixing an issue: > > Fixes: PR gdb/1234 > > Sometimes, you make a commit that is related to a PR but does not fix it > (for example, add a KFAIL-ed test). In that case, it should be > something else than "Fixes". What about... Bug: PR gdb/1234 ... or... Xref: PR gdb/1234 ? > What do people use normally for thse things? Is it necessary, or just > mentioning "PR gdb/1234" somewhere in the commit message's free text > will be enough to automatically link the commit to the PR? I believe so. FTAOD, here is the sequence in the script which extracts the references to bugzilla PR numbers: while ($log_txt =~ m/\s(?:bug|PR|BZ)\s+\#?\s*(?:[a-z0-9+-]+\/)?(?:\/)?(\d+)(.*)$/si) { Let me also attach a copy of the entire script, just in case I missed something. Regardless of the above, I think it would be nice if we used Git trailers for this as it makes it easier to find that kind of information. -- Joel --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=email-to-bugzilla #!/usr/bin/perl # -*-Perl-*- # # Perl filter to handle the log messages from the checkin of files in # a directory. This script will group the lists of files by log # message, and mail a single consolidated log message at the end of # the commit. # # This file assumes a pre-commit checking program that leaves the # names of the first and last commit directories in a temporary file. # # Contributed by David Hampton # # hacked greatly by Greg A. Woods # # Then chopped down just to send bugzilla email, for git. use strict; use POSIX; use DBI; use Mail::Header; use Mail::Internet; my $bugzillaproduct; # # Subroutines # sub see_if_bugzilla_bug_exists { my ($dbh, $product, $id) = @_; # Split $PRODUCT and SQL-ify. my $sql_product = ''; for my $i (split (/\s+/, $product)) { if ($sql_product ne '') { $sql_product .= ', '; } $sql_product .= "'" . $i . "'"; } my $sth2 = $dbh->prepare ("SELECT COUNT(*) from bugs where bug_id = $id and product_id = any (select products.id from products where name in ($sql_product))") or return 0; $sth2->execute() or return 0; my $count = $sth2->fetchrow_array (); return $count > 0; } sub mail_bug_notification { my $name = shift; my $subject = shift; my $head = Mail::Header->new; $head->add('From', 'cvs-commit@gcc.gnu.org'); $head->add('Subject', $subject); $head->add('To', $name); my $mail = Mail::Internet->new(Header => $head, Body => \@_); die "email send failed\n" if !$mail->send; } # # Main Body # # Initialize basic variables # my $debug = 0; # Parse command line arguments. while (my $arg = shift @ARGV) { if ($arg eq '-d') { $debug = 1; print STDERR "Debug turned on...\n"; } elsif ($arg eq '-G') { die "Too many '-G' args\n" if $bugzillaproduct; $bugzillaproduct = shift @ARGV; } } # Used with sprintf to form name of Gnats notification mailing list. # %s argument comse from -G option. my $MAIL_FORMAT = '%s-bugzilla@localhost'; # Collect the body of the commit message. binmode STDIN, ":utf8"; my @text = (); while () { push (@text, $_); } my $log_txt = join ('', @text); my %done_ids = {}; # fche/jakub 2020-04-01 ... this following matches "Apr" and spams PR1 #while ($log_txt =~ m/[^Aa]?(?:bug|PR|BZ)\s+\#?\s*(?:[a-z+-]+\/)?(?:\/)?(\d+)(.*)$/si) { while ($log_txt =~ m/\s(?:bug|PR|BZ)\s+\#?\s*(?:[a-z0-9+-]+\/)?(?:\/)?(\d+)(.*)$/si) { my $bug_id = $1; $log_txt = $2; if (!defined $done_ids{$bug_id}) { $done_ids{$bug_id} = 1; # Send mail to Bugzilla, if required. if ($bugzillaproduct ne '') { my $dbh = undef; if ($bugzillaproduct eq 'gcc') { $dbh = DBI->connect ("dbi:mysql:bugs", "swbugz", "everythingroses"); } else {# elsif ($bugzillaproduct eq 'glibc') $dbh = DBI->connect ("dbi:mysql:sourcesbugs", "swbugz", "everythingroses"); } if ($debug) { print STDERR "Attempting to see if bug $bug_id exists\n"; } if (defined $dbh & see_if_bugzilla_bug_exists ($dbh, $bugzillaproduct, $bug_id)) { if ($debug) { print STDERR "It does\n"; } if ($bugzillaproduct ne 'gcc') { mail_bug_notification( sprintf ($MAIL_FORMAT, "sourceware"), "[Bug $bug_id]", @text); } else { mail_bug_notification( sprintf ($MAIL_FORMAT, $bugzillaproduct), "[Bug $bug_id]", @text); } } $dbh->disconnect if defined $dbh; } } } exit 0; --YZ5djTAD1cGYuMQK--