Backed out 3 changesets (bug 1197325) for adding a burning Cc(hfsplus) job
authorPhil Ringnalda <philringnalda@gmail.com>
Mon, 06 Feb 2017 20:04:55 -0800
changeset 387689 c028fc346ac9deffe65964390c0c4b0979fa5f8b
parent 387688 017a3a0d4a0016326821a54f5e8af909b7b4c075
child 387690 28f5dd10784202d1fb9b31548df0909eba8c25e6
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1197325
milestone54.0a1
backs out158233bce73892f5053d90076018719b3a48beb7
b5ac3fa0bbe7626abbe9b694a856eee05a879428
55a8ad127517bb1438bb3a58f592d6930de44ef5
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 3 changesets (bug 1197325) for adding a burning Cc(hfsplus) job CLOSED TREE Backed out changeset 158233bce738 (bug 1197325) Backed out changeset b5ac3fa0bbe7 (bug 1197325) Backed out changeset 55a8ad127517 (bug 1197325)
browser/config/tooltool-manifests/macosx64/cross-releng.manifest
build/macosx/cross-mozconfig.common
build/unix/build-hfsplus/build-hfsplus.sh
moz.configure
python/mozbuild/mozpack/dmg.py
taskcluster/ci/toolchain/linux.yml
taskcluster/scripts/misc/build-hfsplus-linux.sh
--- a/browser/config/tooltool-manifests/macosx64/cross-releng.manifest
+++ b/browser/config/tooltool-manifests/macosx64/cross-releng.manifest
@@ -36,24 +36,24 @@
 "size": 57060,
 "visibility": "public",
 "digest": "9649ca595f4cf088d118da26201f92cc94cda7af49c7c48112ee31cd13c83b2935b3e145de9dd78060cff2480b4c2e7ff5fb24235876956fed13c87852071998",
 "algorithm": "sha512",
 "unpack": true,
 "filename": "dmg.tar.xz"
 },
 {
+"size": 188880,
+"visibility": "public",
+"digest": "1ffddd43efb03aed897ee42035d9d8d758a8d66ab6c867599ef755e1a586768fc22011ce03698af61454920b00fe8bed08c9a681e7bd324d7f8f78c026c83943",
+"algorithm": "sha512",
+"unpack": true,
+"filename": "genisoimage.tar.xz"
+},
+{
 "version": "rustc 1.14.0 (e8a012324 2016-12-16) repack",
 "size": 152573516,
 "digest": "eef2f10bf57005d11c34b9b49eb76d0f09d026295055039fea89952a3be51580abdab29366278ed4bfa393b33c5cee4d51d3af4221e9e7d7d833d0fc1347597c",
 "algorithm": "sha512",
 "filename": "rustc.tar.xz",
 "unpack": true
-},
-{
-"size": 281576,
-"visibility": "public",
-"digest": "71616564533d138fb12f08e761c2638d054814fdf9c9439638ec57b201e100445c364d73d8d7a4f0e3b784898d5fe6264e8242863fc5ac40163f1791468bbc46",
-"algorithm": "sha512",
-"filename": "hfsplus-tools.tar.xz",
-"unpack": true
 }
 ]
--- a/build/macosx/cross-mozconfig.common
+++ b/build/macosx/cross-mozconfig.common
@@ -26,19 +26,18 @@ FLAGS="-target x86_64-apple-darwin10 -ml
 
 export CC="$topsrcdir/clang/bin/clang $FLAGS"
 export CXX="$topsrcdir/clang/bin/clang++ $FLAGS"
 export CPP="$topsrcdir/clang/bin/clang $FLAGS -E"
 export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
 export LDFLAGS="-Wl,-syslibroot,$CROSS_SYSROOT -Wl,-dead_strip"
 export TOOLCHAIN_PREFIX=$CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin10-
 export DSYMUTIL=$topsrcdir/clang/bin/llvm-dsymutil
-export MKFSHFS=$topsrcdir/hfsplus-tools/newfs_hfs
+export GENISOIMAGE=$topsrcdir/genisoimage/genisoimage
 export DMG_TOOL=$topsrcdir/dmg/dmg
