From 92bd44f9228212ecc1137f7ad2552a6296361473 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 15:20:17 +0000 Subject: [PATCH] =?UTF-8?q?auto-import=20changelog=20data=20from=20zsh-4.0?= =?UTF-8?q?.4-8.src.rpm=20Fri=20Jun=2028=202002=20Trond=20Eivind=20Glomsr?= =?UTF-8?q?=F8d=20=204.0.4-8=20-=20Make=20it=20work=20with?= =?UTF-8?q?=20a=20serial=20port=20(#56353)=20-=20Add=20$HOME/bin=20to=20pa?= =?UTF-8?q?th=20for=20login=20shells=20(#67110)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zprofile.rhs | 4 +++ zsh-serial.patch | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ zsh.spec | 8 +++++- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 zsh-serial.patch diff --git a/zprofile.rhs b/zprofile.rhs index db18222..46291ab 100644 --- a/zprofile.rhs +++ b/zprofile.rhs @@ -3,3 +3,7 @@ # # all bourne shells should source /etc/profile + + +PATH="$PATH:$HOME/bin" +export PATH diff --git a/zsh-serial.patch b/zsh-serial.patch new file mode 100644 index 0000000..541781c --- /dev/null +++ b/zsh-serial.patch @@ -0,0 +1,65 @@ +--- zsh-4.0.4/Src/builtin.c.open Tue Oct 16 02:49:17 2001 ++++ zsh-4.0.4/Src/builtin.c Wed May 15 11:55:32 2002 +@@ -3489,7 +3489,7 @@ bin_read(char *name, char **args, char * + if (!zleactive) { + if (SHTTY == -1) { + /* need to open /dev/tty specially */ +- if ((SHTTY = open("/dev/tty", O_RDWR|O_NOCTTY)) != -1) { ++ if ((SHTTY = block_open("/dev/tty", O_RDWR|O_NOCTTY)) != -1) { + haso = 1; + oshout = shout; + init_shout(); +--- zsh-4.0.4/Src/init.c.open Wed Oct 24 04:16:32 2001 ++++ zsh-4.0.4/Src/init.c Wed May 15 12:00:07 2002 +@@ -397,7 +397,7 @@ init_io(void) + if (isatty(0)) { + zsfree(ttystrname); + if ((ttystrname = ztrdup(ttyname(0)))) { +- SHTTY = movefd(open(ttystrname, O_RDWR | O_NOCTTY)); ++ SHTTY = movefd(block_open(ttystrname, O_RDWR | O_NOCTTY)); + #ifdef TIOCNXCL + /* + * See if the terminal claims to be busy. If so, and fd 0 +@@ -438,7 +438,7 @@ init_io(void) + ttystrname = ztrdup(ttyname(1)); + } + if (SHTTY == -1 && +- (SHTTY = movefd(open("/dev/tty", O_RDWR | O_NOCTTY))) != -1) { ++ (SHTTY = movefd(block_open("/dev/tty", O_RDWR | O_NOCTTY))) != -1) { + zsfree(ttystrname); + ttystrname = ztrdup(ttyname(SHTTY)); + } +@@ -1235,3 +1235,33 @@ zsh_main(int argc, char **argv) + : "use 'logout' to logout.", NULL, 0); + } + } ++ ++/**/ ++int ++block_open (const char *tty, int flags) ++{ ++ int saved_errno; ++ int fd; ++ ++ if ((flags & O_NONBLOCK) == 0) { ++ fd = open (tty, flags | O_NONBLOCK); ++ if (fd == -1) ++ return fd; ++ flags = fcntl(fd, F_GETFL); ++ if (flags == -1) ++ goto bad; ++ flags &= ~O_NONBLOCK; ++ if (fcntl(fd, F_SETFL, flags) == -1) ++ goto bad; ++ } ++ else ++ fd = open (tty, flags); ++ ++ return fd; ++ ++bad: ++ saved_errno = errno; ++ close (fd); ++ errno = saved_errno; ++ return -1; ++} diff --git a/zsh.spec b/zsh.spec index 6baed13..8d576b1 100644 --- a/zsh.spec +++ b/zsh.spec @@ -1,7 +1,7 @@ Summary: A shell similar to ksh, but with improvements. Name: zsh Version: 4.0.4 -Release: 7 +Release: 8 License: BSD Group: System Environment/Shells Source0: ftp://ftp.zsh.org/pub/zsh-%{version}.tar.bz2 @@ -10,6 +10,7 @@ Source2: zlogout.rhs Source3: zprofile.rhs Source4: zshrc.rhs Source5: zshenv.rhs +Patch0: zsh-serial.patch Prereq: fileutils grep /sbin/install-info Buildroot: %{_tmppath}/%{name}-%{version}-root Requires: libcap @@ -26,6 +27,7 @@ mechanism, and more. %prep %setup -q +%patch0 -p1 -b .serial %build @@ -97,6 +99,10 @@ fi %config(noreplace) /etc/* %changelog +* Fri Jun 28 2002 Trond Eivind Glomsrød 4.0.4-8 +- Make it work with a serial port (#56353) +- Add $HOME/bin to path for login shells (#67110) + * Fri Jun 21 2002 Tim Powers - automated rebuild