Accepting request 328399 from shells

- Add read1char_signals.patch to fix workers/36373 

- Update to version 5.1
  * The print builtin has new options -x and -X to expand tabs.
  * Several new command completions and numerous updates to others.
  * Options to "fc" to segregate internal and shared history.
  * All emulations including "sh" use multibyte by default; several
    repairs to multibyte handling.
  * ZLE supports "bracketed paste" mode to avoid interpreting pasted
    newlines as accept-line.  Pastes can be highlighted for visibility
    and to make it more obvious whether accept-line has occurred.
  * Improved (though still not perfect) POSIX compatibility for getopts
    builtin when POSIX_BUILTINS is set.
  * New setopt APPEND_CREATE for POSIX-compatible NO_CLOBBER behavior.
  * Completion of date values now displays in a calendar format when
    the complist module is available.  Controllable by zstyle.
  * New parameter UNDO_LIMIT_NO for more control over ZLE undo repeat.
  * Several repairs/improvements to the contributed narrow-to-region
    ZLE function.
  * Many changes to child-process and signal handling to eliminate race
    conditions and avoid deadlocks on descriptor and memory management.
  * New builtin sysopen in zsh/system module for detailed control of
    file descriptor modes. 
- Remove printf-regress.patch, upstream.

OBS-URL: https://build.opensuse.org/request/show/328399
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zsh?expand=0&rev=69
This commit is contained in:
Dominique Leuenberger 2015-09-03 15:59:47 +00:00 committed by Git OBS Bridge
commit c45bf1e18d
6 changed files with 65 additions and 52 deletions

View File

@ -1,46 +0,0 @@
From ac26fafa03c30e8c79e4bd70bdbb68d025643ee7 Mon Sep 17 00:00:00 2001
From: Oliver Kiddle <opk@zsh.org>
Date: Sun, 7 Jun 2015 23:07:26 +0200
Subject: [PATCH] 35412: fix for - flag when formating strings with printf
---
ChangeLog | 5 +++++
Src/builtin.c | 2 +-
Test/B03print.ztst | 8 ++++++--
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/Src/builtin.c b/Src/builtin.c
index 643b8c6..a3d847f 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -4518,7 +4518,7 @@ bin_print(char *name, char **args, Options ops, int func)
lleft -= chars;
ptr += chars;
}
- if (width > 0 && flags[2]) width = -width;
+ if (width > 0 && flags[3]) width = -width;
if (width > 0 && lchars < width)
count += fprintf(fout, "%*c", width - lchars, ' ');
count += fwrite(b, 1, lbytes, fout);
diff --git a/Test/B03print.ztst b/Test/B03print.ztst
index 54d6350..eb79c4d 100644
--- a/Test/B03print.ztst
+++ b/Test/B03print.ztst
@@ -169,11 +169,15 @@
0:%n count zeroed on format reuse
>1
-# this may fill spec string with '%0+- #*.*lld\0' - 13 characters
- printf '%1$0+- #-08.5dx\n' 123
+# this may fill spec string with '%0'+- #*.*lld\0' - 14 characters
+ printf '%1$0'"'+- #-08.5dx\n" 123
0:maximal length format specification
>+00123 x
+ printf "x:%-20s:y\n" fubar
+0:left-justification of string
+>x:fubar :y
+
printf '%*smorning\n' -5 good
0:negative width specified
>good morning

28
read1char_signals.patch Normal file
View File

@ -0,0 +1,28 @@
commit 3747f6b6ab20ac9082909dd0cb3376e4e35f2c6c
Author: Barton E. Schaefer <schaefer@zsh.org>
Date: Tue Sep 1 11:26:06 2015 -0700
36376: handle signals during read1char() so it is possible to interrupt correct/correctall prompts
diff --git a/Src/utils.c b/Src/utils.c
index 4c4dc55..90f7c33 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -2538,11 +2538,16 @@ static int
read1char(int echo)
{
char c;
+ int q = queue_signal_level();
+ dont_queue_signals();
while (read(SHTTY, &c, 1) != 1) {
- if (errno != EINTR || errflag || retflag || breaks || contflag)
+ if (errno != EINTR || errflag || retflag || breaks || contflag) {
+ restore_queue_signals(q);
return -1;
+ }
}
+ restore_queue_signals(q);
if (echo)
write_loop(SHTTY, &c, 1);
return STOUC(c);

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8079cf08cb8beff22f84b56bd72bb6e6962ff4718d816f3d83a633b4c9e17d23
size 3250542

3
zsh-5.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c3a654fa0ef26cb1a3228c9257101870e72899fde1cd815388b1b2cbbdfa59b4
size 2785404

View File

@ -1,3 +1,34 @@
-------------------------------------------------------------------
Tue Sep 1 18:57:20 UTC 2015 - idonmez@suse.com
- Add read1char_signals.patch to fix workers/36373
-------------------------------------------------------------------
Tue Sep 1 06:36:57 UTC 2015 - idonmez@suse.com
- Update to version 5.1
* The print builtin has new options -x and -X to expand tabs.
* Several new command completions and numerous updates to others.
* Options to "fc" to segregate internal and shared history.
* All emulations including "sh" use multibyte by default; several
repairs to multibyte handling.
* ZLE supports "bracketed paste" mode to avoid interpreting pasted
newlines as accept-line. Pastes can be highlighted for visibility
and to make it more obvious whether accept-line has occurred.
* Improved (though still not perfect) POSIX compatibility for getopts
builtin when POSIX_BUILTINS is set.
* New setopt APPEND_CREATE for POSIX-compatible NO_CLOBBER behavior.
* Completion of date values now displays in a calendar format when
the complist module is available. Controllable by zstyle.
* New parameter UNDO_LIMIT_NO for more control over ZLE undo repeat.
* Several repairs/improvements to the contributed narrow-to-region
ZLE function.
* Many changes to child-process and signal handling to eliminate race
conditions and avoid deadlocks on descriptor and memory management.
* New builtin sysopen in zsh/system module for detailed control of
file descriptor modes.
- Remove printf-regress.patch, upstream.
-------------------------------------------------------------------
Sun Jun 14 12:55:42 UTC 2015 - idonmez@suse.com

View File

@ -17,13 +17,13 @@
Name: zsh
Version: 5.0.8
Version: 5.1
Release: 0
Summary: Shell with comprehensive completion
License: MIT
Group: System/Shells
Url: http://www.zsh.org
Source0: http://www.zsh.org/pub/zsh-%{version}.tar.bz2
Source0: http://www.zsh.org/pub/zsh-%{version}.tar.xz
Source1: zshrc
Source2: zshenv
Source3: zprofile
@ -39,7 +39,7 @@ Source17: zshprompt.pl
Patch1: trim-unneeded-completions.patch
# PATCH-FIX-OPENSUSE zsh-osc-completion.patch -- Fix openSUSE versions in osc completion
Patch2: zsh-osc-completion.patch
Patch3: printf-regress.patch
Patch3: read1char_signals.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
Requires(pre): %{install_info_prereq}