Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts to build linux installer packages #28

Merged
merged 6 commits into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,10 @@ group("create_dist") {
if (is_mac) {
deps += [ "build/mac:create_dist_mac" ]
}
if (is_linux) {
deps += [
"//chrome/installer/linux",
]
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Copyright 2017 The Chromium Authors -->
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>brave-browser.desktop</id>
<update_contact>[email protected]</update_contact>
<metadata_license>CC0-1.0</metadata_license>
<project_license>BSD-3-Clause and LGPL-2.1+ and Apache-2.0 and IJG and MIT and GPL-2.0+ and ISC and OpenSSL and (MPL-1.1 or GPL-2.0 or LGPL-2.0)</project_license>
<name>Brave Browser</name>
<summary>The web browser from Brave.com</summary>
<description>
<p>
A browser with your interests at heart.
</p>
<p>
Browse faster by blocking ads and trackers that violate your privacy and cost you time and money.
</p>
</description>
<url type="homepage">https://brave.com/</url>
<translation/>
<developer_name>Brave Software</developer_name>
<url type="bugtracker">https://github.com/brave</url>
<url type="help">https://community.brave.com/</url>
</component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) 2009 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.
#
# This file provides common configuration information for building
# chromium-browser packages for various platforms.

# Base name of the package.
PACKAGE="brave-browser"

# Filename of the main executable (for generating launcher scripts, etc.)
PROGNAME=brave

# Base directory for package installation.
INSTALLDIR=/opt/brave.com/brave

# Display string for desktop menu/icon.
MENUNAME="Brave Web Browser"

# Brief package description.
SHORTDESC="The web browser from Brave"

# Detailed package description.
FULLDESC="Browse faster by blocking ads and trackers that violate your privacy and cost you time and money."

# Package maintainer information.
MAINTNAME="Brave Software"
MAINTMAIL="[email protected]"
PRODUCTURL="https://brave.com/"
24 changes: 20 additions & 4 deletions patches/chrome-installer-linux-BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn
index 225c6fd2669818225e1877ef21774b04abb1a6f3..d2ff71f0034dd2185d486816935979a3842a3ef8 100644
index 225c6fd2669818225e1877ef21774b04abb1a6f3..4a0a2ef64fdfc3c0b2b12d2c7718e414af456650 100644
--- a/chrome/installer/linux/BUILD.gn
+++ b/chrome/installer/linux/BUILD.gn
@@ -19,7 +19,7 @@ if (current_cpu == "x86" || current_cpu == "x64") {
@@ -19,11 +19,10 @@ if (current_cpu == "x86" || current_cpu == "x64") {
assert(is_linux)

packaging_files_executables = [
- "$root_out_dir/chrome",
- "$root_out_dir/chrome_sandbox",
+ "$root_out_dir/brave",
"$root_out_dir/chrome_sandbox",
+ "$root_out_dir/brave_sandbox",
]
packaging_files_shlibs = []
@@ -153,7 +153,7 @@ action("merge_rpm_dependencies") {
-
if (enable_nacl) {
packaging_files_executables += [
"$root_out_dir/nacl_helper",
@@ -153,7 +152,7 @@ action("merge_rpm_dependencies") {
}

action("strip_chrome_binary") {
Expand All @@ -20,3 +25,14 @@ index 225c6fd2669818225e1877ef21774b04abb1a6f3..d2ff71f0034dd2185d486816935979a3
debug_file = prog_name + ".debug"
stripped_file = prog_name + ".stripped"
deps = [
@@ -240,8 +239,8 @@ copy("common_packaging_files") {
]
} else {
sources += [
- "common/chromium-browser/chromium-browser.appdata.xml",
- "common/chromium-browser/chromium-browser.info",
+ "//brave/chromium_src/chrome/installer/linux/common/brave-browser/chromium-browser.appdata.xml",
+ "//brave/chromium_src/chrome/installer/linux/common/brave-browser/chromium-browser.info",
]
}

23 changes: 23 additions & 0 deletions patches/chrome-installer-linux-common-installer.include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/chrome/installer/linux/common/installer.include b/chrome/installer/linux/common/installer.include
index 4c460fc0244e7c1066e1abc3f3cacbfc92b1ed48..a595365da8685462f1cddfa807b89f93c67c0169 100644
--- a/chrome/installer/linux/common/installer.include
+++ b/chrome/installer/linux/common/installer.include
@@ -153,6 +153,9 @@ stage_install_common() {
install -m 644 "${BUILDDIR}/ui_resources_100_percent.pak" "${STAGEDIR}/${INSTALLDIR}/"
fi

+ # brave_resources.pak, contains customization, shields
+ install -m 644 "${BUILDDIR}/brave_resources.pak" "${STAGEDIR}/${INSTALLDIR}/"
+
# ICU data file; Necessary when the GN icu_use_data_file flag is true.
install -m 644 "${BUILDDIR}/icudtl.dat" "${STAGEDIR}/${INSTALLDIR}/"

@@ -359,7 +362,7 @@ stage_install_common() {
exit 1
fi
local expected_perms=777
- elif [ "${base_name}" = "chrome-sandbox" ]; then
+ elif [ "${base_name}" = "brave-sandbox" ]; then
local expected_perms=4755
elif [[ "${base_name}" = "nacl_irt_"*".nexe" ]]; then
local expected_perms=644
13 changes: 13 additions & 0 deletions patches/sandbox-linux-BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn
index 8c9cf2c9458ef538269e83fb5db4d1b02f91c142..2e542281aee7b8beccf5c94cb41e7e8b1bca0bdd 100644
--- a/sandbox/linux/BUILD.gn
+++ b/sandbox/linux/BUILD.gn
@@ -335,6 +335,8 @@ if (is_linux) {
# This is safe to delete unconditionally, because it is part of the
# default configs and empty when not using the sanitizers.
configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ]
+
+ output_name = "brave_sandbox"
}
}