← Back to team overview

ubuntu-bugcontrol team mailing list archive

[Merge] ~iconstantin/ubuntu-qa-tools:add-esm-emargo-support into ubuntu-qa-tools:master

 

Ian Constantin has proposed merging ~iconstantin/ubuntu-qa-tools:add-esm-emargo-support into ubuntu-qa-tools:master.

Commit message:
Adding support for esm/legacy embargo ppas

Requested reviews:
  Ubuntu Security Team (ubuntu-security)

For more details, see:
https://code.launchpad.net/~iconstantin/ubuntu-qa-tools/+git/ubuntu-qa-tools/+merge/490052
-- 
Your team Ubuntu Bug Control is subscribed to branch ubuntu-qa-tools:master.
diff --git a/security-tools/unembargo b/security-tools/unembargo
index c92bb7e..2888909 100755
--- a/security-tools/unembargo
+++ b/security-tools/unembargo
@@ -35,14 +35,19 @@ UBUNTU_ARCHIVE = "ubuntu"
 ESM_STAGING_PPA = "ubuntu-security/esm"
 ESM_PRODUCTION_PPA = "ubuntu-esm/esm"
 
-ESM_APPS_PRIVATE_PPA = "ubuntu-esm/private-esm-apps-security"
+ESM_APPS_EMBARGO_PPA = "ubuntu-esm/embargo-esm-apps-security-staging"
 ESM_APPS_STAGING_PPA = "ubuntu-esm/esm-apps-security-staging"
 ESM_APPS_PRODUCTION_PPA = "ubuntu-esm/esm-apps-security"
 
-ESM_INFRA_PRIVATE_PPA = "ubuntu-esm/private-esm-infrastructure-security"
+ESM_INFRA_EMBARGO_PPA = "ubuntu-esm/embargo-esm-infra-security-staging"
 ESM_INFRA_STAGING_PPA = "ubuntu-esm/esm-infra-security-staging"
 ESM_INFRA_PRODUCTION_PPA = "ubuntu-esm/esm-infra-security"
 
+ESM_APPS_LEGACY_EMBARGO_PPA = "ubuntu-esm/embargo-esm-apps-legacy-security-staging"
+ESM_APPS_LEGACY_STAGING_PPA = "ubuntu-esm/esm-apps-legacy-security-staging"
+ESM_APPS_LEGACY_PRODUCTION_PPA = "ubuntu-esm/esm-apps-legacy-security"
+
+ESM_INFRA_LEGACY_EMBARGO_PPA = "ubuntu-esm/embargo-esm-infra-legacy-security-staging"
 ESM_INFRA_LEGACY_STAGING_PPA = "ubuntu-esm/esm-infra-legacy-security-staging"
 ESM_INFRA_LEGACY_PRODUCTION_PPA = "ubuntu-esm/esm-infra-legacy-security"
 
@@ -66,22 +71,34 @@ parser.add_argument("--esm-apps", help="Copy completed ESM packages from the "
                     "ESM Apps staging PPA to the ESM Apps production PPA "
                     "(default: None)", action='store_true',
                     default=None)
