Bug 1337145 - Revert build system changes used for EME voucher; r=glandium

There is no single bug that was reverted, as this work was done over
several bugs, including 1091668, 1123990, 1138535, and 1265272. Most
notable is that we are moving the precomplete generation back into
packager.py rather than spread out over various make variables (except
for the Windows installer, which is still specified in packager.mk).

MozReview-Commit-ID: KDcfR23kKr8

--HG--
extra : rebase_source : ab78f84bb32721289659c893028d681115176c9d
This commit is contained in:
Mike Shal 2017-04-06 17:28:39 -04:00
Родитель 5d31163dcd
Коммит 2a2f301a96
4 изменённых файлов: 6 добавлений и 25 удалений

Просмотреть файл

@ -1,16 +0,0 @@
# 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/.
include $(MOZILLA_DIR)/toolkit/mozapps/installer/signing.mk
ifdef MOZ_SIGN_CMD
ifeq (,$(filter-out WINNT Darwin,$(OS_ARCH)))
# The first argument to this macro is the directory where the
# plugin-container binary exists, and the second is where voucher.bin will
# be generated. If the second argument is not specified, it defaults to the
# same as the first.
MAKE_SIGN_EME_VOUCHER = $(PYTHON) $(MOZILLA_DIR)/python/eme/gen-eme-voucher.py -input $(1)/$(MOZ_CHILD_PROCESS_NAME) -output $(or $(2),$(1))/voucher.bin && \
$(MOZ_SIGN_CMD) -f emevoucher "$(or $(2),$(1))/voucher.bin"
endif
endif

Просмотреть файл

@ -4,7 +4,6 @@
include $(MOZILLA_DIR)/toolkit/mozapps/installer/package-name.mk include $(MOZILLA_DIR)/toolkit/mozapps/installer/package-name.mk
include $(MOZILLA_DIR)/toolkit/mozapps/installer/upload-files.mk include $(MOZILLA_DIR)/toolkit/mozapps/installer/upload-files.mk
include $(MOZILLA_DIR)/toolkit/mozapps/installer/make-eme.mk
# This is how we create the binary packages we release to the public. # This is how we create the binary packages we release to the public.
@ -22,12 +21,11 @@ endif
@echo 'Staging installer files...' @echo 'Staging installer files...'
@$(NSINSTALL) -D $(DEPTH)/installer-stage/core @$(NSINSTALL) -D $(DEPTH)/installer-stage/core
@cp -av $(DIST)/$(MOZ_PKG_DIR)$(_BINPATH)/. $(DEPTH)/installer-stage/core @cp -av $(DIST)/$(MOZ_PKG_DIR)$(_BINPATH)/. $(DEPTH)/installer-stage/core
@(cd $(DEPTH)/installer-stage/core && $(CREATE_PRECOMPLETE_CMD))
ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD
# The && true is necessary to make sure Pymake spins a shell # The && true is necessary to make sure Pymake spins a shell
$(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(DEPTH)/installer-stage && true $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(DEPTH)/installer-stage && true
endif endif
$(call MAKE_SIGN_EME_VOUCHER,$(DEPTH)/installer-stage/core)
@(cd $(DEPTH)/installer-stage/core && $(CREATE_PRECOMPLETE_CMD))
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT)) ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
ELF_HACK_FLAGS = --fill ELF_HACK_FLAGS = --fill

Просмотреть файл

@ -26,6 +26,7 @@ from mozpack.errors import errors
import mozpack.path as mozpath import mozpack.path as mozpath
import buildconfig import buildconfig
from argparse import ArgumentParser from argparse import ArgumentParser
from createprecomplete import generate_precomplete
import os import os
from StringIO import StringIO from StringIO import StringIO
import subprocess import subprocess
@ -317,6 +318,8 @@ def main():
f.preload(log[key]) f.preload(log[key])
copier.copy(args.destination) copier.copy(args.destination)
generate_precomplete(os.path.normpath(os.path.join(args.destination,
respath)))
if __name__ == '__main__': if __name__ == '__main__':

Просмотреть файл

@ -239,19 +239,15 @@ endif
ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD
ifeq (Darwin, $(OS_ARCH)) ifeq (Darwin, $(OS_ARCH))
MAKE_PACKAGE = $(or $(call MAKE_SIGN_EME_VOUCHER,$(MOZ_PKG_DIR)$(_BINPATH)/$(MOZ_CHILD_PROCESS_NAME).app/Contents/MacOS,$(MOZ_PKG_DIR)$(_RESPATH)),true) \ MAKE_PACKAGE = cd ./$(PKG_DMG_SOURCE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_MACBUNDLE_NAME) \
&& (cd $(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) \
&& cd ./$(PKG_DMG_SOURCE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_MACBUNDLE_NAME) \
&& cd $(PACKAGE_BASE_DIR) && $(INNER_MAKE_PACKAGE) && cd $(PACKAGE_BASE_DIR) && $(INNER_MAKE_PACKAGE)
else else
MAKE_PACKAGE = $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_PKG_DIR) \ MAKE_PACKAGE = $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_PKG_DIR) \
&& $(or $(call MAKE_SIGN_EME_VOUCHER,$(MOZ_PKG_DIR)),true) \
&& (cd $(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) \
&& $(INNER_MAKE_PACKAGE) && $(INNER_MAKE_PACKAGE)
endif #Darwin endif #Darwin
else else
MAKE_PACKAGE = (cd $(MOZ_PKG_DIR)$(_RESPATH) && $(CREATE_PRECOMPLETE_CMD)) && $(INNER_MAKE_PACKAGE) MAKE_PACKAGE = $(INNER_MAKE_PACKAGE)
endif endif
ifdef MOZ_SIGN_PACKAGE_CMD ifdef MOZ_SIGN_PACKAGE_CMD