[SRU][P, T, X, B, C][PATCH v2] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][P, T, X, B, C][PATCH v2] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit

Kleber Souza
The package tracking bug number is not inserted anymore on the changelog
by the link-to-tracker script. Instead, it creates/updates the
debian.<branch>/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 <[hidden email]>
---
 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..4bf738f8fed1 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)
+            elif 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)
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][P, T, X, B, C][PATCH v2] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit

Thadeu Lima de Souza Cascardo-3
Acked-by: Thadeu Lima de Souza Cascardo <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][P, T, X, B, C][PATCH v2] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit

Stefan Bader-2
In reply to this post by Kleber Souza
On 21.09.2018 13:37, Kleber Sacilotto de Souza wrote:

> The package tracking bug number is not inserted anymore on the changelog
> by the link-to-tracker script. Instead, it creates/updates the
> debian.<branch>/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 <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---
>  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..4bf738f8fed1 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)
> +            elif 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)
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED[T]: [SRU][P, T, X, B, C][PATCH v2] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit

Stefan Bader-2
In reply to this post by Kleber Souza
On 21.09.2018 13:37, Kleber Sacilotto de Souza wrote:

> The package tracking bug number is not inserted anymore on the changelog
> by the link-to-tracker script. Instead, it creates/updates the
> debian.<branch>/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 <[hidden email]>
> ---
Applied to trusty/master-next. Thanks.

-Stefan

>  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..4bf738f8fed1 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)
> +            elif 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)
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED[B]: [SRU][P, T, X, B, C][PATCH v2] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit

Stefan Bader-2
In reply to this post by Kleber Souza
On 21.09.2018 13:37, Kleber Sacilotto de Souza wrote:

> The package tracking bug number is not inserted anymore on the changelog
> by the link-to-tracker script. Instead, it creates/updates the
> debian.<branch>/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 <[hidden email]>
> ---
>  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..4bf738f8fed1 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)
> +            elif 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)
>
Applied to bionic/master-next. Thanks.

-Stefan


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED[X]: [SRU][P,T,X,B,C][PATCH v2] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit

Kleber Souza
In reply to this post by Kleber Souza
On 09/21/18 13:37, Kleber Sacilotto de Souza wrote:

> The package tracking bug number is not inserted anymore on the changelog
> by the link-to-tracker script. Instead, it creates/updates the
> debian.<branch>/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 <[hidden email]>
> ---
>  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..4bf738f8fed1 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)
> +            elif 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)
>

Applied to xenial/master-next branch.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[P]: [SRU][P,T,X,B,C][PATCH v2] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit

Kleber Souza
In reply to this post by Kleber Souza
On 09/21/18 13:37, Kleber Sacilotto de Souza wrote:

> The package tracking bug number is not inserted anymore on the changelog
> by the link-to-tracker script. Instead, it creates/updates the
> debian.<branch>/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 <[hidden email]>
> ---
>  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..4bf738f8fed1 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)
> +            elif 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)
>

Applied to precise/master-next branch.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [SRU][P, T, X, B, C][PATCH v2] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit

Kleber Souza
In reply to this post by Kleber Souza
On 09/21/18 13:37, Kleber Sacilotto de Souza wrote:

> The package tracking bug number is not inserted anymore on the changelog
> by the link-to-tracker script. Instead, it creates/updates the
> debian.<branch>/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 <[hidden email]>
> ---
>  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..4bf738f8fed1 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)
> +            elif 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)
>

Please note that this patch still needs to be applied to Cosmic.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED[C,U]: [SRU][P,T,X,B,C][PATCH v2] UBUNTU: [Packaging] git-ubuntu-log -- fix order of tracking bug commit

Thadeu Lima de Souza Cascardo-3
Applied to cosmic master-next and unstable master trees.

Thanks.
Cascardo.

Applied-to: cosmic/master-next
Applied-to: unstable/master

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team