tools/update-packaging/Makefile.in

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 # vim:set ts=8 sw=8 sts=8 noet:
michael@0 2 #
michael@0 3 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 6
michael@0 7 STANDALONE_MAKEFILE := 1
michael@0 8
michael@0 9 # input location for the build, usually $(DIST)
michael@0 10 # set this to $(DIST)/l10n-stage per override for L10n builds
michael@0 11 PACKAGE_BASE_DIR = $(DIST)
michael@0 12
michael@0 13 # Default output location for update archive
michael@0 14 STAGE_DIR = $(DIST)/$(PKG_UPDATE_PATH)
michael@0 15
michael@0 16 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
michael@0 17 ifdef UNIVERSAL_BINARY
michael@0 18 ifneq (,$(filter %/l10n-stage,$(PACKAGE_BASE_DIR)))
michael@0 19 PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)/$(MOZ_MACBUNDLE_NAME)
michael@0 20 else
michael@0 21 PACKAGE_DIR = $(PACKAGE_BASE_DIR)/universal/$(MOZ_PKG_DIR)/$(MOZ_MACBUNDLE_NAME)
michael@0 22 endif
michael@0 23 else
michael@0 24 PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)/$(MOZ_MACBUNDLE_NAME)
michael@0 25 endif
michael@0 26 else
michael@0 27 PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_DIR)
michael@0 28 endif
michael@0 29
michael@0 30 MAR_BIN = $(LIBXUL_DIST)/host/bin/mar$(HOST_BIN_SUFFIX)
michael@0 31 MBSDIFF_BIN = $(LIBXUL_DIST)/host/bin/mbsdiff$(HOST_BIN_SUFFIX)
michael@0 32
michael@0 33 OVERRIDE_DEFAULT_GOAL := full-update
michael@0 34 full-update:: complete-patch $(if $(MOZ_AUTOMATION_UPDATE_PACKAGING),automation-partial-patch)
michael@0 35
michael@0 36 ifeq ($(OS_TARGET), WINNT)
michael@0 37 MOZ_PKG_FORMAT := SFX7Z
michael@0 38 UNPACKAGE = '$(subst $(DIST),$(_ABS_DIST),$(INSTALLER_PACKAGE))'
michael@0 39 ifdef AB_CD
michael@0 40 UNPACKAGE = '$(PACKAGE_BASE_DIR)/$(PACKAGE)'
michael@0 41 endif
michael@0 42 endif
michael@0 43
michael@0 44 include $(topsrcdir)/config/rules.mk
michael@0 45 include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
michael@0 46 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
michael@0 47
michael@0 48 ifdef MOZ_EXTERNAL_SIGNING_FORMAT
michael@0 49 # We can't use signcode on mar files
michael@0 50 MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT))
michael@0 51 MOZ_EXTERNAL_SIGNING_FORMAT := mar $(MOZ_EXTERNAL_SIGNING_FORMAT)
michael@0 52 endif
michael@0 53
michael@0 54 dir-stage := $(call mkdir_deps,$(STAGE_DIR))
michael@0 55
michael@0 56 complete-patch:: $(dir-stage)
michael@0 57 ifeq ($(OS_TARGET), WINNT)
michael@0 58 test -f $(UNPACKAGE)
michael@0 59 $(RM) -rf '$(PACKAGE_DIR)'
michael@0 60 cd $(PACKAGE_BASE_DIR) && $(INNER_UNMAKE_PACKAGE)
michael@0 61 endif
michael@0 62 MAR=$(MAR_BIN) \
michael@0 63 $(srcdir)/make_full_update.sh \
michael@0 64 '$(DIST)/$(COMPLETE_MAR)' \
michael@0 65 '$(PACKAGE_DIR)'
michael@0 66 ifdef MOZ_SIGN_CMD
michael@0 67 $(MOZ_SIGN_CMD) -f mar '$(DIST)/$(COMPLETE_MAR)'
michael@0 68 endif
michael@0 69
michael@0 70 partial-patch:: $(dir-stage)
michael@0 71 MAR=$(MAR_BIN) \
michael@0 72 MBSDIFF=$(MBSDIFF_BIN) \
michael@0 73 $(srcdir)/make_incremental_update.sh \
michael@0 74 '$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar' \
michael@0 75 '$(SRC_BUILD)' \
michael@0 76 '$(DST_BUILD)'
michael@0 77 ifdef MOZ_SIGN_CMD
michael@0 78 $(MOZ_SIGN_CMD) -f mar '$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar'
michael@0 79 endif
michael@0 80
michael@0 81 automation-partial-patch: complete-patch
michael@0 82 rm -rf current current.work previous
michael@0 83 mkdir current previous
michael@0 84 latestmar=$$(ssh -l $(UPLOAD_USER) -i $(UPLOAD_SSH_KEY) $(UPLOAD_HOST) 'ls -1t $(LATEST_MAR_DIR) | grep $(MOZ_PKG_PLATFORM).complete.mar$$ | head -n 1'); \
michael@0 85 if test -n "$$latestmar"; then \
michael@0 86 wget -O $(STAGE_DIR)/previous.mar http://$(UPLOAD_HOST)/$(LATEST_MAR_DIR)/$$latestmar && \
michael@0 87 (cd previous; \
michael@0 88 MAR=$(MAR_BIN) perl $(topsrcdir)/tools/update-packaging/unwrap_full_update.pl '../$(STAGE_DIR)/previous.mar') && \
michael@0 89 (cd current; \
michael@0 90 MAR=$(MAR_BIN) perl $(topsrcdir)/tools/update-packaging/unwrap_full_update.pl '../$(DIST)/$(COMPLETE_MAR)') && \
michael@0 91 find current -name \*.pgc -print -delete && \
michael@0 92 find previous -name \*.pgc -print -delete && \
michael@0 93 rm -f $(STAGE_DIR)/*.partial.*.mar && \
michael@0 94 SRC_BUILD_ID=$$(python $(topsrcdir)/config/printconfigsetting.py $$(find previous -maxdepth 4 -type f -name application.ini) App BuildID) \
michael@0 95 DST_BUILD_ID=$$(cat $(DEPTH)/config/buildid) \
michael@0 96 SRC_BUILD=previous DST_BUILD=current \
michael@0 97 $(MAKE) partial-patch && \
michael@0 98 rm -f $(STAGE_DIR)/previous.mar; \
michael@0 99 else \
michael@0 100 echo "No previous MAR found; not creating a partial MAR"; \
michael@0 101 fi

mercurial