Bug 1307886 - [1.2] Remove szip support. r=glandium

This commit is contained in:
Eugen Sawin 2016-10-18 17:45:10 +02:00
Родитель 9d1a87f0db
Коммит 5999591289
7 изменённых файлов: 0 добавлений и 93 удалений

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

@ -25,11 +25,6 @@ if [ ! -f /etc/redhat-release ] || [ "$(< /etc/redhat-release)" != "CentOS relea
mk_add_options "export PATH=$PATH:$topsrcdir/java_home/bin"
fi
# Set the most aggressive settings for szip. Not the default because it's
# much slower and we didn't want to slow down developers builds.
# Has no effect when MOZ_ENABLE_SZIP is not set in mobile/android/confvars.sh.
MOZ_SZIP_FLAGS="-D auto -f auto"
ac_add_options --enable-elf-hack
ANDROID_NDK_VERSION="r10e"

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

@ -5743,9 +5743,6 @@ AC_SUBST(MOZ_FOLD_LIBS)
AC_SUBST(MOZ_FOLD_LIBS_FLAGS)
AC_SUBST(SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE)
AC_SUBST(MOZ_ENABLE_SZIP)
AC_SUBST(MOZ_SZIP_FLAGS)
AC_SUBST(DMG_TOOL)
dnl Host JavaScript runtime, if any, to use during cross compiles.

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

@ -28,7 +28,6 @@ def package_fennec_apk(inputs=[], omni_ja=None, classes_dex=None,
lib_dirs=[],
assets_dirs=[],
features_dirs=[],
szip_assets_libs_with=None,
root_files=[],
verbose=False):
jarrer = Jarrer(optimize=False)
@ -65,17 +64,6 @@ def package_fennec_apk(inputs=[], omni_ja=None, classes_dex=None,
compress = None # Take default from Jarrer.
if p.endswith('.so'):
# Asset libraries are special.
if szip_assets_libs_with:
# We need to szip libraries before packing. The file
# returned by the finder is not yet opened. When it is
# opened, it will "see" the content updated by szip.
subprocess.check_output([szip_assets_libs_with,
mozpath.join(finder.base, p)])
if f.open().read(4) == 'SeZz':
# We need to store (rather than deflate) szipped libraries
# (even if we don't szip them ourselves).
compress = False
add(mozpath.join('assets', p), f, compress=compress)
for lib_dir in lib_dirs:
@ -113,9 +101,6 @@ def main(args):
help='Optional assets/ dirs to pack into APK file.')
parser.add_argument('--features-dirs', nargs='*', default=[],
help='Optional features/ dirs to pack into APK file.')
parser.add_argument('--szip-assets-libs-with', default=None,
help='IN PLACE szip assets/**/*.so BEFORE packing '
'into APK file using the given szip executable.')
parser.add_argument('--root-files', nargs='*', default=[],
help='Optional files to pack into APK file root.')
args = parser.parse_args(args)
@ -130,7 +115,6 @@ def main(args):
lib_dirs=args.lib_dirs,
assets_dirs=args.assets_dirs,
features_dirs=args.features_dirs,
szip_assets_libs_with=args.szip_assets_libs_with,
root_files=args.root_files,
verbose=args.verbose)
jarrer.copy(args.output)

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

