Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bug 750976 - allow for different locale/apknames for android, android…

…-xul, and android-armv6 in sign_android.py. r=rail
  • Loading branch information...
commit ee56d4cff22f3e815f0eb92e850d4cc8f1b4a3eb 1 parent 90dbab1
@escapewindow escapewindow authored
View
14 configs/signing/android_mozilla-beta.py
@@ -46,10 +46,22 @@
"locales_file": "buildbot-configs/mozilla/l10n-changesets_mobile-beta.json",
"release_config_file": "buildbot-configs/mozilla/release-fennec-mozilla-beta.py",
- "platforms": ['android-xul', 'android'],
+ "platforms": ['android-xul', 'android', 'android-armv6'],
+ "platform_config": {
+ 'android': {},
+ 'android-xul': {
+ 'locales': ['en-US', 'multi'],
+ },
+ 'android-armv6': {
+ 'locales': ['en-US'],
+ 'apk_base_name': "fennec-%(version)s.%(locale)s.android-arm-armv6.apk"
+ },
+ },
"update_platforms": [],
"update_platform_map": {
'android': 'Android_arm-eabi-gcc3',
+ 'android-xul': 'Android_arm-eabi-gcc3-xul',
+ 'android-armv6': 'Android_arm-eabi-gcc3-armv6',
},
"update_channels": {
'release': {
View
12 configs/signing/android_mozilla-esr10.py
@@ -47,9 +47,21 @@
"release_config_file": "buildbot-configs/mozilla/release-fennec-mozilla-esr10.py",
"platforms": ['android',],
+ "platform_config": {
+ 'android': {},
+ 'android-xul': {
+ 'locales': ['en-US', 'multi'],
+ },
+ 'android-armv6': {
+ 'locales': ['en-US'],
+ 'apk_base_name': "fennec-%(version)s.%(locale)s.android-arm-armv6.apk"
+ },
+ },
"update_platforms": [],
"update_platform_map": {
'android': 'Android_arm-eabi-gcc3',
+ 'android-xul': 'Android_arm-eabi-gcc3-xul',
+ 'android-armv6': 'Android_arm-eabi-gcc3-armv6',
},
"update_channels": {
'release': {
View
14 configs/signing/android_mozilla-release.py
@@ -46,10 +46,22 @@
"locales_file": "buildbot-configs/mozilla/l10n-changesets_mobile-release.json",
"release_config_file": "buildbot-configs/mozilla/release-fennec-mozilla-release.py",
- "platforms": ['android-xul'],
+ "platforms": ['android', 'android-xul'],
+ "platform_config": {
+ 'android': {},
+ 'android-xul': {
+ 'locales': ['en-US', 'multi'],
+ },
+ 'android-armv6': {
+ 'locales': ['en-US'],
+ 'apk_base_name': "fennec-%(version)s.%(locale)s.android-arm-armv6.apk"
+ },
+ },
"update_platforms": [],
"update_platform_map": {
'android': 'Android_arm-eabi-gcc3',
+ 'android-xul': 'Android_arm-eabi-gcc3-xul',
+ 'android-armv6': 'Android_arm-eabi-gcc3-armv6',
},
"enable_partner_repacks": False,
"partner_platforms": ['android'],
View
14 configs/signing/staging_android_mozilla-beta.py
@@ -43,10 +43,22 @@
"locales_file": "buildbot-configs/mozilla/l10n-changesets_mobile-beta.json",
"release_config_file": "buildbot-configs/mozilla/staging_release-fennec-mozilla-beta.py",
- "platforms": ['android', 'android-xul'],
+ "platforms": ['android', 'android-xul', 'android-armv6'],
+ "platform_config": {
+ 'android': {},
+ 'android-xul': {
+ 'locales': ['en-US', 'multi'],
+ },
+ 'android-armv6': {
+ 'locales': ['en-US'],
+ 'apk_base_name': 'fennec-%(version)s.%(locale)s.android-arm-armv6.apk',
+ },
+ },
"update_platforms": ['android'],
"update_platform_map": {
'android': 'Android_arm-eabi-gcc3',
+ 'android-xul': 'Android_arm-eabi-gcc3-xul',
+ 'android-armv6': 'Android_arm-eabi-gcc3-armv6',
},
# "enable_partner_repacks": True,
# "partner_platforms": ['android'],
View
32 scripts/sign_android.py
@@ -202,6 +202,12 @@ def query_failure(self, platform, locale):
s = "%s:%s" % (platform, locale)
return super(SignAndroid, self).query_failure(s)
+ def query_platform_locales(self, platform):
+ return self.config['platform_config'][platform].get('locales', self.query_locales())
+
+ def query_platform_apk_base_name(self, platform):
+ return self.config['platform_config'][platform].get('apk_base_name', self.config['apk_base_name'])
+
# Actions {{{2
# passphrase() is in AndroidSigningMixin
@@ -228,17 +234,17 @@ def download_unsigned_bits(self):
c = self.config
rc = self.query_release_config()
dirs = self.query_abs_dirs()
- locales = self.query_locales()
- base_url = c['download_base_url'] + '/' + \
- c['download_unsigned_base_subdir'] + '/' + \
- c.get('unsigned_apk_base_name', 'gecko-unsigned-unaligned.apk')
replace_dict = {
'buildnum': rc['buildnum'],
'version': rc['version'],
}
success_count = total_count = 0
for platform in c['platforms']:
+ base_url = c['download_base_url'] + '/' + \
+ c['download_unsigned_base_subdir'] + '/' + \
+ self.query_platform_apk_base_name(platform)
replace_dict['platform'] = platform
+ locales = self.query_platform_locales(platform)
for locale in locales:
replace_dict['locale'] = locale
url = base_url % replace_dict
@@ -276,17 +282,16 @@ def sign(self):
c = self.config
rc = self.query_release_config()
dirs = self.query_abs_dirs()
- locales = self.query_locales()
success_count = total_count = 0
for platform in c['platforms']:
+ locales = self.query_platform_locales(platform)
for locale in locales:
if self.query_failure(platform, locale):
self.warning("%s:%s had previous issues; skipping!" % (platform, locale))
continue
unsigned_path = '%s/unsigned/%s/%s/gecko.ap_' % (dirs['abs_work_dir'], platform, locale)
signed_dir = '%s/signed/%s/%s' % (dirs['abs_work_dir'], platform, locale)
- signed_file_name = c['apk_base_name'] % {'version': rc['version'],
- 'locale': locale}
+ signed_file_name = self.query_platform_apk_base_name(platform) % {'version': rc['version'], 'locale': locale}
signed_path = "%s/%s" % (signed_dir, signed_file_name)
total_count += 1
self.info("Signing %s %s." % (platform, locale))
@@ -313,9 +318,9 @@ def sign(self):
self.info("Signing partner repacks.")
for partner in c.get("partners", []):
for platform in c.get("partner_platforms", []):
+ locales = self.query_platform_locales(platform)
for locale in locales:
- file_name = c['apk_base_name'] % {'version': rc['version'],
- 'locale': locale}
+ file_name = self.query_platform_apk_base_name(platform) % {'version': rc['version'], 'locale': locale}
unsigned_path = '%s/unsigned/partner-repacks/%s/%s/%s/%s' % (dirs['abs_work_dir'], partner, platform, locale, file_name)
signed_dir = '%s/signed/partner-repacks/%s/%s/%s' % (dirs['abs_work_dir'], partner, platform, locale)
signed_path = '%s/%s' % (signed_dir, file_name)
@@ -344,16 +349,15 @@ def verify_signatures(self):
c = self.config
rc = self.query_release_config()
dirs = self.query_abs_dirs()
- locales = self.query_locales()
env = self.query_env(partial_env=c.get("env"))
for platform in c['platforms']:
+ locales = self.query_platform_locales(platform)
for locale in locales:
if self.query_failure(platform, locale):
self.warning("%s:%s had previous issues; skipping!" % (platform, locale))
continue
signed_path = 'signed/%s/%s/%s' % (platform, locale,
- c['apk_base_name'] % {'version': rc['version'],
- 'locale': locale})
+ self.query_platform_apk_base_name(platform) % {'version': rc['version'], 'locale': locale})
if not os.path.exists(os.path.join(dirs['abs_work_dir'],
signed_path)):
self.add_failure(platform, locale,
@@ -393,7 +397,6 @@ def create_snippets(self):
c = self.config
rc = self.query_release_config()
dirs = self.query_abs_dirs()
- locales = self.query_locales()
replace_dict = {
'version': rc['version'],
'buildnum': rc['buildnum'],
@@ -410,6 +413,7 @@ def create_snippets(self):
continue
replace_dict['platform'] = platform
replace_dict['buildid'] = buildid
+ locales = self.query_platform_locales(platform)
for locale in locales:
if self.query_failure(platform, locale):
self.warning("%s:%s had previous issues; skipping!" % (platform, locale))
@@ -417,7 +421,7 @@ def create_snippets(self):
replace_dict['locale'] = locale
parent_dir = '%s/%s/%s' % (dirs['abs_work_dir'],
platform, locale)
- replace_dict['apk_name'] = c['apk_base_name'] % replace_dict
+ replace_dict['apk_name'] = self.query_platform_apk_base_name(platform) % replace_dict
signed_path = '%s/%s' % (parent_dir, replace_dict['apk_name'])
if not os.path.exists(signed_path):
self.add_summary("Unable to create snippet for %s:%s: apk doesn't exist!" % (platform, locale), level=ERROR)
Please sign in to comment.
Something went wrong with that request. Please try again.