diff --git a/python/mozbuild/mozbuild/artifacts.py b/python/mozbuild/mozbuild/artifacts.py index 3915688ae79b..1adf7d2abc29 100644 --- a/python/mozbuild/mozbuild/artifacts.py +++ b/python/mozbuild/mozbuild/artifacts.py @@ -152,19 +152,14 @@ class ArtifactJob(object): # prepended. # # The entries in the archive, suitably renamed, will be extracted into `dist`. - @property - def _extra_archives(self): - return { - ".xpt_artifacts.zip": { - "description": "XPT Artifacts", - "src_prefix": "", - "dest_prefix": "xpt_artifacts", - }, - } - - @property - def _extra_archive_suffixes(self): - return tuple(sorted(self._extra_archives.keys())) + _extra_archives = { + ".xpt_artifacts.zip": { + "description": "XPT Artifacts", + "src_prefix": "", + "dest_prefix": "xpt_artifacts", + }, + } + _extra_archive_suffixes = tuple(sorted(_extra_archives.keys())) def __init__( self, @@ -219,7 +214,7 @@ class ArtifactJob(object): self._symbols_archive_suffix ): yield name - elif name.endswith(self._extra_archive_suffixes): + elif name.endswith(ArtifactJob._extra_archive_suffixes): yield name else: self.log( @@ -253,7 +248,7 @@ class ArtifactJob(object): self._symbols_archive_suffix ): return self.process_symbols_archive(filename, processed_filename) - if filename.endswith(self._extra_archive_suffixes): + if filename.endswith(ArtifactJob._extra_archive_suffixes): return self.process_extra_archive(filename, processed_filename) return self.process_package_artifact(filename, processed_filename) @@ -407,7 +402,7 @@ class ArtifactJob(object): writer.add(destpath.encode("utf-8"), entry) def process_extra_archive(self, filename, processed_filename): - for suffix, extra_archive in self._extra_archives.items(): + for suffix, extra_archive in ArtifactJob._extra_archives.items(): if filename.endswith(suffix): self.log( logging.INFO, @@ -677,20 +672,6 @@ class MacArtifactJob(ArtifactJob): ), ) - @property - def _extra_archives(self): - extra_archives = super()._extra_archives - extra_archives.update( - { - ".update_framework_artifacts.zip": { - "description": "Update-related macOS Framework Artifacts", - "src_prefix": "", - "dest_prefix": "update_framework_artifacts", - }, - } - ) - return extra_archives - @property def paths_no_keep_path(self): formatted = [] @@ -1295,8 +1276,8 @@ class Artifacts(object): zeroes = "0" * 40 hashes = [] - for hg_hash_unstripped in hg_hash_list.splitlines(): - hg_hash = hg_hash_unstripped.strip() + for hg_hash in hg_hash_list.splitlines(): + hg_hash = hg_hash.strip() if not hg_hash or hg_hash == zeroes: continue hashes.append(hg_hash) @@ -1408,8 +1389,8 @@ https://firefox-source-docs.mozilla.org/contributing/vcs/mercurial_bundles.html if candidate_pushheads: break count = 0 - for rev_unstripped in last_revs: - rev = rev_unstripped.rstrip() + for rev in last_revs: + rev = rev.rstrip() if not rev: continue if rev not in candidate_pushheads: diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk index c7be51972523..36239fe79f6f 100644 --- a/toolkit/mozapps/installer/package-name.mk +++ b/toolkit/mozapps/installer/package-name.mk @@ -110,9 +110,6 @@ GTEST_PACKAGE = $(PKG_BASENAME).gtest.tests.tar.gz # `.xpt` artifacts: for use in artifact builds. XPT_ARTIFACTS_ARCHIVE_BASENAME = $(PKG_BASENAME).xpt_artifacts -ifeq (Darwin, $(OS_ARCH)) -UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME = $(PKG_BASENAME).update_framework_artifacts -endif # Darwin ifneq (,$(wildcard $(DIST)/bin/application.ini)) BUILDID = $(shell $(PYTHON3) $(MOZILLA_DIR)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID) diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index f0572af6d854..a85b7c55814a 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -109,17 +109,9 @@ endif # Darwin ifndef MOZ_ARTIFACT_BUILDS @echo 'Generating XPT artifacts archive ($(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip)' $(call py_action,zip $(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip,-C $(topobjdir)/config/makefiles/xpidl '$(ABS_DIST)/$(PKG_PATH)$(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.xpt') -ifeq (Darwin, $(OS_ARCH)) - @echo 'Generating update-related macOS framework artifacts archive ($(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip)' - $(call py_action,zip $(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip,-C '$(ABS_DIST)/update_framework_artifacts' '$(ABS_DIST)/$(PKG_PATH)$(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.framework') -endif # Darwin else @echo 'Packaging existing XPT artifacts from artifact build into archive ($(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip)' $(call py_action,zip $(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip,-C $(ABS_DIST)/xpt_artifacts '$(ABS_DIST)/$(PKG_PATH)$(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.xpt') -ifeq (Darwin, $(OS_ARCH)) - @echo 'Packaging existing update-related macOS framework artifacts from artifact build into archive ($(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip)' - $(call py_action,zip $(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip,-C $(ABS_DIST)/update_framework_artifacts '$(ABS_DIST)/$(PKG_PATH)$(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip' '*.framework') -endif # Darwin endif # MOZ_ARTIFACT_BUILDS prepare-package: stage-package diff --git a/toolkit/mozapps/installer/upload-files.mk b/toolkit/mozapps/installer/upload-files.mk index 817f782772f1..6e1283e23874 100644 --- a/toolkit/mozapps/installer/upload-files.mk +++ b/toolkit/mozapps/installer/upload-files.mk @@ -394,10 +394,6 @@ endif # Upload `.xpt` artifacts for use in artifact builds. UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(XPT_ARTIFACTS_ARCHIVE_BASENAME).zip) -# Upload update-related macOS framework artifacts for use in artifact builds. -ifeq ($(OS_ARCH),Darwin) -UPLOAD_FILES += $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(UPDATE_FRAMEWORK_ARTIFACTS_ARCHIVE_BASENAME).zip) -endif # Darwin ifndef MOZ_PKG_SRCDIR MOZ_PKG_SRCDIR = $(topsrcdir) diff --git a/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/Makefile.in b/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/Makefile.in deleted file mode 100644 index 5dcb0821cba1..000000000000 --- a/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/Makefile.in +++ /dev/null @@ -1,25 +0,0 @@ -# vim:set ts=8 sw=8 sts=8 noet: -# 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 $(topsrcdir)/config/rules.mk - -# In a compile build, the moz.build stanzas produce a binary named -# `ChannelPrefs-localbuild`. We need to produce -# `dist/update_framework_artifacts/ChannelPrefs-localbuild.framework/ChannelPrefs` -# for consumption by artifact builds. -# -# In an artifact build, we already have upstream artifacts in -# `dist/update_framework_artifacts/ChannelPrefs-localbuild.framework`. - -ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -libs:: -ifneq (,$(COMPILE_ENVIRONMENT)) - rm -rf $(FINAL_TARGET)/ChannelPrefs-localbuild.framework - $(NSINSTALL) -D $(FINAL_TARGET)/ChannelPrefs-localbuild.framework - cp $(FINAL_TARGET)/ChannelPrefs-localbuild ChannelPrefs - $(NSINSTALL) ChannelPrefs $(FINAL_TARGET)/ChannelPrefs-localbuild.framework -endif # COMPILE_ENVIRONMENT - $(NSINSTALL) $(srcdir)/../ChannelPrefs/Info.plist $(FINAL_TARGET)/ChannelPrefs-localbuild.framework/Resources -endif # MOZ_WIDGET_TOOLKIT diff --git a/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/moz.build b/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/moz.build deleted file mode 100644 index ff91833ad360..000000000000 --- a/toolkit/mozapps/macos-frameworks/ChannelPrefs-localbuild/moz.build +++ /dev/null @@ -1,21 +0,0 @@ -# -*- 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/. - -with Files("**"): - BUG_COMPONENT = ("Toolkit", "Application Update") - -Framework("ChannelPrefs-localbuild") -FINAL_TARGET = "dist/update_framework_artifacts" - -DEFINES["MOZ_UPDATE_CHANNEL_OVERRIDE"] = "default" - -UNIFIED_SOURCES += [ - "../ChannelPrefs/ChannelPrefs.mm", -] - -OS_LIBS += [ - "-framework Foundation", -] diff --git a/toolkit/mozapps/macos-frameworks/ChannelPrefs/ChannelPrefs.mm b/toolkit/mozapps/macos-frameworks/ChannelPrefs/ChannelPrefs.mm index 0428bbe8abfe..f437bb857d4a 100644 --- a/toolkit/mozapps/macos-frameworks/ChannelPrefs/ChannelPrefs.mm +++ b/toolkit/mozapps/macos-frameworks/ChannelPrefs/ChannelPrefs.mm @@ -6,13 +6,7 @@ #include "mozilla/HelperMacros.h" -#ifdef MOZ_UPDATE_CHANNEL_OVERRIDE -# define CHANNEL MOZ_UPDATE_CHANNEL_OVERRIDE -#else -# define CHANNEL MOZ_UPDATE_CHANNEL -#endif - NSString* ChannelPrefsGetChannel() { - return [NSString stringWithCString:MOZ_STRINGIFY(CHANNEL) + return [NSString stringWithCString:MOZ_STRINGIFY(MOZ_UPDATE_CHANNEL) encoding:NSUTF8StringEncoding]; } diff --git a/toolkit/mozapps/macos-frameworks/ChannelPrefs/Makefile.in b/toolkit/mozapps/macos-frameworks/ChannelPrefs/Makefile.in index 7f3bfd1cc539..43552a771e59 100644 --- a/toolkit/mozapps/macos-frameworks/ChannelPrefs/Makefile.in +++ b/toolkit/mozapps/macos-frameworks/ChannelPrefs/Makefile.in @@ -5,23 +5,10 @@ include $(topsrcdir)/config/rules.mk -# In a compile build, the moz.build stanzas produce a binary named -# `ChannelPrefs`. We need to produce -# `dist/bin/ChannelPrefs.framework/ChannelPrefs` for consumption by the -# build. -# -# In an artifact build, we copy upstream artifacts from -# `dist/update_framework_artifacts/ChannelPrefs-localbuild.framework` - ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) libs:: - rm -rf $(FINAL_TARGET)/ChannelPrefs.framework - $(NSINSTALL) -D $(FINAL_TARGET)/ChannelPrefs.framework -ifneq (,$(COMPILE_ENVIRONMENT)) - $(NSINSTALL) $(FINAL_TARGET)/ChannelPrefs $(FINAL_TARGET)/ChannelPrefs.framework -endif # COMPILE_ENVIRONMENT -ifneq (,$(MOZ_ARTIFACT_BUILDS)) - $(NSINSTALL) $(DIST)/update_framework_artifacts/ChannelPrefs-localbuild.framework/ChannelPrefs $(FINAL_TARGET)/ChannelPrefs.framework -endif # MOZ_ARTIFACT_BUILDS - $(NSINSTALL) $(srcdir)/Info.plist $(FINAL_TARGET)/ChannelPrefs.framework/Resources -endif # MOZ_WIDGET_TOOLKIT + rm -rf $(DIST)/bin/ChannelPrefs.framework + + $(NSINSTALL) $(DIST)/bin/ChannelPrefs $(DIST)/bin/ChannelPrefs.framework + $(NSINSTALL) $(srcdir)/Info.plist $(DIST)/bin/ChannelPrefs.framework/Resources +endif diff --git a/toolkit/mozapps/macos-frameworks/moz.build b/toolkit/mozapps/macos-frameworks/moz.build index f7ad2d314f92..b1a315500c5f 100644 --- a/toolkit/mozapps/macos-frameworks/moz.build +++ b/toolkit/mozapps/macos-frameworks/moz.build @@ -11,7 +11,6 @@ FINAL_LIBRARY = "xul" DIRS += [ "ChannelPrefs", - "ChannelPrefs-localbuild", ] EXPORTS += [ diff --git a/toolkit/mozapps/update/updater/Makefile.in b/toolkit/mozapps/update/updater/Makefile.in index f93a3744289c..ec3ad9773acf 100644 --- a/toolkit/mozapps/update/updater/Makefile.in +++ b/toolkit/mozapps/update/updater/Makefile.in @@ -5,12 +5,6 @@ # For changes here, also consider ./updater-xpcshell/Makefile.in -# In a compile build, the moz.build stanzas produce the binary named -# `UpdateSettings`; we just need it in the correct place. -# -# In an artifact build, we copy upstream artifacts from -# `dist/update_framework_artifacts/UpdateSettings-localbuild.framework` - ifndef MOZ_WINCONSOLE ifdef MOZ_DEBUG MOZ_WINCONSOLE = 1 @@ -32,11 +26,6 @@ libs:: $(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/MacOS $(NSINSTALL) $(DIST)/bin/org.mozilla.updater $(DIST)/bin/updater.app/Contents/MacOS $(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/Frameworks -ifneq (,$(COMPILE_ENVIRONMENT)) $(NSINSTALL) $(DIST)/bin/UpdateSettings $(DIST)/bin/updater.app/Contents/Frameworks/UpdateSettings.framework -endif # COMPILE_ENVIRONMENT -ifneq (,$(MOZ_ARTIFACT_BUILDS)) - $(NSINSTALL) $(DIST)/update_framework_artifacts/UpdateSettings-localbuild.framework/UpdateSettings $(DIST)/bin/updater.app/Contents/Frameworks/UpdateSettings.framework -endif # MOZ_ARTIFACT_BUILDS $(NSINSTALL) $(srcdir)/macos-frameworks/UpdateSettings/Info.plist $(DIST)/bin/updater.app/Contents/Frameworks/UpdateSettings.framework/Resources endif diff --git a/toolkit/mozapps/update/updater/macos-frameworks/UpdateSettings-localbuild/Makefile.in b/toolkit/mozapps/update/updater/macos-frameworks/UpdateSettings-localbuild/Makefile.in deleted file mode 100644 index 2798eecd64d5..000000000000 --- a/toolkit/mozapps/update/updater/macos-frameworks/UpdateSettings-localbuild/Makefile.in +++ /dev/null @@ -1,25 +0,0 @@ -# vim:set ts=8 sw=8 sts=8 noet: -# 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 $(topsrcdir)/config/rules.mk - -# In a compile build, the moz.build stanzas produce a binary named -# `UpdateSettings-localbuild`. We need to produce -# `dist/update_framework_artifacts/UpdateSettings-localbuild.framework/UpdateSettings` -# for consumption by artifact builds. -# -# In an artifact build, we already have upstream artifacts in -# `dist/update_framework_artifacts/UpdateSettings-localbuild.framework`. - -ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -libs:: -ifneq (,$(COMPILE_ENVIRONMENT)) - rm -rf $(FINAL_TARGET)/UpdateSettings-localbuild.framework - $(NSINSTALL) -D $(FINAL_TARGET)/UpdateSettings-localbuild.framework - cp $(FINAL_TARGET)/UpdateSettings-localbuild UpdateSettings - $(NSINSTALL) UpdateSettings $(FINAL_TARGET)/UpdateSettings-localbuild.framework -endif # COMPILE_ENVIRONMENT - $(NSINSTALL) $(srcdir)/../UpdateSettings/Info.plist $(FINAL_TARGET)/UpdateSettings-localbuild.framework/Resources -endif # MOZ_WIDGET_TOOLKIT diff --git a/toolkit/mozapps/update/updater/macos-frameworks/UpdateSettings-localbuild/moz.build b/toolkit/mozapps/update/updater/macos-frameworks/UpdateSettings-localbuild/moz.build deleted file mode 100644 index ca3a0c9f1cc9..000000000000 --- a/toolkit/mozapps/update/updater/macos-frameworks/UpdateSettings-localbuild/moz.build +++ /dev/null @@ -1,18 +0,0 @@ -# -*- 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/. - -Framework("UpdateSettings-localbuild") -FINAL_TARGET = "dist/update_framework_artifacts" - -DEFINES["ACCEPTED_MAR_CHANNEL_IDS"] = '""' - -UNIFIED_SOURCES += [ - "../UpdateSettings/UpdateSettings.mm", -] - -OS_LIBS += [ - "-framework Foundation", -] diff --git a/toolkit/mozapps/update/updater/macos-frameworks/moz.build b/toolkit/mozapps/update/updater/macos-frameworks/moz.build index cb49b680c0e8..19fa11942e42 100644 --- a/toolkit/mozapps/update/updater/macos-frameworks/moz.build +++ b/toolkit/mozapps/update/updater/macos-frameworks/moz.build @@ -7,12 +7,7 @@ with Files("**"): BUG_COMPONENT = ("Toolkit", "Application Update") -DIRS += [ - "UpdateSettings", - "UpdateSettings-localbuild", - "UpdateSettings-WrongChannel", - "UpdateSettings-xpcshell", -] +DIRS += ["UpdateSettings", "UpdateSettings-xpcshell", "UpdateSettings-WrongChannel"] EXPORTS += [ "UpdateSettingsUtil.h",