Skip to content

Commit

Permalink
Backed out 3 changesets (bug 1197325) for adding a burning Cc(hfsplus…
Browse files Browse the repository at this point in the history
…) job

CLOSED TREE

Backed out changeset 158233bce738 (bug 1197325)
Backed out changeset b5ac3fa0bbe7 (bug 1197325)
Backed out changeset 55a8ad127517 (bug 1197325)
  • Loading branch information
philor committed Feb 7, 2017
1 parent 71cb8fa commit 0bf37ea
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 148 deletions.
16 changes: 8 additions & 8 deletions browser/config/tooltool-manifests/macosx64/cross-releng.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@
"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
}
]
3 changes: 1 addition & 2 deletions build/macosx/cross-mozconfig.common
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ 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++"
Expand Down
46 changes: 0 additions & 46 deletions build/unix/build-hfsplus/build-hfsplus.sh

This file was deleted.

7 changes: 2 additions & 5 deletions moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -253,17 +253,14 @@ 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)
Expand Down
69 changes: 19 additions & 50 deletions python/mozbuild/mozpack/dmg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# 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
Expand All @@ -12,7 +11,6 @@

is_linux = platform.system() == 'Linux'


def mkdir(dir):
if not os.path.isdir(dir):
try:
Expand All @@ -36,48 +34,11 @@ def rsync(source, dest):
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):
Expand All @@ -94,23 +55,29 @@ def create_dmg_from_staged(stagedir, output_dmg, tmpdir, volume_name):
'-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:
Expand All @@ -133,7 +100,7 @@ def create_dmg(source_directory, output_dmg, volume_name, extra_files):
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)
Expand All @@ -144,9 +111,11 @@ def create_dmg(source_directory, output_dmg, volume_name, 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)
21 changes: 0 additions & 21 deletions taskcluster/ci/toolchain/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,3 @@ linux64-cctools-port/opt:
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'
16 changes: 0 additions & 16 deletions taskcluster/scripts/misc/build-hfsplus-linux.sh

This file was deleted.

0 comments on commit 0bf37ea

Please sign in to comment.