diff options
author | mal@chromium.org <mal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 09:59:05 +0000 |
---|---|---|
committer | mal@chromium.org <mal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 09:59:05 +0000 |
commit | 01b897429526efc1b6f82e1cea4d3695568239c1 (patch) | |
tree | 278060789a7d133eae81f3ebdc231b38aed0e8ea | |
parent | b0c6ad6c7328fb0dfe4f63bb89e2f15344987352 (diff) | |
download | chromium_src-01b897429526efc1b6f82e1cea4d3695568239c1.zip chromium_src-01b897429526efc1b6f82e1cea4d3695568239c1.tar.gz chromium_src-01b897429526efc1b6f82e1cea4d3695568239c1.tar.bz2 |
Merge 32879 - Make Linux packaging options more granular.
This allows us to not waste time building packages/channels we don't care about. Also added option to build new 'trunk' channel packages, which are a special configuration for developer testing.
Review URL: http://codereview.chromium.org/418021
TBR=mmoss@chromium.org
Review URL: http://codereview.chromium.org/438016
git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@32920 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/all.gyp | 2 | ||||
-rw-r--r-- | build/common.gypi | 5 | ||||
-rwxr-xr-x | chrome/chrome.gyp | 2 | ||||
-rw-r--r-- | chrome/installer/installer.gyp | 379 |
4 files changed, 285 insertions, 103 deletions
diff --git a/build/all.gyp b/build/all.gyp index 0a386ea..85c7c2c 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -82,7 +82,7 @@ 'conditions': [ ['branding=="Chrome"', { 'dependencies': [ - '../chrome/installer/installer.gyp:linux_packages', + '../chrome/installer/installer.gyp:linux_packages_<(channel)', ], }], ], diff --git a/build/common.gypi b/build/common.gypi index be89cdd..164e338 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -84,6 +84,11 @@ 'inside_chromium_build%': '<(inside_chromium_build)', 'fastbuild%': '<(fastbuild)', + # The release channel that this build targets. This is used to restrict + # channel-specific build options, like which installer packages to create. + # The default is 'all', which does no channel-specific filtering. + 'channel%': 'all', + # Override chromium_mac_pch and set it to 0 to suppress the use of # precompiled headers on the Mac. Prefix header injection may still be # used, but prefix headers will not be precompiled. This is useful when diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 650a1a1..fe67556 100755 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -3856,7 +3856,7 @@ 'conditions': [ ['branding=="Chrome"', { 'dependencies': [ - 'installer/installer.gyp:installer_util', + 'installer/installer.gyp:linux_installer_configs', ], }], ['selinux==0', { diff --git a/chrome/installer/installer.gyp b/chrome/installer/installer.gyp index 13f988f..41a056a 100644 --- a/chrome/installer/installer.gyp +++ b/chrome/installer/installer.gyp @@ -379,9 +379,11 @@ ], }], ['OS=="linux" and branding=="Chrome"', { - # Always google_chrome since this only applies to branding==Chrome. 'variables': { + # Always google_chrome since this only applies to branding==Chrome. 'branding_dir': '../app/theme/google_chrome', + 'version' : '<!(python <(version_py) -f ../../chrome/VERSION -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")', + 'revision' : '<!(python ../../build/util/lastchange.py | cut -d "=" -f 2)', 'packaging_files_common': [ 'linux/internal/common/apt.include', 'linux/internal/common/default-app.template', @@ -411,10 +413,37 @@ 'linux/internal/rpm/build.sh', 'linux/internal/rpm/chrome.spec.template', ], + 'packaging_files_binaries': [ + # TODO(mmoss) Any convenient way to get all the relevant build + # files? (e.g. all locales, resources, etc.) + '<(PRODUCT_DIR)/chrome', + '<(PRODUCT_DIR)/chrome.pak', + '<(PRODUCT_DIR)/chrome_sandbox', + '<(PRODUCT_DIR)/libffmpegsumo.so', + '<(PRODUCT_DIR)/xdg-settings', + '<(PRODUCT_DIR)/locales/en-US.pak', + ], + 'flock_bash': ['flock', '--', '/tmp/linux_package_lock', 'bash'], + 'deb_build': '<(PRODUCT_DIR)/installer/debian/build.sh', + 'rpm_build': '<(PRODUCT_DIR)/installer/rpm/build.sh', + 'deb_cmd': ['<@(flock_bash)', '<(deb_build)', '-o' '<(PRODUCT_DIR)', + '-b', '<(PRODUCT_DIR)', '-a', '<(target_arch)'], + 'rpm_cmd': ['<@(flock_bash)', '<(rpm_build)', '-o' '<(PRODUCT_DIR)', + '-b', '<(PRODUCT_DIR)', '-a', '<(target_arch)'], + 'conditions': [ + ['target_arch=="ia32"', { + 'deb_arch': 'i386', + 'rpm_arch': 'i386', + }], + ['target_arch=="x64"', { + 'deb_arch': 'amd64', + 'rpm_arch': 'x86_64', + }], + ], }, 'targets': [ { - 'target_name': 'installer_util', + 'target_name': 'linux_installer_configs', 'type': 'none', # Add these files to the build output so the build archives will be # "hermetic" for packaging. This is only for branding="Chrome" since @@ -481,47 +510,120 @@ ], }, { - 'target_name': 'linux_packages', + 'target_name': 'linux_packages_all', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + 'linux_packages_unstable', + 'linux_packages_beta', + 'linux_packages_stable', + ], + }, + { + # 'trunk' is a developer, testing-only package, so it shouldn't be + # included in the 'linux_packages_all' collection. + 'target_name': 'linux_packages_trunk', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + 'linux_packages_trunk_deb', + ], + # ChromeOS doesn't care about RPM packages. + 'conditions': [ + ['chromeos==0 and toolkit_views==0', { + 'dependencies': [ + 'linux_packages_trunk_rpm', + ], + }], + ], + }, + { + 'target_name': 'linux_packages_unstable', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + 'linux_packages_unstable_deb', + ], + # ChromeOS doesn't care about RPM packages. + 'conditions': [ + ['chromeos==0 and toolkit_views==0', { + 'dependencies': [ + 'linux_packages_unstable_rpm', + ], + }], + ], + }, + { + 'target_name': 'linux_packages_beta', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + 'linux_packages_beta_deb', + ], + # ChromeOS doesn't care about RPM packages. + 'conditions': [ + ['chromeos==0 and toolkit_views==0', { + 'dependencies': [ + 'linux_packages_beta_rpm', + ], + }], + ], + }, + { + 'target_name': 'linux_packages_stable', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + 'linux_packages_stable_deb', + ], + # ChromeOS doesn't care about RPM packages. + 'conditions': [ + ['chromeos==0 and toolkit_views==0', { + 'dependencies': [ + 'linux_packages_stable_rpm', + ], + }], + ], + }, + # TODO(mmoss) gyp looping construct would be handy here ... + # These package actions are the same except for the 'channel' variable. + { + 'target_name': 'linux_packages_trunk_deb', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + '../chrome.gyp:chrome', + 'linux_installer_configs', + ], + 'actions': [ + { + 'variables': { + 'channel': 'trunk', + }, + 'action_name': 'deb_packages_<(channel)', + 'process_outputs_as_sources': 1, + 'inputs': [ + '<(deb_build)', + '<@(packaging_files_binaries)', + '<@(packaging_files_common)', + '<@(packaging_files_deb)', + ], + 'outputs': [ + '<(PRODUCT_DIR)/google-chrome-<(channel)_<(version)-r<(revision)_<(deb_arch).deb', + ], + 'action': [ '<@(deb_cmd)', '-c', '<(channel)', ], + }, + ], + }, + { + 'target_name': 'linux_packages_unstable_deb', 'suppress_wildcard': 1, 'type': 'none', 'dependencies': [ '../chrome.gyp:chrome', + 'linux_installer_configs', ], - 'variables': { - 'version' : '<!(python <(version_py) -f ../../chrome/VERSION -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")', - 'revision' : '<!(python ../../build/util/lastchange.py | cut -d "=" -f 2)', - 'input_files': [ - # TODO(mmoss) Any convenient way to get all the relevant build - # files? (e.g. all locales, resources, etc.) - '<(PRODUCT_DIR)/chrome', - '<(PRODUCT_DIR)/chrome.pak', - '<(PRODUCT_DIR)/chrome_sandbox', - '<(PRODUCT_DIR)/libffmpegsumo.so', - '<(PRODUCT_DIR)/xdg-settings', - '<(PRODUCT_DIR)/locales/en-US.pak', - ], - 'flock_bash': ['flock', '--', '/tmp/linux_package_lock', 'bash'], - 'deb_build': '<(PRODUCT_DIR)/installer/debian/build.sh', - 'rpm_build': '<(PRODUCT_DIR)/installer/rpm/build.sh', - 'deb_cmd': ['<@(flock_bash)', '<(deb_build)', '-o' '<(PRODUCT_DIR)', - '-b', '<(PRODUCT_DIR)', '-a', '<(target_arch)'], - 'rpm_cmd': ['<@(flock_bash)', '<(rpm_build)', '-o' '<(PRODUCT_DIR)', - '-b', '<(PRODUCT_DIR)', '-a', '<(target_arch)'], - 'conditions': [ - ['target_arch=="ia32"', { - 'deb_arch': 'i386', - 'rpm_arch': 'i386', - }], - ['target_arch=="x64"', { - 'deb_arch': 'amd64', - 'rpm_arch': 'x86_64', - }], - ], - }, 'actions': [ - # TODO(mmoss) gyp looping construct would be handy here ... - # These deb_packages* and rpm_packages* actions are the same except - # for the 'channel' variable. { 'variables': { 'channel': 'unstable', @@ -530,7 +632,7 @@ 'process_outputs_as_sources': 1, 'inputs': [ '<(deb_build)', - '<@(input_files)', + '<@(packaging_files_binaries)', '<@(packaging_files_common)', '<@(packaging_files_deb)', ], @@ -539,6 +641,17 @@ ], 'action': [ '<@(deb_cmd)', '-c', '<(channel)', ], }, + ], + }, + { + 'target_name': 'linux_packages_beta_deb', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + '../chrome.gyp:chrome', + 'linux_installer_configs', + ], + 'actions': [ { 'variables': { 'channel': 'beta', @@ -547,7 +660,7 @@ 'process_outputs_as_sources': 1, 'inputs': [ '<(deb_build)', - '<@(input_files)', + '<@(packaging_files_binaries)', '<@(packaging_files_common)', '<@(packaging_files_deb)', ], @@ -556,6 +669,17 @@ ], 'action': [ '<@(deb_cmd)', '-c', '<(channel)', ], }, + ], + }, + { + 'target_name': 'linux_packages_stable_deb', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + '../chrome.gyp:chrome', + 'linux_installer_configs', + ], + 'actions': [ { 'variables': { 'channel': 'stable', @@ -564,7 +688,7 @@ 'process_outputs_as_sources': 1, 'inputs': [ '<(deb_build)', - '<@(input_files)', + '<@(packaging_files_binaries)', '<@(packaging_files_common)', '<@(packaging_files_deb)', ], @@ -574,68 +698,121 @@ 'action': [ '<@(deb_cmd)', '-c', '<(channel)', ], }, ], - 'conditions': [ - ['chromeos==0 and toolkit_views==0', { - 'actions': [ - { - 'variables': { - 'channel': 'unstable', - }, - 'action_name': 'rpm_packages_<(channel)', - 'process_outputs_as_sources': 1, - 'inputs': [ - '<(rpm_build)', - '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template', - '<@(input_files)', - '<@(packaging_files_common)', - '<@(packaging_files_rpm)', - ], - 'outputs': [ - '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-<(revision).<(rpm_arch).rpm', - ], - 'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ], - }, - { - 'variables': { - 'channel': 'beta', - }, - 'action_name': 'rpm_packages_<(channel)', - 'process_outputs_as_sources': 1, - 'inputs': [ - '<(rpm_build)', - '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template', - '<@(input_files)', - '<@(packaging_files_common)', - '<@(packaging_files_rpm)', - ], - 'outputs': [ - '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-<(revision).<(rpm_arch).rpm', - ], - 'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ], - }, - { - 'variables': { - 'channel': 'stable', - }, - 'action_name': 'rpm_packages_<(channel)', - 'process_outputs_as_sources': 1, - 'inputs': [ - '<(rpm_build)', - '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template', - '<@(input_files)', - '<@(packaging_files_common)', - '<@(packaging_files_rpm)', - ], - 'outputs': [ - '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-<(revision).<(rpm_arch).rpm', - ], - 'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ], - }, + }, + { + 'target_name': 'linux_packages_trunk_rpm', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + '../chrome.gyp:chrome', + 'linux_installer_configs', + ], + 'actions': [ + { + 'variables': { + 'channel': 'trunk', + }, + 'action_name': 'rpm_packages_<(channel)', + 'process_outputs_as_sources': 1, + 'inputs': [ + '<(rpm_build)', + '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template', + '<@(packaging_files_binaries)', + '<@(packaging_files_common)', + '<@(packaging_files_rpm)', ], - }], - ['target_arch=="x64"', { - # TODO(mmoss) 64-bit RPMs not ready yet. - }], + 'outputs': [ + '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-<(revision).<(rpm_arch).rpm', + ], + 'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ], + }, + ], + }, + { + 'target_name': 'linux_packages_unstable_rpm', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + '../chrome.gyp:chrome', + 'linux_installer_configs', + ], + 'actions': [ + { + 'variables': { + 'channel': 'unstable', + }, + 'action_name': 'rpm_packages_<(channel)', + 'process_outputs_as_sources': 1, + 'inputs': [ + '<(rpm_build)', + '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template', + '<@(packaging_files_binaries)', + '<@(packaging_files_common)', + '<@(packaging_files_rpm)', + ], + 'outputs': [ + '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-<(revision).<(rpm_arch).rpm', + ], + 'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ], + }, + ], + }, + { + 'target_name': 'linux_packages_beta_rpm', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + '../chrome.gyp:chrome', + 'linux_installer_configs', + ], + 'actions': [ + { + 'variables': { + 'channel': 'beta', + }, + 'action_name': 'rpm_packages_<(channel)', + 'process_outputs_as_sources': 1, + 'inputs': [ + '<(rpm_build)', + '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template', + '<@(packaging_files_binaries)', + '<@(packaging_files_common)', + '<@(packaging_files_rpm)', + ], + 'outputs': [ + '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-<(revision).<(rpm_arch).rpm', + ], + 'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ], + }, + ], + }, + { + 'target_name': 'linux_packages_stable_rpm', + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + '../chrome.gyp:chrome', + 'linux_installer_configs', + ], + 'actions': [ + { + 'variables': { + 'channel': 'stable', + }, + 'action_name': 'rpm_packages_<(channel)', + 'process_outputs_as_sources': 1, + 'inputs': [ + '<(rpm_build)', + '<(PRODUCT_DIR)/installer/rpm/chrome.spec.template', + '<@(packaging_files_binaries)', + '<@(packaging_files_common)', + '<@(packaging_files_rpm)', + ], + 'outputs': [ + '<(PRODUCT_DIR)/google-chrome-<(channel)-<(version)-<(revision).<(rpm_arch).rpm', + ], + 'action': [ '<@(rpm_cmd)', '-c', '<(channel)', ], + }, ], }, ], |