From edbfee2288d537bd7651f1c68404df7407bd6831 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Fri, 25 Jan 2008 10:56:15 +0000 Subject: [PATCH] 2.19, fix #399551, #430159 --- which-2.13-afs.patch | 40 -------------------------------------- which-2.14-broken.patch | 14 ------------- which-2.18-direntry.patch | 15 -------------- which-2.19-afs.patch | 41 +++++++++++++++++++++++++++++++++++++++ which.spec | 15 +++++++------- 5 files changed, 48 insertions(+), 77 deletions(-) delete mode 100644 which-2.13-afs.patch delete mode 100644 which-2.14-broken.patch delete mode 100644 which-2.18-direntry.patch create mode 100644 which-2.19-afs.patch diff --git a/which-2.13-afs.patch b/which-2.13-afs.patch deleted file mode 100644 index 9207270..0000000 --- a/which-2.13-afs.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- which-2.16/bash.c.afs 2003-09-15 03:58:55.000000000 +0200 -+++ which-2.16/bash.c 2003-09-24 23:40:25.000000000 +0200 -@@ -33,7 +33,6 @@ - */ - #define HAVE_GETGROUPS - #undef SHELL --#undef AFS - #undef NOGROUP - - /* -@@ -253,7 +252,7 @@ - if (S_ISDIR (finfo.st_mode)) - return (FS_EXISTS|FS_DIRECTORY); - --#if defined (AFS) -+ if (getenv("AFS")) { - /* We have to use access(2) to determine access because AFS does not - support Unix file system semantics. This may produce wrong - answers for non-AFS files when ruid != euid. I hate AFS. */ -@@ -261,8 +260,9 @@ - return (FS_EXISTS | FS_EXECABLE); - else - return (FS_EXISTS); --#else /* !AFS */ -- -+ } -+ else /* !AFS */ -+ { - /* Find out if the file is actually executable. By definition, the - only other criteria is that the file has an execute bit set that - we can use. */ -@@ -298,7 +298,7 @@ - return (FS_EXISTS | FS_EXECABLE); - - return (FS_EXISTS); --#endif /* !AFS */ -+ } /* !AFS */ - } - - /* From bash-2.05b / general.c / line 501 ; Changes: Using 'strchr' instead of 'xstrchr'. */ diff --git a/which-2.14-broken.patch b/which-2.14-broken.patch deleted file mode 100644 index 8f5d735..0000000 --- a/which-2.14-broken.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- which-2.14/tilde/tilde.c.orig Mon Dec 9 18:52:19 2002 -+++ which-2.14/tilde/tilde.c Mon Dec 9 18:58:09 2002 -@@ -182,7 +182,10 @@ - int result_size, result_index; - - result_index = result_size = 0; -- if (result = strchr (string, '~')) -+ -+ result = strchr (string, '~'); -+ -+ if (!result) - result = xmalloc (result_size = (strlen (string) + 16)); - else - result = xmalloc (result_size = (strlen (string) + 1)); diff --git a/which-2.18-direntry.patch b/which-2.18-direntry.patch deleted file mode 100644 index 4878e9e..0000000 --- a/which-2.18-direntry.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up which-2.18/which.texinfo.direntry which-2.18/which.texinfo ---- which-2.18/which.texinfo.direntry 2007-11-26 15:37:28.000000000 +0100 -+++ which-2.18/which.texinfo 2007-11-26 15:39:09.000000000 +0100 -@@ -43,6 +43,11 @@ original English. - @c !END COPYING - @end ifinfo - -+@dircategory Individual utilities -+@direntry -+* which: (which)which invocation. Shows the full path of commands -+@end direntry -+ - @titlepage - @title Which - @subtitle Show the full path of commands diff --git a/which-2.19-afs.patch b/which-2.19-afs.patch new file mode 100644 index 0000000..f9acce1 --- /dev/null +++ b/which-2.19-afs.patch @@ -0,0 +1,41 @@ +diff -up which-2.19/bash.c.afs which-2.19/bash.c +--- which-2.19/bash.c.afs 2008-01-18 19:03:40.000000000 +0100 ++++ which-2.19/bash.c 2008-01-25 11:41:14.000000000 +0100 +@@ -34,7 +34,6 @@ + */ + #define HAVE_GETGROUPS + #undef SHELL +-#undef AFS + #undef NOGROUP + + /* +@@ -251,7 +250,7 @@ file_status (char const* name) + + r = FS_EXISTS; + +-#if defined (AFS) ++ if (getenv("AFS")) { + /* We have to use access(2) to determine access because AFS does not + support Unix file system semantics. This may produce wrong + answers for non-AFS files when ruid != euid. I hate AFS. */ +@@ -261,8 +260,9 @@ file_status (char const* name) + r |= FS_READABLE; + + return r; +-#else /* !AFS */ +- ++ } ++ else /* !AFS */ ++ { + /* Find out if the file is actually executable. By definition, the + only other criteria is that the file has an execute bit set that + we can use. The same with whether or not a file is readable. */ +@@ -305,7 +305,7 @@ file_status (char const* name) + } + + return r; +-#endif /* !AFS */ ++ } /* !AFS */ + } + + /* From bash-3.2 / general.c / line 534 ; Changes: Using 'strchr' instead of 'xstrchr'. */ diff --git a/which.spec b/which.spec index f2a574f..7cf0fc3 100644 --- a/which.spec +++ b/which.spec @@ -1,16 +1,14 @@ Summary: Displays where a particular program in your path is located Name: which -Version: 2.18 -Release: 5%{?dist} -License: GPLv2 +Version: 2.19 +Release: 1%{?dist} +License: GPLv3 Group: Applications/System Source0: http://www.xs4all.nl/~carlo17/which/%{name}-%{version}.tar.gz Source1: which2.sh Source2: which2.csh Url: http://www.xs4all.nl/~carlo17/which/ -Patch: which-2.13-afs.patch -Patch1: which-2.14-broken.patch -Patch2: which-2.18-direntry.patch +Patch: which-2.19-afs.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(preun): /sbin/install-info Requires(post): /sbin/install-info @@ -23,8 +21,6 @@ the specified program is in your PATH. %setup -q %patch -p1 -b .afs -%patch1 -p1 -b .broken -%patch2 -p1 -b .direntry %build %configure @@ -60,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/*/* %changelog +* Fri Jan 25 2008 Than Ngo 2.19-1 +- 2.19, fix #399551, #430159 + * Tue Nov 27 2007 Than Ngo - 2.18-5 - fix permission which-2 scripts