Backed out changeset f28ea3184e5c (bug 1502457) draft
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 19 Nov 2018 21:37:39 +0200
changeset 1764285 05388a0632555e6a4caa45e4f47a66979d273141
parent 1764284 2defeaa74152d911a4e630eb6dd45ca30f1cebc6
child 1764286 a9f52110f5825305957b2080365c320fc2662c7c
push id316349
push userarchaeopteryx@coole-files.de
push dateMon, 19 Nov 2018 19:59:21 +0000
treeherdertry@f74cad46e59d [default view] [failures only]
bugs1502457
milestone65.0a1
backs outf28ea3184e5ca7be89bfa62802af63c5dfe8f7e8
Backed out changeset f28ea3184e5c (bug 1502457)
browser/confvars.sh
build/moz.configure/init.configure
embedding/ios/confvars.sh
extensions/confvars.sh
js/src/old-configure.in
mobile/android/confvars.sh
old-configure.in
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -26,16 +26,19 @@ if test "$OS_ARCH" = "WINNT"; then
       fi
     fi
   fi
 fi
 
 # Enable building ./signmar and running libmar signature tests
 MOZ_ENABLE_SIGNMAR=1
 
+MOZ_APP_VERSION=$FIREFOX_VERSION
+MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY
+
 if [ "${MOZ_BROWSER_XHTML}" = "1" ]; then
   BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml
 else
   BROWSER_CHROME_URL=chrome://browser/content/browser.xul
 fi
 
 # MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
 # MOZ_BRANDING_DIRECTORY is the default branding directory used when none is
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -1038,50 +1038,35 @@ add_old_configure_assignment('MOZ_BUILD_
 
 # set RELEASE_OR_BETA and NIGHTLY_BUILD variables depending on the cycle we're in
 # The logic works like this:
 # - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
 # - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
 # - otherwise, we're building Release/Beta (define RELEASE_OR_BETA)
 @depends(check_build_environment, build_project, '--help')
 @imports(_from='__builtin__', _import='open')
-@imports('os')
 @imports('re')
 def milestone(build_env, build_project, _):
     versions = []
     paths = ['config/milestone.txt']
     if build_project == 'js':
         paths = paths * 3
     else:
         paths += [
             'browser/config/version.txt',
             'browser/config/version_display.txt',
         ]
-    for f in ('version.txt', 'version_display.txt'):
-        f = os.path.join(build_project, f)
-        if not os.path.exists(os.path.join(build_env.topsrcdir, f)):
-            break
-        paths.append(f)
-
     for p in paths:
         with open(os.path.join(build_env.topsrcdir, p), 'r') as fh:
             content = fh.read().splitlines()
             if not content:
                 die('Could not find a version number in {}'.format(p))
             versions.append(content[-1])
 
-    milestone, firefox_version, firefox_version_display = versions[:3]
-
-    # version.txt content from the project directory if there is one, otherwise
-    # the firefox version.
-    app_version = versions[3] if len(versions) > 3 else firefox_version
-    # version_display.txt content from the project directory if there is one,
-    # otherwise version.txt content from the project directory, otherwise the
-    # firefox version for display.
-    app_version_display = versions[-1] if len(versions) > 3 else firefox_version_display
+    milestone, firefox_version, firefox_version_display = versions
 
     is_nightly = is_release_or_beta = None
 
     if 'a1' in milestone:
         is_nightly = True
     elif 'a' not in milestone:
         is_release_or_beta = True
 
@@ -1094,18 +1079,18 @@ def milestone(build_env, build_project, 
     #
     # Only expose major milestone and alpha version in the symbolversion
     # string; as the name suggests, we use it for symbol versioning on Linux.
     return namespace(version=milestone,
                      uaversion='%s.0' % major_version,
                      symbolversion='%s%s' % (major_version, ab_patch),
                      is_nightly=is_nightly,
                      is_release_or_beta=is_release_or_beta,
-                     app_version=app_version,
-                     app_version_display=app_version_display)
+                     firefox_version=firefox_version,
+                     firefox_version_display=firefox_version_display)
 
 
 set_config('GRE_MILESTONE', milestone.version)
 set_config('NIGHTLY_BUILD', milestone.is_nightly)
 set_define('NIGHTLY_BUILD', milestone.is_nightly)
 add_old_configure_assignment('NIGHTLY_BUILD', milestone.is_nightly)
 set_config('RELEASE_OR_BETA', milestone.is_release_or_beta)
 set_define('RELEASE_OR_BETA', milestone.is_release_or_beta)
@@ -1115,19 +1100,20 @@ set_define('MOZILLA_VERSION', depends(mi
 set_config('MOZILLA_VERSION', milestone.version)
 set_define('MOZILLA_VERSION_U', milestone.version)
 set_define('MOZILLA_UAVERSION', depends(milestone)(lambda m: '"%s"' % m.uaversion))
 set_config('MOZILLA_SYMBOLVERSION', milestone.symbolversion)
 # JS configure still wants to look at these.
 add_old_configure_assignment('MOZILLA_VERSION', milestone.version)
 add_old_configure_assignment('MOZILLA_SYMBOLVERSION', milestone.symbolversion)
 
-set_config('MOZ_APP_VERSION', milestone.app_version)
-set_config('MOZ_APP_VERSION_DISPLAY', milestone.app_version_display)
-add_old_configure_assignment('MOZ_APP_VERSION', milestone.app_version)
+set_config('FIREFOX_VERSION', milestone.firefox_version)
+set_define('FIREFOX_VERSION', milestone.firefox_version)
+add_old_configure_assignment('FIREFOX_VERSION', milestone.firefox_version)
+add_old_configure_assignment('FIREFOX_VERSION_DISPLAY', milestone.firefox_version_display)
 
 # The app update channel is 'default' when not supplied. The value is used in
 # the application's confvars.sh (and is made available to a project specific
 # moz.configure).
 option('--enable-update-channel',
        nargs=1,
        help='Select application update channel',
        default='default')
--- a/embedding/ios/confvars.sh
+++ b/embedding/ios/confvars.sh
@@ -1,8 +1,9 @@
 #! /bin/sh
 # 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/.
 
 MOZ_APP_NAME=geckoembed
 MOZ_APP_DISPLAYNAME=GeckoEmbed
 MOZ_UPDATER=
+MOZ_APP_VERSION=$MOZILLA_VERSION
--- a/extensions/confvars.sh
+++ b/extensions/confvars.sh
@@ -1,7 +1,8 @@
 #! /bin/sh
 # 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/.
 
 MOZ_APP_NAME=mozilla
 MOZ_APP_DISPLAYNAME=Mozilla
+MOZ_APP_VERSION=$MOZILLA_VERSION
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1700,16 +1700,17 @@ AC_SUBST(PKG_SKIP_STRIP)
 AC_SUBST(INCREMENTAL_LINKER)
 
 AC_SUBST_LIST(MOZ_FIX_LINK_PATHS)
 
 AC_SUBST(MOZ_POST_PROGRAM_COMMAND)
 
 AC_SUBST(MOZ_APP_NAME)
 AC_SUBST(MOZ_APP_DISPLAYNAME)
+AC_SUBST(MOZ_APP_VERSION)
 
 AC_SUBST(MOZ_PKG_SPECIAL)
 
 dnl ========================================================
 dnl ECMAScript Internationalization API Support (uses ICU)
 dnl ========================================================
 
 dnl top-level configure may override this with --without-intl-api
@@ -1819,16 +1820,17 @@ dnl ====================================
 MOZ_CHECK_ALLOCATOR
 
 AC_CHECK_FUNCS(localeconv)
 
 AC_SUBST(ac_configure_args)
 
 if test -n "$JS_STANDALONE"; then
 MOZ_APP_NAME="mozjs"
+MOZ_APP_VERSION="$MOZILLA_SYMBOLVERSION"
 JS_LIBRARY_NAME="mozjs-$MOZILLA_SYMBOLVERSION"
 else
 JS_LIBRARY_NAME="mozjs"
 fi
 JS_CONFIG_LIBS="$NSPR_LIBS $LIBS"
 if test -n "$GNU_CC"; then
 JS_CONFIG_MOZ_JS_LIBS='-L${libdir} -l${JS_LIBRARY_NAME}'
 else
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -1,15 +1,17 @@
 # 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/.
 
 MOZ_APP_BASENAME=Fennec
 MOZ_APP_VENDOR=Mozilla
 
+MOZ_APP_VERSION=$FIREFOX_VERSION
+MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY
 MOZ_APP_UA_NAME=Firefox
 
 BROWSER_CHROME_URL=chrome://browser/content/browser.xul
 
 MOZ_BRANDING_DIRECTORY=mobile/android/branding/unofficial
 MOZ_OFFICIAL_BRANDING_DIRECTORY=mobile/android/branding/official
 # MOZ_APP_DISPLAYNAME is set by branding/configure.sh
 
--- a/old-configure.in
+++ b/old-configure.in
@@ -3954,16 +3954,19 @@ AC_SUBST(MOZ_CHILD_PROCESS_BUNDLENAME)
 # versions of a given application (e.g. Aurora and Firefox both use
 # "Firefox"), but may vary for full rebrandings (e.g. Iceweasel). Used
 # for application.ini's "Name" field, which controls profile location in
 # the absence of a "Profile" field (see below), and various system
 # integration hooks (Unix remoting, Windows MessageWindow name, etc.)
 # - MOZ_APP_DISPLAYNAME: Used in user-visible fields (DLL properties,
 # Mac Bundle name, Updater, Installer), it is typically used for nightly
 # builds (e.g. Aurora for Firefox).
+# - MOZ_APP_VERSION: Defines the application version number.
+# - MOZ_APP_VERSION_DISPLAY: Defines the application version number. Used
+# in the "About" window. If not set, defaults to MOZ_APP_VERSION.
 # - MOZ_APP_NAME: Used for e.g. the binary program file name. If not set,
 # defaults to a lowercase form of MOZ_APP_BASENAME.
 # - MOZ_APP_REMOTINGNAME: Used for the internal program name, which affects
 # profile name and remoting. If not set, defaults to MOZ_APP_NAME.
 # - MOZ_APP_PROFILE: When set, used for application.ini's
 # "Profile" field, which controls profile location.
 # - MOZ_APP_ID: When set, used for application.ini's "ID" field, and
 # crash reporter server url.
@@ -3973,33 +3976,28 @@ AC_SUBST(MOZ_CHILD_PROCESS_BUNDLENAME)
 # build ID.
 # - MOZ_ANDROID_SHARED_ID: On Android, "android:sharedUserId" for all Android
 # packages produced.
 # - MOZ_ANDROID_GCM_SENDERID: On Android, the Android GCM Sender ID used.  GCM
 # sender IDs are not sensitive: see, http://stackoverflow.com/a/18216063.
 # - MOZ_MMA_GCM_SENDERID: This GCM Sender ID is used for MMA integration.
 # - MOZ_PROFILE_MIGRATOR: When set, enables profile migrator.
 
-# The following environment variables used to have an effect, but don't anymore:
-# - MOZ_APP_VERSION: Defines the application version number. This was replaced with
-# the contents from the version.txt file in the application directory, or
-# browser/config/version.txt if there isn't one.
-# - MOZ_APP_VERSION_DISPLAY: Defines the application version number. Used
-# in the "About" window. This was replaced with the contents from the
-# version_display.txt or version.txt in the application directory, or
-# browser/config/version_display.txt.
-
 if test -z "$MOZ_APP_NAME"; then
    MOZ_APP_NAME=`echo $MOZ_APP_BASENAME | tr A-Z a-z`
 fi
 
 if test -z "$MOZ_APP_REMOTINGNAME"; then
    MOZ_APP_REMOTINGNAME=$MOZ_APP_NAME
 fi
 
+if test -z "$MOZ_APP_VERSION_DISPLAY"; then
+   MOZ_APP_VERSION_DISPLAY=$MOZ_APP_VERSION
+fi
+
 if test -z "$ANDROID_PACKAGE_NAME" ; then
    # When we got rid of the Aurora channel we decided to replace the old
    # Nightly ANDROID_PACKAGE_NAME with Aurora. To make sure this is inherited
    # by all mozilla-central based branches we make this the new "default"
    # for Fennec. Non mozilla-central based branches set ANDROID_PACKAGE_NAME
    # in their mozconfig, so they will never get this. If there are ever
    # non-Fennec builds for Android, they will fall into the else block
    # and use their own default name.
@@ -4050,16 +4048,18 @@ AC_SUBST(MOZ_ANDROID_SHARED_ID)
 AC_SUBST(MOZ_ANDROID_GCM_SENDERID)
 AC_SUBST(MOZ_MMA_GCM_SENDERID)
 AC_SUBST(MAR_CHANNEL_ID)
 AC_SUBST(ACCEPTED_MAR_CHANNEL_IDS)
 AC_SUBST(MOZ_PROFILE_MIGRATOR)
 AC_DEFINE_UNQUOTED(MOZ_APP_UA_NAME, "$MOZ_APP_UA_NAME")
 AC_SUBST(MOZ_APP_UA_NAME)
 AC_DEFINE_UNQUOTED(MOZ_APP_UA_VERSION, "$MOZ_APP_VERSION")
+AC_SUBST(MOZ_APP_VERSION)
+AC_SUBST(MOZ_APP_VERSION_DISPLAY)
 AC_DEFINE_UNQUOTED(BROWSER_CHROME_URL, $BROWSER_CHROME_URL)
 AC_DEFINE_UNQUOTED(BROWSER_CHROME_URL_QUOTED, "$BROWSER_CHROME_URL")
 
 AC_SUBST(MOZ_APP_MAXVERSION)
 AC_SUBST(MOZ_UA_OS_AGNOSTIC)
 if test -n "$MOZ_UA_OS_AGNOSTIC"; then
   AC_DEFINE(MOZ_UA_OS_AGNOSTIC)
 fi