From patchwork Fri Sep 21 09:54:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kleber Sacilotto de Souza X-Patchwork-Id: 973006 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42GpqT0vvjz9sCV; Fri, 21 Sep 2018 19:55:01 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1g3I9E-0007o7-L0; Fri, 21 Sep 2018 09:54:52 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1g3I9D-0007nv-6j for kernel-team@lists.ubuntu.com; Fri, 21 Sep 2018 09:54:51 +0000 Received: from mail-ed1-f72.google.com ([209.85.208.72]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1g3I9C-000132-Vi for kernel-team@lists.ubuntu.com; Fri, 21 Sep 2018 09:54:50 +0000 Received: by mail-ed1-f72.google.com with SMTP id w42-v6so5409509eda.23 for ; Fri, 21 Sep 2018 02:54:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=yA80bqQfNCiuJ9G9Dd3Ua+irlMwF9WDrHNithEujIO4=; b=Rf+2VTM1tr47kbJKqWovhAR8kL4dvmsMR4Blfqjk4Q6JWVZoCWCAqLjjEvAEBdMZ20 vZUy6hUcF7OZx8tnQEKV181L11nPQK6tpU/xm7WG/Y50G1ot5WpkN2JT7W95HA1msXxS 0lCCib0dk836+3s16ScpNj28suayJ947F6Hycz4+lx21OmCoH6u6jGLST28lgUfL++Ql EDbHVSm8SQqDZ4n2fEX4Y/AvGvAgAISKW/+cxPYhyhwYxGMlg52lmErPoERJCxPG4DaS lOM0vQYvztTN5kAXweIbfqtx5hQKjpXn6YvNXN4BzeHWVlD4xbdFUJxMu6biffyKvi67 +ZBw== X-Gm-Message-State: APzg51BHisk31IhsMMRQHGh2K69YJHp7d9KPZkcVr/TwDnur9tpY+RJk 7QOwJ3X5aeY/X1H78tL7VraOiYkjki7QJT6LTSDr7FTn22rAXbhps1HFRvfM9b2qEwWwM6V5iE1 5owfHRz66AElHg0LBH2Y2Cx6dm8VMG+dU7RSa10h9PQ== X-Received: by 2002:a50:b4db:: with SMTP id x27-v6mr10289322edd.155.1537523690298; Fri, 21 Sep 2018 02:54:50 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbp1bhUTZoHlWz5PUfR0Ny6g/6pWcWmCpULBg8H6Nq/RR8rVJ7FmO5MRPQpNx8162Uqi5N5KA== X-Received: by 2002:a50:b4db:: with SMTP id x27-v6mr10289305edd.155.1537523690035; Fri, 21 Sep 2018 02:54:50 -0700 (PDT) Received: from localhost (84-199-88-153.iFiber.telenet-ops.be. [84.199.88.153]) by smtp.gmail.com with ESMTPSA id o12-v6sm2515879edo.0.2018.09.21.02.54.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Sep 2018 02:54:49 -0700 (PDT) From: Kleber Sacilotto de Souza To: kernel-team@lists.ubuntu.com Subject: [SRU][P, T, X, B, C][PATCH] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit Date: Fri, 21 Sep 2018 11:54:48 +0200 Message-Id: <20180921095448.32240-1-kleber.souza@canonical.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" The package tracking bug number is not inserted anymore on the changelog by the link-to-tracker script. Instead, it creates/updates the debian./tracking-bug file and commits the change. We want this commit to be added to the changelog in a similar fashion as before, as the first entry. So change the git-ubuntu-log script to detect that commit and insert it in the right place. Ignore: yes Signed-off-by: Kleber Sacilotto de Souza --- debian/scripts/misc/git-ubuntu-log | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/debian/scripts/misc/git-ubuntu-log b/debian/scripts/misc/git-ubuntu-log index 490ecce73c48..6520bfaa20c8 100755 --- a/debian/scripts/misc/git-ubuntu-log +++ b/debian/scripts/misc/git-ubuntu-log @@ -28,13 +28,19 @@ def add_entry(entry): else: combo = '__mainline__' else: - if combo not in keys: - keys.append(combo) + 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. keys = [] entry = None @@ -90,6 +96,10 @@ for key in keys: for bug in key: if bug.startswith('CVE-'): title_set.append(bug) + if bug == '__trackingbug__': + # Look for the tracking bug number on the second + # position of the key + continue else: bug_info = None @@ -132,8 +142,9 @@ for key in keys: emit_title = False - title_lines = textwrap.wrap(entry['subject'], 76) - print(' - ' + title_lines[0]) - for line in title_lines[1:]: - line = line.replace('LP###', 'LP: #') - print(' ' + line) + 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)