Skip to content

Commit

Permalink
Backed out 13 changesets (bug 1620744) for causing diffoscope failure…
Browse files Browse the repository at this point in the history
…s firefox/browser/chrome/browser/content/browser/built_in_addons.json

CLOSED TREE

Backed out changeset 6beda54bcb9b (bug 1620744)
Backed out changeset a1e97f0b91ef (bug 1620744)
Backed out changeset b8faa0184d4f (bug 1620744)
Backed out changeset 3bc8fda68107 (bug 1620744)
Backed out changeset 8e95b21b2ae3 (bug 1620744)
Backed out changeset 1de09de1a802 (bug 1620744)
Backed out changeset 622a2f7414fa (bug 1620744)
Backed out changeset 3372c9ab721c (bug 1620744)
Backed out changeset 0997313a9f99 (bug 1620744)
Backed out changeset 2fa34749bbfa (bug 1620744)
Backed out changeset 6d597d2eb792 (bug 1620744)
Backed out changeset 78e78f7c7b26 (bug 1620744)
Backed out changeset 6e4d85b19f88 (bug 1620744)
  • Loading branch information
dvarga1989 committed Mar 10, 2020
1 parent edc3bf3 commit 04f4db8
Show file tree
Hide file tree
Showing 32 changed files with 73 additions and 63 deletions.
8 changes: 4 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ endif

