diff --git a/.cvsignore b/.cvsignore index dfb725b..86b8f04 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,3 @@ tcsh-6.14.00.tar.gz tcsh-6.15.00.tar.gz +tcsh-6.16.00.tar.gz diff --git a/sources b/sources index e184c43..777a89e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -67a0611620b080bd0eb032b1774382b6 tcsh-6.15.00.tar.gz +55f1a41512250168ec4bf1db0e246db4 tcsh-6.16.00.tar.gz diff --git a/tcsh-6.14.00-config.patch b/tcsh-6.14.00-config.patch deleted file mode 100644 index b0d6b31..0000000 --- a/tcsh-6.14.00-config.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- tcsh-6.14.00/config_f.h.config 2005-03-26 00:12:39.756467744 +0100 -+++ tcsh-6.14.00/config_f.h 2005-03-26 00:12:49.831936040 +0100 -@@ -69,7 +69,7 @@ - * if you don't have , you don't want - * to define this. - */ --#undef NLS_CATALOGS -+#define NLS_CATALOGS - - /* - * LOGINFIRST Source ~/.login before ~/.cshrc diff --git a/tcsh-6.14.00-octal.patch b/tcsh-6.14.00-octal.patch deleted file mode 100644 index 385843c..0000000 --- a/tcsh-6.14.00-octal.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -up tcsh-6.15.00/sh.set.c.octal tcsh-6.15.00/sh.set.c ---- tcsh-6.15.00/sh.set.c.octal 2006-08-24 22:56:31.000000000 +0200 -+++ tcsh-6.15.00/sh.set.c 2008-09-03 12:28:10.000000000 +0200 -@@ -525,6 +525,7 @@ getn(Char *cp) - { - int n; - int sign; -+ int base; - - if (!cp) /* PWP: extra error checking */ - stderror(ERR_NAME | ERR_BADNUM); -@@ -538,9 +539,19 @@ getn(Char *cp) - if (!Isdigit(*cp)) - stderror(ERR_NAME | ERR_BADNUM); - } -+ -+ if (cp[0] == '0' && cp[1]) -+ base = 8; -+ else -+ base = 10; -+ - n = 0; - while (Isdigit(*cp)) -- n = n * 10 + *cp++ - '0'; -+ { -+ if (base == 8 && *cp >= '8') -+ stderror(ERR_NAME | ERR_BADNUM); -+ n = n * base + *cp++ - '0'; -+ } - if (*cp) - stderror(ERR_NAME | ERR_BADNUM); - return (sign ? -n : n); diff --git a/tcsh-6.14.00-read.patch b/tcsh-6.14.00-read.patch deleted file mode 100644 index 3a0b5ee..0000000 --- a/tcsh-6.14.00-read.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: tcsh/sh.dol.c -=================================================================== ---- tcsh.orig/sh.dol.c -+++ tcsh/sh.dol.c -@@ -485,9 +485,10 @@ Dgetdol(void) - (void) sigrelse(SIGINT); - #endif /* BSDSIGS */ - np = wbuf; -- while (force_read(OLDSTD, cbuf + cbp++, 1) == 1) { -+ while (force_read(OLDSTD, cbuf + cbp, 1) == 1) { - int len; - -+ cbp++; - len = normal_mbtowc(np, cbuf, cbp); - if (len == -1) { - reset_mbtowc(); diff --git a/tcsh-6.14.00-remotehost.patch b/tcsh-6.14.00-remotehost.patch deleted file mode 100644 index e1ad3ec..0000000 --- a/tcsh-6.14.00-remotehost.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- tcsh-6.14.00/tc.func.c.remotehost 2006-09-09 04:05:48.000000000 +0200 -+++ tcsh-6.14.00/tc.func.c 2006-09-09 04:05:52.000000000 +0200 -@@ -2250,14 +2250,13 @@ - jmp_buf_t osetexit; - getexit(osetexit); - -- (void) alarm(2); -- -- if (setexit() == 0) -+ if (setexit() == 0) { -+ (void) alarm(2); - getremotehost(); -- -+ } -+ (void) alarm(0); - resexit(osetexit); - -- (void) alarm(0); - (void) sigset(SIGALRM, osig); - - #ifdef YPBUGS diff --git a/tcsh-6.14.00-sigint.patch b/tcsh-6.14.00-sigint.patch deleted file mode 100644 index 82bda30..0000000 --- a/tcsh-6.14.00-sigint.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- tcsh-6.14.00/sh.proc.c.sigint 2006-02-19 05:07:32.000000000 +0100 -+++ tcsh-6.14.00/sh.proc.c 2006-02-19 05:29:52.000000000 +0100 -@@ -543,9 +543,7 @@ - { - struct process *fp; - int jobflags, reason; --#ifdef BSDSIGS -- sigmask_t omask; --#endif /* BSDSIGS */ -+ sigset_t omask, pause_mask; - #ifdef UNRELSIGS - signalfun_t inthandler; - #endif /* UNRELSIGS */ -@@ -562,17 +560,16 @@ - * target process, or any of its friends, are running - */ - fp = pp; --#ifdef BSDSIGS -- omask = sigblock(sigmask(SIGCHLD)); --#endif /* BSDSIGS */ -+ sigprocmask(SIG_BLOCK, NULL, &omask); -+ sighold(SIGINT); -+ sigprocmask(SIG_BLOCK, NULL, &pause_mask); -+ sighold(SIGCHLD); -+ sigdelset(&pause_mask, SIGCHLD); - #ifdef UNRELSIGS - if (setintr) - inthandler = signal(SIGINT, SIG_IGN); - #endif /* UNRELSIGS */ - for (;;) { --#ifndef BSDSIGS -- (void) sighold(SIGCHLD); --#endif /* !BSDSIGS */ - jobflags = 0; - do - jobflags |= fp->p_flags; -@@ -583,21 +580,12 @@ - xprintf("%d starting to sigpause for SIGCHLD on %d\n", - getpid(), fp->p_procid); - #endif /* JOBDEBUG */ --#ifdef BSDSIGS -- /* (void) sigpause(sigblock((sigmask_t) 0) &~ sigmask(SIGCHLD)); */ -- (void) sigpause(omask & ~sigmask(SIGCHLD)); --#else /* !BSDSIGS */ -- (void) sigpause(SIGCHLD); --#endif /* !BSDSIGS */ -+ sigsuspend(&pause_mask); - } - #ifdef JOBDEBUG - xprintf("%d returned from sigpause loop\n", getpid()); - #endif /* JOBDEBUG */ --#ifdef BSDSIGS -- (void) sigsetmask(omask); --#else /* !BSDSIGS */ -- (void) sigrelse(SIGCHLD); --#endif /* !BSDSIGS */ -+ sigprocmask(SIG_SETMASK, &omask, NULL); - #ifdef UNRELSIGS - if (setintr) - (void) signal(SIGINT, inthandler); diff --git a/tcsh-6.14.00-spell-crash.patch b/tcsh-6.14.00-spell-crash.patch deleted file mode 100644 index b0fe4db..0000000 --- a/tcsh-6.14.00-spell-crash.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- tcsh-6.14.00/tw.parse.c.spell-crash 2006-08-16 19:10:16.000000000 +0200 -+++ tcsh-6.14.00/tw.parse.c 2006-08-16 19:11:51.000000000 +0200 -@@ -1668,7 +1668,8 @@ - return (-1); - } - -- numitems = tw_collect(command, looking, exp_dir, exp_name, -+ exp_name[0] = '\0'; -+ numitems = tw_collect(command, looking, exp_dir, exp_name, - &target, pat, flags, dir_fd); - if (numitems == -1) - return -1; diff --git a/tcsh-6.15.00-var-sub.patch b/tcsh-6.15.00-var-sub.patch deleted file mode 100644 index cfe0f3c..0000000 --- a/tcsh-6.15.00-var-sub.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up tcsh-6.15.00/sh.dol.c.var-sub tcsh-6.15.00/sh.dol.c ---- tcsh-6.15.00/sh.dol.c.var-sub 2006-09-14 20:30:16.000000000 +0200 -+++ tcsh-6.15.00/sh.dol.c 2008-08-29 12:37:18.000000000 +0200 -@@ -613,7 +613,7 @@ Dgetdol(void) - - for (i = 0; Isdigit(*np); i = i * 10 + *np++ - '0') - continue; -- if ((i < 0 || i > upb) && !any("-*", *np)) { -+ if (i < 0 || i > upb) { - cleanup_until(&name); - dolerror(vp->v_name); - return; diff --git a/tcsh.spec b/tcsh.spec index c355bc3..0465258 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -2,21 +2,19 @@ Summary: An enhanced version of csh, the C shell Name: tcsh -Version: 6.15 -Release: 8%{?dist} -License: BSD with advertising +Version: 6.16 +Release: 1%{?dist} +License: BSD Group: System Environment/Shells -Source: ftp://ftp.astron.com/pub/tcsh/tcsh-%{version}.00.tar.gz +Source: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.00.tar.gz Patch1: tcsh-6.15.00-closem.patch Patch2: tcsh-6.14.00-tinfo.patch Patch3: tcsh-6.14.00-unprintable.patch Patch4: tcsh-6.15.00-hist-sub.patch -Patch5: tcsh-6.15.00-var-sub.patch Patch6: tcsh-6.15.00-ca-color.patch Patch7: tcsh-6.14.00-set.patch Patch8: tcsh-6.14.00-syntax.patch Patch9: tcsh-6.13.00-memoryuse.patch -Patch10: tcsh-6.14.00-octal.patch Patch11: tcsh-6.14.00-order.patch Patch12: tcsh-6.15.00-wide-str.patch Patch13: tcsh-6.15.00-rs-color.patch @@ -41,28 +39,31 @@ like syntax. %patch2 -p1 -b .tinfo %patch3 -p1 -b .unprintable %patch4 -p1 -b .hist-sub -%patch5 -p1 -b .var-sub %patch6 -p1 -b .ca-color %patch7 -p1 -b .set %patch8 -p1 -b .syntax %patch9 -p1 -b .memoryuse -%patch10 -p1 -b .octal %patch11 -p1 -b .order %patch12 -p1 -b .wide-str %patch13 -p1 -b .rs-color +for i in Fixes WishList; do + iconv -f iso-8859-1 -t utf-8 < "$i" > "${i}_" + mv "${i}_" "$i" +done + %build # For tcsh-6.14.00-tinfo.patch autoreconf %configure --without-hesiod -make all -make -C nls catalogs +make %{?_smp_mflags} all +make %{?_smp_mflags} -C nls catalogs %install -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf ${RPM_BUILD_ROOT} +rm -rf $RPM_BUILD_ROOT mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 ${RPM_BUILD_ROOT}%{_bindir} -install -m 755 tcsh ${RPM_BUILD_ROOT}%{_bindir}/tcsh -install -m 644 tcsh.man ${RPM_BUILD_ROOT}%{_mandir}/man1/tcsh.1 +install -p -m 755 tcsh ${RPM_BUILD_ROOT}%{_bindir}/tcsh +install -p -m 644 tcsh.man ${RPM_BUILD_ROOT}%{_mandir}/man1/tcsh.1 ln -sf tcsh ${RPM_BUILD_ROOT}%{_bindir}/csh ln -sf tcsh.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/csh.1 @@ -70,7 +71,7 @@ while read lang language ; do dest=${RPM_BUILD_ROOT}%{_datadir}/locale/$lang/LC_MESSAGES if test -f tcsh.$language.cat ; then mkdir -p $dest - install -m644 tcsh.$language.cat $dest/tcsh + install -p -m 644 tcsh.$language.cat $dest/tcsh echo "%lang($lang) %{_datadir}/locale/$lang/LC_MESSAGES/tcsh" fi done > tcsh.lang << _EOF @@ -89,34 +90,41 @@ uk ukrainian _EOF %clean -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf ${RPM_BUILD_ROOT} +rm -rf $RPM_BUILD_ROOT %post if [ ! -f /etc/shells ]; then - echo "%{_bindir}/tcsh" >> /etc/shells - echo "%{_bindir}/csh" >> /etc/shells + echo "%{_bindir}/tcsh" >> /etc/shells + echo "%{_bindir}/csh" >> /etc/shells else - grep -q '^%{_bindir}/tcsh$' /etc/shells || \ - echo "%{_bindir}/tcsh" >> /etc/shells - grep -q '^%{_bindir}/csh$' /etc/shells || \ - echo "%{_bindir}/csh" >> /etc/shells + grep -q '^%{_bindir}/tcsh$' /etc/shells || \ + echo "%{_bindir}/tcsh" >> /etc/shells + grep -q '^%{_bindir}/csh$' /etc/shells || \ + echo "%{_bindir}/csh" >> /etc/shells fi %postun if [ ! -x %{_bindir}/tcsh ]; then - grep -v '^%{_bindir}/tcsh$' /etc/shells | \ - grep -v '^%{_bindir}/csh$' > /etc/shells.rpm - cat /etc/shells.rpm > /etc/shells && rm /etc/shells.rpm + grep -v '^%{_bindir}/tcsh$' /etc/shells | \ + grep -v '^%{_bindir}/csh$' > /etc/shells.rpm && \ + mv /etc/shells.rpm /etc/shells fi %files -f tcsh.lang %defattr(-,root,root) -%doc FAQ Fixes NewThings complete.tcsh +%doc BUGS FAQ Fixes NewThings WishList complete.tcsh %{_bindir}/tcsh %{_bindir}/csh -%{_mandir}/*/* +%{_mandir}/man1/*.1* %changelog +* Tue Apr 28 2009 Vitezslav Crhonek - 6.16-1 +- Update to tcsh-6.16.00 +- Merge Review (fix License, add BUGS and WishList to documentation, convert Fixes and + WishList to UTF-8, remove root checking from buildroot cleaning, preserve timestamps, + use smp_flags, remove unused patches and improve postun script) + Resolves: #226483 + * Mon Mar 2 2009 Vitezslav Crhonek - 6.15-8 - Fix tcsh needs to know about new colorls variables Resolves: #487783