diff --git a/README.md b/README.md index 5553ae67ad..4d28bf6c72 100644 --- a/README.md +++ b/README.md @@ -20,19 +20,19 @@ The build environment brings all the necessary parts required to build a Git for The most important part of Git for Windows is [Git](https://git-scm.com/), obviously. The Git for Windows project maintains [a friendly fork](https://github.com/git-for-windows/git) of the "upstream" [Git project](https://github.com/git/git). The idea is that the Git for Windows repository serves as a test bed to develop patches and patch series that are specific to the Windows port, and once the patches stabilized, they are [submitted upstream](https://github.com/git-for-windows/git/tree/master/Documentation/SubmittingPatches). -## MSys2 +## MSYS2 Git is not a monolithic executable, but consists of a couple of executables written in C, a couple of Bash scripts, a couple of Perl scripts, and a couple of Tcl/Tk scripts. Some parts (not supported by Git for Windows yet) are written in other script languages, still. -To support those scripts, Git for Windows uses [MSys2](https://msys2.github.io/), a project providing a minimal POSIX emulation layer (based on [Cygwin](https://cygwin.com)), a package management system (named "Pacman", borrowed from Arch Linux) and a number of packages that are kept up-to-date by an active team of maintainers, including Bash, Perl, Subversion, etc. +To support those scripts, Git for Windows uses [MSYS2](https://msys2.github.io/), a project providing a minimal POSIX emulation layer (based on [Cygwin](https://cygwin.com)), a package management system (named "Pacman", borrowed from Arch Linux) and a number of packages that are kept up-to-date by an active team of maintainers, including Bash, Perl, Subversion, etc. -### The difference between MSys2 and MinGW +### The difference between MSYS2 and MinGW -MSys2 refers to the libraries and programs that use the POSIX emulation layer ("msys2 runtime", derived from Cygwin's `cygwin1.dll`). It is very easy to port libraries and programs from Unix/Linux because most of the POSIX semantics is emulated reasonably well, for example [the `fork()` function](http://pubs.opengroup.org/onlinepubs/000095399/functions/fork.html). Bash and Perl are examples of MSys2 programs. +MSYS2 refers to the libraries and programs that use the POSIX emulation layer ("msys2 runtime", derived from Cygwin's `cygwin1.dll`). It is very easy to port libraries and programs from Unix/Linux because most of the POSIX semantics is emulated reasonably well, for example [the `fork()` function](http://pubs.opengroup.org/onlinepubs/000095399/functions/fork.html). Bash and Perl are examples of MSYS2 programs. MinGW refers to libraries and programs that are compiled using GNU tools but do not require any POSIX semantics, instead relying on the standard Win32 API and the C runtime library. MinGW stands for "Minimal GNU for Windows". Examples: cURL (a library to talk to remote servers via HTTP(S), (S)FTP, etc), emacs, Inkscape, etc -The POSIX emulation layer of MSys2 binaries is convenient, but comes at a cost: Typically, MSys2 programs are noticably slower than their MinGW counterparts (if there are such counterparts). As a consequence, the Git for Windows project tries to provide as many components as possible as MinGW binaries. +The POSIX emulation layer of MSYS2 binaries is convenient, but comes at a cost: Typically, MSYS2 programs are noticably slower than their MinGW counterparts (if there are such counterparts). As a consequence, the Git for Windows project tries to provide as many components as possible as MinGW binaries. ### MinGW packages @@ -48,9 +48,9 @@ The packages inside the `/usr/src/MINGW-packages/` directory can then be built b MinGW packages can be built for both `i686` and `x86_64` architectures at the same time by making sure that both toolchains are installed (`pacman -Sy mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain`) before running `makepkg-mingw`. -### MSys2 packages +### MSYS2 packages -The MSys2 packages are built from the `MSYS2-packages` repository which can be initialized in the Git SDK Bash via +The MSYS2 packages are built from the `MSYS2-packages` repository which can be initialized in the Git SDK Bash via ```sh cd /usr/src/MSYS2-packages @@ -58,7 +58,7 @@ git fetch git checkout master ``` -To build the packages inside the `/usr/src/MSYS2-packages/` directory, the user has to launch a special shell by double-clicking the `msys2_shell.bat` script in the top-level directory of the Git SDK, switch the working directory to the appropriate subdirectory of `/usr/src/MSYS2-packages/` and then execute `makepkg -s`. Before the first MSys2 package is built, the prerequisite development packages have to be installed by executing `pacman -Sy base-devel binutils`. +To build the packages inside the `/usr/src/MSYS2-packages/` directory, the user has to launch a special shell by double-clicking the `msys2_shell.bat` script in the top-level directory of the Git SDK, switch the working directory to the appropriate subdirectory of `/usr/src/MSYS2-packages/` and then execute `makepkg -s`. Before the first MSYS2 package is built, the prerequisite development packages have to be installed by executing `pacman -Sy base-devel binutils`. ## Installer generators diff --git a/get-sources.sh b/get-sources.sh index 153b449049..c78d7d06c9 100644 --- a/get-sources.sh +++ b/get-sources.sh @@ -62,7 +62,7 @@ do ;; esac - # Work around mismatched version uploaded in MSys2 + # Work around mismatched version uploaded in MSYS2 case $name-$version in dash-0.5.8-1) version=0.5.8-2;; mingw-w64-*-antiword-0.37-2) version=0.37-1;; diff --git a/installer/ReleaseNotes.md b/installer/ReleaseNotes.md index 66915d0580..06d48fa1e7 100644 --- a/installer/ReleaseNotes.md +++ b/installer/ReleaseNotes.md @@ -30,7 +30,7 @@ Git is licensed under the GNU Public License version 2. Git for Windows also contains Embedded CAcert Root Certificates. For more information please go to [https://www.cacert.org/policy/RootDistributionLicense.php](https://www.cacert.org/policy/RootDistributionLicense.php). -This package contains software from a number of other projects including Bash, zlib, curl, msmtp, tcl/tk, perl, MSys2 and a number of libraries and utilities from the GNU project, licensed under the GNU Public License. Likewise, it contains Perl which is dual licensed under the GNU Public License and the Artistic License. +This package contains software from a number of other projects including Bash, zlib, curl, msmtp, tcl/tk, perl, MSYS2 and a number of libraries and utilities from the GNU project, licensed under the GNU Public License. Likewise, it contains Perl which is dual licensed under the GNU Public License and the Artistic License. ## Changes since Git for Windows v2.7.1(2) (February 12th 2016) @@ -74,7 +74,7 @@ This package contains software from a number of other projects including Bash, z * When installing as administrator, we [no longer offer the option to install quiicklaunch icons](https://github.com/git-for-windows/build-extra/commit/a13ffd7c3fa24e2ac1ef3561d7a7f09a0b924338) because quicklaunch icons can only be installed per-user. * If a `~/.bashrc` is detected without a `~/.bash_profile`, the generated file will now [also source `~/.profile` if that exists](https://github.com/git-for-windows/build-extra/pull/91). -* The environment variable `HOME` can now be used to set the home directory [even when running with accounts that are part of a different domain than the current (non-domain-joined) machine](https://github.com/git-for-windows/msys2-runtime/commit/9660c5ffe82b921dd2193efa18e9721f47a6b22f) (in which case the MSys2 runtime has no way to emulate POSIX-style UIDs). +* The environment variable `HOME` can now be used to set the home directory [even when running with accounts that are part of a different domain than the current (non-domain-joined) machine](https://github.com/git-for-windows/msys2-runtime/commit/9660c5ffe82b921dd2193efa18e9721f47a6b22f) (in which case the MSYS2 runtime has no way to emulate POSIX-style UIDs). * Git [can now fetch and push via HTTPS](https://github.com/Alexpux/MINGW-packages/pull/986) even when the `http.sslCAInfo` config variable was unset. * Git for Windows is now [handling the case gracefully where the current user has no permission to list the parent of the current directory](https://github.com/git-for-windows/git/pull/606). * More file locking issues ("Unlink of file ... failed. Should I try again?") [were fixed](https://github.com/git-for-windows/git/issues/500). @@ -94,7 +94,7 @@ This package contains software from a number of other projects including Bash, z ### New Features * Comes with [Git v2.6.4](http://article.gmane.org/gmane.linux.kernel/2103498). -* Also available as `.tar.bz2` packages (you need an MSys2/Cygwin-compatible unpacker to recreate the symbolic links correctly). +* Also available as `.tar.bz2` packages (you need an MSYS2/Cygwin-compatible unpacker to recreate the symbolic links correctly). ## Bug Fixes @@ -209,7 +209,7 @@ This package contains software from a number of other projects including Bash, z ### Bug Fixes -* The MSys2 runtime was taught [not to look hard for groups](https://github.com/git-for-windows/git/issues/193), speeding up *Git Bash*'s startup time. +* The MSYS2 runtime was taught [not to look hard for groups](https://github.com/git-for-windows/git/issues/193), speeding up *Git Bash*'s startup time. * A [work around](https://github.com/git-for-windows/git/issues/361) was added for [issues](https://github.com/git-for-windows/git/wiki/32-bit-issues) when installing 32-bit Git for Windows on 64-bit Windows 10. * The installer [no longer freezes](https://github.com/git-for-windows/git/issues/351) when there are interactive commands in the user's `.profile`. * `git rebase --skip` [was speeded up again](https://github.com/git-for-windows/git/issues/365). @@ -341,8 +341,8 @@ This package contains software from a number of other projects including Bash, z ### Bug Fixes * Fixed a regression where *Git Bash* would not start properly on Windows XP * Tab completion works like on Linux and MacOSX (double-Tab required to show ambiguous completions) -* In 32-bit setups, all the MSys2 `.dll`'s address ranges are adjusted ("auto-rebased") as part of the installation process -* The post-install scripts of MSys2 are now executed as part of the installation process, too +* In 32-bit setups, all the MSYS2 `.dll`'s address ranges are adjusted ("auto-rebased") as part of the installation process +* The post-install scripts of MSYS2 are now executed as part of the installation process, too * All files that are part of the installation will now be registered so they are deleted upon uninstall ## Changes since Git-2.3.6-preview20150425 @@ -371,7 +371,7 @@ This package contains software from a number of other projects including Bash, z ### New Features * Comes with Git 2.3.5 plus Windows-specific patches. -* First release based on [MSys2](https://msys2.github.io/). +* First release based on [MSYS2](https://msys2.github.io/). * Support for 64-bit! ### Backwards-incompatible changes diff --git a/installer/install.iss b/installer/install.iss index cf063f9db0..109d45bd1d 100644 --- a/installer/install.iss +++ b/installer/install.iss @@ -903,7 +903,7 @@ begin RdbBashTerminal[GB_MinTTY]:=TRadioButton.Create(BashTerminalPage); with RdbBashTerminal[GB_MinTTY] do begin Parent:=BashTerminalPage.Surface; - Caption:='Use MinTTY (the default terminal of MSys2)'; + Caption:='Use MinTTY (the default terminal of MSYS2)'; Left:=ScaleX(4); Top:=ScaleY(8); Width:=ScaleX(405); diff --git a/pacman-helper.sh b/pacman-helper.sh index 30a64a0b9f..a6dbc1b8ca 100755 --- a/pacman-helper.sh +++ b/pacman-helper.sh @@ -31,7 +31,7 @@ die () { fifo_find="/var/tmp/disowned.find" fifo_pacman="/var/tmp/disowned.pacman" -# MSys2's mingw-w64-$arch-ca-certificates seem to lag behind ca-certificates +# MSYS2's mingw-w64-$arch-ca-certificates seem to lag behind ca-certificates CURL_CA_BUNDLE=/usr/ssl/certs/ca-bundle.crt export CURL_CA_BUNDLE diff --git a/please.sh b/please.sh index cba5047361..238a5a6da2 100644 --- a/please.sh +++ b/please.sh @@ -569,7 +569,7 @@ upload () { # # Here, we exploit the fact that the 64-bit SDK is either the only # SDK where the package was built (MinGW) or it agrees with thw 32-bit - # SDK's build product (MSys2). + # SDK's build product (MSYS2). (cd "$sdk64/$path" && test -z "$(git rev-list @{u}..)" || if test refs/heads/master = \ diff --git a/sdk-installer/release.sh b/sdk-installer/release.sh index b05ded67c9..3a5e92dfbb 100755 --- a/sdk-installer/release.sh +++ b/sdk-installer/release.sh @@ -8,7 +8,7 @@ test -z "$1" && { } die () { - echo "$*" >&1 + echo "$*" >&2 exit 1 } @@ -49,17 +49,35 @@ sed -e 's/^#\(XferCommand.*curl\).*/\1 --anyauth -C - -L -f %u >%o/' \ "$FAKEROOTDIR/etc/pacman.conf.proxy" || die "Could not copy extra files into fake root" -fileList="$(cd / && echo \ - etc/pacman.* \ +dlls_for_exes () { + # Add DLLs' transitive dependencies + dlls= + todo="$* " + while test -n "$todo" + do + path=${todo%% *} + todo=${todo#* } + case "$path" in ''|' ') continue;; esac + for dll in $(objdump -p "$path" | + sed -n 's/^\tDLL Name: msys-/usr\/bin\/msys-/p') + do + case "$dlls" in + *"$dll"*) ;; # already found + *) dlls="$dlls $dll"; todo="$todo /$dll ";; + esac + done + done + echo "$dlls" +} + +fileList="etc/pacman.conf \ + etc/pacman.d \ usr/bin/pacman.exe \ usr/bin/curl.exe \ usr/bin/gpg.exe \ - $(ldd /usr/bin/gpg.exe /usr/bin/curl.exe | - sed -n 's/.* \/\(usr\/bin\/.*\.dll\) .*/\1/p' | - sort | - uniq) \ + $(dlls_for_exes /usr/bin/gpg.exe /usr/bin/curl.exe) usr/ssl/certs/ca-bundle.crt \ - var/lib/pacman) + var/lib/pacman $FAKEROOTDIR/setup-git-sdk.bat $FAKEROOTDIR/etc $FAKEROOTDIR/usr" type 7za || diff --git a/sdk-installer/setup-git-sdk.bat b/sdk-installer/setup-git-sdk.bat index e915ce56f0..0cd2805337 100755 --- a/sdk-installer/setup-git-sdk.bat +++ b/sdk-installer/setup-git-sdk.bat @@ -10,7 +10,7 @@ @REM set PATH @set PATH=%cwd%\usr\bin;%PATH% -@REM set MSYSTEM so that MSys2 starts up in the correct mode +@REM set MSYSTEM so that MSYS2 starts up in the correct mode @set MSYSTEM=MINGW@@BITNESS@@ @REM need to rebase just to make sure that it still works even with Windows 10 @@ -44,7 +44,7 @@ @REM Maybe we need a proxy? @IF %counter% GEQ 2 @( @ECHO. - @ECHO There was a problem accessing the MSys2 repositories + @ECHO There was a problem accessing the MSYS2 repositories @ECHO If your setup requires an HTTP proxy to access the web, @ECHO please specify it here, otherwise leave it empty. @ECHO. @@ -126,7 +126,7 @@ ) @REM Before running a shell, let's prevent complaints about "permission denied" -@REM from MSys2's /etc/post-install/01-devices.post +@REM from MSYS2's /etc/post-install/01-devices.post @MKDIR "%cwd%"\dev\shm 2> NUL @MKDIR "%cwd%"\dev\mqueue 2> NUL