Re: [chromium-dev] Forking Chromium code base to internal repo

363 views
Skip to first unread message

dan...@chromium.org

unread,
Feb 13, 2017, 12:36:17 PM2/13/17
to panneer...@gmail.com, Chromium-dev
This seems like a standard git workflow, so you could just do this by checking out chromium and working from your local repo. Can you explain what you're trying to do that is not possible from there? What do you mean by "internal repo"?

On Sat, Feb 11, 2017 at 1:02 PM, Panneerselvam V. <panneer...@gmail.com> wrote:
I would like to fork chromium source to internal repo and start working on internal repo. When i fork, it should contain following:

1. History of previous commits with release branches and tags.
2. Should be able to rebase it.
3. Should be able to sync the code from internal repository and compile.
4. Going forward, i will link internal chromium version to work with Chromium Embedded Framework (CEF).

I googled for the guidance and could not find any relevant resources. Any guidance with specific commands will be helpful. 
Thanks!!!

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Sylvain Defresne

unread,
Feb 13, 2017, 12:53:43 PM2/13/17
to Chromium-dev
[Resent from the correct address].

As d...@chromium.org said, this is mostly working with git as usual. However, I would recommend that you avoid forking chromium source if possible. Chrome on iOS was started as a fork of chromium and stayed like that a long time until we've been able to open-source all our code. Working in a fork was painful to say the least.

If you cannot land the code directly in chromium (which would be the easiest as maintenance for you), I would encourage you to instead build on top of it. Create a new repository and then use .gclient to fetch both that repository and chromium source in the same hierarchy (see below). Then use gn variable root_extra_deps to configure additional targets to build in addition to what chromium builds.

Let say you have your addition in src/my_addition_on_top_of_chromium, then create a new git repository on one of your server, push all the history of src/my_addition_on_top_of_chromium there, and use the following .gclient:

$ cat .gclient
solutions = [
  {
    "name"        : "src",
    "deps_file"   : "DEPS",
    "managed"     : False,
    "custom_deps" : {},
    "safesync_url": "",
  },
  {
    "name"        : "src/my_addition_on_top_of_chromium",
    "url"         : "git://my.private.server/my_addition_on_top_of_chromium",
    "deps_file"   : "DEPS",
    "managed"     : False,
    "custom_deps" : {},
    "safesync_url": "",
  },
]
$ gclient sync

This will prevent you from making forks of individual files in chromium, so this gives you less power, but this will reduce the pain of keeping up-to-date with chromium pace.
-- Sylvain

Tony Arena

unread,
Sep 16, 2022, 10:48:17 PM9/16/22
to Chromium-dev, sdef...@chromium.org
I notice for example brave browser uses npm instead.. feels kinda shot to to use npm.. idk is using .gclient better?
Reply all
Reply to author
Forward
0 new messages