SHA256
1
0
forked from pool/git

Accepting request 339786 from devel:tools:scm

git 2.6.2

OBS-URL: https://build.opensuse.org/request/show/339786
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=167
This commit is contained in:
Dominique Leuenberger 2015-10-22 10:57:59 +00:00 committed by Git OBS Bridge
parent 88ee113741
commit 52850b3274
7 changed files with 27 additions and 199 deletions

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:211beb96ff41a83727e39704431ac388ecb1cebb5219cda067999bce4e1e15a6
size 3808872

BIN
git-2.6.2.tar.sign Normal file

Binary file not shown.

3
git-2.6.2.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:646e37abbc69d5c1b153e30c82ec3346d176e2b499b44281d08565ad8e00a670
size 3812636

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Mon Oct 19 08:16:32 UTC 2015 - astieger@suse.com
- git 2.6.2:
* git fsck return status fixes
* Fix for case insensitive filesystems
* Fix "git am" ignoring user.signingkey
* For ssh transport, explicitly clear GIT_* environment variables
* Other compatible minor bug fixes and improvements
- drop pager-don-t-use-unsafe-functions-in-signal-handle.patch
-------------------------------------------------------------------
Tue Oct 6 08:53:30 UTC 2015 - astieger@suse.com
- git 2.6.1, with a security fix:
* Make xdiff code handle extremely large files, cap around 1GB.
* Some protocols (like git-remote-ext) can execute arbitrary code
found in the URL. The URLs that submodules use may come from
arbitrary sources (e.g., .gitmodules files in a remote
repository), and can hurt those who blindly enable recursive
fetch. Restrict the allowed protocols to well known and safe
ones. [boo#948969]
-------------------------------------------------------------------
Tue Sep 29 18:57:13 UTC 2015 - astieger@suse.com

View File

@ -26,7 +26,7 @@
%endif
Name: git
Version: 2.6.0
Version: 2.6.2
Release: 0
Summary: Fast, scalable, distributed revision control system
License: GPL-2.0
@ -51,8 +51,6 @@ Patch5: git-bash-completion-egrep-color-fix.diff
Patch6: git-tcsh-completion-fixes.diff
# adapt paths in zsh completion (bnc#853183)
Patch7: git-zsh-completion-fixes.diff
# PATCH-FIX-SUSE pager-don-t-use-unsafe-functions-in-signal-handle.patch boo#942297
Patch8: pager-don-t-use-unsafe-functions-in-signal-handle.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: apache2
BuildRequires: asciidoc
@ -238,7 +236,6 @@ directory /git/ that calls the cgi script.
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%build
cat > .make <<'EOF'

View File

@ -1,192 +0,0 @@
From bbc10c28f64194c143775b80bcd349f46d927bbf Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Fri, 4 Sep 2015 07:23:55 +0200
Subject: [PATCH v2] pager: don't use unsafe functions in signal handlers
Since the commit [a3da8821208d: pager: do wait_for_pager on signal
death], we call wait_for_pager() in the pager's signal handler. The
recent bug report revealed that this causes a deadlock in glibc at
aborting "git log" [*1]. When this happens, git process is left
unterminated, and it can't be killed by SIGTERM but only by SIGKILL.
The problem is that wait_for_pager() function does more than waiting
for pager process's termination, but it does cleanups and printing
errors. Unfortunately, the functions that may be used in a signal
handler are very limited [*2]. Particularly, malloc(), free() and the
variants can't be used in a signal handler because they take a mutex
internally in glibc. This was the cause of the deadlock above. Other
than the direct calls of malloc/free, many functions calling
malloc/free can't be used. strerror() is such one, either.
Also the usage of fflush() and printf() in a signal handler is bad,
although it seems working so far. In a safer side, we should avoid
them, too.
This patch tries to reduce the calls of such functions in signal
handlers. wait_for_signal() takes a flag and avoids the unsafe
calls. Also, finish_command_in_signal() is introduced for the
same reason. There the free() calls are removed, and only waits for
the children without whining at errors.
[*1] https://bugzilla.opensuse.org/show_bug.cgi?id=942297
[*2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
pager.c | 22 ++++++++++++++++------
run-command.c | 25 +++++++++++++++++--------
run-command.h | 1 +
3 files changed, 34 insertions(+), 14 deletions(-)
Index: git-2.6.0/pager.c
===================================================================
--- git-2.6.0.orig/pager.c 2015-09-29 01:01:32.000000000 +0200
+++ git-2.6.0/pager.c 2015-09-29 20:50:23.000000000 +0200
@@ -14,19 +14,29 @@
static const char *pager_argv[] = { NULL, NULL };
static struct child_process pager_process = CHILD_PROCESS_INIT;
-static void wait_for_pager(void)
+static void wait_for_pager(int in_signal)
{
- fflush(stdout);
- fflush(stderr);
+ if (!in_signal) {
+ fflush(stdout);
+ fflush(stderr);
+ }
/* signal EOF to pager */
close(1);
close(2);
- finish_command(&pager_process);
+ if (in_signal)
+ finish_command_in_signal(&pager_process);
+ else
+ finish_command(&pager_process);
+}
+
+static void wait_for_pager_atexit(void)
+{
+ wait_for_pager(0);
}
static void wait_for_pager_signal(int signo)
{
- wait_for_pager();
+ wait_for_pager(1);
sigchain_pop(signo);
raise(signo);
}
@@ -90,7 +100,7 @@ void setup_pager(void)
/* this makes sure that the parent terminates after the pager */
sigchain_push_common(wait_for_pager_signal);
- atexit(wait_for_pager);
+ atexit(wait_for_pager_atexit);
}
int pager_in_use(void)
Index: git-2.6.0/run-command.c
===================================================================
--- git-2.6.0.orig/run-command.c 2015-09-29 01:01:32.000000000 +0200
+++ git-2.6.0/run-command.c 2015-09-29 20:50:23.000000000 +0200
@@ -18,26 +18,27 @@ struct child_to_clean {
static struct child_to_clean *children_to_clean;
static int installed_child_cleanup_handler;
-static void cleanup_children(int sig)
+static void cleanup_children(int sig, int in_signal)
{
while (children_to_clean) {
struct child_to_clean *p = children_to_clean;
children_to_clean = p->next;
kill(p->pid, sig);
- free(p);
+ if (!in_signal)
+ free(p);
}
}
static void cleanup_children_on_signal(int sig)
{
- cleanup_children(sig);
+ cleanup_children(sig, 1);
sigchain_pop(sig);
raise(sig);
}
static void cleanup_children_on_exit(void)
{
- cleanup_children(SIGTERM);
+ cleanup_children(SIGTERM, 0);
}
static void mark_child_for_cleanup(pid_t pid)
@@ -220,7 +221,7 @@ static inline void set_cloexec(int fd)
fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
}
-static int wait_or_whine(pid_t pid, const char *argv0)
+static int wait_or_whine(pid_t pid, const char *argv0, int in_signal)
{
int status, code = -1;
pid_t waiting;
@@ -228,6 +229,8 @@ static int wait_or_whine(pid_t pid, cons
while ((waiting = waitpid(pid, &status, 0)) < 0 && errno == EINTR)
; /* nothing */
+ if (in_signal)
+ return 0;
if (waiting < 0) {
failed_errno = errno;
@@ -437,7 +440,7 @@ fail_pipe:
* At this point we know that fork() succeeded, but execvp()
* failed. Errors have been reported to our stderr.
*/
- wait_or_whine(cmd->pid, cmd->argv[0]);
+ wait_or_whine(cmd->pid, cmd->argv[0], 0);
failed_errno = errno;
cmd->pid = -1;
}
@@ -536,12 +539,18 @@ fail_pipe:
int finish_command(struct child_process *cmd)
{
- int ret = wait_or_whine(cmd->pid, cmd->argv[0]);
+ int ret = wait_or_whine(cmd->pid, cmd->argv[0], 0);
argv_array_clear(&cmd->args);
argv_array_clear(&cmd->env_array);
return ret;
}
+int finish_command_in_signal(struct child_process *cmd)
+{
+ return wait_or_whine(cmd->pid, cmd->argv[0], 1);
+}
+
+
int run_command(struct child_process *cmd)
{
int code;
@@ -772,7 +781,7 @@ error:
int finish_async(struct async *async)
{
#ifdef NO_PTHREADS
- return wait_or_whine(async->pid, "child process");
+ return wait_or_whine(async->pid, "child process", 0);
#else
void *ret = (void *)(intptr_t)(-1);
Index: git-2.6.0/run-command.h
===================================================================
--- git-2.6.0.orig/run-command.h 2015-09-29 01:01:32.000000000 +0200
+++ git-2.6.0/run-command.h 2015-09-29 20:50:23.000000000 +0200
@@ -50,6 +50,7 @@ void child_process_init(struct child_pro
int start_command(struct child_process *);
int finish_command(struct child_process *);
+int finish_command_in_signal(struct child_process *);
int run_command(struct child_process *);
/*