diff -Nru linux-meta-4.15.0.87.79/debian/changelog linux-meta-4.15.0.88.80/debian/changelog --- linux-meta-4.15.0.87.79/debian/changelog 2020-01-31 19:09:58.000000000 +0000 +++ linux-meta-4.15.0.88.80/debian/changelog 2020-02-11 18:57:05.000000000 +0000 @@ -1,3 +1,12 @@ +linux-meta (4.15.0.88.80) bionic; urgency=medium + + * Bump ABI 4.15.0-88 + + * Packaging resync (LP: #1786013) + - [Packaging] resync git-ubuntu-log + + -- Marcelo Henrique Cerri Tue, 11 Feb 2020 15:57:05 -0300 + linux-meta (4.15.0.87.79) bionic; urgency=medium * Bump ABI 4.15.0-87 diff -Nru linux-meta-4.15.0.87.79/debian/control linux-meta-4.15.0.88.80/debian/control --- linux-meta-4.15.0.87.79/debian/control 2020-01-31 19:09:58.000000000 +0000 +++ linux-meta-4.15.0.88.80/debian/control 2020-02-11 18:57:05.000000000 +0000 @@ -5,8 +5,8 @@ Standards-Version: 3.9.8 Build-Depends: dpkg (>= 1.13.19), debhelper (>= 9), gawk, Build-Depends-Arch: - linux-headers-4.15.0-87, - linux-headers-4.15.0-87-generic, + linux-headers-4.15.0-88, + linux-headers-4.15.0-88-generic, Vcs-Git: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-meta/+git/bionic Package: linux-source diff -Nru linux-meta-4.15.0.87.79/debian/scripts/misc/git-ubuntu-log linux-meta-4.15.0.88.80/debian/scripts/misc/git-ubuntu-log --- linux-meta-4.15.0.87.79/debian/scripts/misc/git-ubuntu-log 2020-01-30 16:56:25.000000000 +0000 +++ linux-meta-4.15.0.88.80/debian/scripts/misc/git-ubuntu-log 2019-08-27 15:03:22.000000000 +0000 @@ -1,6 +1,5 @@ #!/usr/bin/python3 -import os import sys import codecs @@ -13,16 +12,39 @@ sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) entries = [] + + def add_entry(entry): if entry and 'ignore' not in entry: - if 'bugs' not in entry and 'cves' in entry: - for cve in entry['cves']: - if cve not in bugs: - bugs.append(cve) + combo = [] + for bug in set(entry.get('bugs', [])): + combo.append(bug) + for cve in set(entry.get('cves', [])): + combo.append(cve) + combo = sorted(combo) + + if len(combo) == 0: + if entry.get('subject', "").startswith('UBUNTU'): + combo = '__packaging__' + else: + combo = '__mainline__' + else: + if entry.get('subject', "") == 'UBUNTU: link-to-tracker: update tracking bug': + # Construct a key with '__trackingbug__' on the first position + # and the tracking bug number afterwards + combo.insert(0, '__trackingbug__') + # Tracking bug goes at the top + keys.insert(0, combo) + else: + if combo not in keys: + keys.append(combo) + + entry['key'] = combo entries.append(entry) + # Suck up the git log output and extract the information we need. -bugs = [] +keys = [] entry = None subject_wait = False for line in sys.stdin: @@ -39,14 +61,16 @@ subject_wait = False entry['subject'] = line.strip() - elif line.startswith(' BugLink: ') and 'launchpad.net' in line: - bits = line.strip().split(maxsplit=1) - bits = bits[1].split('/') - entry.setdefault('bugs', []).append(bits[-1]) - - # Accumulate bug numbers. - if bits[-1] not in bugs: - bugs.append(bits[-1]) + elif line.startswith(' BugLink: '): + bits = line.strip().split(maxsplit=2) + if len(bits) > 2: + # There is text after the URL, so use that (after stripping the + # enclosing characters) + entry.setdefault('bugs', []).append(bits[2][1:-1]) + elif 'launchpad.net' in bits[1]: + # Extract the bug number from the launchpad URL + bits = bits[1].split('/') + entry.setdefault('bugs', []).append(bits[-1]) elif line.startswith(' CVE-'): entry.setdefault('cves', []).append(line.strip()) @@ -54,6 +78,11 @@ elif line.startswith(' Ignore:'): entry['ignore'] = True + elif line.startswith(' Properties:'): + for prop in line.strip().split()[1:]: + if prop in ('ignore', 'no-changelog'): + entry['ignore'] = True + add_entry(entry) entries.reverse() @@ -66,60 +95,72 @@ del entry['author'] # Lump everything without a bug at the bottom. -bugs.append('__packaging__') -bugs.append('__mainline__') +keys.append('__packaging__') +keys.append('__mainline__') emit_nl = False -for bug in bugs: - if bug == '__packaging__': - title = 'Miscellaneous Ubuntu changes' - elif bug == '__mainline__': - title = 'Miscellaneous upstream changes' - elif bug.startswith('CVE-'): - title = bug +for key in keys: + if key == '__packaging__': + title_set = ['Miscellaneous Ubuntu changes'] + elif key == '__mainline__': + title_set = ['Miscellaneous upstream changes'] else: - bug_info = None + title_set = [] + for bug in key: + if bug.startswith('CVE-'): + title_set.append(bug) + elif bug == '__trackingbug__': + # Look for the tracking bug number on the second + # position of the key + continue + elif bug.isdigit(): + # Assume that it is an LP bug number if 'bug' contains only digits + bug_info = None + + try: + # urllib.request.urlcleanup() + request = urllib.request.Request('https://api.launchpad.net/devel/bugs/' + bug) + request.add_header('Cache-Control', 'max-age=0') + with urllib.request.urlopen(request) as response: + data = response.read() + bug_info = json.loads(data.decode('utf-8')) + + title = bug_info['title'] + if 'description' in bug_info: + for line in bug_info['description'].split('\n'): + if line.startswith('Kernel-Description:'): + title = line.split(' ', 1)[1] + + except urllib.error.HTTPError: + title = 'INVALID or PRIVATE BUG' + + title += ' (LP###' + bug + ')' + title_set.append(title) + else: + # Finally treat 'bug' itself as the title + title_set.append(bug) - try: - #urllib.request.urlcleanup() - request = urllib.request.Request('https://api.launchpad.net/devel/bugs/' + bug) - request.add_header('Cache-Control', 'max-age=0') - with urllib.request.urlopen(request) as response: - data = response.read() - bug_info = json.loads(data.decode('utf-8')) - - title = bug_info['title'] - if 'description' in bug_info: - for line in bug_info['description'].split('\n'): - if line.startswith('Kernel-Description:'): - title = line.split(' ', 1)[1] + emit_title = True + for entry in entries: + if entry['key'] != key: + continue - except urllib.error.HTTPError: - title = 'INVALID or PRIVATE BUG' + if emit_title: + if emit_nl: + print('') + emit_nl = True - title += ' (LP###' + bug + ')' + title_lines = textwrap.wrap('#// '.join(title_set), 76) + print(' * ' + title_lines[0].replace('LP###', 'LP: #').replace('#//', ' //')) + for line in title_lines[1:]: + line = line.replace('LP###', 'LP: #').replace('#//', ' //') + print(' ' + line) - emit_title = True - for entry in entries: - if (bug == '__packaging__' and 'bugs' not in entry and 'cves' not in entry and 'author' in entry) or \ - (bug == '__mainline__' and 'bugs' not in entry and 'cves' not in entry and 'author' not in entry) or \ - ('bugs' in entry and bug in entry['bugs']) or \ - ('cves' in entry and bug in entry['cves']): - if emit_title: - if emit_nl: - print('') - emit_nl = True - - title_lines = textwrap.wrap(title, 76) - print(' * ' + title_lines[0].replace('LP###', 'LP: #')) - for line in title_lines[1:]: - line = line.replace('LP###', 'LP: #') - print(' ' + line) + emit_title = False - emit_title = False + if key[0] != '__trackingbug__': title_lines = textwrap.wrap(entry['subject'], 76) print(' - ' + title_lines[0]) for line in title_lines[1:]: line = line.replace('LP###', 'LP: #') print(' ' + line) -