Bug 1562952 - Always build signmar when mar is built. r=nalexander
☠☠ backed out by bf063ce64c58 ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 10 Jul 2019 03:17:26 +0000
changeset 482067 12099ffad9cae748d060872883a4b2c5e560c3ee
parent 482066 fc4a6e8f6e3446ff8c613eb4d46dcd66e393bfd0
child 482068 fa94c9a03e3f019a060d028f61da69af41e3a8ff
push id113650
push useraciure@mozilla.com
push dateWed, 10 Jul 2019 15:54:09 +0000
treeherdermozilla-inbound@241af4dbb964 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1562952
milestone70.0a1
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
Bug 1562952 - Always build signmar when mar is built. r=nalexander When we build mar, there is no reason not to build signmar as well. It used to be optional because not all platforms were supported, but they are now. --disable-verify-mar is kept to still allow to disable mar verification in the updater for debugging purpose. Differential Revision: https://phabricator.services.mozilla.com/D36992
browser/confvars.sh
build/moz.configure/old.configure
modules/libmar/moz.build
modules/libmar/tests/moz.build
modules/libmar/tool/moz.build
old-configure.in
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -23,19 +23,16 @@ 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,17 +200,16 @@ 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,19 +2,16 @@
 # 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']
+DIRS += [
+    'src',
+    'sign',
+    'tool',
+    'verify',
+]
 
-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']
-
+TEST_DIRS += ['tests']
--- 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/.
 
 XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
 
-if CONFIG['OS_TARGET'] != 'Android':
+if CONFIG['OS_TARGET'] != 'Android' and CONFIG['COMPILE_ENVIRONMENT']:
     TEST_HARNESS_FILES.xpcshell.modules.libmar.tests.unit += [
         '!/dist/bin/signmar%s' % CONFIG['BIN_SUFFIX'],
     ]
--- a/modules/libmar/tool/moz.build
+++ b/modules/libmar/tool/moz.build
@@ -10,54 +10,40 @@ HOST_SOURCES += [
 ]
 
 HostProgram('mar')
 
 HOST_USE_LIBS += [
     'hostmar',
 ]
 
-if CONFIG['MOZ_ENABLE_SIGNMAR']:
-    Program('signmar')
+Program('signmar')
 
-    SOURCES += HOST_SOURCES
+SOURCES += HOST_SOURCES
 
-    USE_LIBS += [
-        'mar',
-        'signmar',
-    ]
-
-    if CONFIG['MOZ_VERIFY_MAR_SIGNATURE']:
-        USE_LIBS += [
-            'verifymar',
-        ]
+USE_LIBS += [
+    'mar',
+    'nspr',
+    'nss',
+    'signmar',
+    '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,38 +2147,16 @@ 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,
@@ -2895,17 +2873,16 @@ 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)