From patchwork Thu Mar 15 20:48:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 26327 Received: (qmail 110103 invoked by alias); 15 Mar 2018 20:48:44 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 109982 invoked by uid 89); 15 Mar 2018 20:48:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=more!, more X-HELO: mail-qt0-f182.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=9wKr5XKeZLt+/ZHemW5+Zb0WCLeq2KXuVxqBk8zXmGs=; b=Mn0wnCg33Z5L1Zp+ceuEgxnqPCyVKxKhkWSyOPfjqmKBrJ6+ds4KCfHrkFeZ6rJoQf 3c9X8xofpPX9ZnMnoKNcP10bgtEdOdgRnS6Xh9g54vfgmHPxHBlwXhtPSqbiKsgep8dL GMnrxUSoPr75GjwsRMkkktUtxqPOdhMst5GHqdgJpOU8OR8Rhozu6KoTf5s1ipGurxGQ aHC3KZ4RR+Y0IMnz6rmlQCwkd0R90d+vJZd/WtOshiSLcDSmOiyxG8MmSU9o5EUCEPmV Nq6F7prHF0N8dpHhxKe3IVGg/qzORRvNySgUyL5JTnEsVIrepsfbnhTS8DH2A7zzXI71 DxEg== X-Gm-Message-State: AElRT7EskVXpUHnLOeEblfH82IVXTG5+nBQ7mx/TAcbVE5ae5tI+eik7 aBy1FFGpn2KXI/GjT/g/QtsCeqQ0XTc= X-Google-Smtp-Source: AG47ELvC14i1Z71bPTbuKIZeBGXkYWCXNOxvSNMBPbp3DYrp3hFNs2gcdbZdPDsMK81dCH42qTIw3A== X-Received: by 10.237.59.49 with SMTP id p46mr15810351qte.84.1521146903474; Thu, 15 Mar 2018 13:48:23 -0700 (PDT) To: GNU C Library , "Joseph S. Myers" From: Carlos O'Donell Subject: [RFC]: Repurpose glibc_X.Y keyword to mean "Fixed in glibc X.Y release branch" Message-ID: Date: Thu, 15 Mar 2018 14:48:19 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 The current purpose of the glic_X.Y keywords is to indicate that a given bug needs to be backported to glibc_X.Y. My original idea behind this was that users or distribution maintainers could request certain bugs fixed on master to be backported to release/X.Y/master via this keyword, and we could avoid creating a new bug for this request. Instead of following this process, we have had a better process arise! We have empowered distro maintainers and vendors to work upstream, backporting bugs that matter to them (selected from their perspective distro bug trackers). The distro maintainers are doing a fantastic job of backporting bugs. Thanks you Aurelien, Florian, Siddhesh, Raji, Arjun, Dmitry, and many more! This is exactly the way it should work. Need and interest driving the work. Therefore nobody uses glibc_X.Y to indicate anything. Developers backport the bugs themselves, there is no need to mark a bug as needing a backport. Users of the distros file these bugs in the downstream distro bug trackers instead of upstream in the glibc bugzilla. The one thing that is missing from this is an automated way to generate the bug list on the *release branch* NEWS. We have that automation already for master via milestone=X.Y, but the milestone UI widget is not multi-select. I would like to propose we re-purpose the glibc_X.Y tag to indicate "Fixed in glibc_X.Y", and enhance the list-fixed-bugs.py script to process keywords in-addition to milestone. This way the process looks like this: * Commit changes to master, set bug milestone=X.Y. * Can update bug list at release with `./list-fixed-bugs.py 2.28` * Commit changes to release/X.Y-1, set keyword glibc_X.Y-1 in bug. * Run list-fixed-bugs.py, and commit the changes it generates. * Get list of bugs for 2.27.1 with `./list-fixed-bugs.py -b release 2.27` * Lists only bugs which were fixed after release e.g. glibc_2.27 keyword and FIXED. This automates the generation of the list NEWS bug list for release branches. Users need only cut-and-paste the results before they commit. Cheers, Carlos. 2018-03-15 Carlos O'Donell * scripts/list-fixed-bugs.py: Add -b support for listing bugs. diff --git a/scripts/list-fixed-bugs.py b/scripts/list-fixed-bugs.py index b62f3b2146..8491e20cc5 100755 --- a/scripts/list-fixed-bugs.py +++ b/scripts/list-fixed-bugs.py @@ -21,6 +21,24 @@ This script takes a version number as input and generates a list of bugs marked as FIXED with that milestone, to be added to the NEWS file just before release. The output is in UTF-8. + +If the -b "master" option is used the list of bugs is all of those +bugs marked FIXED with that milestone i.e. fixed on master before the +release. This is the same as running without -b (default). + +If the -b "both" option is used the list of bugs is all of those bugs +marked FIXED with that milestone and keyword e.g. glibc_VERSION +i.e. fixeed on master before the release and fixed subseqeuently on +the release branch. This is the list of all the bugs fixed in a given +minor X.Y* release. + +If the -b "release" option is used the list of bugs is all of those +bugs marked FIXED with that keyword e.g. glibc_VERSION i.e. fixed on +the release branch after the release. Once a commit has been cherry +picked to the release branch, and the bug updated to include the +keyword glibc_VERSION (indicates fixed on the matching release branch), +the script can be run to get the new list of fixed bugs to update the +release branch NEWS. """ import argparse @@ -30,19 +48,47 @@ import textwrap import urllib.request +class BranchAction(argparse.Action): + def __init__(self, option_strings, dest, nargs=None, **kwargs): + if nargs is not None: + raise ValueError("nargs not allowed") + super(BranchAction, self).__init__(option_strings, dest, **kwargs) + def __call__(self, parser, namespace, values, option_string=None): + options = set(['master', 'release', 'both']) + if values not in options: + raise ValueError("Only one of 'master', 'release', " + "or 'both' can be used with -b."); + setattr(namespace, self.dest, values) + def get_parser(): """Return an argument parser for this module.""" parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('-b', action=BranchAction, default='master' + help='One of "master", "release", or "both"') parser.add_argument('version', help='Release version to look up') return parser -def list_fixed_bugs(version): - """List the bugs fixed in a given version.""" - url = ('https://sourceware.org/bugzilla/rest.cgi/bug?product=glibc' - '&resolution=FIXED&target_milestone=%s' - '&include_fields=id,component,summary' % version) +def list_fixed_bugs(version, branch): + """List the bugs fixed in a given version on master and the matching + release branch (if branch is 'both'), or only on the matching release + branch (if branch is 'release'), or only on the master branch when + that the release was in development (if branch is 'master').""" + keyword=version + milestone=version + + if branch == 'master': + keyword='NOMATCH' + if branch == 'release': + milestone='NOMATCH' + + url =('https://sourceware.org/bugzilla/rest.cgi/bug?product=glibc' + '&f1=keywords&f2=target_milestone&j_top=OR' + '&o1=substring&o2=equals' + '&query_format=advanced' + '&v1=glibc_%s&v2=%s' + '&include_fields=id,component,summary' % (keyword, milestone)) response = urllib.request.urlopen(url) json_data = response.read().decode('utf-8') data = json.loads(json_data) @@ -57,7 +103,7 @@ def main(argv): """The main entry point.""" parser = get_parser() opts = parser.parse_args(argv) - list_fixed_bugs(opts.version) + list_fixed_bugs(opts.version, opts.b) if __name__ == '__main__':