From d4737238b561306880b4e267a64c0bc7a1f16d9bcd1ecf59114538260906768d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 5 Dec 2011 09:43:11 +0000 Subject: [PATCH 1/4] - Fix license to be MIT, zsh seems to be using the "Modern" variant of the license text. - Import git commits 74eed99c312de05e19b54ba6b5d37a0aeb4ba713 and 724fd07a67f135c74eba57e9f25fd342201ec722 * metafy() added null termination even if buffer was not modifiable * Fix uninitialised memory after lexer realloc OBS-URL: https://build.opensuse.org/package/show/shells/zsh?expand=0&rev=87 --- ...d07a67f135c74eba57e9f25fd342201ec722.patch | 35 +++++++++++++++++++ ...d99c312de05e19b54ba6b5d37a0aeb4ba713.patch | 29 +++++++++++++++ zsh.changes | 11 ++++++ zsh.spec | 7 +++- 4 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 724fd07a67f135c74eba57e9f25fd342201ec722.patch create mode 100644 74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch diff --git a/724fd07a67f135c74eba57e9f25fd342201ec722.patch b/724fd07a67f135c74eba57e9f25fd342201ec722.patch new file mode 100644 index 0000000..9de6dae --- /dev/null +++ b/724fd07a67f135c74eba57e9f25fd342201ec722.patch @@ -0,0 +1,35 @@ +commit 724fd07a67f135c74eba57e9f25fd342201ec722 +Author: Peter Stephenson +Date: Sat Dec 3 17:24:45 2011 +0000 + + 29934: Stef van Vlierberghe: uninitialised memory after lexer realloc + +diff --git a/Src/lex.c b/Src/lex.c +index 90c4eff..05f54f8 100644 +--- a/Src/lex.c ++++ b/Src/lex.c +@@ -567,22 +567,14 @@ add(int c) + { + *bptr++ = c; + if (bsiz == ++len) { +-#if 0 +- int newbsiz; +- +- newbsiz = bsiz * 8; +- while (newbsiz < inbufct) +- newbsiz *= 2; +- bptr = len + (tokstr = (char *)hrealloc(tokstr, bsiz, newbsiz)); +- bsiz = newbsiz; +-#endif +- + int newbsiz = bsiz * 2; + + if (newbsiz > inbufct && inbufct > bsiz) + newbsiz = inbufct; + + bptr = len + (tokstr = (char *)hrealloc(tokstr, bsiz, newbsiz)); ++ /* len == bsiz, so bptr is at the start of newly allocated memory */ ++ memset(bptr, 0, newbsiz - bsiz); + bsiz = newbsiz; + } + } diff --git a/74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch b/74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch new file mode 100644 index 0000000..a1627fd --- /dev/null +++ b/74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch @@ -0,0 +1,29 @@ +commit 74eed99c312de05e19b54ba6b5d37a0aeb4ba713 +Author: Peter Stephenson +Date: Sat Dec 3 23:15:37 2011 +0000 + + 29940: metafy() added null termination even if buffer was not modifiable + +diff --git a/Src/utils.c b/Src/utils.c +index 6c2ea98..014cb2f 100644 +--- a/Src/utils.c ++++ b/Src/utils.c +@@ -3959,7 +3959,7 @@ metafy(char *buf, int len, int heap) + if (imeta(*e++)) + meta++; + +- if (meta || heap == META_DUP || heap == META_HEAPDUP) { ++ if (meta || heap == META_DUP || heap == META_HEAPDUP || *e != '\0') { + switch (heap) { + case META_REALLOC: + buf = zrealloc(buf, len + meta + 1); +@@ -4002,8 +4002,8 @@ metafy(char *buf, int len, int heap) + meta--; + } + } ++ *e = '\0'; + } +- *e = '\0'; + return buf; + } + diff --git a/zsh.changes b/zsh.changes index 3fa7949..e508c49 100644 --- a/zsh.changes +++ b/zsh.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Dec 5 09:40:23 UTC 2011 - idoenmez@suse.de + +- Fix license to be MIT, zsh seems to be using the "Modern" variant + of the license text. +- Import git commits 74eed99c312de05e19b54ba6b5d37a0aeb4ba713 and + 724fd07a67f135c74eba57e9f25fd342201ec722 + + * metafy() added null termination even if buffer was not modifiable + * Fix uninitialised memory after lexer realloc + ------------------------------------------------------------------- Wed Nov 30 21:49:26 UTC 2011 - idoenmez@suse.de diff --git a/zsh.spec b/zsh.spec index e25ba28..2f57ef6 100644 --- a/zsh.spec +++ b/zsh.spec @@ -20,7 +20,7 @@ Name: zsh Version: 4.3.13 Release: 4 -License: BSD +License: MIT Summary: Shell with comprehensive completion Url: http://www.zsh.org %if 0%{?suse_version} @@ -42,6 +42,9 @@ Source16: dotzshrc.rh Source17: zshprompt.pl %endif Patch1: %{name}-4.3.12-disable-c02cond-test.patch +# Fixes from zsh.git +Patch100: 724fd07a67f135c74eba57e9f25fd342201ec722.patch +Patch101: 74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} Requires(pre): %{install_info_prereq} @@ -96,6 +99,8 @@ This package contains the Zsh manual in html format. %prep %setup -q -n %{name}-%{version} %patch1 +%patch100 -p1 +%patch101 -p1 # Remove executable bit chmod 0644 Etc/changelog2html.pl From e64400740522c1fe8e696d274b996e0c3303da67e052f91710d77dcde5eb4ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 7 Dec 2011 13:34:12 +0000 Subject: [PATCH 2/4] - Update to zsh 4.3.14 * Drop 74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch and 724fd07a67f135c74eba57e9f25fd342201ec722.patch, fixed upstream * Fix for nanosecond timestamp support OBS-URL: https://build.opensuse.org/package/show/shells/zsh?expand=0&rev=88 --- ...d07a67f135c74eba57e9f25fd342201ec722.patch | 35 ------------------- ...d99c312de05e19b54ba6b5d37a0aeb4ba713.patch | 29 --------------- zsh-4.3.13.tar.bz2 | 3 -- zsh-4.3.14.tar.bz2 | 3 ++ zsh.changes | 8 +++++ zsh.spec | 7 +--- 6 files changed, 12 insertions(+), 73 deletions(-) delete mode 100644 724fd07a67f135c74eba57e9f25fd342201ec722.patch delete mode 100644 74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch delete mode 100644 zsh-4.3.13.tar.bz2 create mode 100644 zsh-4.3.14.tar.bz2 diff --git a/724fd07a67f135c74eba57e9f25fd342201ec722.patch b/724fd07a67f135c74eba57e9f25fd342201ec722.patch deleted file mode 100644 index 9de6dae..0000000 --- a/724fd07a67f135c74eba57e9f25fd342201ec722.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 724fd07a67f135c74eba57e9f25fd342201ec722 -Author: Peter Stephenson -Date: Sat Dec 3 17:24:45 2011 +0000 - - 29934: Stef van Vlierberghe: uninitialised memory after lexer realloc - -diff --git a/Src/lex.c b/Src/lex.c -index 90c4eff..05f54f8 100644 ---- a/Src/lex.c -+++ b/Src/lex.c -@@ -567,22 +567,14 @@ add(int c) - { - *bptr++ = c; - if (bsiz == ++len) { --#if 0 -- int newbsiz; -- -- newbsiz = bsiz * 8; -- while (newbsiz < inbufct) -- newbsiz *= 2; -- bptr = len + (tokstr = (char *)hrealloc(tokstr, bsiz, newbsiz)); -- bsiz = newbsiz; --#endif -- - int newbsiz = bsiz * 2; - - if (newbsiz > inbufct && inbufct > bsiz) - newbsiz = inbufct; - - bptr = len + (tokstr = (char *)hrealloc(tokstr, bsiz, newbsiz)); -+ /* len == bsiz, so bptr is at the start of newly allocated memory */ -+ memset(bptr, 0, newbsiz - bsiz); - bsiz = newbsiz; - } - } diff --git a/74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch b/74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch deleted file mode 100644 index a1627fd..0000000 --- a/74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 74eed99c312de05e19b54ba6b5d37a0aeb4ba713 -Author: Peter Stephenson -Date: Sat Dec 3 23:15:37 2011 +0000 - - 29940: metafy() added null termination even if buffer was not modifiable - -diff --git a/Src/utils.c b/Src/utils.c -index 6c2ea98..014cb2f 100644 ---- a/Src/utils.c -+++ b/Src/utils.c -@@ -3959,7 +3959,7 @@ metafy(char *buf, int len, int heap) - if (imeta(*e++)) - meta++; - -- if (meta || heap == META_DUP || heap == META_HEAPDUP) { -+ if (meta || heap == META_DUP || heap == META_HEAPDUP || *e != '\0') { - switch (heap) { - case META_REALLOC: - buf = zrealloc(buf, len + meta + 1); -@@ -4002,8 +4002,8 @@ metafy(char *buf, int len, int heap) - meta--; - } - } -+ *e = '\0'; - } -- *e = '\0'; - return buf; - } - diff --git a/zsh-4.3.13.tar.bz2 b/zsh-4.3.13.tar.bz2 deleted file mode 100644 index 433b55d..0000000 --- a/zsh-4.3.13.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:173bafa9f363050de40c50492eccbd8c55d85401a42b076b2178c2d9d5355d9c -size 2964918 diff --git a/zsh-4.3.14.tar.bz2 b/zsh-4.3.14.tar.bz2 new file mode 100644 index 0000000..96e915c --- /dev/null +++ b/zsh-4.3.14.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a85a31e243c10106b159923b164935b11bc282d1388bbabe1c77408c93f6b2b8 +size 2965367 diff --git a/zsh.changes b/zsh.changes index e508c49..c3444f0 100644 --- a/zsh.changes +++ b/zsh.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Dec 7 13:28:25 UTC 2011 - idonmez@suse.com + +- Update to zsh 4.3.14 + * Drop 74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch and + 724fd07a67f135c74eba57e9f25fd342201ec722.patch, fixed upstream + * Fix for nanosecond timestamp support + ------------------------------------------------------------------- Mon Dec 5 09:40:23 UTC 2011 - idoenmez@suse.de diff --git a/zsh.spec b/zsh.spec index 2f57ef6..7364368 100644 --- a/zsh.spec +++ b/zsh.spec @@ -18,7 +18,7 @@ Name: zsh -Version: 4.3.13 +Version: 4.3.14 Release: 4 License: MIT Summary: Shell with comprehensive completion @@ -42,9 +42,6 @@ Source16: dotzshrc.rh Source17: zshprompt.pl %endif Patch1: %{name}-4.3.12-disable-c02cond-test.patch -# Fixes from zsh.git -Patch100: 724fd07a67f135c74eba57e9f25fd342201ec722.patch -Patch101: 74eed99c312de05e19b54ba6b5d37a0aeb4ba713.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} Requires(pre): %{install_info_prereq} @@ -99,8 +96,6 @@ This package contains the Zsh manual in html format. %prep %setup -q -n %{name}-%{version} %patch1 -%patch100 -p1 -%patch101 -p1 # Remove executable bit chmod 0644 Etc/changelog2html.pl From 2a5b48d91beb25f4dd4fab9f61e2691b3b7d703acc5ca49d5fcf88b88deadd37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 20 Dec 2011 09:33:57 +0000 Subject: [PATCH 3/4] - Update to zsh 4.3.15 * Fix POSIX compatibility OBS-URL: https://build.opensuse.org/package/show/shells/zsh?expand=0&rev=89 --- zsh-4.3.14.tar.bz2 | 3 --- zsh-4.3.15.tar.bz2 | 3 +++ zsh.changes | 6 ++++++ zsh.spec | 13 ++++--------- 4 files changed, 13 insertions(+), 12 deletions(-) delete mode 100644 zsh-4.3.14.tar.bz2 create mode 100644 zsh-4.3.15.tar.bz2 diff --git a/zsh-4.3.14.tar.bz2 b/zsh-4.3.14.tar.bz2 deleted file mode 100644 index 96e915c..0000000 --- a/zsh-4.3.14.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a85a31e243c10106b159923b164935b11bc282d1388bbabe1c77408c93f6b2b8 -size 2965367 diff --git a/zsh-4.3.15.tar.bz2 b/zsh-4.3.15.tar.bz2 new file mode 100644 index 0000000..5494a5d --- /dev/null +++ b/zsh-4.3.15.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8708f485823fb7e51aa696776d0dfac7d3558485182672cf9311c12a50a95486 +size 2969951 diff --git a/zsh.changes b/zsh.changes index c3444f0..74419e6 100644 --- a/zsh.changes +++ b/zsh.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 20 09:27:59 UTC 2011 - idonmez@suse.com + +- Update to zsh 4.3.15 + * Fix POSIX compatibility + ------------------------------------------------------------------- Wed Dec 7 13:28:25 UTC 2011 - idonmez@suse.com diff --git a/zsh.spec b/zsh.spec index 7364368..e1fe162 100644 --- a/zsh.spec +++ b/zsh.spec @@ -15,18 +15,15 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: zsh -Version: 4.3.14 -Release: 4 -License: MIT +Version: 4.3.15 +Release: 0 Summary: Shell with comprehensive completion +License: MIT +Group: System/Shells Url: http://www.zsh.org %if 0%{?suse_version} -Group: System/Shells %else -Group: System Environment/Shells %endif Source0: ftp://ftp.zsh.org/pub/zsh-%{version}.tar.bz2 Source1: zshrc @@ -77,9 +74,7 @@ Zsh is well known for its command line completion. Summary: Zsh shell manual in html format %if 0%{?suse_version} -Group: System/Shells %else -Group: System Environment/Shells Obsoletes: %{name}-html < %{version} %endif From 61630cdf59923161e3bcd498457466c02410e689dbcc786e29deb89ada68684a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 20 Dec 2011 09:35:55 +0000 Subject: [PATCH 4/4] - OBS-URL: https://build.opensuse.org/package/show/shells/zsh?expand=0&rev=90 --- zsh.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/zsh.spec b/zsh.spec index e1fe162..e4af30c 100644 --- a/zsh.spec +++ b/zsh.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: zsh Version: 4.3.15 Release: 0 @@ -22,9 +23,6 @@ Summary: Shell with comprehensive completion License: MIT Group: System/Shells Url: http://www.zsh.org -%if 0%{?suse_version} -%else -%endif Source0: ftp://ftp.zsh.org/pub/zsh-%{version}.tar.bz2 Source1: zshrc Source2: zshenv @@ -73,10 +71,7 @@ Zsh is well known for its command line completion. %package htmldoc Summary: Zsh shell manual in html format -%if 0%{?suse_version} -%else Obsoletes: %{name}-html < %{version} -%endif %description htmldoc The zsh shell is a command interpreter usable as an interactive login