-parser.add_argument("--esm-apps-private", help="Copy completed ESM packages from the "
-                    "Private ESM Apps PPA to the ESM Apps production PPA "
+parser.add_argument("--esm-apps-embargo", help="Copy completed ESM packages from the "
+                    "Embargo ESM Apps PPA to the ESM Apps production PPA "
+                    "(default: None)", action='store_true',
+                    default=None)
+parser.add_argument("--esm-apps-legacy", help="Copy completed ESM packages from the "
+                    "ESM Apps Legacy staging PPA to the ESM Apps Legacy production PPA "
+                    "(default: None)", action='store_true',
+                    default=None)
+parser.add_argument("--esm-apps-legacy-embargo", help="Copy completed ESM packages from the "
+                    "Embargo ESM Apps Legacy PPA to the ESM Apps Legacy production PPA "
                     "(default: None)", action='store_true',
                     default=None)
 parser.add_argument("--esm-infra", help="Copy completed ESM packages from the "
                     "ESM Infra staging PPA to the ESM Infra production PPA "
                     "(default: None)", action='store_true',
                     default=None)
-parser.add_argument("--esm-infra-private", help="Copy completed ESM packages from the "
-                    "Private ESM Infra PPA to the ESM Infra production PPA "
+parser.add_argument("--esm-infra-embargo", help="Copy completed ESM packages from the "
+                    "Embargo ESM Infra PPA to the ESM Infra production PPA "
                     "(default: None)", action='store_true',
                     default=None)
 parser.add_argument("--esm-infra-legacy", help="Copy completed ESM packages from the "
                     "ESM Infra Legacy staging PPA to the ESM Infra Legacy production PPA "
                     "(default: None)", action='store_true',
                     default=None)
+parser.add_argument("--esm-infra-legacy-embargo", help="Copy completed ESM packages from the "
+                    "Embargo ESM Infra Legacy PPA to the ESM Infra Legacy production PPA "
+                    "(default: None)", action='store_true',
+                    default=None)
 parser.add_argument("-r", "--release", help="Limit unembargo to a specific set "
                     "of comma-separate releases",
                     metavar="SERIES", action='store', default=None)
@@ -113,7 +130,13 @@ if len(args) < 1:
 # If --esm, --esm-apps, --esm-infra, or --esm-infra-legacy option is provided,
 # the script will move from the respective ESM staging PPA to the respective
 # ESM PROD PPA. So the user should not indicate such values.
-if opt.esm or opt.esm_apps or opt.esm_infra or opt.esm_infra_private or opt.esm_infra_legacy:
+if opt.esm or opt.esm_apps or opt.esm_apps_embargo or opt.esm_infra or \
+    opt.esm_infra_embargo or opt.esm_apps_legacy or opt.esm_apps_legacy_embargo or \
+    opt.esm_infra_legacy or opt.esm_infra_legacy_embargo:
+
+    # noting that we are performing an esm upadte for future checks
+    esm_update = True
+
     if opt.destination != UBUNTU_ARCHIVE or opt.ppa is not None or opt.pocket is not None:
         parser.error("If an esm option is provided, do not specify values for "
                      "package origin, destination, and pocket as this "
@@ -122,18 +145,27 @@ if opt.esm or opt.esm_apps or opt.esm_infra or opt.esm_infra_private or opt.esm_
     elif opt.esm_apps:
         opt.destination = ESM_APPS_PRODUCTION_PPA
         opt.ppa = ESM_APPS_STAGING_PPA
+    elif opt.esm_apps_embargo:
+        opt.destination = ESM_APPS_PRODUCTION_PPA
+        opt.ppa = ESM_APPS_EMBARGO_PPA
     elif opt.esm_infra:
         opt.destination = ESM_INFRA_PRODUCTION_PPA
         opt.ppa = ESM_INFRA_STAGING_PPA
-    elif opt.esm_infra_private:
+    elif opt.esm_infra_embargo:
         opt.destination = ESM_INFRA_PRODUCTION_PPA
-        opt.ppa = ESM_INFRA_PRIVATE_PPA
-    elif opt.esm_apps_private:
-        opt.destination = ESM_APPS_PRODUCTION_PPA
-        opt.ppa = ESM_APPS_PRIVATE_PPA
+        opt.ppa = ESM_INFRA_EMBARGO_PPA
+    elif opt.esm_apps_legacy:
+        opt.destination = ESM_APPS_LEGACY_PRODUCTION_PPA
+        opt.ppa = ESM_APPS_LEGACY_STAGING_PPA
+    elif opt.esm_apps_legacy_embargo:
+        opt.destination = ESM_APPS_LEGACY_PRODUCTION_PPA
+        opt.ppa = ESM_APPS_LEGACY_EMBARGO_PPA
     elif opt.esm_infra_legacy:
         opt.destination = ESM_INFRA_LEGACY_PRODUCTION_PPA
         opt.ppa = ESM_INFRA_LEGACY_STAGING_PPA
+    elif opt.esm_infra_legacy_embargo:
+        opt.destination = ESM_INFRA_LEGACY_PRODUCTION_PPA
+        opt.ppa = ESM_INFRA_LEGACY_EMBARGO_PPA
     else:
         opt.destination = ESM_PRODUCTION_PPA
         opt.ppa = ESM_STAGING_PPA
@@ -238,9 +270,7 @@ if potential_embargo:
 
 
 # don't release security updates on Fridays
-if (opt.pocket == SECURITY_POCKET or \
-   opt.esm or opt.esm_apps or opt.esm_apps_private or \
-   opt.esm_infra or opt.esm_infra_private or opt.esm_infra_legacy) and \
+if (opt.pocket == SECURITY_POCKET or esm_update) and \
    datetime.datetime.today().weekday() == 4:
     print("WARNING: The security team has a policy of not releasing security updates "
           "on Fridays.")