@ -52,17 +52,6 @@ class RemoteCPPUnitTests(cppunittests.CPPUnitTests):
self.device.chmodDir(self.remote_bin_dir)
def push_libs(self):
if self.options.local_bin is not None:
szip = os.path.join(self.options.local_bin, '..', 'host', 'bin', 'szip')
if not os.path.exists(szip):
# Tinderbox builds must run szip from the test package
szip = os.path.join(self.options.local_bin, 'host', 'szip')
if not os.path.exists(szip):
# If the test package doesn't contain szip, it means files
# are not szipped in the test package.
szip = None
else:
szip = None
if self.options.local_apk:
with mozfile.TemporaryDirectory() as tmpdir:
apk_contents = ZipFile(self.options.local_apk)
@ -73,13 +62,6 @@ class RemoteCPPUnitTests(cppunittests.CPPUnitTests):
remote_file = posixpath.join(self.remote_bin_dir, os.path.basename(info.filename))
apk_contents.extract(info, tmpdir)
local_file = os.path.join(tmpdir, info.filename)
if szip:
try:
out = subprocess.check_output([szip, '-d', local_file], stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
print >> sys.stderr, "Error calling %s on %s.." % (szip, local_file)
if out:
print >> sys.stderr, out
self.device.pushFile(local_file, remote_file)
elif self.options.local_lib:
@ -88,13 +70,6 @@ class RemoteCPPUnitTests(cppunittests.CPPUnitTests):
print >> sys.stderr, "Pushing %s.." % file
remote_file = posixpath.join(self.remote_bin_dir, file)
local_file = os.path.join(self.options.local_lib, file)
if szip:
try:
out = subprocess.check_output([szip, '-d', local_file], stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
print >> sys.stderr, "Error calling %s on %s.." % (szip, local_file)
if out:
print >> sys.stderr, out
self.device.pushFile(local_file, remote_file)
# Additional libraries may be found in a sub-directory such as "lib/armeabi-v7a"
for subdir in ["assets", "lib"]:
@ -106,13 +81,6 @@ class RemoteCPPUnitTests(cppunittests.CPPUnitTests):
print >> sys.stderr, "Pushing %s.." % file
remote_file = posixpath.join(self.remote_bin_dir, file)
local_file = os.path.join(root, file)
if szip:
try:
out = subprocess.check_output([szip, '-d', local_file], stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
print >> sys.stderr, "Error calling %s on %s.." % (szip, local_file)
if out:
print >> sys.stderr, out
self.device.pushFile(local_file, remote_file)
def push_progs(self, progs):

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

@ -285,10 +285,6 @@ stage-gtest: make-stage-dir
cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/gtest
stage-android: make-stage-dir
ifdef MOZ_ENABLE_SZIP
# Tinderbox scripts are not unzipping everything, so the file needs to be in a directory it unzips
$(NSINSTALL) $(DIST)/host/bin/szip $(PKG_STAGE)/bin/host
endif
$(NSINSTALL) $(topsrcdir)/mobile/android/fonts $(DEPTH)/_tests/reftest
$(NSINSTALL) $(topsrcdir)/mobile/android/fonts $(DEPTH)/_tests/testing/mochitest

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

@ -443,17 +443,6 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
self.pushLibs()
def pushLibs(self):
if self.localBin is not None:
szip = os.path.join(self.localBin, '..', 'host', 'bin', 'szip')
if not os.path.exists(szip):
# Tinderbox builds must run szip from the test package
szip = os.path.join(self.localBin, 'host', 'szip')
if not os.path.exists(szip):
# If the test package doesn't contain szip, it means files
# are not szipped in the test package.
szip = None
else:
szip = None
pushed_libs_count = 0
if self.options.localAPK:
try:
@ -464,13 +453,6 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
remoteFile = remoteJoin(self.remoteBinDir, os.path.basename(info.filename))
self.localAPKContents.extract(info, dir)
localFile = os.path.join(dir, info.filename)
if szip:
try:
out = subprocess.check_output([szip, '-d', localFile], stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
print >> sys.stderr, "Error calling %s on %s.." % (szip, localFile)
if out:
print >> sys.stderr, out
self.device.pushFile(localFile, remoteFile)
pushed_libs_count += 1
finally:
@ -484,13 +466,6 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
print >> sys.stderr, "This is a big file, it could take a while."
localFile = os.path.join(self.localLib, file)
remoteFile = remoteJoin(self.remoteBinDir, file)
if szip:
try:
out = subprocess.check_output([szip, '-d', localFile], stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
print >> sys.stderr, "Error calling %s on %s.." % (szip, localFile)
if out:
print >> sys.stderr, out
self.device.pushFile(localFile, remoteFile)
pushed_libs_count += 1
@ -503,13 +478,6 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
print >> sys.stderr, "Pushing %s.." % file
localFile = os.path.join(root, file)
remoteFile = remoteJoin(self.remoteBinDir, file)
if szip:
try:
out = subprocess.check_output([szip, '-d', localFile], stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
print >> sys.stderr, "Error calling %s on %s.." % (szip, localFile)
if out:
print >> sys.stderr, out
self.device.pushFile(localFile, remoteFile)
pushed_libs_count += 1

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

@ -100,7 +100,6 @@ INNER_FENNEC_PACKAGE = \
--lib-dirs $(STAGEPATH)$(MOZ_PKG_DIR)/lib \
--assets-dirs $(STAGEPATH)$(MOZ_PKG_DIR)/assets \
--features-dirs $(STAGEPATH)$(MOZ_PKG_DIR)/features \
$(if $(COMPILE_ENVIRONMENT),$(if $(MOZ_ENABLE_SZIP),--szip-assets-libs-with $(ABS_DIST)/host/bin/szip)) \
--root-files $(foreach f,$(ROOT_FILES),$(STAGEPATH)$(MOZ_PKG_DIR)/$(f)) \
--output $(PACKAGE:.apk=-unsigned-unaligned.apk) && \
$(call RELEASE_SIGN_ANDROID_APK,$(PACKAGE:.apk=-unsigned-unaligned.apk),$(PACKAGE))