Commit 2bb2b389 authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Linux packager: Use gn_run_binary.py instead of custom scripts

R=thestig@chromium.org
TBR=michaelpg@chromium.org

Change-Id: Ie26a81bf7f3bbf0beaf64565ae703c5134c997e7
Reviewed-on: https://chromium-review.googlesource.com/685268Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504471}
parent f307d848
...@@ -156,7 +156,7 @@ action("strip_chrome_binary") { ...@@ -156,7 +156,7 @@ action("strip_chrome_binary") {
deps = [ deps = [
"//chrome", "//chrome",
] ]
script = "strip_chrome_binary.py" script = "//build/gn_run_binary.py"
sources = [ sources = [
prog_name, prog_name,
] ]
...@@ -166,9 +166,11 @@ action("strip_chrome_binary") { ...@@ -166,9 +166,11 @@ action("strip_chrome_binary") {
] ]
args = [ args = [
rebase_path("//third_party/eu-strip/bin/eu-strip", root_build_dir), rebase_path("//third_party/eu-strip/bin/eu-strip", root_build_dir),
rebase_path(prog_name, root_build_dir), "-o",
rebase_path(debug_file, root_build_dir),
rebase_path(stripped_file, root_build_dir), rebase_path(stripped_file, root_build_dir),
"-f",
rebase_path(debug_file, root_build_dir),
rebase_path(prog_name, root_build_dir),
] ]
} }
...@@ -365,7 +367,7 @@ template("linux_package") { ...@@ -365,7 +367,7 @@ template("linux_package") {
deb_target_name = "${target_name}_deb" deb_target_name = "${target_name}_deb"
action(deb_target_name) { action(deb_target_name) {
visibility = [ ":*" ] visibility = [ ":*" ]
script = "make_package.py" script = "//build/gn_run_binary.py"
if (current_cpu == "x86") { if (current_cpu == "x86") {
deb_arch = "i386" deb_arch = "i386"
...@@ -415,7 +417,7 @@ template("linux_package") { ...@@ -415,7 +417,7 @@ template("linux_package") {
rpm_target_name = "${target_name}_rpm" rpm_target_name = "${target_name}_rpm"
action(rpm_target_name) { action(rpm_target_name) {
visibility = [ ":*" ] visibility = [ ":*" ]
script = "make_package.py" script = "//build/gn_run_binary.py"
if (current_cpu == "x86") { if (current_cpu == "x86") {
rpm_arch = "i386" rpm_arch = "i386"
......
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Usage:
# make_package.py <shell_script> [<args_to_script>*]
import subprocess
import sys
if len(sys.argv) < 2:
print "Incorrect args."
sys.exit(1)
sys.exit(subprocess.call(["bash"] + sys.argv[1:]))
#!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import subprocess
import sys
if len(sys.argv) != 5:
print ("Usage: strip_chrome_binary.py /path/to/eu-strip /path/to/chrome"
"/path/to/chrome.debug /path/to/chrome.stripped")
sys.exit(1)
eu_strip = sys.argv[1]
chrome = sys.argv[2]
chrome_debug = sys.argv[3]
chrome_stripped = sys.argv[4]
sys.exit(subprocess.call([eu_strip, '-o', chrome_stripped, '-f', chrome_debug,
chrome]))
...@@ -38,7 +38,7 @@ action("strip_app_shell_binary") { ...@@ -38,7 +38,7 @@ action("strip_app_shell_binary") {
deps = [ deps = [
"//extensions/shell:app_shell", "//extensions/shell:app_shell",
] ]
script = "//chrome/installer/linux/strip_chrome_binary.py" script = "//build/gn_run_binary.py"
sources = [ sources = [
prog_name, prog_name,
] ]
...@@ -48,9 +48,11 @@ action("strip_app_shell_binary") { ...@@ -48,9 +48,11 @@ action("strip_app_shell_binary") {
] ]
args = [ args = [
rebase_path("//third_party/eu-strip/bin/eu-strip", root_build_dir), rebase_path("//third_party/eu-strip/bin/eu-strip", root_build_dir),
rebase_path(prog_name, root_build_dir), "-o",
rebase_path(debug_file, root_build_dir),
rebase_path(stripped_file, root_build_dir), rebase_path(stripped_file, root_build_dir),
"-f",
rebase_path(debug_file, root_build_dir),
rebase_path(prog_name, root_build_dir),
] ]
} }
...@@ -176,7 +178,7 @@ template("linux_package") { ...@@ -176,7 +178,7 @@ template("linux_package") {
deb_target_name = "${target_name}_deb" deb_target_name = "${target_name}_deb"
action(deb_target_name) { action(deb_target_name) {
visibility = [ ":*" ] visibility = [ ":*" ]
script = "//chrome/installer/linux/make_package.py" script = "//build/gn_run_binary.py"
deb_arch = "amd64" deb_arch = "amd64"
inputs = packaging_files_binaries inputs = packaging_files_binaries
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment