auto-import changelog data from which-2.16-1.src.rpm

Wed Sep 24 2003 Florian La Roche <Florian.LaRoche@redhat.de>
- update to 2.16
- fix %preun
Thu Jul 17 2003 Than Ngo <than@redhat.com> 2.14-8
- rebuild
Thu Jul 17 2003 Than Ngo <than@redhat.com> 2.14-7
- added Prereq: dev (bug #99275)
Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt
This commit is contained in:
cvsdist 2004-09-09 14:20:27 +00:00
parent 6b63f8b659
commit d943064f47
4 changed files with 41 additions and 98 deletions

View File

@ -1 +1 @@
which-2.14.tar.gz
which-2.16.tar.gz

View File

@ -1 +1 @@
3897f2a9d0c53a166ba68be9c21353a6 which-2.14.tar.gz
830b83af48347a9a3520f561e47cbc9b which-2.16.tar.gz

View File

@ -1,5 +1,5 @@
--- which-2.13/bash.c.orig Tue Feb 26 23:39:42 2002
+++ which-2.13/bash.c Wed Feb 27 00:02:36 2002
--- 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
@ -8,100 +8,33 @@
#undef NOGROUP
/*
@@ -146,51 +145,52 @@
@@ -253,7 +252,7 @@
if (S_ISDIR (finfo.st_mode))
return (FS_EXISTS);
return (FS_EXISTS|FS_DIRECTORY);
-#if defined (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. */
- if (access (name, X_OK) == 0)
- return (FS_EXISTS | FS_EXECABLE);
- else
- return (FS_EXISTS);
+ 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 */
-
- /* 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. */
- if (user_id == -1)
- user_id = geteuid (); /* CHANGED: bash uses: current_user.euid; */
-
- /* Root only requires execute permission for any of owner, group or
- others to be able to exec a file. */
- if (user_id == 0)
+ 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. */
+ if (access (name, X_OK) == 0)
+ return (FS_EXISTS | FS_EXECABLE);
+ else
+ return (FS_EXISTS);
+ }
+ else /* !AFS */
{
- int bits;
-
- bits = (u_mode_bits (finfo.st_mode) |
- g_mode_bits (finfo.st_mode) |
- o_mode_bits (finfo.st_mode));
-
- if (X_BIT (bits))
- return (FS_EXISTS | FS_EXECABLE);
- }
-
- /* If we are the owner of the file, the owner execute bit applies. */
- if (user_id == finfo.st_uid && X_BIT (u_mode_bits (finfo.st_mode)))
- return (FS_EXISTS | FS_EXECABLE);
-
- /* If we are in the owning group, the group permissions apply. */
- if (group_member (finfo.st_gid) && X_BIT (g_mode_bits (finfo.st_mode)))
- return (FS_EXISTS | FS_EXECABLE);
-
- /* If `others' have execute permission to the file, then so do we,
- since we are also `others'. */
- if (X_BIT (o_mode_bits (finfo.st_mode)))
- return (FS_EXISTS | FS_EXECABLE);
- else
- return (FS_EXISTS);
+ {
/* 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 */
+ /* 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. */
+ if (user_id == -1)
+ user_id = geteuid (); /* CHANGED: bash uses: current_user.euid; */
+
+ /* Root only requires execute permission for any of owner, group or
+ others to be able to exec a file. */
+ if (user_id == 0)
+ {
+ int bits;
+
+ bits = (u_mode_bits (finfo.st_mode) |
+ g_mode_bits (finfo.st_mode) |
+ o_mode_bits (finfo.st_mode));
+
+ if (X_BIT (bits))
+ return (FS_EXISTS | FS_EXECABLE);
+ }
+
+ /* If we are the owner of the file, the owner execute bit applies. */
+ if (user_id == finfo.st_uid && X_BIT (u_mode_bits (finfo.st_mode)))
+ return (FS_EXISTS | FS_EXECABLE);
+
+ /* If we are in the owning group, the group permissions apply. */
+ if (group_member (finfo.st_gid) && X_BIT (g_mode_bits (finfo.st_mode)))
+ return (FS_EXISTS | FS_EXECABLE);
+
+ /* If `others' have execute permission to the file, then so do we,
+ since we are also `others'. */
+ if (X_BIT (o_mode_bits (finfo.st_mode)))
+ return (FS_EXISTS | FS_EXECABLE);
+ else
+ return (FS_EXISTS);
+ } /* !AFS */
+ } /* !AFS */
}
/* Return 1 if STRING is an absolute program name; it is absolute if it
/* From bash-2.05b / general.c / line 501 ; Changes: Using 'strchr' instead of 'xstrchr'. */

View File

@ -1,20 +1,16 @@
Summary: Displays where a particular program in your path is located.
Name: which
Version: 2.14
Release: 5
Version: 2.16
Release: 1
License: GPL
Group: Applications/System
Source0: ftp://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz
Source1: which-2.sh
Patch: which-2.13-afs.patch
Patch1: which-2.14-broken.patch
Prefix: %{_prefix}
Buildroot: %{_tmppath}/%{name}-root
Prereq: /sbin/install-info
Prereq: /sbin/install-info, dev
%description
The which command shows the full pathname of a specified program, if
@ -39,6 +35,7 @@ install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/profile.d
%post
/sbin/install-info --quiet --info-dir=%{_infodir} %{_infodir}/which.info.gz > /dev/null 2>&1
%preun
if [ $1 = 0 ]; then
/sbin/install-info --quiet --info-dir=%{_infodir} --delete %{_infodir}/which.info.gz > /dev/null 2>&1
fi
@ -55,6 +52,19 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/*/*
%changelog
* Wed Sep 24 2003 Florian La Roche <Florian.LaRoche@redhat.de>
- update to 2.16
- fix %%preun
* Thu Jul 17 2003 Than Ngo <than@redhat.com> 2.14-8
- rebuild
* Thu Jul 17 2003 Than Ngo <than@redhat.com> 2.14-7
- added Prereq: dev (bug #99275)
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt