# HG changeset patch # User RhodeCode Admin # Date 2023-01-18 20:51:57 # Node ID 7a40200586b3e2df3e1902aaa61e717042a5d821 # Parent 6541a7d5f3cb0d4998d5a67a85e8a0d1f79add8e git: bumped to latest git version. - security release - fixed patches - added setreference quotes diff --git a/pkgs/overlays.nix b/pkgs/overlays.nix --- a/pkgs/overlays.nix +++ b/pkgs/overlays.nix @@ -9,19 +9,19 @@ self: super: { in super.lib.overrideDerivation gitWithoutPerl (oldAttrs: { - name = "git-2.30.0"; + name = "git-2.39.1"; src = self.fetchurl { - url = "https://www.kernel.org/pub/software/scm/git/git-2.30.0.tar.xz"; - sha256 = "06ad6dylgla34k9am7d5z8y3rryc8ln3ibq5z0d74rcm20hm0wsm"; + url = "https://www.kernel.org/pub/software/scm/git/git-2.39.1.tar.xz"; + sha256 = "0qf1wly7zagg23svpv533va5v213y7y3lfw76ldkf35k8w48m8s0"; }; - # patches come from: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/version-management/git-and-tools/git + # patches come from: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/version-management/git patches = [ ./patches/git/docbook2texi.patch + ./patches/git/git-send-email-honor-PATH.patch ./patches/git/git-sh-i18n.patch + ./patches/git/installCheck-path.patch ./patches/git/ssh-path.patch - ./patches/git/git-send-email-honor-PATH.patch - ./patches/git/installCheck-path.patch ]; #preInstallCheck = oldAttrs.preInstallCheck + '' diff --git a/pkgs/patches/git/docbook2texi.patch b/pkgs/patches/git/docbook2texi.patch --- a/pkgs/patches/git/docbook2texi.patch +++ b/pkgs/patches/git/docbook2texi.patch @@ -35,4 +35,4 @@ index 26a2342bea..ceccd67ebb 100644 - $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) gitman.info ;\ else \ echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \ - fi + fi \ No newline at end of file diff --git a/pkgs/patches/git/git-send-email-honor-PATH.patch b/pkgs/patches/git/git-send-email-honor-PATH.patch --- a/pkgs/patches/git/git-send-email-honor-PATH.patch +++ b/pkgs/patches/git/git-send-email-honor-PATH.patch @@ -1,28 +1,31 @@ diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt -index 1afe9fc858..05dd7c3a90 100644 +index 3db4eab4ba..39bc0e77c9 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt -@@ -215,8 +215,7 @@ a password is obtained using 'git-credential'. - specify a full pathname of a sendmail-like program instead; - the program must support the `-i` option. Default value can - be specified by the `sendemail.smtpServer` configuration -- option; the built-in default is to search for `sendmail` in -- `/usr/sbin`, `/usr/lib` and $PATH if such program is -+ option; the built-in default is to search in $PATH if such program is - available, falling back to `localhost` otherwise. - - --smtp-server-port=:: +@@ -220,9 +220,9 @@ a password is obtained using 'git-credential'. + --smtp-server=:: + If set, specifies the outgoing SMTP server to use (e.g. + `smtp.example.com` or a raw IP address). If unspecified, and if +- `--sendmail-cmd` is also unspecified, the default is to search +- for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH if such a +- program is available, falling back to `localhost` otherwise. ++ `--sendmail-cmd` is also unspecified, the default is to search for ++ `sendmail` in $PATH if such a program is available, falling back to ++ `localhost` otherwise. + + + For backward compatibility, this option can also specify a full pathname + of a sendmail-like program instead; the program must support the `-i` diff --git a/git-send-email.perl b/git-send-email.perl -index 8eb63b5a2f..74a61d8213 100755 +index e65d969d0b..508d49483d 100755 --- a/git-send-email.perl +++ b/git-send-email.perl -@@ -956,8 +956,7 @@ sub expand_one_alias { +@@ -1066,8 +1066,7 @@ sub expand_one_alias { } - if (!defined $smtp_server) { + if (!defined $sendmail_cmd && !defined $smtp_server) { - my @sendmail_paths = qw( /usr/sbin/sendmail /usr/lib/sendmail ); - push @sendmail_paths, map {"$_/sendmail"} split /:/, $ENV{PATH}; + my @sendmail_paths = map {"$_/sendmail"} split /:/, $ENV{PATH}; foreach (@sendmail_paths) { if (-x $_) { - $smtp_server = $_; + $sendmail_cmd = $_; \ No newline at end of file diff --git a/pkgs/patches/git/git-sh-i18n.patch b/pkgs/patches/git/git-sh-i18n.patch --- a/pkgs/patches/git/git-sh-i18n.patch +++ b/pkgs/patches/git/git-sh-i18n.patch @@ -20,4 +20,4 @@ index e1d917fd27..e90f8e1414 100644 + export PATH=@gettext@/bin:$PATH ;; gettext_without_eval_gettext) - # Solaris has a gettext(1) but no eval_gettext(1) + # Solaris has a gettext(1) but no eval_gettext(1) \ No newline at end of file diff --git a/pkgs/patches/git/installCheck-path.patch b/pkgs/patches/git/installCheck-path.patch --- a/pkgs/patches/git/installCheck-path.patch +++ b/pkgs/patches/git/installCheck-path.patch @@ -10,4 +10,4 @@ index 8665b0a9b6..8bb892b1af 100644 + PATH=$GIT_TEST_INSTALLED:$GIT_BUILD_DIR/t/helper:$GIT_BUILD_DIR:$PATH GIT_EXEC_PATH=${GIT_TEST_EXEC_PATH:-$GIT_EXEC_PATH} else # normal case, use ../bin-wrappers only unless $with_dashes: - if test -n "$no_bin_wrappers" + if test -n "$no_bin_wrappers" \ No newline at end of file diff --git a/pkgs/patches/git/ssh-path.patch b/pkgs/patches/git/ssh-path.patch --- a/pkgs/patches/git/ssh-path.patch +++ b/pkgs/patches/git/ssh-path.patch @@ -23,4 +23,4 @@ index 480a6b30d0..7817204241 100644 + set ssh @ssh@ if {[info exists env(GIT_SSH)]} { set ssh $env(GIT_SSH) - } + } \ No newline at end of file diff --git a/vcsserver/git.py b/vcsserver/git.py --- a/vcsserver/git.py +++ b/vcsserver/git.py @@ -1240,7 +1240,7 @@ class GitRemote(RemoteBase): @reraise_safe_exceptions def set_head_ref(self, wire, head_name): log.debug('Setting refs/head to `%s`', head_name) - cmd = ['symbolic-ref', 'HEAD', 'refs/heads/%s' % head_name] + cmd = ['symbolic-ref', '"HEAD"', '"refs/heads/%s"' % head_name] output, __ = self.run_git_command(wire, cmd) return [head_name] + output.splitlines() diff --git a/vcsserver/hooks.py b/vcsserver/hooks.py --- a/vcsserver/hooks.py +++ b/vcsserver/hooks.py @@ -577,8 +577,8 @@ def git_post_receive(unused_repo_path, r try: subprocessio.run_command(cmd, env=os.environ.copy()) except Exception: - cmd = [settings.GIT_EXECUTABLE, 'symbolic-ref', 'HEAD', - 'refs/heads/%s' % push_ref['name']] + cmd = [settings.GIT_EXECUTABLE, 'symbolic-ref', '"HEAD"', + '"refs/heads/%s"' % push_ref['name']] print("Setting default branch to %s" % push_ref['name']) subprocessio.run_command(cmd, env=os.environ.copy())