Bug 955392 - Broken complete mar files generated during l10n repack, r=Even.

This commit is contained in:
Florian Quèze 2013-05-06 15:32:10 +02:00
Родитель d05bc87fb6
Коммит c57885e1d8
2 изменённых файлов: 65 добавлений и 193 удалений

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

@ -113,7 +113,7 @@ ifdef MOZ_UPDATE_PACKAGING
$(MAKE) -C $(MOZDEPTH)/tools/update-packaging full-update PKG_INST_PATH=
endif
ifdef L10NBASEDIR
$(foreach locale,$(SHIPPED_LOCALES),$(MAKE) -C instantbird/locales/ repack-$(locale) LOCALE_MERGEDIR=mergedir ;)
$(foreach locale,$(SHIPPED_LOCALES),$(MAKE) -C instantbird/locales/ repack-$(locale) LOCALE_MERGEDIR=mergedir MOZ_MAKE_COMPLETE_MAR=$(MOZ_UPDATE_PACKAGING) ;)
endif
ifdef MOZ_UPDATE_PACKAGING
ifdef LIST_PREVIOUS_MAR_CMD

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

@ -2,22 +2,23 @@
# 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/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
run_for_effects := $(shell if test ! -d $(DIST); then $(NSINSTALL) -D $(DIST); fi; if test ! -d $(DIST)/branding; then $(NSINSTALL) -D $(DIST)/branding; fi)
_ABS_DIST := $(shell cd $(DIST) && pwd)
DEFINES += -DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION)
vpath %.xml @srcdir@/en-US/searchplugins
vpath %.xml $(LOCALE_SRCDIR)/searchplugins
_ABS_SRCDIR := $(call core_abspath,$(topsrcdir))
ifndef MOZ_BRANDING_DIRECTORY
MOZ_BRANDING_DIRECTORY = instantbird/branding/nightly
endif
@ -30,7 +31,6 @@ SUBMAKEFILES += \
# This makefile uses variable overrides from the libs-% target to
# build non-default locales to non-default dist/ locations. Be aware!
AB = $(firstword $(subst -, ,$(AB_CD)))
PWD := $(CURDIR)
# These are defaulted to be compatible with the files the wget-en-US target
@ -41,61 +41,58 @@ ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
RETRIEVE_WINDOWS_INSTALLER = 1
DEFINES += \
-DAB_CD=$(AB_CD) \
-DMOZ_LANGPACK_EID=langpack-$(AB_CD)@addons.instantbird.org \
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-DLOCALE_SRCDIR=$(LOCALE_SRCDIR) \
-DPKG_BASENAME="$(PKG_BASENAME)" \
-DPKG_INST_BASENAME="$(PKG_INST_BASENAME)" \
$(NULL)
MOZ_LANGPACK_EID=langpack-$(AB_CD)@addons.instantbird.org
PREF_JS_EXPORTS = $(LOCALE_SRCDIR)/all-l10n.js
PREF_JS_EXPORTS = $(firstword $(wildcard $(LOCALE_SRCDIR)/all-l10n.js) \
$(srcdir)/en-US/all-l10n.js )
include $(topsrcdir)/config/rules.mk
SEARCH_PLUGINS = $(shell cat $(LOCALE_SRCDIR)/searchplugins/list.txt)
libs:: $(addsuffix .xml,$(SEARCH_PLUGINS))
if [ -n "$^" ]; then $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/searchplugins; fi
ifdef MOZ_UPDATER
libs:: $(addprefix $(LOCALE_SRCDIR)/,updater/updater.ini)
ifeq ($(OS_ARCH),WINNT)
cat $< $(srcdir)/../installer/windows/nsis/updater_append.ini > \
$(FINAL_TARGET)/updater.ini
else
cat $< > \
$(FINAL_TARGET)/updater.ini
endif
endif
clobber-%:
$(RM) -rf $(DIST)/xpi-stage/locale-$*
libs-%:
$(NSINSTALL) -D $(DIST)/install
@$(MAKE) -C ../../mozilla/toolkit/locales libs-$* BOTH_MANIFESTS=1
@$(MAKE) -C ../../chat/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
@$(MAKE) -C ../../purple/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
@$(MAKE) -C ../../mozilla/extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
# leave out $(STAGEPATH) as we never have a universal/ subdir here
PKG_DMG_SOURCE=$(MOZ_PKG_DIR)
endif
PACKAGER_NO_LIBS = 1
include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/packager.mk
PKG_INST_PATH =
ifeq (WINNT,$(OS_ARCH))
UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(STAGEDIST)/uninstall; \
$(NSINSTALL) -D $(STAGEDIST)/uninstall; \
cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall; \
$(RM) $(_ABS_DIST)/l10n-stage/setup.exe; \
cp ../installer/windows/l10ngen/setup.exe $(_ABS_DIST)/l10n-stage; \
$(NULL)
endif
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/mozilla/toolkit/locales/l10n.mk
$(STAGEDIST): $(DIST)/branding
$(DIST)/branding:
$(NSINSTALL) -D $@
SEARCH_PLUGINS = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt))
libs:: $(addsuffix .xml,$(SEARCH_PLUGINS))
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/searchplugins
install:: $(addsuffix .xml,$(SEARCH_PLUGINS))
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/searchplugins
libs-%:
$(NSINSTALL) -D $(DIST)/install
@$(MAKE) -C ../../mozilla/toolkit/locales libs-$*
@$(MAKE) -C ../../chat/locales AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) -C ../../purple/locales AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) -C ../../mozilla/extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) -C ../../mozilla/intl/locales AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
# Note the funny extra "../" in SFX_HEADER is because the repackage-zip command
# is actually run effectively from within the mozilla/ part of the objdir, so
# topsrcdir points to the wrong place and we have to go one directory higher.
repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
@echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
@ -107,7 +104,7 @@ repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
ZIP_IN=$(WIN32_INSTALLER_IN) \
ZIP_OUT=$(WIN32_INSTALLER_OUT) \
SFX_HEADER="$(PWD)/../installer/windows/l10ngen/7zSD.sfx \
$(topsrcdir)/instantbird/installer/windows/app.tag"
$(_ABS_SRCDIR)/instantbird/installer/windows/app.tag"
ifeq (WINNT,$(OS_ARCH))
repackage-win32-installer-%: $(WIN32_INSTALLER_IN) libs-%
@ -116,110 +113,25 @@ else
repackage-win32-installer-%: ;
endif
ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/MacOS
else
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)
endif
# During repackaging, we never have an universal/ subfolder.
STAGEPATH =
$(STAGEDIST): AB_CD:=en-US
$(STAGEDIST): UNPACKAGE=$(ZIP_IN)
$(STAGEDIST): $(ZIP_IN)
# only mac needs to remove the parent of STAGEDIST...
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
if test -d $(DIST)/l10n-stage; then \
$(RM) -r -v $(DIST)/l10n-stage; \
fi
else
# ... and windows doesn't like removing STAGEDIST itself, remove all children
if test -d $(DIST)/l10n-stage; then \
find $(STAGEDIST) -maxdepth 1 -print0 | xargs -0 $(RM) -r ; \
fi
endif
$(NSINSTALL) -D $(DIST)/l10n-stage
cd $(DIST)/l10n-stage && \
$(UNMAKE_PACKAGE)
make clobber-zip AB_CD=en-US
clobber-zip:
$(RM) $(STAGEDIST)/chrome/$(AB_CD).jar \
$(STAGEDIST)/chrome/$(AB_CD).manifest \
$(STAGEDIST)/defaults/pref/all-l10n.js
$(RM) -r $(STAGEDIST)/dictionaries \
$(STAGEDIST)/searchplugins \
$(RM) -rf $(STAGEDIST)/searchplugins \
$(STAGEDIST)/dictionaries \
$(STAGEDIST)/hyphenation/$(AB_CD) \
$(STAGEDIST)/isp/$(AB_CD) \
$(STAGEDIST)/chrome/$(AB_CD)
unpack: $(STAGEDIST)
@echo done unpacking
langpack: langpack-$(AB_CD)
repackage-zip: ZIP_OUT?="$(_ABS_DIST)/$(PACKAGE)"
repackage-zip: UNPACKAGE="$(ZIP_IN)"
repackage-zip:
ifeq (WINNT,$(OS_ARCH))
$(RM) -r $(STAGEDIST)/uninstall
$(NSINSTALL) -D $(STAGEDIST)/uninstall
cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall
$(RM) $(_ABS_DIST)/l10n-stage/setup.exe
cp ../installer/windows/l10ngen/setup.exe $(_ABS_DIST)/l10n-stage
endif
# copy xpi-stage over, but not install.rdf and chrome.manifest,
# those are just for language packs
cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
tar --exclude=install.rdf --exclude=chrome.manifest $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
mv $(STAGEDIST)/chrome/$(AB_CD).manifest $(STAGEDIST)/chrome/localized.manifest
ifneq (en,$(AB))
ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj
endif
endif
$(NSINSTALL) -D $(DIST)/l10n-stage/$(PKG_PATH)
cd $(DIST)/l10n-stage; \
$(MAKE_PACKAGE)
ifdef MOZ_UPDATE_PACKAGING
ifneq ($(MOZ_PKG_FORMAT),ZIP)
$(MAKE) -C $(MOZDEPTH)/tools/update-packaging full-update AB_CD=$(AB_CD) \
MOZ_PKG_PRETTYNAMES=$(MOZ_PKG_PRETTYNAMES) \
PACKAGE_BASE_DIR="$(_ABS_DIST)/l10n-stage" \
DIST="$(_ABS_DIST)"
endif
endif
# packaging done, undo l10n stuff
ifneq (en,$(AB))
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj
endif
endif
ifdef MOZ_OMNIJAR
@(cd $(STAGEDIST) && $(UNPACK_OMNIJAR))
endif
$(MAKE) clobber-zip AB_CD=$(AB_CD)
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
mv -f "$(DIST)/l10n-stage/$(PACKAGE)" "$(ZIP_OUT)"
repackage-zip-%: $(ZIP_IN) $(STAGEDIST) libs-%
@$(MAKE) repackage-zip AB_CD=$* ZIP_IN=$(ZIP_IN)
langpack-%: LANGPACK_FILE=$(_ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
langpack-%: AB_CD=$*
langpack-%: XPI_NAME=locale-$*
langpack-%: libs-%
@echo "Making langpack $(LANGPACK_FILE)"
$(NSINSTALL) -D $(_ABS_DIST)/$(PKG_LANGPACK_PATH)
$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
-I$(call EXPAND_MOZLOCALE_SRCDIR,toolkit/locales)/defines.inc \
-I$(LOCALE_SRCDIR)/defines.inc $(srcdir)/generic/install.rdf > \
$(FINAL_TARGET)/install.rdf
cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
if test -d dictionaries; then \
$(ZIP) -r9D $(LANGPACK_FILE) install.rdf chrome chrome.manifest dictionaries -x chrome/$(AB_CD).manifest; \
else \
$(ZIP) -r9D $(LANGPACK_FILE) install.rdf chrome chrome.manifest -x chrome/$(AB_CD).manifest; \
fi
# This is a generic target that will make a langpack, repack ZIP (tarball)
# This is a generic target that will make a langpack, repack ZIP (+tarball)
# builds, and repack and installer if applicable. It is called from the
# tinderbox scripts. Alter it with caution.
@ -241,33 +153,16 @@ else
endif
endif
# This variable is to allow the wget-en-US target to know which ftp server to download from
ifndef EN_US_BINARY_URL
EN_US_BINARY_URL = $(error You must set EN_US_BINARY_URL)
endif
# This make target allows us to wget the latest en-US binary from a specified website
# The make installers-% target needs the en-US binary in dist/
# and for the windows repackages we need the .installer.exe in dist/sea
wget-en-US:
ifndef WGET
$(error Wget not installed)
endif
(cd $(_ABS_DIST) && $(WGET) -nv -N $(EN_US_BINARY_URL)/$(PACKAGE))
@echo "Downloaded $(EN_US_BINARY_URL)/$(PACKAGE) to $(_ABS_DIST)/$(PACKAGE)"
ifeq ($(OS_ARCH), WINNT)
$(NSINSTALL) -D $(_ABS_DIST)/$(PKG_INST_PATH)
(cd $(_ABS_DIST)/$(PKG_INST_PATH) && $(WGET) -nv -N "$(EN_US_BINARY_URL)/$(PKG_PATH)$(PKG_INST_BASENAME).exe")
@echo "Downloaded $(EN_US_BINARY_URL)/$(PKG_PATH)$(PKG_INST_BASENAME).exe to $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
endif
ident:
@printf "ib_revision "
@$(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(STAGEDIST)/application.ini App SourceStamp
@$(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py \
$(STAGEDIST)/application.ini App SourceStamp
@printf "moz_revision "
@$(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(STAGEDIST)/platform.ini Build SourceStamp
@$(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py \
$(STAGEDIST)/platform.ini Build SourceStamp
@printf "buildid "
@$(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(STAGEDIST)/application.ini App BuildID
@$(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py \
$(STAGEDIST)/application.ini App BuildID
#These make targets call prepare-repackages by setting different UPLOAD_DIR
prepare-upload-latest-%:
@ -283,7 +178,6 @@ prepare-upload-dated-%:
# 3) the installer (on windows)
# To set the paths those packages should end up, override the following vars:
# PKG_PATH, PKG_LANGPACK_PATH, PKG_INST_PATH
prepare-repackages-%: AB_CD=$*
prepare-repackages-%:
ifndef UPLOAD_DIR
$(error UPLOAD_DIR not defined)
@ -304,28 +198,6 @@ endif
# Set the permissions that the folders will have in ftp once uploaded
chmod -vR 775 $(UPLOAD_DIR)
generate-snippet-%:
$(PYTHON) $(MOZILLA_SRCDIR)/tools/update-packaging/generatesnippet.py \
--mar-path=$(_ABS_DIST)/update \
--application-ini-file=$(STAGEDIST)/application.ini \
--locale=$* \
--product=$(MOZ_PKG_APPNAME) \
--platform=$(MOZ_PKG_PLATFORM) \
--download-base-URL=$(DOWNLOAD_BASE_URL) \
--branch=$(FILE_BRANCH) \
--verbose
l10n-upload-%: AB_CD=$*
l10n-upload-%:
$(PYTHON) $(MOZILLA_SRCDIR)/build/upload.py --base-path $(DIST) "$(DIST)/$(PACKAGE)" $(DIST)/$(LANGPACK)
ifdef MOZ_MAKE_COMPLETE_MAR
$(PYTHON) $(MOZILLA_SRCDIR)/build/upload.py --base-path $(DIST) $(DIST)/$(COMPLETE_MAR);
endif
ifeq (WINNT, $(OS_ARCH))
$(PYTHON) $(MOZILLA_SRCDIR)/build/upload.py --base-path $(DIST) "$(INSTALLER_PACKAGE)"
endif
merge-%:
ifdef LOCALE_MERGEDIR
$(RM) -rf $(LOCALE_MERGEDIR)