From dd5bd851bfccfc03c8ef72dd939d76e4598d6072b82c84a918afa7fb58c5a77f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Sun, 22 Dec 2019 09:27:57 +0000 Subject: [PATCH] - Update to version 5.8~pre2 (5.7.1-test-2) - Drop 1baf0d1f553631ecb641e98f4bf48bc2a44e5b82.patch, fixed upstream. OBS-URL: https://build.opensuse.org/package/show/shells/zsh?expand=0&rev=210 --- ...0d1f553631ecb641e98f4bf48bc2a44e5b82.patch | 106 ------------------ zsh-5.7.1-test-1.tar.xz | 3 - zsh-5.7.1-test-1.tar.xz.asc | 11 -- zsh-5.7.1-test-2.tar.xz | 3 + zsh-5.7.1-test-2.tar.xz.asc | 11 ++ zsh.changes | 7 ++ zsh.spec | 6 +- 7 files changed, 23 insertions(+), 124 deletions(-) delete mode 100644 1baf0d1f553631ecb641e98f4bf48bc2a44e5b82.patch delete mode 100644 zsh-5.7.1-test-1.tar.xz delete mode 100644 zsh-5.7.1-test-1.tar.xz.asc create mode 100644 zsh-5.7.1-test-2.tar.xz create mode 100644 zsh-5.7.1-test-2.tar.xz.asc diff --git a/1baf0d1f553631ecb641e98f4bf48bc2a44e5b82.patch b/1baf0d1f553631ecb641e98f4bf48bc2a44e5b82.patch deleted file mode 100644 index 1efa0e0..0000000 --- a/1baf0d1f553631ecb641e98f4bf48bc2a44e5b82.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 1baf0d1f553631ecb641e98f4bf48bc2a44e5b82 Mon Sep 17 00:00:00 2001 -From: Peter Stephenson -Date: Sun, 15 Dec 2019 19:04:04 +0000 -Subject: [PATCH] 45025: fix re-entrancy problem with memory management in - readoutput(). - -This could cause a signal received during $(...) to corrupt memory. ---- - ChangeLog | 6 ++++++ - Src/exec.c | 61 ++++++++++++++++++++++++++++++++---------------------- - 2 files changed, 42 insertions(+), 25 deletions(-) - -diff --git a/Src/exec.c b/Src/exec.c -index 9dc91a71e..64eee7dc4 100644 ---- a/Src/exec.c -+++ b/Src/exec.c -@@ -4646,19 +4646,25 @@ getoutput(char *cmd, int qt) - return NULL; - } - --/* read output of command substitution */ -+/* read output of command substitution -+ * -+ * The file descriptor "in" is closed by the function. -+ * -+ * "qt" indicates if the substitution was in double quotes. -+ * -+ * "readerror", if not NULL, is used to return any error that -+ * occurred during the read. -+ */ - - /**/ - mod_export LinkList - readoutput(int in, int qt, int *readerror) - { - LinkList ret; -- char *buf, *ptr; -- int bsiz, c, cnt = 0; -- FILE *fin; -+ char *buf, *bufptr, *ptr, inbuf[64]; -+ int bsiz, c, cnt = 0, readret; - int q = queue_signal_level(); - -- fin = fdopen(in, "r"); - ret = newlinklist(); - ptr = buf = (char *) hcalloc(bsiz = 64); - /* -@@ -4670,33 +4676,38 @@ readoutput(int in, int qt, int *readerror) - */ - dont_queue_signals(); - child_unblock(); -- while ((c = fgetc(fin)) != EOF || errno == EINTR) { -- if (c == EOF) { -- errno = 0; -- clearerr(fin); -- continue; -- } -- if (imeta(c)) { -- *ptr++ = Meta; -- c ^= 32; -- cnt++; -+ for (;;) { -+ readret = read(in, inbuf, 64); -+ if (readret <= 0) { -+ if (readret < 0 && errno == EINTR) -+ continue; -+ else -+ break; - } -- if (++cnt >= bsiz) { -- char *pp; -- queue_signals(); -- pp = (char *) hcalloc(bsiz *= 2); -- dont_queue_signals(); -+ for (bufptr = inbuf; bufptr < inbuf + readret; bufptr++) { -+ c = *bufptr; -+ if (imeta(c)) { -+ *ptr++ = Meta; -+ c ^= 32; -+ cnt++; -+ } -+ if (++cnt >= bsiz) { -+ char *pp; -+ queue_signals(); -+ pp = (char *) hcalloc(bsiz *= 2); -+ dont_queue_signals(); - -- memcpy(pp, buf, cnt - 1); -- ptr = (buf = pp) + cnt - 1; -+ memcpy(pp, buf, cnt - 1); -+ ptr = (buf = pp) + cnt - 1; -+ } -+ *ptr++ = c; - } -- *ptr++ = c; - } - child_block(); - restore_queue_signals(q); - if (readerror) -- *readerror = ferror(fin) ? errno : 0; -- fclose(fin); -+ *readerror = readret < 0 ? errno : 0; -+ close(in); - while (cnt && ptr[-1] == '\n') - ptr--, cnt--; - *ptr = '\0'; diff --git a/zsh-5.7.1-test-1.tar.xz b/zsh-5.7.1-test-1.tar.xz deleted file mode 100644 index f15d2ab..0000000 --- a/zsh-5.7.1-test-1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5d7f5fdec1189c78b76c6cbbfcd8680d2c2f3abed5d8bf70dac6e5bbdafb025 -size 3176336 diff --git a/zsh-5.7.1-test-1.tar.xz.asc b/zsh-5.7.1-test-1.tar.xz.asc deleted file mode 100644 index 947790d..0000000 --- a/zsh-5.7.1-test-1.tar.xz.asc +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQEzBAABCAAdFiEEfKfsqvBiFrkPiUFGrPgUbK6Mu8QFAl31MeIACgkQrPgUbK6M -u8RBXQgAxNAEYB590ArdctZzJxp43nWPyULDe31X08skGqInpRwQ4B5og4Ra1JM7 -SSF2YvYG+RcHPzPPVlKjinQ1Rxg/5kL/cyQM/mkM2TSxc6uk0Ejub1kiuoZeqR9t -/Srb3qRnTgGHZqvZduffQQaNKANW03C7Pha6shNbXE5i/vog/BmSr0LsEtA8FAWA -ZNXAZtgCvwwV6jSFFmsu2/TSPAx4GB/pglMtH+SQCLEmxhE+rP7qEG9uZD0cHtCR -XeUzPrEBHZvfZqzo+c42u0DbGme9D41ZCggcTypeFjpMy6Uz4gsAUiv2u780O9ij -l+d7bgLZBG1zM+p95GHsuCQ58qBAaQ== -=43SX ------END PGP SIGNATURE----- diff --git a/zsh-5.7.1-test-2.tar.xz b/zsh-5.7.1-test-2.tar.xz new file mode 100644 index 0000000..46fff64 --- /dev/null +++ b/zsh-5.7.1-test-2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6036e53b8dc417030e6ef9901ed82e2df8455f18f6e1b6264212caf2341f9ac6 +size 3180532 diff --git a/zsh-5.7.1-test-2.tar.xz.asc b/zsh-5.7.1-test-2.tar.xz.asc new file mode 100644 index 0000000..724aba0 --- /dev/null +++ b/zsh-5.7.1-test-2.tar.xz.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCAAdFiEEfKfsqvBiFrkPiUFGrPgUbK6Mu8QFAl3+3oYACgkQrPgUbK6M +u8QI9gf9GLHCdE1IwWV0aWjoZRYjQ7UhoGu8ZWGk5CFqkWM69FhZvvtc3/tl7Zxr +APn3GNGayLQ+ub2eZR/dw/2lI21FeF6tnYabdedfs88mkuj2MbGIDQV1iGVAmGbG +pTzemf2+3UaeHs6M6mc7juwlmhRoHaeM8wCkGdcGpbsD+LAon5+AMg1PTyZOnXuU +ql3mifDTDoNo8ME3xc0/67g33tpmCHKAISN900B65yCBtWv0st7JMULpAUGWlhrG +g4etSaWo6oyby4DKTIe5udvDfPCDe3lbI0UMStt4/TzAgV/0WJb4BKMLxJ+4w1Tj +dm+TvPXQnb5n6Bnx1fryfXzjOExEpw== +=mYIM +-----END PGP SIGNATURE----- diff --git a/zsh.changes b/zsh.changes index dad3f0a..64d1d08 100644 --- a/zsh.changes +++ b/zsh.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Dec 22 09:19:39 UTC 2019 - Ismail Dönmez + +- Update to version 5.8~pre2 (5.7.1-test-2) +- Drop 1baf0d1f553631ecb641e98f4bf48bc2a44e5b82.patch, fixed + upstream. + ------------------------------------------------------------------- Mon Dec 16 15:03:50 UTC 2019 - Ismail Dönmez diff --git a/zsh.spec b/zsh.spec index 1247587..a1b2640 100644 --- a/zsh.spec +++ b/zsh.spec @@ -17,7 +17,7 @@ # Only for -test builds -%define _version 5.7.1-test-1 +%define _version 5.7.1-test-2 %if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version} %if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700 @@ -28,7 +28,7 @@ BuildRequires: texi2html BuildRequires: texinfo %endif Name: zsh -Version: 5.8~pre1 +Version: 5.8~pre2 Release: 0%{?dist} Summary: Shell with comprehensive completion License: MIT @@ -43,7 +43,6 @@ Source5: zprofile Patch1: trim-unneeded-completions.patch # PATCH-FIX-OPENSUSE zsh-osc-completion.patch -- Fix openSUSE versions in osc completion Patch2: zsh-osc-completion.patch -Patch3: 1baf0d1f553631ecb641e98f4bf48bc2a44e5b82.patch BuildRequires: groff BuildRequires: libcap-devel BuildRequires: ncurses-devel @@ -100,7 +99,6 @@ This package contains the Zsh manual in HTML format. %patch1 -p1 %endif %patch2 -p1 -%patch3 -p1 # Remove executable bit chmod 0644 Etc/changelog2html.pl