Accepting request 334864 from devel:tools:scm
git 2.6.0 OBS-URL: https://build.opensuse.org/request/show/334864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=166
This commit is contained in:
parent
f5e36d7fac
commit
88ee113741
Binary file not shown.
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4b4760a90ede51accee703bd6815f1f79afef68670acdcf3ea31dcc846a40c9b
|
||||
size 3744080
|
BIN
git-2.6.0.tar.sign
Normal file
BIN
git-2.6.0.tar.sign
Normal file
Binary file not shown.
3
git-2.6.0.tar.xz
Normal file
3
git-2.6.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:211beb96ff41a83727e39704431ac388ecb1cebb5219cda067999bce4e1e15a6
|
||||
size 3808872
|
29
git.changes
29
git.changes
@ -1,3 +1,32 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 29 18:57:13 UTC 2015 - astieger@suse.com
|
||||
|
||||
- git 2.6.0:
|
||||
* many UI and workflow updates, added parameters and options
|
||||
* some performance optimisations and resource use reduction
|
||||
- refresh pager-don-t-use-unsafe-functions-in-signal-handle.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 25 15:11:29 CEST 2015 - tiwai@suse.de
|
||||
|
||||
- Fix deadlock in signal handler in pager (boo#942297):
|
||||
pager-don-t-use-unsafe-functions-in-signal-handle.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 20 16:34:29 UTC 2015 - astieger@suse.com
|
||||
|
||||
- git 2.5.3:
|
||||
* The experimental untracked-cache feature were buggy when paths
|
||||
with a few levels of subdirectories are involved.
|
||||
* Fix performance regression in "git am --skip"
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 19 10:13:32 UTC 2015 - dimstar@opensuse.org
|
||||
|
||||
- Suggest instead of recommend git-web: git-web is the web-server
|
||||
browsing part. Users that install git-core and appache will still
|
||||
get it auto-recommended based on the supplements.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 11 18:29:52 UTC 2015 - astieger@suse.com
|
||||
|
||||
|
9
git.spec
9
git.spec
@ -26,7 +26,7 @@
|
||||
%endif
|
||||
|
||||
Name: git
|
||||
Version: 2.5.2
|
||||
Version: 2.6.0
|
||||
Release: 0
|
||||
Summary: Fast, scalable, distributed revision control system
|
||||
License: GPL-2.0
|
||||
@ -51,6 +51,8 @@ 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
|
||||
@ -70,8 +72,8 @@ BuildRequires: tcsh
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: xz
|
||||
Requires: git-core = %{version}
|
||||
Recommends: git-svn git-cvs git-email gitk git-gui git-web
|
||||
Suggests: git-daemon
|
||||
Recommends: git-svn git-cvs git-email gitk git-gui
|
||||
Suggests: git-daemon git-web
|
||||
|
||||
%description
|
||||
Git is a fast, scalable, distributed revision control system with an
|
||||
@ -236,6 +238,7 @@ directory /git/ that calls the cgi script.
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
|
||||
%build
|
||||
cat > .make <<'EOF'
|
||||
|
192
pager-don-t-use-unsafe-functions-in-signal-handle.patch
Normal file
192
pager-don-t-use-unsafe-functions-in-signal-handle.patch
Normal file
@ -0,0 +1,192 @@
|
||||
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 *);
|
||||
|
||||
/*
|
Loading…
Reference in New Issue
Block a user