ifdef MOZ_ANDROID_FAT_AAR_ARCHITECTURES
recurse_android-fat-aar-artifact:
$(call py3_action,fat_aar,\
$(call py_action,fat_aar,\
$(addprefix --armeabi-v7a $(MOZ_FETCHES_DIR)/,$(MOZ_ANDROID_FAT_AAR_ARMEABI_V7A)) \
$(addprefix --arm64-v8a $(MOZ_FETCHES_DIR)/,$(MOZ_ANDROID_FAT_AAR_ARM64_V8A)) \
$(addprefix --x86 $(MOZ_FETCHES_DIR)/,$(MOZ_ANDROID_FAT_AAR_X86)) \
Expand Down Expand Up @@ -196,14 +196,14 @@ endif
.PHONY: symbolsfullarchive
symbolsfullarchive: prepsymbolsarchive
$(RM) '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
$(call py3_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' \
$(call py_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip' \
$(abspath $(DIST)/crashreporter-symbols) \
--full-archive)

.PHONY: symbolsarchive
symbolsarchive: prepsymbolsarchive
$(RM) '$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip'
$(call py3_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' \
$(call py_action,symbols_archive,'$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip' \
$(abspath $(DIST)/crashreporter-symbols))

ifdef MOZ_CRASHREPORTER
Expand All @@ -229,7 +229,7 @@ update-packaging:

.PHONY: package-generated-sources
package-generated-sources:
$(call py3_action,package_generated_sources,'$(DIST)/$(PKG_PATH)$(GENERATED_SOURCE_FILE_PACKAGE)')
$(call py_action,package_generated_sources,'$(DIST)/$(PKG_PATH)$(GENERATED_SOURCE_FILE_PACKAGE)')

ifdef JS_STANDALONE
# Delegate js-specific rules to js
Expand Down
2 changes: 1 addition & 1 deletion browser/app/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ endif
# steps. See bug 1431342.
libs:: $(srcdir)/profile/channel-prefs.js
$(NSINSTALL) -D $(DIST)/bin/defaults/pref
$(call py3_action,preprocessor,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
$(call py_action,preprocessor,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)

ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))

Expand Down
2 changes: 1 addition & 1 deletion browser/installer/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ endif

package-compare::
cd $(DIST); find $(PKGCOMP_FIND_OPTS) '$(FINDPATH)' -type f | sort > bin-list.txt
$(call py3_action,preprocessor,$(DEFINES) $(ACDEFINES) $(MOZ_PKG_MANIFEST)) | grep '^$(BINPATH)' | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(MOZ_PKG_MANIFEST)) | grep '^$(BINPATH)' | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt
-diff -u $(DIST)/pack-list.txt $(DIST)/bin-list.txt
rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt

Expand Down
2 changes: 1 addition & 1 deletion browser/installer/windows/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $(CONFIG_DIR)/setup.exe::
$(MKDIR) $(CONFIG_DIR)
$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
$(INSTALL) $(addprefix $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/,$(BRANDING_FILES)) $(CONFIG_DIR)
$(call py3_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
$(call py_action,preprocessor,-Fsubstitution $(DEFINES) $(ACDEFINES) \
$(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
$(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
--preprocess-locale $(topsrcdir) \
Expand Down
3 changes: 1 addition & 2 deletions build/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def buildid_header(output):
def get_program_output(*command):
try:
with open(os.devnull) as stderr:
return subprocess.check_output(command, stderr=stderr,
universal_newlines=True)
return subprocess.check_output(command, stderr=stderr)
except Exception:
return ''

Expand Down
2 changes: 1 addition & 1 deletion config/makefiles/rust.mk
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ ifndef MOZ_TSAN
ifeq ($(OS_ARCH), Linux)
ifeq (,$(rustflags_sancov))
ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
$(call py3_action,check_binary,--target --networking $@)
$(call py_action,check_binary,--target --networking $@)
endif
endif
endif
Expand Down
18 changes: 9 additions & 9 deletions config/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ ifdef MSMANIFEST_TOOL
endif # MSVC with manifest tool
else # !WINNT || GNU_CC
$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
$(call py3_action,check_binary,--target $@)
$(call py_action,check_binary,--target $@)
endif # WINNT && !GNU_CC

ifdef ENABLE_STRIP
Expand Down Expand Up @@ -505,7 +505,7 @@ else
endif # HOST_CPP_PROG_LINK
endif
ifndef CROSS_COMPILE
$(call py3_action,check_binary,--host $@)
$(call py_action,check_binary,--host $@)
endif

#
Expand All @@ -530,7 +530,7 @@ ifdef MSMANIFEST_TOOL
endif # MSVC with manifest tool
else
$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $($@_OBJS) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
$(call py3_action,check_binary,--target $@)
$(call py_action,check_binary,--target $@)
endif # WINNT && !GNU_CC

ifdef ENABLE_STRIP
Expand All @@ -552,7 +552,7 @@ else
endif
endif
ifndef CROSS_COMPILE
$(call py3_action,check_binary,--host $@)
$(call py_action,check_binary,--host $@)
endif

$(LIBRARY): $(OBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
Expand Down Expand Up @@ -610,7 +610,7 @@ ifndef INCREMENTAL_LINKER
$(RM) $@
endif
$(MKSHLIB) $($@_OBJS) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
$(call py3_action,check_binary,--target $@)
$(call py_action,check_binary,--target $@)

ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
ifdef MSMANIFEST_TOOL
Expand Down Expand Up @@ -702,7 +702,7 @@ define syms_template
syms:: $(2)
$(2): $(1)
ifdef MOZ_CRASHREPORTER
$$(call py3_action,dumpsymbols,$$(abspath $$<) $$(abspath $$@) $$(DUMP_SYMBOLS_FLAGS))
$$(call py_action,dumpsymbols,$$(abspath $$<) $$(abspath $$@) $$(DUMP_SYMBOLS_FLAGS))
endif
endef

Expand Down Expand Up @@ -936,7 +936,7 @@ endif
endif

libs realchrome:: $(FINAL_TARGET)/chrome
$(call py3_action,jar_maker,\
$(call py_action,jar_maker,\
$(QUIET) -d $(FINAL_TARGET) \
$(MAKE_JARS_FLAGS) $(DEFINES) $(ACDEFINES) \
$(JAR_MANIFEST))
Expand Down Expand Up @@ -979,7 +979,7 @@ ifndef MOZ_DEBUG
endif
endif
@echo 'Packaging $(XPI_PKGNAME).xpi...'
$(call py3_action,zip,-C $(FINAL_TARGET) ../$(XPI_PKGNAME).xpi '*')
$(call py_action,zip,-C $(FINAL_TARGET) ../$(XPI_PKGNAME).xpi '*')
endif

# See comment above about moving this out of the tools tier.
Expand Down Expand Up @@ -1159,7 +1159,7 @@ PP_TARGETS_ALL_RESULTS := $(sort $(foreach tier,$(PP_TARGETS_TIERS),$(PP_TARGETS
$(PP_TARGETS_ALL_RESULTS):
$(if $(filter-out $(notdir $@),$(notdir $(<:.in=))),$(error Looks like $@ has an unexpected dependency on $< which breaks PP_TARGETS))
$(RM) '$@'
$(call py3_action,preprocessor,--depend $(MDDEPDIR)/$(@F).pp $(PP_TARGET_FLAGS) $(DEFINES) $(ACDEFINES) '$<' -o '$@')
$(call py_action,preprocessor,--depend $(MDDEPDIR)/$(@F).pp $(PP_TARGET_FLAGS) $(DEFINES) $(ACDEFINES) '$<' -o '$@')

$(filter %.css,$(PP_TARGETS_ALL_RESULTS)): PP_TARGET_FLAGS+=--marker %

Expand Down
5 changes: 2 additions & 3 deletions layout/tools/reftest/reftest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import os
import re
import six

RE_COMMENT = re.compile(r'\s+#')
RE_HTTP = re.compile(r'HTTP\((\.\.(\/\.\.)*)\)')
Expand Down Expand Up @@ -97,14 +96,14 @@ def add_test(file, annotations, referenced_test=None):
if self.finder:
lines = self.finder.get(path).read().splitlines()
else:
with open(path, 'r', encoding='utf-8') as fh:
with open(path, 'r') as fh:
lines = fh.read().splitlines()

urlprefix = ''
defaults = []
for i, line in enumerate(lines):
lineno = i + 1
line = six.ensure_text(line)
line = line.decode('utf-8')

# Entire line is a comment.
if line.startswith('#'):
Expand Down
1 change: 1 addition & 0 deletions mobile/android/geckoview/src/androidTest/assets/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ for addon in addons:

GENERATED_FILES += [xpi]
GENERATED_FILES[xpi].script = '../../../../../../toolkit/mozapps/extensions/test/create_xpi.py'
GENERATED_FILES[xpi].py2 = True
GENERATED_FILES[xpi].inputs = [indir]

TEST_HARNESS_FILES.testing.mochitest.tests.junit += ['!%s' % xpi]
1 change: 1 addition & 0 deletions moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ if not CONFIG['JS_STANDALONE'] or not CONFIG['MOZ_BUILD_APP']:

GENERATED_FILES['buildid.h'].script = 'build/variables.py:buildid_header'
GENERATED_FILES['source-repo.h'].script = 'build/variables.py:source_repo_header'
GENERATED_FILES['source-repo.h'].py2 = True

DIRS += [
'build',
Expand Down
2 changes: 1 addition & 1 deletion mozglue/build/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include $(topsrcdir)/config/config.mk

ifeq (WINNT,$(OS_TARGET))
mozglue.def: $(srcdir)/mozglue.def.in $(GLOBAL_DEPS)
$(call py3_action,preprocessor,$(if $(MOZ_REPLACE_MALLOC),-DMOZ_REPLACE_MALLOC) $(ACDEFINES) $< -o $@)
$(call py_action,preprocessor,$(if $(MOZ_REPLACE_MALLOC),-DMOZ_REPLACE_MALLOC) $(ACDEFINES) $< -o $@)

GARBAGE += mozglue.def

Expand Down
18 changes: 12 additions & 6 deletions mozglue/dllservices/gen_dll_blocklist_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ def add_list_flags(elem):

# Sort the list on entry name so that the blocklist code may use
# binary search if it so chooses.
return sorted(filtered_list, key=lambda e: e.get_name())
filtered_list.sort(key=lambda e: e.get_name())

return filtered_list

@staticmethod
def get_fd(outspec_leaf_name):
Expand Down Expand Up @@ -369,7 +371,11 @@ def write(self, src_file, exec_env):

class PETimeStamp(object):
def __init__(self, ts):
max_timestamp = (2 ** 32) - 1
# Since we can't specify the long literal suffix in python 3, we'll
# compute max_timestamp this way to ensure that it is defined as a
# long in python 2
max_timestamp = (long(2) ** 32) - 1
assert isinstance(max_timestamp, long)
if ts < 0 or ts > max_timestamp:
raise ValueError('Invalid timestamp value')
self._value = ts
Expand Down Expand Up @@ -407,7 +413,7 @@ def __init__(self, *args):
elif isinstance(args[0], PETimeStamp):
self._ver = args[0]
else:
self._ver = int(args[0])
self._ver = long(args[0])
elif len(args) == 4:
self.validate_iterable(args)

Expand All @@ -427,14 +433,14 @@ def validate_iterable(self, arg):

def build_long(self, args):
self.validate_iterable(args)
return (int(args[0]) << 48) | (int(args[1]) << 32) | \
(int(args[2]) << 16) | int(args[3])
return (long(args[0]) << 48) | (long(args[1]) << 32) | \
(long(args[2]) << 16) | long(args[3])

def is_timestamp(self):
return isinstance(self._ver, PETimeStamp)

def __str__(self):
if isinstance(self._ver, int):
if isinstance(self._ver, long):
if self._ver == Version.ALL_VERSIONS:
return 'DllBlockInfo::ALL_VERSIONS'

Expand Down
1 change: 1 addition & 0 deletions mozglue/dllservices/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ GENERATED_FILES += [
blocklist_defs = GENERATED_FILES[blocklist_files]
blocklist_defs.script = 'gen_dll_blocklist_defs.py:gen_blocklists'
blocklist_defs.inputs = ['WindowsDllBlocklistDefs.in']
blocklist_defs.py2 = True
EXPORTS.mozilla += ['!' + hdr for hdr in blocklist_files]

FINAL_LIBRARY = 'mozglue'
2 changes: 2 additions & 0 deletions netwerk/dns/prepare_tlds.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def dafsa_words():

""" words_to_bin() returns a bytes while words_to_cxx() returns string """
if output_format == "bin":
if sys.version_info[0] >= 3:
output = output.buffer
output.write(words_to_bin(dafsa_words()))
else:
output.write(words_to_cxx(dafsa_words()))
Expand Down
1 change: 1 addition & 0 deletions netwerk/dns/tests/unit/data/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ fake_remote_dafsa = GENERATED_FILES['fake_remote_dafsa.bin']
fake_remote_dafsa.script = '../../../prepare_tlds.py'
fake_remote_dafsa.inputs = ['fake_public_suffix_list.dat']
fake_remote_dafsa.flags = ['bin']
fake_remote_dafsa.py2 = True

TEST_HARNESS_FILES.xpcshell.netwerk.dns.tests.unit.data += ['!fake_remote_dafsa.bin']
4 changes: 2 additions & 2 deletions python/mozbuild/mozbuild/action/check_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
def get_output(*cmd):
env = dict(os.environ)
env[b'LC_ALL'] = b'C'
return subprocess.check_output(cmd, env=env, universal_newlines=True).splitlines()
return subprocess.check_output(cmd, env=env).splitlines()


class Skip(RuntimeError):
Expand Down Expand Up @@ -86,7 +86,7 @@ def iter_symbols(binary):
# platforms for static libraries, but its format is different for
# Windows .obj files, so the following won't work for them, but
# it currently doesn't matter.
if ty == UNKNOWN and open(binary, 'rb').read(8) == b'!<arch>\n':
if ty == UNKNOWN and open(binary).read(8) == '!<arch>\n':
ty = ELF
if ty in (ELF, MACHO):
for line in get_output(buildconfig.substs['LLVM_OBJDUMP'], '-t',
Expand Down
4 changes: 2 additions & 2 deletions python/mozbuild/mozbuild/action/dumpsymbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def dump_symbols(target, tracking_file, count_ctors=False):
if count_ctors:
args.append('--count-ctors')
print('Running: %s' % ' '.join(args))
out_files = subprocess.check_output(args, universal_newlines=True)
with open(tracking_file, 'w', encoding='utf-8', newline='\n') as fh:
out_files = subprocess.check_output(args)
with open(tracking_file, 'w') as fh:
fh.write(out_files)
fh.flush()

Expand Down
9 changes: 4 additions & 5 deletions python/mozbuild/mozbuild/action/fat_aar.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from __future__ import absolute_import, unicode_literals, print_function

import argparse
import six
import sys

from collections import (
Expand Down Expand Up @@ -71,7 +70,7 @@ def fat_aar(distdir, aars_paths, no_process=False, no_compatibility_check=False)
diffs['{}!/{}'.format(path, r)][fingerprint].append(arch)

else:
fingerprint = sha1(six.ensure_binary(fileobj.open().read())).hexdigest()
fingerprint = sha1(fileobj.open().read()).hexdigest()
# There's no need to distinguish `target.maven.zip` from `assets/omni.ja` here,
# since in practice they will never overlap.
diffs[path][fingerprint].append(arch)
Expand Down Expand Up @@ -100,9 +99,9 @@ def format_diffs(ds):
return '\n'.join(sorted(
' {archs} -> {fingerprint}'.format(archs=', '.join(sorted(archs)),
fingerprint=fingerprint)
for fingerprint, archs in ds.items()))
for fingerprint, archs in ds.iteritems()))

for p, ds in sorted(diffs.items()):
for p, ds in sorted(diffs.iteritems()):
if len(ds) <= 1:
# Only one hash across all inputs: roll on.
continue
Expand All @@ -114,7 +113,7 @@ def format_diffs(ds):

not_allowed[p] = ds

for p, ds in not_allowed.items():
for p, ds in not_allowed.iteritems():
print('Disallowed: Path "{path}" has architecture-specific versions:\n{ds_repr}'.format(
path=p, ds_repr=format_diffs(ds)))

Expand Down
2 changes: 1 addition & 1 deletion python/mozbuild/mozbuild/action/generate_symbols_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import argparse
import buildconfig
import os
from io import StringIO
from StringIO import StringIO
from mozbuild.preprocessor import Preprocessor
from mozbuild.util import DefinesAction

Expand Down
2 changes: 1 addition & 1 deletion python/mozbuild/mozbuild/action/process_define_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def define_for_name(name, val):
return define
defines = '\n'.join(sorted(
define_for_name(name, val)
for name, val in config.defines['ALLDEFINES'].items()))
for name, val in config.defines['ALLDEFINES'].iteritems()))
l = l[:m.start('cmd') - 1] \
+ defines + l[m.end('name'):]
elif cmd == 'define':
Expand Down
Loading

0 comments on commit 04f4db8

Please sign in to comment.