import git-2.27.0-1.el8

This commit is contained in:
CentOS Sources 2020-11-03 07:03:57 -05:00 committed by Andrew Lukoshko
parent b3fc3d4ec8
commit 3a9bc7a83c
14 changed files with 425 additions and 660 deletions

View File

@ -1,2 +1,2 @@
49ba48976fcfc622947fb3689381ad46aa996a3e SOURCES/git-2.18.4.tar.xz
996c0be58e901deb4ef9d0145e7bf98cdf6a0fb3 SOURCES/git-2.27.0.tar.xz
097b8da13939ac9f51f97a5659184c1d96fb0973 SOURCES/gpgkey-junio.asc

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/git-2.18.4.tar.xz
SOURCES/git-2.27.0.tar.xz
SOURCES/gpgkey-junio.asc

View File

@ -0,0 +1,12 @@
diff -ur a/git-instaweb.sh b/git-instaweb.sh
--- a/git-instaweb.sh 2020-04-20 17:52:30.000000000 +0200
+++ b/git-instaweb.sh 2020-05-27 12:36:20.725300334 +0200
@@ -36,7 +36,7 @@
# Defaults:
# if installed, it doesn't need further configuration (module_path)
-test -z "$httpd" && httpd='lighttpd -f'
+test -z "$httpd" && httpd='httpd -f'
# Default is @@GITWEBDIR@@
test -z "$root" && root='@@GITWEBDIR@@'

View File

