-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Up For Grabs: make installing the Git for Windows SDK as easy as cloning a repository #1357
Comments
This is now actually more urgent a project. It would be really nice if a volunteer could step up to do the job, as it is a pretty fun project, with next to no prior knowledge required (I will provide guidance, of course), and I personally do have a lot more non-fun projects to take care of in the meantime... |
I'm working on a series to implement this.
The problem I have with this: when would a developer who just cloned the SDK repo set this variable? |
Next question: are any proxy settings (especially |
Work in progress: https://github.com/bbolli/build-extra/commits/master |
Great!
True. Probably a Powershell script would make most sense, as that does not yet need the Bash, and therefore could even do things like set up the POSIX mqueue and stuff. OTOH I could also imagine that the best course of action would be to actually not clone anything, but just initialize the repositories and set up remotes (not fetching anything yet). And then we could introduce a shell function (maybe called
The code would be very light-weight and mostly hand off to
Good point. My thinking was to reuse the proxy helper introduced in (In this instance, I could imagine that we would look at config setting
Nice! How about opening a [DO-NOT-MERGE] Pull Request already, to make reviewing easier? We can always edit out that |
Let our developers-to-be get started in a less intimidating way. See the built-in help (`sdk help`) for its subcommands. This addresses git-for-windows/git#1357. Signed-off-by: Beat Bolli <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
Closed via git-for-windows/build-extra#171 |
The Git for Windows SDK [can now be "installed" via `git clone --depth=1 https://github.com/git-for-windows/git-sdk-64`](https://github.com/git-for-windows/git/issues/1357). Signed-off-by: Johannes Schindelin <[email protected]>
Currently, the Git for Windows SDK needs to be installed by running a self-extracting 7-Zip archive that eventually runs a
.bat
script to initialize our custom fork of MSYS2.This is a bit tedious, as many things can go wrong on the way:
pacman
has to know about itpacman
may want to update itself, which is a bit of a chicken-and-egg problempacman
repository (which really is a static website at https://repo.msys2.org) needs to be up and runningpacman
repository (hosted by BinTray) needs to be up and runningAnd even then, it is hard to assess how far along we are in the process.
The proposed solution
There is a silver lining on the horizon, though, as it should be a lot easier to install the SDK than this involved and fragile process
git-sdk-64.git
andgit-sdk-32.git
For the Continuous Testing of https://github.com/git/git, we already needed a more robust way to initialize and update Git for Windows SDKs. Imitating the way Git for Windows 1.x worked (whose SDK was called "msysgit", mistaken by many to be the end-user facing software), we have two repositories tracking the 64-bit and the 32-bit SDKs, respectively: https://github.com/git-for-windows/git-sdk-64 and https://github.com/git-for-windows/git-sdk-32
A trusty VSTS job keeps them up-to-date, at least once every 24h cycle, sometimes triggered manually (e.g. after updating a dependency).
The missing parts
These repositories already have most of what is needed to initialize a full Git for Windows SDK, but not quite:
/usr/src/build-extra
needs to be cloned,/usr/src/git
needs to be cloned (and optionally built & installed into the SDK)Outline: the new SDK "installer"
So while it is totally possible to clone https://github.com/git-for-windows/git-sdk-64 and then double-click
git-bash.exe
, this will only open a Git Bash but leave a couple of things missing. The way we could make sure that those things are not missing is by detecting their absence and installing them in a script at startup.Such a script already exists:
/etc/profile.d/git-sdk.sh
This file is present only in Git for Windows SDKs (installed via the
git-extra
package), and it is excluded from the Git for Windows installer, portable Git, MinGit, etcSo the idea is simple: extend that script to install the missing parts, namely
/usr/src/build-extra
/usr/src/git
(and build and install Git, unless it was already cloned)As with the current SDK installer, these steps should be guarded behind an
test -z "$JENKINS_URL" || { ... }
, to still allow installing the SDK into a Continuous Integration system where we may not want build-extra, git, and certainly not the shortcut.It is also conceivable to introduce a new environment variable, say,
GIT_SDK_OPTIONS
with space-separated options to turn those features off on demand.Document how to "install" the SDK in a
README.md
fileSo far, the
git-sdk-64
andgit-sdk-32
repositories do not have aREADME.md
file, which probably leaves occasional visitors wondering what those repositories are all about.These files would make for an excellent location to describe what those repositories represent, how they are to be used, how they can be extended, how they are maintained, etc
The text was updated successfully, but these errors were encountered: