summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/cherry-pick-551ff842-43464-another-attachtty-fix.patch109
-rw-r--r--debian/patches/cherrypick_decc78c72__svn:_Allow_hyphens_in_command_name_aliases.patch17
-rw-r--r--debian/patches/further-mitigate-test-suite-hangs.patch15
-rw-r--r--debian/patches/series4
-rw-r--r--debian/patches/update-debian-sections.patch51
5 files changed, 196 insertions, 0 deletions
diff --git a/debian/patches/cherry-pick-551ff842-43464-another-attachtty-fix.patch b/debian/patches/cherry-pick-551ff842-43464-another-attachtty-fix.patch
new file mode 100644
index 000000000..fcb04ecfe
--- /dev/null
+++ b/debian/patches/cherry-pick-551ff842-43464-another-attachtty-fix.patch
@@ -0,0 +1,109 @@
+Origin: upstream (commit 551ff842721d6ca83727dbe6cd40178f46cc8201)
+Author: Peter Stephenson <p.w.stephenson@ntlworld.com>
+Date: Sun Sep 16 19:13:38 2018 +0100
+Description: 43464: Another attachtty() fix.
+ If list_pipe_job triggered more than once we need to know
+ the most recent process group leader, so record that
+ both if the attach happened in the main shell on in
+ entersubsh().
+
+ Also don't pass back proocess group for ESUB_ASYNC subshells.
+
+diff --git a/Src/exec.c b/Src/exec.c
+index b9af9ea63..a667b078d 100644
+--- a/Src/exec.c
++++ b/Src/exec.c
+@@ -1036,7 +1036,7 @@ entersubsh(int flags, struct entersubsh_ret *retp)
+ if (!(flags & ESUB_ASYNC))
+ attachtty(jobtab[thisjob].gleader);
+ }
+- if (retp) {
++ if (retp && !(flags & ESUB_ASYNC)) {
+ retp->gleader = jobtab[list_pipe_job].gleader;
+ retp->list_pipe_job = list_pipe_job;
+ }
+@@ -1058,12 +1058,13 @@ entersubsh(int flags, struct entersubsh_ret *retp)
+ !jobtab[list_pipe_job].gleader)
+ jobtab[list_pipe_job].gleader = jobtab[thisjob].gleader;
+ setpgrp(0L, jobtab[thisjob].gleader);
+- if (!(flags & ESUB_ASYNC))
++ if (!(flags & ESUB_ASYNC)) {
+ attachtty(jobtab[thisjob].gleader);
+- if (retp) {
+- retp->gleader = jobtab[thisjob].gleader;
+- if (list_pipe_job != thisjob)
+- retp->list_pipe_job = list_pipe_job;
++ if (retp) {
++ retp->gleader = jobtab[thisjob].gleader;
++ if (list_pipe_job != thisjob)
++ retp->list_pipe_job = list_pipe_job;
++ }
+ }
+ }
+ }
+diff --git a/Src/jobs.c b/Src/jobs.c
+index db2e87ec1..2d58319a8 100644
+--- a/Src/jobs.c
++++ b/Src/jobs.c
+@@ -40,6 +40,11 @@ mod_export pid_t origpgrp;
+
+ /**/
+ mod_export pid_t mypgrp;
++
++/* the last process group to attach to the terminal */
++
++/**/
++pid_t last_attached_pgrp;
+
+ /* the job we are working on */
+
+@@ -1405,6 +1410,11 @@ addproc(pid_t pid, char *text, int aux, struct timeval *bgtime,
+ jobtab[thisjob].gleader = gleader;
+ if (list_pipe_job_used != -1)
+ jobtab[list_pipe_job_used].gleader = gleader;
++ /*
++ * Record here this is the latest process group to grab the
++ * terminal as attachtty() was run in the subshell.
++ */
++ last_attached_pgrp = gleader;
+ } else if (!jobtab[thisjob].gleader)
+ jobtab[thisjob].gleader = pid;
+ /* attach this process to end of process list of current job */
+diff --git a/Src/signals.c b/Src/signals.c
+index 99aad0fab..26d88abc2 100644
+--- a/Src/signals.c
++++ b/Src/signals.c
+@@ -540,8 +540,8 @@ wait_for_processes(void)
+ if (WIFEXITED(status) &&
+ pn->pid == jn->gleader &&
+ killpg(pn->pid, 0) == -1) {
+- jn->gleader = 0;
+- if (!(jn->stat & STAT_NOSTTY)) {
++ if (last_attached_pgrp == jn->gleader &&
++ !(jn->stat & STAT_NOSTTY)) {
+ /*
+ * This PID was in control of the terminal;
+ * reclaim terminal now it has exited.
+@@ -552,6 +552,7 @@ wait_for_processes(void)
+ attachtty(mypgrp);
+ adjustwinsize(0);
+ }
++ jn->gleader = 0;
+ }
+ }
+ update_job(jn);
+diff --git a/Src/utils.c b/Src/utils.c
+index 075d27241..5a9fbdd32 100644
+--- a/Src/utils.c
++++ b/Src/utils.c
+@@ -4670,6 +4670,10 @@ attachtty(pid_t pgrp)
+ ep = 1;
+ }
+ }
++ else
++ {
++ last_attached_pgrp = pgrp;
++ }
+ }
+ }
+
diff --git a/debian/patches/cherrypick_decc78c72__svn:_Allow_hyphens_in_command_name_aliases.patch b/debian/patches/cherrypick_decc78c72__svn:_Allow_hyphens_in_command_name_aliases.patch
new file mode 100644
index 000000000..022c6db91
--- /dev/null
+++ b/debian/patches/cherrypick_decc78c72__svn:_Allow_hyphens_in_command_name_aliases.patch
@@ -0,0 +1,17 @@
+Origin: commit decc78c72110159bd8a27faf579c020abca6cb0b
+Author: Daniel Shahaf <d.s@daniel.shahaf.name>
+Date: Fri Sep 14 14:25:07 2018 +0000
+Description: _svn: Allow hyphens in command name aliases.
+ Used by svn 1.11.0-rc1.
+
+--- a/Completion/Unix/Command/_subversion
++++ b/Completion/Unix/Command/_subversion
+@@ -34,7 +34,7 @@
+ typeset -gHA _svn_cmds
+ if _cache_invalid svn-cmds || ! _retrieve_cache svn-cmds; then
+ _svn_cmds=(
+- ${=${(f)${${"$(_call_program commands svn help)"#l#*Available subcommands:}%%Subversion is a tool*}}/(#s)[[:space:]]#(#b)([a-z-]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
++ ${=${(f)${${"$(_call_program commands svn help)"#l#*Available subcommands:}%%Subversion is a tool*}}/(#s)[[:space:]]#(#b)([a-z-]##)[[:space:]]#(\([a-z, ?-]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
+ )
+ if (( $? == 0 )); then
+ _store_cache svn-cmds _svn_cmds
diff --git a/debian/patches/further-mitigate-test-suite-hangs.patch b/debian/patches/further-mitigate-test-suite-hangs.patch
new file mode 100644
index 000000000..cf22be741
--- /dev/null
+++ b/debian/patches/further-mitigate-test-suite-hangs.patch
@@ -0,0 +1,15 @@
+Origin: https://www.zsh.org/mla/workers/2014/msg01250.html
+Author: Bart Schaefer <schaefer@brasslantern.com>
+Bug-Debian: https://bugs.debian.org/759870
+Description: Add a sleep call which should prevent a race condition in coproc
+
+--- a/Test/A05execution.ztst
++++ b/Test/A05execution.ztst
+@@ -239,6 +239,7 @@
+ print -u $ZTST_fd 'This test takes 5 seconds to fail...'
+ { printf "%d\n" {1..20000} } 2>/dev/null | ( read -e )
+ hang(){ printf "%d\n" {2..20000} | cat }; hang 2>/dev/null | ( read -e )
++ sleep 1 ;: avoid coproc exit race condition
+ print -p done
+ read -et 6 -p
+ 0:Bug regression: piping a shell construct to an external process may hang
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 000000000..14d4bba19
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+further-mitigate-test-suite-hangs.patch
+update-debian-sections.patch
+cherrypick_decc78c72__svn:_Allow_hyphens_in_command_name_aliases.patch
+cherry-pick-551ff842-43464-another-attachtty-fix.patch
diff --git a/debian/patches/update-debian-sections.patch b/debian/patches/update-debian-sections.patch
new file mode 100644
index 000000000..390f5c701
--- /dev/null
+++ b/debian/patches/update-debian-sections.patch
@@ -0,0 +1,51 @@
+From a7204dd6176d4c1305de7092525c8037fd335acf Mon Sep 17 00:00:00 2001
+From: Josh Triplett <josh@joshtriplett.org>
+Date: Thu, 8 Dec 2016 20:19:18 -0800
+Subject: [PATCH] Update for new programming language sections
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=847540;filename=0001-Update-for-new-programming-language-sections.patch;msg=13
+Bug-Debian: https://bugs.debian.org/847540
+Forwarded: not-yet
+Reviewed-By: Axel Beckert <abe@debian.org>, Daniel Shahaf <danielsh@apache.org>
+
+---
+ Completion/Debian/Command/_dak | 2 +-
+ Completion/Debian/Command/_debfoster | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Completion/Debian/Command/_dak b/Completion/Debian/Command/_dak
+index 086196c4a..d06f55d23 100644
+--- a/Completion/Debian/Command/_dak
++++ b/Completion/Debian/Command/_dak
+@@ -37,7 +37,7 @@
+ '(-n --no-action)'{-n,--no-action}'[do not do anything]'
+ '(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" oldstable stable testing unstable experimental'
+ ':package:_deb_packages avail'
+- ':section:(admin base comm contrib/admin contrib/comm contrib/devel contrib/doc contrib/games contrib/graphics contrib/interpreters contrib/kde contrib/libdevel contrib/libs contrib/mail contrib/math contrib/misc contrib/net contrib/otherosfs contrib/perl contrib/python contrib/science contrib/sound contrib/tex contrib/text contrib/utils contrib/web contrib/x11 devel doc editors electronics embedded games gnome graphics hamradio interpreters kde libdevel libs mail math misc net news non-free/admin non-free/base non-free/comm non-free/devel non-free/doc non-free/editors non-free/electronics non-free/games non-free/graphics non-free/hamradio non-free/libdevel non-free/libs non-free/mail non-free/math non-free/misc non-free/net non-free/news non-free/otherosfs non-free/python non-free/science non-free/sound non-free/tex non-free/text non-free/utils non-free/web non-free/x11 oldlibs otherosfs perl python science shells sound tex text utils web x11)'
++ ':section:({,contrib/,non-free/}{admin,cli-mono,comm,database,debug,devel,doc,editors,education,electronics,embedded,fonts,games,gnome,gnu-r,gnustep,graphics,hamradio,haskell,httpd,interpreters,introspection,java,javascript,kde,kernel,libdevel,libs,lisp,localization,mail,math,metapackages,misc,net,news,ocaml,oldlibs,otherosfs,perl,php,python,ruby,rust,science,shells,sound,tex,text,utils,vcs,video,web,x11,xfce,zope})'
+ ':priority:(extra important optional required standard)'
+ )
+ ;;
+diff --git a/Completion/Debian/Command/_debfoster b/Completion/Debian/Command/_debfoster
+index 08a1078e2..4c041bc36 100644
+--- a/Completion/Debian/Command/_debfoster
++++ b/Completion/Debian/Command/_debfoster
+@@ -44,10 +44,13 @@
+ ;;
+ *(#i)(no|)keepsections*)
+ _wanted values expl 'section' compadd \
+- x11 web utils text tex sound shells science \
+- otherosfs oldlibs news net misc math mail libs \
+- interpreters hamradio graphics games electronics \
+- editors doc devel comm base admin && ret=0
++ zope xfce x11 web video vcs utils text tex sound shells \
++ science rust ruby python php perl otherosfs oldlibs ocaml \
++ news net misc metapackages math mail localization lisp libs \
++ libdevel kernel kde javascript java introspection \
++ interpreters httpd haskell hamradio graphics gnustep gnu-r \
++ gnome games fonts embedded electronics education editors doc \
++ devel debug database comm cli-mono admin && ret=0
+ ;;
+ *(#i)guessdepends*)
+ _wanted values expl 'name extension' \
+--
+2.11.0