-export HFS_TOOL=$topsrcdir/dmg/hfsplus
 
 export HOST_CC="$topsrcdir/clang/bin/clang"
 export HOST_CXX="$topsrcdir/clang/bin/clang++"
 export HOST_CPP="$topsrcdir/clang/bin/clang -E"
 export HOST_CFLAGS="-g"
 export HOST_CXXFLAGS="-g"
 export HOST_LDFLAGS="-g"
 
deleted file mode 100755
--- a/build/unix/build-hfsplus/build-hfsplus.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-set -x
-
-hfplus_version=540.1.linux3
-md5sum=0435afc389b919027b69616ad1b05709
-filename=diskdev_cmds-${hfplus_version}.tar.gz
-make_flags='-j$(getconf _NPROCESSORS_ONLN)'
-
-root_dir="$1"
-if [ -z "$root_dir" -o ! -d "$root_dir" ]; then
-  root_dir=$(mktemp -d)
-fi
-cd $root_dir
-
-if test -z $TMPDIR; then
-  TMPDIR=/tmp/
-fi
-
-# Install clang first
-yum install -y clang
-
-# Set an md5 check file to validate input
-echo "${md5sum} *${TMPDIR}/${filename}" > $TMPDIR/hfsplus.MD5
-
-# Most-upstream is https://opensource.apple.com/source/diskdev_cmds/
-
-# Download the source of the specified version of binutils
-wget -c -P $TMPDIR http://pkgs.fedoraproject.org/repo/pkgs/hfsplus-tools/${filename}/${md5sum}/${filename} || exit 1
-md5sum -c $TMPDIR/hfsplus.MD5 || exit 1
-mkdir hfsplus-source
-tar xzf $TMPDIR/${filename} -C hfsplus-source --strip-components=1
-
-# Build
-cd hfsplus-source
-make $make_flags || exit 1
-cd ..
-
-mkdir hfsplus-tools
-cp hfsplus-source/newfs_hfs.tproj/newfs_hfs hfsplus-tools/newfs_hfs
-## XXX fsck_hfs is unused, but is small and built from the package.
-cp hfsplus-source/fsck_hfs.tproj/fsck_hfs hfsplus-tools/fsck_hfs
-
-# Make a package of the built utils
-cd $root_dir
-tar caf $root_dir/hfsplus-tools.tar.xz hfsplus-tools
--- a/moz.configure
+++ b/moz.configure
@@ -248,27 +248,24 @@ tup = check_prog('TUP', tup_progs)
 check_prog('DOXYGEN', ('doxygen',), allow_missing=True)
 check_prog('XARGS', ('xargs',))
 
 @depends(target)
 def extra_programs(target):
     if target.kernel == 'Darwin':
         return namespace(
             DSYMUTIL=('dsymutil', 'llvm-dsymutil'),
-            MKFSHFS=('newfs_hfs', 'mkfs.hfsplus'),
-            HFS_TOOL=('hfsplus',)
+            GENISOIMAGE=('genisoimage',),
         )
     if target.os == 'GNU' and target.kernel == 'Linux':
         return namespace(RPMBUILD=('rpmbuild',))
 
 check_prog('DSYMUTIL', delayed_getattr(extra_programs, 'DSYMUTIL'),
            allow_missing=True)
