author | Bogdan Tara <btara@mozilla.com> |
Fri, 12 Jul 2019 00:04:53 +0300 | |
changeset 482376 | 4db5e839c57bd6823f02e51040f4dfda3b5c0c94 |
parent 482375 | 8f13553f8e2519fd9a203823262262f9d3797da3 |
child 482377 | fc8279c2281d03ae487b23c8f801f9552bc30b9f |
push id | 36278 |
push user | btara@mozilla.com |
push date | Thu, 11 Jul 2019 21:05:53 +0000 |
treeherder | mozilla-central@4db5e839c57b [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | backout |
bugs | 1562952 |
milestone | 70.0a1 |
backs out | 6b09d4c0868ca40fb9bcfb828713a7cd60b1be5c 250696e18e7dc5dddb48a0f00d2221f9d5cdf2b9 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/browser/confvars.sh +++ b/browser/confvars.sh @@ -23,16 +23,19 @@ if test "$OS_ARCH" = "WINNT"; then exit 1 fi MOZ_STUB_INSTALLER=1 fi fi fi fi +# Enable building ./signmar and running libmar signature tests +MOZ_ENABLE_SIGNMAR=1 + BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml # MOZ_APP_DISPLAYNAME will be set by branding/configure.sh # MOZ_BRANDING_DIRECTORY is the default branding directory used when none is # specified. It should never point to the "official" branding directory. # For mozilla-beta, mozilla-release, or mozilla-central repositories, use # "unofficial" branding. # For the mozilla-aurora repository, use "aurora".
--- a/build/moz.configure/old.configure +++ b/build/moz.configure/old.configure @@ -200,16 +200,17 @@ def old_configure_options(*options): '--enable-negotiateauth', '--enable-nfc', '--enable-nspr-build', '--enable-official-branding', '--enable-parental-controls', '--enable-pref-extensions', '--enable-readline', '--enable-sandbox', + '--enable-signmar', '--enable-startup-notification', '--enable-startupcache', '--enable-strip', '--enable-synth-pico', '--enable-system-cairo', '--enable-system-extension-dirs', '--enable-system-pixman', '--enable-system-sqlite',
--- a/modules/libmar/moz.build +++ b/modules/libmar/moz.build @@ -2,16 +2,19 @@ # vim: set filetype=python: # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. with Files('**'): BUG_COMPONENT = ('Toolkit', 'Application Update') -DIRS += [ - 'src', - 'sign', - 'tool', - 'verify', -] +DIRS += ['src'] -TEST_DIRS += ['tests'] +if CONFIG['MOZ_ENABLE_SIGNMAR']: + DIRS += ['sign'] + TEST_DIRS += ['tests'] + if CONFIG['MOZ_VERIFY_MAR_SIGNATURE']: + DIRS += ['verify'] + +# If we are building ./sign and ./verify then ./tool must come after it +DIRS += ['tool'] +
--- a/modules/libmar/tests/moz.build +++ b/modules/libmar/tests/moz.build @@ -1,12 +1,12 @@ # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- # vim: set filetype=python: # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -if CONFIG['OS_TARGET'] != 'Android' and CONFIG['COMPILE_ENVIRONMENT']: - XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini'] +XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini'] +if CONFIG['OS_TARGET'] != 'Android': TEST_HARNESS_FILES.xpcshell.modules.libmar.tests.unit += [ '!/dist/bin/signmar%s' % CONFIG['BIN_SUFFIX'], ]
--- a/modules/libmar/tool/mar.c +++ b/modules/libmar/tool/mar.c @@ -119,25 +119,26 @@ static int mar_test(const char* path) { printf("SIZE\tMODE\tNAME\n"); mar_enum_items(mar, mar_test_callback, NULL); mar_close(mar); return 0; } int main(int argc, char** argv) { + char* NSSConfigDir = NULL; const char* certNames[MAX_SIGNATURES]; char* MARChannelID = MAR_CHANNEL_ID; char* productVersion = MOZ_APP_VERSION; + uint32_t k; int rv = -1; -#if !defined(NO_SIGN_VERIFY) - char* NSSConfigDir = NULL; - uint32_t k; uint32_t certCount = 0; int32_t sigIndex = -1; + +#if !defined(NO_SIGN_VERIFY) uint32_t fileSizes[MAX_SIGNATURES]; const uint8_t* certBuffers[MAX_SIGNATURES]; # if ((!defined(MAR_NSS) && defined(XP_WIN)) || defined(XP_MACOSX)) || \ ((defined(XP_WIN) || defined(XP_MACOSX)) && !defined(MAR_NSS)) char* DERFilePaths[MAX_SIGNATURES]; # endif # if (!defined(XP_WIN) && !defined(XP_MACOSX)) || defined(MAR_NSS) CERTCertificate* certs[MAX_SIGNATURES]; @@ -175,18 +176,18 @@ int main(int argc, char** argv) { } if (argv[1][0] == '-' && argv[1][1] == 'C') { if (chdir(argv[2]) != 0) { return -1; } argv += 2; argc -= 2; } -#if !defined(NO_SIGN_VERIFY) -#if (!defined(MAR_NSS) && defined(XP_WIN)) || defined(XP_MACOSX) +#if !defined(NO_SIGN_VERIFY) && \ + ((!defined(MAR_NSS) && defined(XP_WIN)) || defined(XP_MACOSX)) /* -D DERFilePath, also matches -D[index] DERFilePath We allow an index for verifying to be symmetric with the import and export command line arguments. */ else if (argv[1][0] == '-' && argv[1][1] == 'D' && (argv[1][2] == (char)('0' + certCount) || argv[1][2] == '\0')) { if (certCount >= MAX_SIGNATURES) { print_usage(); return -1; @@ -217,19 +218,17 @@ int main(int argc, char** argv) { argv[1][2] >= '0' && argv[1][2] <= '9') { sigIndex = argv[1][2] - '0'; argv++; argc--; } else { argv += 2; argc -= 2; } - } -#endif - else if (argv[1][0] == '-' && argv[1][1] == 'H') { // MAR channel ID + } else if (argv[1][0] == '-' && argv[1][1] == 'H') { // MAR channel ID MARChannelID = argv[2]; argv += 2; argc -= 2; } else if (argv[1][0] == '-' && argv[1][1] == 'V') { // Product Version productVersion = argv[2]; argv += 2; argc -= 2; } else {
--- a/modules/libmar/tool/moz.build +++ b/modules/libmar/tool/moz.build @@ -10,40 +10,54 @@ HOST_SOURCES += [ ] HostProgram('mar') HOST_USE_LIBS += [ 'hostmar', ] -Program('signmar') +if CONFIG['MOZ_ENABLE_SIGNMAR']: + Program('signmar') -SOURCES += HOST_SOURCES + SOURCES += HOST_SOURCES -USE_LIBS += [ - 'mar', - 'nspr', - 'nss', - 'signmar', - 'verifymar', -] + USE_LIBS += [ + 'mar', + 'signmar', + ] + + if CONFIG['MOZ_VERIFY_MAR_SIGNATURE']: + USE_LIBS += [ + 'verifymar', + ] for var in ('MAR_CHANNEL_ID', 'MOZ_APP_VERSION'): DEFINES[var] = '"%s"' % CONFIG[var] HOST_DEFINES[var] = DEFINES[var] +if CONFIG['MOZ_ENABLE_SIGNMAR']: + USE_LIBS += [ + 'nspr', + 'nss', + ] +else: + DEFINES['NO_SIGN_VERIFY'] = True + if CONFIG['OS_ARCH'] == 'WINNT': USE_STATIC_LIBS = True OS_LIBS += [ 'ws2_32', - 'crypt32', - 'advapi32', ] + if CONFIG['MOZ_ENABLE_SIGNMAR']: + OS_LIBS += [ + 'crypt32', + 'advapi32', + ] elif CONFIG['OS_ARCH'] == 'Darwin': OS_LIBS += [ '-framework Security', ] if CONFIG['HOST_OS_ARCH'] == 'WINNT': HOST_OS_LIBS += [ 'ws2_32',
--- a/old-configure.in +++ b/old-configure.in @@ -2147,16 +2147,38 @@ if test -n "$MOZ_TREE_FREETYPE" -a "$OS_ CAIRO_FT_CFLAGS="-I$_topsrcdir/modules/freetype2/include" AC_SUBST_LIST(CAIRO_FT_CFLAGS) fi AC_CHECK_PROGS(WGET, wget, "") AC_SUBST(WGET) dnl ======================================================== +dnl Enable building the signmar program. +dnl This option is much different than the --enable-verify-mar option. +dnl --enable-verify-mar is for enabling the verification check on MAR +dnl files in the updater. The --enable-signmar option is for building +dnl the signmar program. +dnl ======================================================== + +MOZ_ARG_ENABLE_BOOL(signmar, +[ --enable-signmar Enable building the signmar program], + MOZ_ENABLE_SIGNMAR=1, + MOZ_ENABLE_SIGNMAR= ) + +if test -n "$MOZ_ENABLE_SIGNMAR"; then + if test -z "$COMPILE_ENVIRONMENT" ; then + AC_MSG_WARN([Cannot --enable-signmar with --disable-compile-environment]) + MOZ_ENABLE_SIGNMAR= + else + AC_DEFINE(MOZ_ENABLE_SIGNMAR) + fi +fi + +dnl ======================================================== dnl Updater dnl ======================================================== if test "$MOZ_IOS"; then MOZ_UPDATER= fi MOZ_ARG_DISABLE_BOOL(updater, @@ -2873,16 +2895,17 @@ AC_SUBST_LIST(WARNINGS_CFLAGS) AC_SUBST_SET(MOZ_EXTENSIONS) AC_SUBST(MOZ_UNIVERSALCHARDET) AC_SUBST(MOZ_SPELLCHECK) AC_SUBST(MOZ_ANDROID_ANR_REPORTER) AC_SUBST(MOZ_CRASHREPORTER) AC_SUBST(MOZ_CRASHREPORTER_INJECTOR) AC_SUBST(MOZ_STUB_INSTALLER) +AC_SUBST(MOZ_ENABLE_SIGNMAR) AC_SUBST(MOZ_UPDATER) AC_SUBST(MOZ_ANDROID_APPLICATION_CLASS) AC_SUBST(MOZ_ANDROID_BROWSER_INTENT_CLASS) AC_SUBST(MOZ_EXCLUDE_HYPHENATION_DICTIONARIES) AC_SUBST(ENABLE_STRIP) AC_SUBST(PKG_SKIP_STRIP) AC_SUBST(STRIP_FLAGS)