summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/cherry-pick-0f73b35f-33391-vcs-info-git-fix-applied-patch-detection-on-git-am.patch51
-rw-r--r--debian/patches/cherry-pick-22c4ea42-33403-be-conservative-about-redirecting-call-program-stderr-the-caller-may-have-already-done-so.patch20
-rw-r--r--debian/patches/cherry-pick-2d14c085-33445-fix-handling-of-s-when-combined-with-i-at-shell-invocation.patch66
-rw-r--r--debian/patches/cherry-pick-521313b4-tests-for-workers-33429.patch27
-rw-r--r--debian/patches/cherry-pick-605a73e4-33429-disallow-non-integer-values-for-histsize-and-savehist-of-fc-p-and-fix-crash-on-zero-values-for-same.patch60
-rw-r--r--debian/patches/cherry-pick-9982ab6f-missing-changelog-entry30
-rw-r--r--debian/patches/cherry-pick-a03227de-33405-vcs-info-make-sure-maxexports-is-set-when-vcs-info-set-is-called.patch19
-rw-r--r--debian/patches/further-mitigate-test-suite-hangs.patch17
-rw-r--r--debian/patches/replace-texi2html-with-makeinfo17
-rw-r--r--debian/patches/series9
10 files changed, 316 insertions, 0 deletions
diff --git a/debian/patches/cherry-pick-0f73b35f-33391-vcs-info-git-fix-applied-patch-detection-on-git-am.patch b/debian/patches/cherry-pick-0f73b35f-33391-vcs-info-git-fix-applied-patch-detection-on-git-am.patch
new file mode 100644
index 000000000..758fa09ff
--- /dev/null
+++ b/debian/patches/cherry-pick-0f73b35f-33391-vcs-info-git-fix-applied-patch-detection-on-git-am.patch
@@ -0,0 +1,51 @@
+Origin: commit 0f73b35f4e0d8adad216ee6650bfef4622df43b1
+Author: Marc Finet <m.dreadlock@gmail.com>
+Date: Thu Oct 9 00:24:45 2014 +0200
+Description: 33391: vcs_info git: fix applied patch detection on git am
+ git-am also uses .git/rebase-apply for patch list but
+ the file original-commit does not exist (as no commit exist).
+ This patch handles both git rebase and git am. Also:
+ - get the first line (rather than the first char) when the message
+ contains only one line;
+ - remove unused function (ironically that should have been used here).
+
+diff --git a/ChangeLog b/ChangeLog
+index 445f1e7..57850eb 100644
+diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+index ee50be6..48d552f 100644
+--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
++++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+@@ -195,14 +195,6 @@ fi
+ VCS_INFO_adjust
+ VCS_INFO_git_getaction ${gitdir}
+
+-
+-VCS_INFO_get_get_rebase()
+-{
+- if [[ -f "$1" ]]; then
+- echo "$(< "$1")"
+- fi
+-}
+-
+ local patchdir=${gitdir}/patches/${gitbranch}
+ if [[ -d $patchdir ]] && [[ -f $patchdir/applied ]] \
+ && [[ -f $patchdir/unapplied ]]
+@@ -223,11 +215,16 @@ elif [[ -d "${gitdir}/rebase-apply" ]]; then
+ # Fake patch names for all but current patch
+ patchdir="${gitdir}/rebase-apply"
+ local cur=$(< "${patchdir}/next")
+- local p
++ local p subject
+ for p in $(seq $(($cur - 1))); do
+ git_patches_applied+=("$(printf "%04d" $p) ?")
+ done
+- git_patches_applied+=("$(< "${patchdir}/original-commit") ${${(f)$(< "${patchdir}/msg-clean")}[1]}")
++ subject="${$(< "${patchdir}/msg-clean")[(f)1]}"
++ if [[ -f "${patchdir}/original-commit" ]]; then
++ git_patches_applied+=("$(< ${patchdir}/original-commit) $subject")
++ else
++ git_patches_applied+=("? $subject")
++ fi
+ git_patches_unapplied=($(seq $cur $(< "${patchdir}/last")))
+
+ VCS_INFO_git_handle_patches
diff --git a/debian/patches/cherry-pick-22c4ea42-33403-be-conservative-about-redirecting-call-program-stderr-the-caller-may-have-already-done-so.patch b/debian/patches/cherry-pick-22c4ea42-33403-be-conservative-about-redirecting-call-program-stderr-the-caller-may-have-already-done-so.patch
new file mode 100644
index 000000000..bc1dcac9c
--- /dev/null
+++ b/debian/patches/cherry-pick-22c4ea42-33403-be-conservative-about-redirecting-call-program-stderr-the-caller-may-have-already-done-so.patch
@@ -0,0 +1,20 @@
+Origin: commit 22c4ea424ce2e8febce04d324c5ec9898f5d534b
+Author: Barton E. Schaefer <schaefer@zsh.org>
+Date: Thu Oct 9 17:54:47 2014 -0700
+Description: 33403: be conservative about redirecting _call_program stderr, the caller may have already done so
+
+diff --git a/Completion/Base/Utility/_call_program b/Completion/Base/Utility/_call_program
+index b657648..010e094 100644
+--- a/Completion/Base/Utility/_call_program
++++ b/Completion/Base/Utility/_call_program
+@@ -2,8 +2,8 @@
+
+ local tmp err_fd=-1
+
+-if (( ${debug_fd:--1} > 2 ))
+-then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is log file
++if (( ${debug_fd:--1} > 2 )) || [[ ! -t 2 ]]
++then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is trace or redirect
+ else exec {err_fd}>/dev/null
+ fi
+
diff --git a/debian/patches/cherry-pick-2d14c085-33445-fix-handling-of-s-when-combined-with-i-at-shell-invocation.patch b/debian/patches/cherry-pick-2d14c085-33445-fix-handling-of-s-when-combined-with-i-at-shell-invocation.patch
new file mode 100644
index 000000000..1fdc5cf0c
--- /dev/null
+++ b/debian/patches/cherry-pick-2d14c085-33445-fix-handling-of-s-when-combined-with-i-at-shell-invocation.patch
@@ -0,0 +1,66 @@
+Origin: commit 2d14c085b761c71e35cc362f87cd4fecbc8e0676
+Author: Barton E. Schaefer <schaefer@zsh.org>
+Date: Sun Oct 12 11:18:30 2014 -0700
+Description: 33445: fix handling of -s when combined with -i at shell invocation
+ Fixes a long-standing (25+ years) bug where using -i -s together did have
+ the documented effect of disabling command line script files but also had
+ the side-effect of invoking ZLE, thereby ignoring the redirected input.
+
+diff --git a/Src/init.c b/Src/init.c
+index 6d005dc..68d3612 100644
+--- a/Src/init.c
++++ b/Src/init.c
+@@ -243,12 +243,24 @@ parseargs(char **argv, char **runscript)
+ */
+ opts[MONITOR] = 2; /* may be unset in init_io() */
+ opts[HASHDIRS] = 2; /* same relationship to INTERACTIVE */
++ opts[USEZLE] = 1; /* see below, related to SHINSTDIN */
+ opts[SHINSTDIN] = 0;
+ opts[SINGLECOMMAND] = 0;
+
+ if (parseopts(NULL, &argv, opts, &cmd, NULL))
+ exit(1);
+
++ /*
++ * USEZLE remains set if the shell has access to a terminal and
++ * is not reading from some other source as indicated by SHINSTDIN.
++ * SHINSTDIN becomes set below if there is no command argument,
++ * but it is the explicit setting (or not) that matters to USEZLE.
++ * USEZLE may also become unset in init_io() if the shell is not
++ * interactive or the terminal cannot be re-opened read/write.
++ */
++ if (opts[SHINSTDIN])
++ opts[USEZLE] = (opts[USEZLE] && isatty(0));
++
+ paramlist = znewlinklist();
+ if (*argv) {
+ if (unset(SHINSTDIN)) {
+@@ -603,7 +615,7 @@ init_shout(void)
+
+ if (SHTTY == -1)
+ {
+- /* Since we're interative, it's nice to have somewhere to write. */
++ /* Since we're interactive, it's nice to have somewhere to write. */
+ shout = stderr;
+ return;
+ }
+@@ -616,7 +628,8 @@ init_shout(void)
+ /* Associate terminal file descriptor with a FILE pointer */
+ shout = fdopen(SHTTY, "w");
+ #ifdef _IOFBF
+- setvbuf(shout, shoutbuf, _IOFBF, BUFSIZ);
++ if (shout)
++ setvbuf(shout, shoutbuf, _IOFBF, BUFSIZ);
+ #endif
+
+ gettyinfo(&shttyinfo); /* get tty state */
+@@ -1608,8 +1621,7 @@ zsh_main(UNUSED(int argc), char **argv)
+ emulate(zsh_name, 1, &emulation, opts); /* initialises most options */
+ opts[LOGINSHELL] = (**argv == '-');
+ opts[PRIVILEGED] = (getuid() != geteuid() || getgid() != getegid());
+- opts[USEZLE] = 1; /* may be unset in init_io() */
+- /* sets INTERACTIVE, SHINSTDIN and SINGLECOMMAND */
++ /* sets ZLE, INTERACTIVE, SHINSTDIN and SINGLECOMMAND */
+ parseargs(argv, &runscript);
+
+ SHTTY = -1;
diff --git a/debian/patches/cherry-pick-521313b4-tests-for-workers-33429.patch b/debian/patches/cherry-pick-521313b4-tests-for-workers-33429.patch
new file mode 100644
index 000000000..fdb55831e
--- /dev/null
+++ b/debian/patches/cherry-pick-521313b4-tests-for-workers-33429.patch
@@ -0,0 +1,27 @@
+Origin: commit 521313b4b95817c9144ab43ab121da934f99bd51
+Author: Barton E. Schaefer <schaefer@zsh.org>
+Date: Sat Oct 11 11:18:34 2014 -0700
+Description: Tests for workers/33429
+
+diff --git a/Test/B06fc.ztst b/Test/B06fc.ztst
+index eb73eaa..65ee43d 100644
+--- a/Test/B06fc.ztst
++++ b/Test/B06fc.ztst
+@@ -9,3 +9,17 @@
+ $ZTST_testdir/../Src/zsh -f ./fcl
+ 1:Checking that fc -l foo doesn't core dump when history is empty
+ ?./fcl:fc:1: event not found: foo
++
++ $ZTST_testdir/../Src/zsh +Z -fsi <<< $'fc -p /dev/null 0 0\n:'
++0:Checking that fc -p doesn't core dump when history size is zero
++*?*%*
++
++ $ZTST_testdir/../Src/zsh +Z -fsi <<< 'fc -p /dev/null a 0'
++1:Checking that fc -p rejects non-integer history size
++*?*% fc: HISTSIZE must be an integer
++*?*%*
++
++ $ZTST_testdir/../Src/zsh +Z -fsi <<< 'fc -p /dev/null 0 a'
++1:Checking that fc -p rejects non-integer history save size
++*?*% fc: SAVEHIST must be an integer
++*?*%*
diff --git a/debian/patches/cherry-pick-605a73e4-33429-disallow-non-integer-values-for-histsize-and-savehist-of-fc-p-and-fix-crash-on-zero-values-for-same.patch b/debian/patches/cherry-pick-605a73e4-33429-disallow-non-integer-values-for-histsize-and-savehist-of-fc-p-and-fix-crash-on-zero-values-for-same.patch
new file mode 100644
index 000000000..19b7a822d
--- /dev/null
+++ b/debian/patches/cherry-pick-605a73e4-33429-disallow-non-integer-values-for-histsize-and-savehist-of-fc-p-and-fix-crash-on-zero-values-for-same.patch
@@ -0,0 +1,60 @@
+Origin: commit 605a73e415772a1d74cff39212618c8f1d58297b
+Author: Barton E. Schaefer <schaefer@zsh.org>
+Date: Fri Oct 10 23:12:57 2014 -0700
+Description: 33429: disallow non-integer values for HISTSIZE and SAVEHIST of "fc -p", and fix crash on zero values for same
+
+diff --git a/Src/builtin.c b/Src/builtin.c
+index 4a10c7d..5b711ed 100644
+--- a/Src/builtin.c
++++ b/Src/builtin.c
+@@ -1363,10 +1363,19 @@ bin_fc(char *nam, char **argv, Options ops, int func)
+ if (*argv) {
+ hf = *argv++;
+ if (*argv) {
+- hs = zstrtol(*argv++, NULL, 10);
+- if (*argv)
+- shs = zstrtol(*argv++, NULL, 10);
+- else
++ char *check;
++ hs = zstrtol(*argv++, &check, 10);
++ if (*check) {
++ zwarnnam("fc", "HISTSIZE must be an integer");
++ return 1;
++ }
++ if (*argv) {
++ shs = zstrtol(*argv++, &check, 10);
++ if (*check) {
++ zwarnnam("fc", "SAVEHIST must be an integer");
++ return 1;
++ }
++ } else
+ shs = hs;
+ if (*argv) {
+ zwarnnam("fc", "too many arguments");
+diff --git a/Src/hist.c b/Src/hist.c
+index 4660fd0..0831756 100644
+--- a/Src/hist.c
++++ b/Src/hist.c
+@@ -1110,8 +1110,11 @@ static void
+ putoldhistentryontop(short keep_going)
+ {
+ static Histent next = NULL;
+- Histent he = keep_going? next : hist_ring->down;
+- next = he->down;
++ Histent he = (keep_going || !hist_ring) ? next : hist_ring->down;
++ if (he)
++ next = he->down;
++ else
++ return;
+ if (isset(HISTEXPIREDUPSFIRST) && !(he->node.flags & HIST_DUP)) {
+ static zlong max_unique_ct = 0;
+ if (!keep_going)
+@@ -1151,7 +1154,7 @@ prepnexthistent(void)
+ freehistnode(&hist_ring->node);
+ }
+
+- if (histlinect < histsiz) {
++ if (histlinect < histsiz || !hist_ring) {
+ he = (Histent)zshcalloc(sizeof *he);
+ if (!hist_ring)
+ hist_ring = he->up = he->down = he;
diff --git a/debian/patches/cherry-pick-9982ab6f-missing-changelog-entry b/debian/patches/cherry-pick-9982ab6f-missing-changelog-entry
new file mode 100644
index 000000000..59156b922
--- /dev/null
+++ b/debian/patches/cherry-pick-9982ab6f-missing-changelog-entry
@@ -0,0 +1,30 @@
+Origin: commit 9982ab6fb5266298c056326ed265fc8560202603
+Author: Mikael Magnusson <mikachu@gmail.com>
+Reviewd-by: Axel Beckert <abe@debian.org>
+Description: unposted: ChangeLog entry for 33365
+ This patch is cherry-picked because it actually should belong to
+ 5.0.7 as it adds one missing (and not unimportant) changelog entry
+ for the 5.0.7 release.
+ .
+ This was initially part of the 5.0.7 merge from upstream into debian,
+ but Jenkins insisted on building against the zsh-5.0.7 tag.
+ .
+ We may need to cherry-pick 9982ab6f in the debian branch before
+ merging the zsh-5.0.8 tag.
+
+diff --git a/ChangeLog b/ChangeLog
+index 2d25d1d..969273b 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -2,6 +2,11 @@
+
+ * unposted: Config/version.mk: 5.0.7
+
++2014-10-06 Mikael Magnusson <mikachu@gmail.com>
++
++ * 33365: Src/exec.c: avoid buffer overflow for very long fds in >&
++ fd syntax.
++
+ 2014-10-06 Peter Stephenson <p.stephenson@samsung.com>
+
+ * unposted (discussed offline): README: update description of
diff --git a/debian/patches/cherry-pick-a03227de-33405-vcs-info-make-sure-maxexports-is-set-when-vcs-info-set-is-called.patch b/debian/patches/cherry-pick-a03227de-33405-vcs-info-make-sure-maxexports-is-set-when-vcs-info-set-is-called.patch
new file mode 100644
index 000000000..41d5a069a
--- /dev/null
+++ b/debian/patches/cherry-pick-a03227de-33405-vcs-info-make-sure-maxexports-is-set-when-vcs-info-set-is-called.patch
@@ -0,0 +1,19 @@
+Origin: commit a03227de23f623370ab6a6eaf8d22e8d9b1a3aae
+Author: Frank Terbeck <ft@bewatermyfriend.org>
+Date: Thu Oct 9 18:09:36 2014 +0200
+Description: 33405: vcs_info: Make sure maxexports is set when VCS_INFO_set is called
+
+diff --git a/ChangeLog b/ChangeLog
+index 57850eb..b27895c 100644
+diff --git a/Functions/VCS_Info/vcs_info b/Functions/VCS_Info/vcs_info
+index 5a421df..4693869 100644
+--- a/Functions/VCS_Info/vcs_info
++++ b/Functions/VCS_Info/vcs_info
+@@ -94,6 +94,7 @@ vcs_info () {
+
+ for pat in ${dps} ; do
+ if [[ ${PWD} == ${~pat} ]] ; then
++ VCS_INFO_maxexports
+ [[ -n ${vcs_info_msg_0_} ]] && VCS_INFO_set --nvcs
+ return 0
+ fi
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..887b8d51a
--- /dev/null
+++ b/debian/patches/further-mitigate-test-suite-hangs.patch
@@ -0,0 +1,17 @@
+Origin: http://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
+
+diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
+index ca97f4f..0b40a73 100644
+--- a/Test/A05execution.ztst
++++ b/Test/A05execution.ztst
+@@ -208,6 +208,7 @@ F:This similar test was triggering a reproducible failure with pipestatus.
+ print -u $ZTST_fd 'This test takes 5 seconds to fail...'
+ { printf "%d\n" {1..20000} } | ( read -e )
+ hang(){ printf "%d\n" {2..20000} | cat }; hang | ( 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/replace-texi2html-with-makeinfo b/debian/patches/replace-texi2html-with-makeinfo
new file mode 100644
index 000000000..509a90a8a
--- /dev/null
+++ b/debian/patches/replace-texi2html-with-makeinfo
@@ -0,0 +1,17 @@
+Description: Replace deprecated texi2html with makeinfo
+Forwarded: http://www.zsh.org/mla/workers/2013/msg00723.html
+Author: Axel Beckert <abe@debian.org>
+
+Index: zsh/Doc/Makefile.in
+===================================================================
+--- zsh.orig/Doc/Makefile.in 2014-08-11 17:45:12.000000000 +0200
++++ zsh/Doc/Makefile.in 2014-08-11 17:45:12.000000000 +0200
+@@ -41,7 +41,7 @@
+ MAKEINFO = makeinfo
+ TEXI2DVI = texi2dvi
+ DVIPS = dvips
+-TEXI2HTML = @TEXI2HTML@ --output . --ifinfo --split=chapter --node-files \
++TEXI2HTML = makeinfo --html --output . --ifinfo --split=chapter --node-files \
+ --init-file texi2html.conf
+
+ .SUFFIXES: .yo .1
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 000000000..af374d2fb
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,9 @@
+replace-texi2html-with-makeinfo
+cherry-pick-9982ab6f-missing-changelog-entry
+cherry-pick-0f73b35f-33391-vcs-info-git-fix-applied-patch-detection-on-git-am.patch
+cherry-pick-a03227de-33405-vcs-info-make-sure-maxexports-is-set-when-vcs-info-set-is-called.patch
+cherry-pick-22c4ea42-33403-be-conservative-about-redirecting-call-program-stderr-the-caller-may-have-already-done-so.patch
+cherry-pick-605a73e4-33429-disallow-non-integer-values-for-histsize-and-savehist-of-fc-p-and-fix-crash-on-zero-values-for-same.patch
+cherry-pick-521313b4-tests-for-workers-33429.patch
+cherry-pick-2d14c085-33445-fix-handling-of-s-when-combined-with-i-at-shell-invocation.patch
+further-mitigate-test-suite-hangs.patch