-check_prog('MKFSHFS', delayed_getattr(extra_programs, 'MKFSHFS'),
-           allow_missing=True)
-check_prog('HFS_TOOL', delayed_getattr(extra_programs, 'HFS_TOOL'),
+check_prog('GENISOIMAGE', delayed_getattr(extra_programs, 'GENISOIMAGE'),
            allow_missing=True)
 check_prog('RPMBUILD', delayed_getattr(extra_programs, 'RPMBUILD'),
            allow_missing=True)
 
 option('--enable-system-hunspell',
        help="Use system hunspell (located with pkgconfig)")
 
 @depends('--enable-system-hunspell', compile_environment)
--- a/python/mozbuild/mozpack/dmg.py
+++ b/python/mozbuild/mozpack/dmg.py
@@ -1,23 +1,21 @@
 # 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/.
 
-import buildconfig
 import errno
 import mozfile
 import os
 import platform
 import shutil
 import subprocess
 
 is_linux = platform.system() == 'Linux'
 
-
 def mkdir(dir):
     if not os.path.isdir(dir):
         try:
             os.makedirs(dir)
         except OSError as e:
             if e.errno != errno.EEXIST:
                 raise
 
@@ -31,91 +29,60 @@ def rsync(source, dest):
     'rsync the contents of directory source into directory dest'
     # Ensure a trailing slash so rsync copies the *contents* of source.
     if not source.endswith('/'):
         source += '/'
     subprocess.check_call(['rsync', '-a', '--copy-unsafe-links',
                            source, dest])
 
 
-def set_folder_icon(dir, tmpdir):
+def set_folder_icon(dir):
     'Set HFS attributes of dir to use a custom icon'
     if not is_linux:
+        #TODO: bug 1197325 - figure out how to support this on Linux
         subprocess.check_call(['SetFile', '-a', 'C', dir])
-    else:
-        hfs = os.path.join(tmpdir, 'staged.hfs')
-        subprocess.check_call([
-            buildconfig.substs['HFS_TOOL'],  hfs, 'attr', '/', 'C'])
-
-
-def generate_hfs_file(stagedir, tmpdir, volume_name):
-    '''
-    When cross compiling, we zero fill an hfs file, that we will turn into
-    a DMG. To do so we test the size of the staged dir, and add some slight
-    padding to that.
-    '''
-    if is_linux:
-        hfs = os.path.join(tmpdir, 'staged.hfs')
-        output = subprocess.check_output(['du', '-s', stagedir])
-        size = (int(output.split()[0]) / 1000)  # Get in MB
-        size = int(size * 1.02)  # Bump the used size slightly larger.
-        # Setup a proper file sized out with zero's
-        subprocess.check_call(['dd', 'if=/dev/zero', 'of={}'.format(hfs),
-                               'bs=1M', 'count={}'.format(size)])
-        subprocess.check_call([
-            buildconfig.substs['MKFSHFS'], '-v', volume_name,
-            hfs])
-
-
-def create_app_symlink(stagedir, tmpdir):
-    '''
-    Make a symlink to /Applications. The symlink name is a space
-    so we don't have to localize it. The Applications folder icon
-    will be shown in Finder, which should be clear enough for users.
-    '''
-    if is_linux:
-        hfs = os.path.join(tmpdir, 'staged.hfs')
-        subprocess.check_call([
-            buildconfig.substs['HFS_TOOL'], hfs, 'symlink',
-            '/ ', '/Applications'])
-    else:
-        os.symlink('/Applications', os.path.join(stagedir, ' '))
 
 
 def create_dmg_from_staged(stagedir, output_dmg, tmpdir, volume_name):
     'Given a prepared directory stagedir, produce a DMG at output_dmg.'
     if not is_linux:
         # Running on OS X
         hybrid = os.path.join(tmpdir, 'hybrid.dmg')
         subprocess.check_call(['hdiutil', 'makehybrid', '-hfs',
                                '-hfs-volume-name', volume_name,
                                '-hfs-openfolder', stagedir,
                                '-ov', stagedir,
                                '-o', hybrid])
         subprocess.check_call(['hdiutil', 'convert', '-format', 'UDBZ',
                                '-imagekey', 'bzip2-level=9',
                                '-ov', hybrid, '-o', output_dmg])
     else:
-        hfs = os.path.join(tmpdir, 'staged.hfs')
+        import buildconfig
+        uncompressed = os.path.join(tmpdir, 'uncompressed.dmg')
         subprocess.check_call([
-            buildconfig.substs['HFS_TOOL'], hfs, 'addall', stagedir])
+            buildconfig.substs['GENISOIMAGE'],
+            '-V', volume_name,
+            '-D', '-R', '-apple', '-no-pad',
+            '-o', uncompressed,
+            stagedir
+        ])
         subprocess.check_call([
             buildconfig.substs['DMG_TOOL'],
-            'build',
-            hfs,
+            'dmg',
+            uncompressed,
             output_dmg
         ],
                               # dmg is seriously chatty
                               stdout=open(os.devnull, 'wb'))
 
