From 2d22423c01b0ed8a1ed29552472c6d69e9ab678f Mon Sep 17 00:00:00 2001 From: "iannucci@chromium.org" Date: Fri, 1 Apr 2016 06:11:28 +0000 Subject: [PATCH] Add git rolling instructions directly to depot_tools. Also switches the download url to the non-deprecated gs direct download URL, and remove an ancient README.google that talked about software that's no longer distributed. R=dnj@chromium.org, agable@chromium.org, maruel@chromium.org, mmoss@chromium.org BUG=598958 Review URL: https://codereview.chromium.org/1851433005 . git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299622 0039d316-1c4b-4281-b951-d872f2087c98 --- bootstrap/win/README.google | 16 --------- bootstrap/win/README.md | 66 +++++++++++++++++++++++++++++++++++++ bootstrap/win/win_tools.bat | 2 +- 3 files changed, 67 insertions(+), 17 deletions(-) delete mode 100644 bootstrap/win/README.google create mode 100644 bootstrap/win/README.md diff --git a/bootstrap/win/README.google b/bootstrap/win/README.google deleted file mode 100644 index ba66c722b..000000000 --- a/bootstrap/win/README.google +++ /dev/null @@ -1,16 +0,0 @@ -Including the following third parties: - -7zip version 4.65 -7za.exe is a free software distributed under the GNU LGPL. -Read license.txt for more information. - -Source code of 7za.exe and 7-Zip can be found at -http://www.7-zip.org/ - -Note: packed with UPX to reduce code size. - - -wget 1.11.4 from http://www.gnu.org/software/wget/ - -Note: local compile without openssl support to reduce code size. -Note: packed with UPX to reduce code size. diff --git a/bootstrap/win/README.md b/bootstrap/win/README.md new file mode 100644 index 000000000..02d5a59ce --- /dev/null +++ b/bootstrap/win/README.md @@ -0,0 +1,66 @@ +# Windows binary tool bootstrap + +This directory has the 'magic' for the `depot_tools` windows binary update +mechanisms. + +## Software bootstrapped + * Python (https://www.python.org/) + * Git for Windows (https://git-for-windows.github.io/) + * Subversion (https://subversion.apache.org/) + +## Mechanism + +Any time a user runs `gclient` on windows, it will invoke the `depot_tools` +autoupdate script [depot_tools.bat](../../update_depot_tools.bat). This, in +turn, will run [win_tools.bat](./win_tools.bat), which does the bulk of the +work. + +`win_tools.bat` will successively look to see if the local version of the binary +package is present, and if so, if it's the expected version. If either of those +cases is not true, it will download and unpack the respective binary. + +Downloading is done with [get_file.js](./get_file.js), which is a windows script +host javascript utility to vaguely impersonate `wget`. + +Through a comedy of history, each binary is stored and retrieved differently. + +### Git + +Git installs are mirrored versions of the offical Git-for-Windows Portable +releases. + * Original: `https://github.com/git-for-windows/git/releases` + * Mirror: `gs://chrome-infra/PortableGit*.7z.exe` + +#### Updating git version + 1. Download the new `PortableGit-X.Y.Z-{32,64}.7z.exe` from the + git-for-windows release page. + 1. From either console.developers.google.com or the CLI, do: + 1. Upload those to the gs://chrome-infra Google Storage bucket. + 1. Set the `allUsers Reader` permission (click the "Public link" checkbox + next to the binaries). + 1. Edit the `set GIT_VERSION=X.Y.Z` line in `win_tools.bat` to be the new + version. + 1. At the time of writing, the first version is the default version, and + the second is the 'bleeding edge' version. You can use the bleeding edge + version to get early feedback/stage a rollout/etc. + 1. Commit the CL. + +Note that in order for the update to take effect, `gclient` currently needs to +run twice. The first time it will update the `depot_tools` repo, and the second +time it will see the new git version and update to it. This is a bug that should +be fixed, in case you're reading this and this paragraph infuriates you more +than the rest of this README. + +### Python + +Python installs are sourced from https://src.chromium.org/viewvc/chrome/trunk/tools/ . + +The process to create them is sort-of-documented in the README of the python +zip file. + +### Subversion + +Subversion installs are sourced from https://src.chromium.org/viewvc/chrome/trunk/tools/ . + +There will likely never be an update to SVN in `depot_tools` from the current +version. diff --git a/bootstrap/win/win_tools.bat b/bootstrap/win/win_tools.bat index f092be431..19ecb51ae 100644 --- a/bootstrap/win/win_tools.bat +++ b/bootstrap/win/win_tools.bat @@ -73,7 +73,7 @@ if not exist "%WIN_TOOLS_ROOT_DIR%\.git_bleeding_edge" ( ) set GIT_VERSION=%GIT_VERSION%-%OS_BITS% -set GIT_FETCH_URL=https://commondatastorage.googleapis.com/chrome-infra/PortableGit-%GIT_VERSION%-bit.7z.exe +set GIT_FETCH_URL=https://storage.googleapis.com/chrome-infra/PortableGit-%GIT_VERSION%-bit.7z.exe set GIT_DOWNLOAD_PATH=%ZIP_DIR%\git.7z.exe set GIT_BIN_DIR=git-%GIT_VERSION%_bin set GIT_INST_DIR=%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%