[kteam-tools][PATCHv2 0/3] create-stable-tracker --version 'patchset' and cleanups

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

[kteam-tools][PATCHv2 0/3] create-stable-tracker --version 'patchset' and cleanups

Kamal Mostafa-2
For create-stable-tracker:

  - New feature:  --version 'patchset' for collections of patches which do
    not have an associated upstream stable version number.  I've been using
    this to generate our "Bionic stable upstream patchset YYYY-MM-DD" tracking
    bugs since v4.15-stable reached EOL upstream.

  - a couple of one-liner bugfixes.
 
 -Kamal

-----

Kamal Mostafa (3):
  create-stable-tracker: fix series_name comparison for series
    nomination
  create-stable-tracker: fix hardcoded --staging buglink URL
  create-stable-tracker: --version 'patchset' option for arbitrary patch
    sets

 stable/create-stable-tracker | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)

--
2.7.4


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

[kteam-tools][PATCHv2 1/3] create-stable-tracker: fix series_name comparison for series nomination

Kamal Mostafa-2
The test determining which series to nominate never worked, because
series_name.title() yields a capitalized series name ("Bionic") but the
series_collection.name values are lowercase ("bionic").  Fix that by
testing against just 'series_name' which yields the lowercase name.

Signed-off-by: Kamal Mostafa <[hidden email]>
---
 stable/create-stable-tracker | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stable/create-stable-tracker b/stable/create-stable-tracker
index 8b56fc9..3dd03ac 100755
--- a/stable/create-stable-tracker
+++ b/stable/create-stable-tracker
@@ -195,7 +195,7 @@ class CreateTrackingBug(StdApp):
             ubuntu = lp.distributions["ubuntu"]
             sc = ubuntu.series_collection
             for s in sc:
-                if s.name == series_name.title():
+                if s.name == series_name:
                     nomination = bug.lpbug.addNomination(target=s)
                     if nomination.canApprove():
                         nomination.approve()
--
2.7.4


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

[kteam-tools][PATCHv2 2/3] create-stable-tracker: fix hardcoded --staging buglink URL

Kamal Mostafa-2
In reply to this post by Kamal Mostafa-2
When --staging is used, generate the proper URL to the new bug from
launchpad_services_root instead of hardcoding "qastaging".  This
presents the correct URL regardless of which Launchpad service
('qastaging' or 'staging') is in use.

Signed-off-by: Kamal Mostafa <[hidden email]>
---
 stable/create-stable-tracker | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stable/create-stable-tracker b/stable/create-stable-tracker
index 3dd03ac..0816e33 100755
--- a/stable/create-stable-tracker
+++ b/stable/create-stable-tracker
@@ -201,7 +201,7 @@ class CreateTrackingBug(StdApp):
                         nomination.approve()
 
             if 'staging' in self.cfg:
