Commit Graph
8 Commits
Author SHA1 Message Date
Claudio DeSouza 6851fe3b8a [cr145] Adjust //chromium/installer/linux patches to refactor
There has been a significant refactor to this code done in upstream to
make it more python-like. This change corrects our patches to adjust to
the new expectations.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/d80c7ae95cd37bbdc1debc9fad8aab9de24f9847

commit d80c7ae95cd37bbdc1debc9fad8aab9de24f9847
Author: Tom Anderson <thomasanderson@chromium.org>
Date:   Thu Dec 11 17:03:39 2025 -0800

    Reland "Refactor chrome/installer/linux"

    This is a reland of commit db3d1a330291474e4d7b5001f89e0440e297f0df

    The reland dupes some code that shouldn't be shared by //remoting.

    Original change's description:
    > Refactor chrome/installer/linux
    >
    > No behavior changes. The built packages are bit-for-bit identical. The
    > original Python port of the shell scripts was a direct, literal
    > translation. This change aims to make the port more Pythonic.
    >
    > - Declarative Artifacts: Replaces the imperative file staging logic
    >   with a declarative list of Artifact objects. Each artifact defines
    >   its source, destination, type (binary, resource, icon, etc.), and
    >   permissions.
    > - InstallerConfig: Replaces the unstructured context dictionary
    >   with a typed InstallerConfig dataclass. This centralizes
    >   configuration, parsed arguments, and derived variables.
    > - Templating Engine: Switches from manual string replacement to
    >   Python's built-in string.Template. This necessitates updating all
    >   template files (deb, rpm, and common) to use the @@VARIABLE syntax
    >   (dropping the trailing @@) and accessing attributes directly from
    >   the config object (e.g., @@architecture instead of
    >   @@ARCHITECTURE@@).
    > - Type Hinting: Adds type annotations throughout installer.py,
    >   debian/build.py, and rpm/build.py.
    > - Modernization: Uses pathlib more extensively, adds a
    >   StagingContext manager for directory cleanup, and defines
    >   permission constants.
    >
    > Change-Id: Ib4954f5095790949f4d4c79de7af962141d8d5e5
    > Bug: None
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7214329
    > Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
    > Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
    > Commit-Queue: Lei Zhang <thestig@chromium.org>
    > Reviewed-by: Lei Zhang <thestig@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#1557645}

    Bug: None
    Change-Id: I8ec3abd52f56c34ac48c342e6f795276fbb0c92d
    Cq-Include-Trybots: luci.chrome.try:linux64-rel-ready
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7253206
    Reviewed-by: Lei Zhang <thestig@chromium.org>
    Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
    Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1557781}
2026-01-29 13:40:32 -05:00
Claudio DeSouza ac8d7ef938 [cr144] Linux install scripts ported to Python
Migrated patches to Python and used chromium_src overrides where feasible.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/f963b7ce99643de953636ba2ef4052daae2fc19a

commit f963b7ce99643de953636ba2ef4052daae2fc19a
Author: Tom Anderson <thomasanderson@chromium.org>
Date:   Tue Nov 25 23:56:57 2025 -0800

    Port linux install scripts to Python

    Linux package builds are reproducible, so I've verified the packages are
    identical under the following combinations of configurations:
      {deb, rpm}{stable, beta, dev, canary}{x64_unbraded_release,
      x64_branded_release, x64_branded_official, arm_unbranded_release}

    The motivation for this change is to improve maintainability and
    readability. The previous Bash scripts were becoming difficult to manage
    and extend. Python offers better string handling, error checking, and is
    more consistent with the rest of the Chromium build system.

    R=thestig

    Bug: None
    Change-Id: Id46cff3a15ef53a9d6e89f674bc852fcce9fe879
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7201054
    Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
    Reviewed-by: Lei Zhang <thestig@chromium.org>
    Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
    Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1550284}
2025-12-21 17:13:06 -05:00
Claudio DeSouza 94590f6d9e [cr133] Fix Linux installer appdata exclusion
For the Linux installer, Brave replaces the existing chromium files with
its own under `chromium_src/`, however these files were renamed
recently, which has broken the exclusion of the upstream files.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/8841ff9eebfb25115d9e84636ca39b16ff87a847

commit 8841ff9eebfb25115d9e84636ca39b16ff87a847
Author: Tom Anderson <thomasanderson@chromium.org>
Date:   Fri Dec 6 23:19:28 2024 +0000

    [Linux Packaging] Unify Chromium and Chrome appdata template

    Also there's only one file in the following directories:
    * chrome/installer/linux/common/chromium-browser
    * chrome/installer/linux/common/google-chrome
    So move the files out of the directories and into
    chrome/installer/linux/common.

    R=thestig

    Change-Id: I5cb76f98bd2e95ee24be9df0b4ec87631b5f0c18
    Bug: None
2025-01-27 09:41:14 -05:00
zenparsing 513b048e73 Remove the Brave Rewards extension 2022-10-19 16:07:33 -04:00
mkarolin 729b8b64a1 [Linux] Produce brave_sandbox.stripped for dist.
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/28d34ca057ce8d73d6976db899d547c12937b5fe

commit 28d34ca057ce8d73d6976db899d547c12937b5fe
Author: Michael Moss <mmoss@chromium.org>
Date:   Wed Dec 1 02:11:37 2021 +0000

    Add strip_binary() targets for all eu-strip processing.

    This moves all the Linux eu-strip processing from installer.include to
    separate BUILD targets, similar to the existing chrome binary processing
    (i.e. strip_chrome_binary). This will help ensure more consistent
    processing, and will allow the release builders to rely on explicit
    build targets to provide that processing, rather than just as a
    side-effect of Linux packaging.

    BUG=1260176
2022-01-24 15:39:12 -05:00
Anthony Tseng 4df791451b Cleanup installer.include patch 2020-09-11 17:03:24 -07:00
Anthony Tseng aee9231e9f Cleanup exising patches 2020-09-11 17:03:18 -07:00
Anthony Tseng 3b0be186c0 Create zip in deb building script 2020-09-11 17:00:10 -07:00