-
 def check_tools(*tools):
     '''
     Check that each tool named in tools exists in SUBSTS and is executable.
     '''
+    import buildconfig
     for tool in tools:
         path = buildconfig.substs[tool]
         if not path:
             raise Exception('Required tool "%s" not found' % tool)
         if not os.path.isfile(path):
             raise Exception('Required tool "%s" not found at path "%s"' % (tool, path))
         if not os.access(path, os.X_OK):
             raise Exception('Required tool "%s" at path "%s" is not executable' % (tool, path))
@@ -128,25 +95,27 @@ def create_dmg(source_directory, output_
     Use volume_name as the disk image volume name, and
     use extra_files as a list of tuples of (filename, relative path) to copy
     into the disk image.
     '''
     if platform.system() not in ('Darwin', 'Linux'):
         raise Exception("Don't know how to build a DMG on '%s'" % platform.system())
 
     if is_linux:
-        check_tools('DMG_TOOL', 'MKFSHFS', 'HFS_TOOL')
+        check_tools('DMG_TOOL', 'GENISOIMAGE')
     with mozfile.TemporaryDirectory() as tmpdir:
         stagedir = os.path.join(tmpdir, 'stage')
         os.mkdir(stagedir)
         # Copy the app bundle over using rsync
         rsync(source_directory, stagedir)
         # Copy extra files
         for source, target in extra_files:
             full_target = os.path.join(stagedir, target)
             mkdir(os.path.dirname(full_target))
             shutil.copyfile(source, full_target)
-        generate_hfs_file(stagedir, tmpdir, volume_name)
-        create_app_symlink(stagedir, tmpdir)
+        # Make a symlink to /Applications. The symlink name is a space
+        # so we don't have to localize it. The Applications folder icon
+        # will be shown in Finder, which should be clear enough for users.
+        os.symlink('/Applications', os.path.join(stagedir, ' '))
         # Set the folder attributes to use a custom icon
-        set_folder_icon(stagedir, tmpdir)
+        set_folder_icon(stagedir)
         chmod(stagedir)
         create_dmg_from_staged(stagedir, output_dmg, tmpdir, volume_name)
--- a/taskcluster/ci/toolchain/linux.yml
+++ b/taskcluster/ci/toolchain/linux.yml
@@ -106,29 +106,8 @@ linux64-cctools-port/opt:
     worker:
         implementation: docker-worker
         docker-image: {in-tree: desktop-build}
         max-run-time: 36000
     when:
         files-changed:
             - 'taskcluster/scripts/misc/build-cctools-port.sh'
             - 'taskcluster/taskgraph/transforms/job/toolchain.py'
-
-linux64-hfsplus/opt:
-    description: "hfplus toolchain build"
-    treeherder:
-        kind: build
-        platform: linux64/opt
-        symbol: Cc(hfsplus)
-        tier: 1
-    run:
-        using: toolchain-script
-        script: build-hfsplus-linux.sh
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        implementation: docker-worker
-        docker-image: {in-tree: desktop-build}
-        max-run-time: 36000
-    when:
-        files-changed:
-            - 'build/unix/build-hfsplus/**'
-            - 'taskcluster/scripts/misc/build-hfsplus-linux.sh'
-            - 'taskcluster/taskgraph/transforms/job/toolchain.py'
deleted file mode 100755
--- a/taskcluster/scripts/misc/build-hfsplus-linux.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-set -x -e -v
-
-# This script is for building hfsplus for Linux.
-
-WORKSPACE=$HOME/workspace
-HOME_DIR=$WORKSPACE/build
-UPLOAD_DIR=$WORKSPACE/artifacts
-
-cd $HOME_DIR/src
-
-build/unix/build-hfsplus/build-hfsplus.sh $HOME_DIR
-
-# Put a tarball in the artifacts dir
-mkdir -p $UPLOAD_DIR
-cp $HOME_DIR/hfsplus-tools.tar.* $UPLOAD_DIR