-                print("<a href="https://bugs.qastaging.launchpad.net/bugs/%s">https://bugs.qastaging.launchpad.net/bugs/%s" % (bug.id))
+                print("<a href="https://bugs.%s.launchpad.net/bugs/%s">https://bugs.%s.launchpad.net/bugs/%s" % (self.defaults['launchpad_services_root'], bug.id))
             else:
                 print("<a href="https://bugs.launchpad.net/bugs/%s">https://bugs.launchpad.net/bugs/%s" % (bug.id))
 
--
2.7.4


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

[kteam-tools][PATCHv2 3/3] create-stable-tracker: --version 'patchset' option for arbitrary patch sets

Kamal Mostafa-2
In reply to this post by Kamal Mostafa-2
For collections of patches which do not have an associated upstream stable
version number (i.e. where the upstream stable series has reached EOL)
this option creates an LP tracking bug with a date-stamped in the title
in place of the upstream stable version number, e.g.:

    "Bionic update: upstream stable patchset 2018-07-06"

Signed-off-by: Kamal Mostafa <[hidden email]>
---
 stable/create-stable-tracker | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/stable/create-stable-tracker b/stable/create-stable-tracker
index 0816e33..4f8e39f 100755
--- a/stable/create-stable-tracker
+++ b/stable/create-stable-tracker
@@ -3,6 +3,7 @@
 
 from sys                                import argv
 from getopt                             import getopt, GetoptError
+from datetime                           import datetime
 from ktl.utils                          import stdo, eout
 from ktl.std_app                        import StdApp
 from ktl.debian                         import Debian
@@ -49,11 +50,12 @@ class Cmdline:
         stdo("        --staging        Use the staging LP server to create the bug. This is just for       \n")
         stdo("                         testing and will go away when the database is reset.                \n")
         stdo("                                                                                             \n")
-        stdo("        --version        What is the version number of the stable release. This is used      \n")
-        stdo("                         for the bug title, to determine the series, etcl.                   \n")
+        stdo("        --version        Version number of the upstream stable release,                      \n")
+        stdo("                         or 'patchset' for an arbitrary set of patches.                      \n")
         stdo("                                                                                             \n")
         stdo("    Examples:                                                                                \n")
-        stdo("        %s --staging                                                                         \n" % self.cfg['app_name'])
+        stdo("        %s --staging --version v4.15.8                                                       \n" % self.cfg['app_name'])
+        stdo("        %s --staging --version patchset                                                      \n" % self.cfg['app_name'])
 
     # process
     #
@@ -135,15 +137,21 @@ class CreateTrackingBug(StdApp):
 
             #-------------------------------------------------------------------------------------
             # B U G   W O R K
-            print("version: %s" % self.cfg['version'])
             version = self.cfg['version']
+            if version == 'patchset':
+                datestr = datetime.now().strftime("%Y-%m-%d")
+                update_desc = "upstream stable patchset %s" % datestr
+            else:
+                update_desc = "%s upstream stable release" % version
             changelog = Debian.changelog(local=True)
             series_name = changelog[0]['release']
             if series_name == 'UNRELEASED':
                 series_name = changelog[1]['release']
 
             # Title:
-            title = "%s update to %s stable release" % (series_name.title(), self.cfg['version'])
+            title = "%s update: %s" % (series_name.title(), update_desc)
+
+            print(title)
 
             # Repository - see if it's a tree we maintain
             if "-ckt" in version:
@@ -160,17 +168,13 @@ class CreateTrackingBug(StdApp):
        in scope to the Ubuntu SRU process, e.g., each patch has to
        demonstrably fix a bug, and each patch is vetted by upstream
        by originating either directly from a mainline/stable Linux tree or
-       a minimally backported form of that patch. The %s upstream stable
-       patch set is now available. It should be included in the Ubuntu
-       kernel as well.
+       a minimally backported form of that patch. The following upstream
+       stable patches should be included in the Ubuntu kernel:
 
        %s
+       from %s
 
-    TEST CASE: TBD
-
-       The following patches from the %s stable release shall be applied:
-
-            """ % (version, repository, version)
+            """ % (update_desc, repository)
 
             bug = self.lp.create_bug(project='ubuntu', package=changelog[0]['package'], title=title, description=description)
 
--
2.7.4


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

ACK: [kteam-tools][PATCHv2 0/3] create-stable-tracker --version 'patchset' and cleanups

Stefan Bader-2
In reply to this post by Kamal Mostafa-2
On 27.08.2018 19:30, Kamal Mostafa wrote:

> For create-stable-tracker:
>
>   - New feature:  --version 'patchset' for collections of patches which do
>     not have an associated upstream stable version number.  I've been using
>     this to generate our "Bionic stable upstream patchset YYYY-MM-DD" tracking
>     bugs since v4.15-stable reached EOL upstream.
>
>   - a couple of one-liner bugfixes.
>  
>  -Kamal
>
> -----
>
> Kamal Mostafa (3):
>   create-stable-tracker: fix series_name comparison for series
>     nomination
>   create-stable-tracker: fix hardcoded --staging buglink URL
>   create-stable-tracker: --version 'patchset' option for arbitrary patch
>     sets
>
>  stable/create-stable-tracker | 34 +++++++++++++++++++---------------
>  1 file changed, 19 insertions(+), 15 deletions(-)
>
Now makes sense.

Acked-by: Stefan Bader <[hidden email]>


--
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: [kteam-tools][PATCHv2 0/3] create-stable-tracker --version 'patchset' and cleanups

Kamal Mostafa-2
In reply to this post by Kamal Mostafa-2