# HG changeset patch # User Marcin Kuzminski # Date 2017-09-08 08:57:22 # Node ID 195e394c42f4723bf2b67cab1b890b04b16f9568 # Parent 93a09a18329d108830476adc5939f83e65dc53cb git: updated git binaries to 2.13.5 release diff --git a/default.nix b/default.nix --- a/default.nix +++ b/default.nix @@ -16,12 +16,19 @@ let pkgs = pkgs_.overridePackages (self: super: { # bump GIT version git = pkgs.lib.overrideDerivation pkgs_.git (oldAttrs: { - name = "git-2.9.5"; + name = "git-2.13.5"; src = pkgs.fetchurl { - url = "https://www.kernel.org/pub/software/scm/git/git-2.9.5.tar.xz"; - sha256 = "00ir7qmgfszwrhxjzxwixk7wp35gxvvw467gr30bagwsrdza7gm4"; + url = "https://www.kernel.org/pub/software/scm/git/git-2.13.5.tar.xz"; + sha256 = "18fi18103n7grshm4ffb0fwsnvbl48sbqy5gqx528vf8maff5j91"; }; + patches = [ + ./pkgs/git_patches/docbook2texi.patch + ./pkgs/git_patches/symlinks-in-bin.patch + ./pkgs/git_patches/git-sh-i18n.patch + ./pkgs/git_patches/ssh-path.patch + ]; + }); # Override subversion derivation to diff --git a/pkgs/git_patches/docbook2texi.patch b/pkgs/git_patches/docbook2texi.patch new file mode 100644 --- /dev/null +++ b/pkgs/git_patches/docbook2texi.patch @@ -0,0 +1,37 @@ +This patch does two things: (1) use the right name for `docbook2texi', +and (2) make sure `gitman.info' isn't produced since it's broken (duplicate +node names). + +diff -ru git-1.8.4-orig/Documentation/Makefile git-1.8.4/Documentation/Makefile +--- git-1.8.4-orig/Documentation/Makefile 2013-08-23 21:38:43.000000000 +0200 ++++ git-1.8.4/Documentation/Makefile 2013-09-30 14:48:51.532890378 +0200 +@@ -101,7 +101,7 @@ + + MAKEINFO = makeinfo + INSTALL_INFO = install-info +-DOCBOOK2X_TEXI = docbook2x-texi ++DOCBOOK2X_TEXI = docbook2texi + DBLATEX = dblatex + ifndef PERL_PATH + PERL_PATH = /usr/bin/perl +@@ -205,7 +205,7 @@ + man5: $(DOC_MAN5) + man7: $(DOC_MAN7) + +-info: git.info gitman.info ++info: git.info + + pdf: user-manual.pdf + +@@ -221,10 +221,9 @@ + + install-info: info + $(INSTALL) -d -m 755 $(DESTDIR)$(infodir) +- $(INSTALL) -m 644 git.info gitman.info $(DESTDIR)$(infodir) ++ $(INSTALL) -m 644 git.info $(DESTDIR)$(infodir) + if test -r $(DESTDIR)$(infodir)/dir; then \ + $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) git.info ;\ +- $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) gitman.info ;\ + else \ + echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \ + fi diff --git a/pkgs/git_patches/git-sh-i18n.patch b/pkgs/git_patches/git-sh-i18n.patch new file mode 100644 --- /dev/null +++ b/pkgs/git_patches/git-sh-i18n.patch @@ -0,0 +1,94 @@ +--- a/git-sh-i18n.sh ++++ b/git-sh-i18n.sh +@@ -15,87 +15,11 @@ + fi + export TEXTDOMAINDIR + +-# First decide what scheme to use... +-GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough +-if test -n "@@USE_GETTEXT_SCHEME@@" +-then +- GIT_INTERNAL_GETTEXT_SH_SCHEME="@@USE_GETTEXT_SCHEME@@" +-elif test -n "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" +-then +- : no probing necessary +-elif test -n "$GIT_GETTEXT_POISON" +-then +- GIT_INTERNAL_GETTEXT_SH_SCHEME=poison +-elif type gettext.sh >/dev/null 2>&1 +-then +- # GNU libintl's gettext.sh +- GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu +-elif test "$(gettext -h 2>&1)" = "-h" +-then +- # gettext binary exists but no gettext.sh. likely to be a gettext +- # binary on a Solaris or something that is not GNU libintl and +- # lack eval_gettext. +- GIT_INTERNAL_GETTEXT_SH_SCHEME=gettext_without_eval_gettext +-fi +-export GIT_INTERNAL_GETTEXT_SH_SCHEME +- +-# ... and then follow that decision. +-case "$GIT_INTERNAL_GETTEXT_SH_SCHEME" in +-gnu) +- # Use libintl's gettext.sh, or fall back to English if we can't. +- . gettext.sh +- ;; +-gettext_without_eval_gettext) +- # Solaris has a gettext(1) but no eval_gettext(1) +- eval_gettext () { +- gettext "$1" | ( +- export PATH $(git sh-i18n--envsubst --variables "$1"); +- git sh-i18n--envsubst "$1" +- ) +- } +- +- eval_ngettext () { +- ngettext "$1" "$2" "$3" | ( +- export PATH $(git sh-i18n--envsubst --variables "$2"); +- git sh-i18n--envsubst "$2" +- ) +- } +- ;; +-poison) +- # Emit garbage so that tests that incorrectly rely on translatable +- # strings will fail. +- gettext () { +- printf "%s" "# GETTEXT POISON #" +- } +- +- eval_gettext () { +- printf "%s" "# GETTEXT POISON #" +- } +- +- eval_ngettext () { +- printf "%s" "# GETTEXT POISON #" +- } +- ;; +-*) +- gettext () { +- printf "%s" "$1" +- } +- +- eval_gettext () { +- printf "%s" "$1" | ( +- export PATH $(git sh-i18n--envsubst --variables "$1"); +- git sh-i18n--envsubst "$1" +- ) +- } ++# GNU gettext ++export GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu ++export PATH=@gettext@/bin:$PATH + +- eval_ngettext () { +- (test "$3" = 1 && printf "%s" "$1" || printf "%s" "$2") | ( +- export PATH $(git sh-i18n--envsubst --variables "$2"); +- git sh-i18n--envsubst "$2" +- ) +- } +- ;; +-esac ++. @gettext@/bin/gettext.sh + + # Git-specific wrapper functions + gettextln () { diff --git a/pkgs/git_patches/ssh-path.patch b/pkgs/git_patches/ssh-path.patch new file mode 100644 --- /dev/null +++ b/pkgs/git_patches/ssh-path.patch @@ -0,0 +1,26 @@ +diff --git a/connect.c b/connect.c +index fd7ffe1..20cd992 100644 +--- a/connect.c ++++ b/connect.c +@@ -768,7 +768,7 @@ + + ssh = getenv("GIT_SSH"); + if (!ssh) +- ssh = "ssh"; ++ ssh = "@ssh@"; + else + handle_ssh_variant(ssh, 0, + &port_option, +diff --git a/git-gui/lib/remote_add.tcl b/git-gui/lib/remote_add.tcl +index 50029d0..17b9594 100644 +--- a/git-gui/lib/remote_add.tcl ++++ b/git-gui/lib/remote_add.tcl +@@ -139,7 +139,7 @@ + # Parse the location + if { [regexp {(?:git\+)?ssh://([^/]+)(/.+)} $location xx host path] + || [regexp {([^:][^:]+):(.+)} $location xx host path]} { +- set ssh ssh ++ set ssh @ssh@ + if {[info exists env(GIT_SSH)]} { + set ssh $env(GIT_SSH) + } diff --git a/pkgs/git_patches/symlinks-in-bin.patch b/pkgs/git_patches/symlinks-in-bin.patch new file mode 100644 --- /dev/null +++ b/pkgs/git_patches/symlinks-in-bin.patch @@ -0,0 +1,13 @@ +diff -ru -x '*~' git-1.8.2.1-orig/Makefile git-1.8.2.1/Makefile +--- git-1.8.2.1-orig/Makefile 2013-04-08 00:52:04.000000000 +0200 ++++ git-1.8.2.1/Makefile 2013-04-22 15:46:42.906026940 +0200 +@@ -2319,8 +2319,7 @@ + { test "$$bindir/" = "$$execdir/" || \ + for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ + $(RM) "$$execdir/$$p" && \ +- test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \ +- ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \ ++ ln -s "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \ + cp "$$bindir/$$p" "$$execdir/$$p" || exit; \ + done; \ + } && \