@ -1,43 +0,0 @@
From aebe9c096f7150eee901fcc59036a89c54c26a0b Mon Sep 17 00:00:00 2001
From: Sebastian Kisela <skisela@redhat.com>
Date: Mon, 16 Jul 2018 08:54:00 +0200
Subject: [PATCH] Switch instaweb default HTTP daemon to httpd
---
git-instaweb.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 47e38f3..e089f0d 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -36,7 +36,7 @@ conf="$GIT_DIR/gitweb/httpd.conf"
# Defaults:
# if installed, it doesn't need further configuration (module_path)
-test -z "$httpd" && httpd='lighttpd -f'
+test -z "$httpd" && httpd='httpd -f'
# Default is @@GITWEBDIR@@
test -z "$root" && root='@@GITWEBDIR@@'
@@ -332,6 +332,8 @@ apache2_conf () {
module_path="/usr/lib/httpd/modules"
test -d "/usr/lib/apache2/modules" &&
module_path="/usr/lib/apache2/modules"
+ test -d "/etc/httpd/modules" &&
+ module_path="/etc/httpd/modules"
fi
bind=
test x"$local" = xtrue && bind='127.0.0.1:'
@@ -356,7 +358,7 @@ EOF
break
fi
done
- for mod in mime dir env log_config authz_core
+ for mod in mime dir env log_config authz_core unixd
do
if test -e $module_path/mod_${mod}.so
then
--
2.14.4

View File

@ -1,99 +0,0 @@
From 5be233541a4fc2e395087fe51a30a3664165e8bc Mon Sep 17 00:00:00 2001
From: Phillip Wood <phillip.wood@dunelm.org.uk>
Date: Fri, 1 Jun 2018 18:46:44 +0100
Subject: [PATCH] add -p: fix counting empty context lines in edited patches
recount_edited_hunk() introduced in commit 2b8ea7f3c7 ("add -p:
calculate offset delta for edited patches", 2018-03-05) required all
context lines to start with a space, empty lines are not counted. This
was intended to avoid any recounting problems if the user had
introduced empty lines at the end when editing the patch. However this
introduced a regression into 'git add -p' as it seems it is common for
editors to strip the trailing whitespace from empty context lines when
patches are edited thereby introducing empty lines that should be
counted. 'git apply' knows how to deal with such empty lines and POSIX
states that whether or not there is an space on an empty context line
is implementation defined [1].
Fix the regression by counting lines consist solely of a newline as
well as lines starting with a space as context lines and add a test to
prevent future regressions.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html
Reported-by: Mahmoud Al-Qudsi <mqudsi@neosmart.net>
Reported-by: Oliver Joseph Ash <oliverjash@gmail.com>
Reported-by: Jeff Felchner <jfelchner1@gmail.com>
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
---
git-add--interactive.perl | 2 +-
t/t3701-add-interactive.sh | 43 ++++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index c1f52e457f..befbe8c749 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -1055,7 +1055,7 @@ sub recount_edited_hunk {
$o_cnt++;
} elsif ($mode eq '+') {
$n_cnt++;
- } elsif ($mode eq ' ') {
+ } elsif ($mode eq ' ' or $_ eq "\n") {
$o_cnt++;
$n_cnt++;
}
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index b170fb02b8..3e9139dca8 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -175,6 +175,49 @@ test_expect_success 'real edit works' '
diff_cmp expected output
'
+test_expect_success 'setup file' '
+ test_write_lines a "" b "" c >file &&
+ git add file &&
+ test_write_lines a "" d "" c >file
+'
+
+test_expect_success 'setup patch' '
+ SP=" " &&
+ NULL="" &&
+ cat >patch <<-EOF
+ @@ -1,4 +1,4 @@
+ a
+ $NULL
+ -b
+ +f
+ $SP
+ c
+ EOF
+'
+
+test_expect_success 'setup expected' '
+ cat >expected <<-EOF
+ diff --git a/file b/file
+ index b5dd6c9..f910ae9 100644
+ --- a/file
+ +++ b/file
+ @@ -1,5 +1,5 @@
+ a
+ $SP
+ -f
+ +d
+ $SP
+ c
+ EOF
+'
+
+test_expect_success 'edit can strip spaces from empty context lines' '
+ test_write_lines e n q | git add -p 2>error &&
+ test_must_be_empty error &&
+ git diff >output &&
+ diff_cmp expected output
+'
+
test_expect_success 'skip files similarly as commit -a' '
git reset &&
echo file >.gitignore &&

View File

@ -1,32 +0,0 @@
From db2d36fad8b6b495a5064ea89d3bed1a48841ba9 Mon Sep 17 00:00:00 2001
From: Brandon Williams <bmwill@google.com>
Date: Mon, 10 Sep 2018 14:21:57 -0700
Subject: [PATCH] config: document value 2 for protocol.version
Update the config documentation to note the value `2` as an acceptable
value for the protocol.version config.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Josh Steadmon <steadmon@google.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/config.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 64c1dbba94..5105a39e98 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -2587,6 +2587,8 @@ protocol.version::
* `1` - the original wire protocol with the addition of a version string
in the initial response from the server.
+* `2` - link:technical/protocol-v2.html[wire protocol version 2].
+
--
pull.ff::
--
2.14.4

View File

@ -1,135 +0,0 @@
From 1e1167f676252c220fbee6038715157c457c7d2f Mon Sep 17 00:00:00 2001
From: Jeff King <peff@peff.net>
Date: Wed, 24 Oct 2018 03:38:00 -0400
Subject: [PATCH] run-command: mark path lookup errors with ENOENT
Since commit e3a434468f (run-command: use the
async-signal-safe execv instead of execvp, 2017-04-19),
prepare_cmd() does its own PATH lookup for any commands we
run (on non-Windows platforms).
However, its logic does not match the old execvp call when
we fail to find a matching entry in the PATH. Instead of
feeding the name directly to execv, execvp would consider
that an ENOENT error. By continuing and passing the name
directly to execv, we effectively behave as if "." was
included at the end of the PATH. This can have confusing and
even dangerous results.
The fix itself is pretty straight-forward. There's a new
test in t0061 to cover this explicitly, and I've also added
a duplicate of the ENOENT test to ensure that we return the
correct errno for this case.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
run-command.c | 21 +++++++++++++++++----
t/t0061-run-command.sh | 13 ++++++++++++-
2 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/run-command.c b/run-command.c
index 84b883c213..d679cc267c 100644
--- a/run-command.c
+++ b/run-command.c
@@ -380,7 +380,7 @@ static void child_err_spew(struct child_process *cmd, struct child_err *cerr)
set_error_routine(old_errfn);
}
-static void prepare_cmd(struct argv_array *out, const struct child_process *cmd)
+static int prepare_cmd(struct argv_array *out, const struct child_process *cmd)
{
if (!cmd->argv[0])
BUG("command is empty");
@@ -403,16 +403,22 @@ static void prepare_cmd(struct argv_array *out, const struct child_process *cmd)
/*
* If there are no '/' characters in the command then perform a path
* lookup and use the resolved path as the command to exec. If there
- * are no '/' characters or if the command wasn't found in the path,
- * have exec attempt to invoke the command directly.
+ * are '/' characters, we have exec attempt to invoke the command
+ * directly.
*/
if (!strchr(out->argv[1], '/')) {
char *program = locate_in_PATH(out->argv[1]);
if (program) {
free((char *)out->argv[1]);
out->argv[1] = program;
+ } else {
+ argv_array_clear(out);
+ errno = ENOENT;
+ return -1;
}
}
+
+ return 0;
}
static char **prep_childenv(const char *const *deltaenv)
@@ -719,6 +725,12 @@ int start_command(struct child_process *cmd)
struct child_err cerr;
struct atfork_state as;
+ if (prepare_cmd(&argv, cmd) < 0) {
+ failed_errno = errno;
+ cmd->pid = -1;
+ goto end_of_spawn;
+ }
+
if (pipe(notify_pipe))
notify_pipe[0] = notify_pipe[1] = -1;
@@ -729,7 +741,6 @@ int start_command(struct child_process *cmd)
set_cloexec(null_fd);
}
- prepare_cmd(&argv, cmd);
childenv = prep_childenv(cmd->env);
atfork_prepare(&as);
@@ -857,6 +868,8 @@ int start_command(struct child_process *cmd)
argv_array_clear(&argv);
free(childenv);
}
+end_of_spawn:
+
#else
{
int fhin = 0, fhout = 1, fherr = 2;
diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh
index c887ed5b45..b9cfc03a53 100755
--- a/t/t0061-run-command.sh
+++ b/t/t0061-run-command.sh
@@ -13,10 +13,14 @@ cat >hello-script <<-EOF
EOF
>empty
-test_expect_success 'start_command reports ENOENT' '
+test_expect_success 'start_command reports ENOENT (slash)' '
test-tool run-command start-command-ENOENT ./does-not-exist
'
+test_expect_success 'start_command reports ENOENT (no slash)' '
+ test-tool run-command start-command-ENOENT does-not-exist
+'
+
test_expect_success 'run_command can run a command' '
cat hello-script >hello.sh &&
chmod +x hello.sh &&
@@ -26,6 +30,13 @@ test_expect_success 'run_command can run a command' '
test_cmp empty err
'
+test_expect_success 'run_command is restricted to PATH' '
+ write_script should-not-run <<-\EOF &&
+ echo yikes
+ EOF
+ test_must_fail test-tool run-command run-command should-not-run
+'
+
test_expect_success !MINGW 'run_command can run a script without a #! line' '
cat >hello <<-\EOF &&
cat hello-script
--
2.14.4

View File

@ -1,34 +0,0 @@
From f5b2c9c98eedc2af38efea91e2702fe8a7e70a6a Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Fri, 7 Sep 2018 19:22:05 -0400
Subject: [PATCH] t5551-http-fetch-smart.sh: sort cookies before comparing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
With curl-7.61.1 cookies are sorted by creation-time¹. Sort the output
used in the 'cookies stored in http.cookiefile when http.savecookies
set' test before comparing it to the expected cookies.
¹ https://github.com/curl/curl/commit/e2ef8d6fa ("cookies: support
creation-time attribute for cookies", 2018-08-28)
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/t5551-http-fetch-smart.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh
index 771f36f9ff473..538656bfef09b 100755
--- a/t/t5551-http-fetch-smart.sh
+++ b/t/t5551-http-fetch-smart.sh
@@ -215,7 +215,7 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set
git config http.cookiefile cookies.txt &&
git config http.savecookies true &&
git ls-remote $HTTPD_URL/smart_cookies/repo.git master &&
- tail -3 cookies.txt >cookies_tail.txt &&
+ tail -3 cookies.txt | sort >cookies_tail.txt &&
test_cmp expect_cookies.txt cookies_tail.txt
'

View File

@ -1,12 +0,0 @@
diff -up git-1.8.4.2/gitweb/gitweb.perl.orig git-1.8.4.2/gitweb/gitweb.perl
--- git-1.8.4.2/gitweb/gitweb.perl.orig 2013-10-28 14:17:38.000000000 -0400
+++ git-1.8.4.2/gitweb/gitweb.perl 2013-10-29 16:49:07.302747507 -0400
@@ -83,7 +83,7 @@ our $projectroot = "++GITWEB_PROJECTROOT
our $project_maxdepth = "++GITWEB_PROJECT_MAXDEPTH++";
# string of the home link on top of all pages
-our $home_link_str = "++GITWEB_HOME_LINK_STR++";
+our $home_link_str = $ENV{'SERVER_NAME'} ? "git://" . $ENV{'SERVER_NAME'} : "projects";
# extra breadcrumbs preceding the home link
our @extra_breadcrumbs = ();

View File

@ -1,70 +0,0 @@
diff -ru git-2.18.1/builtin/receive-pack.c git-2.18.1_patched/builtin/receive-pack.c
--- git-2.18.1/builtin/receive-pack.c 2018-09-27 22:44:44.000000000 +0200
+++ git-2.18.1_patched/builtin/receive-pack.c 2019-06-11 11:19:52.887797134 +0200
@@ -26,6 +26,8 @@
#include "oidset.h"
#include "packfile.h"
#include "protocol.h"
+#include <openssl/hmac.h>
+#include <openssl/evp.h>
static const char * const receive_pack_usage[] = {
N_("git receive-pack <git-dir>"),
@@ -419,43 +421,11 @@
#define HMAC_BLOCK_SIZE 64
-static void hmac_sha1(unsigned char *out,
+static inline void hmac_sha1(unsigned char *out,
const char *key_in, size_t key_len,
const char *text, size_t text_len)
{
- unsigned char key[HMAC_BLOCK_SIZE];
- unsigned char k_ipad[HMAC_BLOCK_SIZE];
- unsigned char k_opad[HMAC_BLOCK_SIZE];
- int i;
- git_SHA_CTX ctx;
-
- /* RFC 2104 2. (1) */
- memset(key, '\0', HMAC_BLOCK_SIZE);
- if (HMAC_BLOCK_SIZE < key_len) {
- git_SHA1_Init(&ctx);
- git_SHA1_Update(&ctx, key_in, key_len);
- git_SHA1_Final(key, &ctx);
- } else {
- memcpy(key, key_in, key_len);
- }
-
- /* RFC 2104 2. (2) & (5) */
- for (i = 0; i < sizeof(key); i++) {
- k_ipad[i] = key[i] ^ 0x36;
- k_opad[i] = key[i] ^ 0x5c;
- }
-
- /* RFC 2104 2. (3) & (4) */
- git_SHA1_Init(&ctx);
- git_SHA1_Update(&ctx, k_ipad, sizeof(k_ipad));
- git_SHA1_Update(&ctx, text, text_len);
- git_SHA1_Final(out, &ctx);
-
- /* RFC 2104 2. (6) & (7) */
- git_SHA1_Init(&ctx);
- git_SHA1_Update(&ctx, k_opad, sizeof(k_opad));
- git_SHA1_Update(&ctx, out, GIT_SHA1_RAWSZ);
- git_SHA1_Final(out, &ctx);
+ HMAC(EVP_sha1(), key_in, key_len, text, text_len, out, NULL);
}
static char *prepare_push_cert_nonce(const char *path, timestamp_t stamp)
diff -ru git-2.18.1/Makefile git-2.18.1_patched/Makefile
--- git-2.18.1/Makefile 2018-09-27 22:44:44.000000000 +0200
+++ git-2.18.1_patched/Makefile 2019-06-10 17:28:26.137986964 +0200
@@ -1721,6 +1721,8 @@
BASIC_CFLAGS += -DHAVE_GETDELIM
endif
+EXTLIBS += -lcrypto
+
ifneq ($(PROCFS_EXECUTABLE_PATH),)
procfs_executable_path_SQ = $(subst ','\'',$(PROCFS_EXECUTABLE_PATH))
BASIC_CFLAGS += '-DPROCFS_EXECUTABLE_PATH="$(procfs_executable_path_SQ)"'

Binary file not shown.

View File

@ -0,0 +1,70 @@
diff -ur a/builtin/receive-pack.c b/builtin/receive-pack.c
--- a/builtin/receive-pack.c 2020-06-01 17:49:27.000000000 +0200
+++ b/builtin/receive-pack.c 2020-06-15 15:28:48.149268576 +0200
@@ -29,6 +29,8 @@
#include "commit-reach.h"
#include "worktree.h"
#include "shallow.h"
+#include <openssl/hmac.h>
+#include <openssl/evp.h>
static const char * const receive_pack_usage[] = {
N_("git receive-pack <git-dir>"),
@@ -419,43 +421,11 @@
return 0;
}
-static void hmac_hash(unsigned char *out,
+static inline void hmac_hash(unsigned char *out,
const char *key_in, size_t key_len,
const char *text, size_t text_len)
{
- unsigned char key[GIT_MAX_BLKSZ];
- unsigned char k_ipad[GIT_MAX_BLKSZ];
- unsigned char k_opad[GIT_MAX_BLKSZ];
- int i;
- git_hash_ctx ctx;
-
- /* RFC 2104 2. (1) */
- memset(key, '\0', GIT_MAX_BLKSZ);
- if (the_hash_algo->blksz < key_len) {
- the_hash_algo->init_fn(&ctx);
- the_hash_algo->update_fn(&ctx, key_in, key_len);
- the_hash_algo->final_fn(key, &ctx);
- } else {
- memcpy(key, key_in, key_len);
- }
-
- /* RFC 2104 2. (2) & (5) */
- for (i = 0; i < sizeof(key); i++) {
- k_ipad[i] = key[i] ^ 0x36;
- k_opad[i] = key[i] ^ 0x5c;
- }
-
- /* RFC 2104 2. (3) & (4) */
- the_hash_algo->init_fn(&ctx);
- the_hash_algo->update_fn(&ctx, k_ipad, sizeof(k_ipad));
- the_hash_algo->update_fn(&ctx, text, text_len);
- the_hash_algo->final_fn(out, &ctx);
-
- /* RFC 2104 2. (6) & (7) */
- the_hash_algo->init_fn(&ctx);
- the_hash_algo->update_fn(&ctx, k_opad, sizeof(k_opad));
- the_hash_algo->update_fn(&ctx, out, the_hash_algo->rawsz);
- the_hash_algo->final_fn(out, &ctx);
+ HMAC(EVP_sha1(), key_in, key_len, text, text_len, out, NULL);
}
static char *prepare_push_cert_nonce(const char *path, timestamp_t stamp)
diff -ur a/Makefile b/Makefile
--- a/Makefile 2020-06-01 17:49:27.000000000 +0200
+++ b/Makefile 2020-06-15 15:00:45.212758547 +0200
@@ -1830,6 +1830,8 @@
BASIC_CFLAGS += -DHAVE_GETDELIM
endif
+EXTLIBS += -lcrypto
+
ifneq ($(PROCFS_EXECUTABLE_PATH),)
procfs_executable_path_SQ = $(subst ','\'',$(PROCFS_EXECUTABLE_PATH))
BASIC_CFLAGS += '-DPROCFS_EXECUTABLE_PATH="$(procfs_executable_path_SQ)"'

BIN
SOURCES/git-2.27.0.tar.sign Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff