b62ed1
Summary: Displays where a particular program in your path is located
b62ed1
Name: which
b62ed1
Version: 2.21
04cbca
Release: 18%{?dist}
b62ed1
License: GPLv3
b62ed1
Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz
b62ed1
Source1: which2.sh
b62ed1
Source2: which2.csh
b62ed1
Patch0: which-2.21-coverity-fixes.patch
126a68
Patch1: which-2.21-coverity.patch
b62ed1
Url: https://savannah.gnu.org/projects/which/
a71e2f
Requires: coreutils
a71e2f
BuildRequires: gcc
b62ed1
BuildRequires: readline-devel
b62ed1
b62ed1
%description
b62ed1
The which command shows the full pathname of a specified program, if
b62ed1
the specified program is in your PATH.
b62ed1
b62ed1
%prep
b62ed1
%setup -q
b62ed1
%patch0 -p1 -b .coverity
126a68
%patch1 -p1 -b .coverity2
b62ed1
b62ed1
%build
b62ed1
%configure
b62ed1
%make_build
b62ed1
b62ed1
%install
b62ed1
%make_install
b62ed1
b62ed1
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
b62ed1
install -p -m 644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
b62ed1
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
b62ed1
b62ed1
%files
b62ed1
%license COPYING
b62ed1
%doc EXAMPLES README AUTHORS NEWS
b62ed1
%attr(0644,root,root) %{_sysconfdir}/profile.d/which2.*
b62ed1
%{_bindir}/which
b62ed1
%{_infodir}/which.info*
b62ed1
%{_mandir}/man1/which.1*
b62ed1
b62ed1
%changelog
04cbca
* Mon Apr 11 2022 Than Ngo <than@redhat.com> - 2.21-18
04cbca
- Resolves: #2044450 - custom profile generates shell error
04cbca
a71e2f
* Thu Nov 25 2021 Than Ngo <than@redhat.com> - 2.21-17
a71e2f
- Resolves: #2025709, check shell correctly 
a71e2f
- Resolves: #2009547, which treats function contents as aliases when parsing ksh
a71e2f
126a68
* Wed May 05 2021 Than Ngo <than@redhat.com> - 2.21-16
126a68
- Related: #1940468, fixed unbound variable
126a68
126a68
126a68
* Fri Apr 30 2021 Than Ngo <than@redhat.com> - 2.21-15
126a68
- Related: #1940468, fix error when the user runs which in bash with strict bash environment
126a68
126a68
* Tue Mar 23 2021 Than Ngo <than@redhat.com> - 2.21-14
126a68
- Related: #1940468, fix regression if SHELL=zsh
126a68
126a68
* Fri Mar 19 2021 Than Ngo <than@redhat.com> - 2.21-13
126a68
- Resolves: #1940468, fixed syntax error caused by testcase: a=b which ls
126a68
  Coverity issue
126a68
715bdd
* Tue Nov 19 2019 Than Ngo <than@redhat.com> - 2.21-12
715bdd
- Fixed coverity issue
715bdd
715bdd
* Tue Nov 19 2019 Than Ngo <than@redhat.com> - 2.21-11
715bdd
- Resolves: #1768506, fix wrong alias
715bdd
b62ed1
* Mon Jul 23 2018 Than Ngo <than@redhat.com> - 2.21-10
b62ed1
- Fix coverity issues
b62ed1
b62ed1
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-9
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b62ed1
b62ed1
* Fri Feb 16 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.21-8
b62ed1
- Fix invalid [ ... ] syntax which results in complaints by zsh.
b62ed1
  https://bugzilla.redhat.com/show_bug.cgi?id=1546221
b62ed1
- Remove pointless Group tag, buildroot cleaning and %%defattr.
b62ed1
b62ed1
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-7
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b62ed1
b62ed1
* Mon Feb 05 2018 Than Ngo <than@redhat.com> - 2.21-6
b62ed1
- added CI tests using the standard test interface
b62ed1
b62ed1
* Wed Jan 31 2018 Than Ngo <than@redhat.com> - 2.21-5
b62ed1
- fixed bz#1526500 - 'declare' not found under ksh
b62ed1
b62ed1
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-4
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
b62ed1
b62ed1
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-3
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b62ed1
b62ed1
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-2
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b62ed1
b62ed1
* Mon Jun 27 2016 Than Ngo <than@redhat.com> - 2.21-1
b62ed1
- update to 2.21
b62ed1
b62ed1
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.20-13
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b62ed1
b62ed1
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.20-12
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b62ed1
b62ed1
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 2.20-11
b62ed1
- Rebuilt for Fedora 23 Change
b62ed1
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
b62ed1
b62ed1
* Thu Feb 19 2015 Till Maas <opensource@till.name> - 2.20-10
b62ed1
- Use alias instead of exported function for which to avoid bashism,
b62ed1
http://unix.stackexchange.com/questions/59360/#59431
b62ed1
b62ed1
* Wed Feb 18 2015 Till Maas <opensource@till.name> - 2.20-9
b62ed1
- Check functions (#1194044)
b62ed1
- Use %%license
b62ed1
b62ed1
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.20-8
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
b62ed1
b62ed1
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.20-7
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b62ed1
b62ed1
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.20-6
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
b62ed1
b62ed1
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.20-5
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b62ed1
b62ed1
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.20-4
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b62ed1
b62ed1
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.20-3
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b62ed1
b62ed1
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.20-2
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b62ed1
b62ed1
* Wed Jan 19 2011 Than Ngo <than@redhat.com> - 2.20-1
b62ed1
- 2.2.0
b62ed1
- disable alias which for cshell
b62ed1
b62ed1
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.19-5
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
b62ed1
b62ed1
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.19-4
b62ed1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
b62ed1
b62ed1
* Thu Mar 06 2008 Warren Togami <wtogami@redhat.com> 2.19-3
b62ed1
- install-info should exit gracefully when --nodocs
b62ed1
b62ed1
* Fri Feb 15 2008 Than Ngo <than@redhat.com> 2.19-2
b62ed1
- rebuilt
b62ed1
b62ed1
* Fri Jan 25 2008 Than Ngo <than@redhat.com> 2.19-1
b62ed1
- 2.19, fix #399551, #430159
b62ed1
b62ed1
* Tue Nov 27 2007 Than Ngo <than@redhat.com> - 2.18-5
b62ed1
- fix permission which-2 scripts
b62ed1
b62ed1
* Tue Nov 27 2007 Than Ngo <than@redhat.com> 2.18-4
b62ed1
- fix permission which-2 scripts
b62ed1
b62ed1
* Mon Nov 26 2007 Karsten Hopp <karsten@redhat.com> 2.18-3
b62ed1
- add dir entry for info page
b62ed1
b62ed1
* Tue Nov 20 2007 Than Ngo <than@redhat.com> 2.18-2
b62ed1
- cleanup specfile
b62ed1
b62ed1
* Tue Nov 13 2007 Than Ngo <than@redhat.com> 2.18-1
b62ed1
- 2.18
b62ed1
b62ed1
* Tue Nov 13 2007 Than Ngo <than@redhat.com> 2.16-10
b62ed1
- cleanup specfile
b62ed1
- get rid of dev dependency
b62ed1
b62ed1
* Mon Apr 23 2007 Than Ngo <than@redhat.com> - 2.16-9
b62ed1
- add missing which-2 script for csh
b62ed1
- cleanup specfile #226539
b62ed1
b62ed1
* Mon Jan 22 2007 Than Ngo <than@redhat.com> - 2.16-8
b62ed1
- install-info scriptlet failures
b62ed1
b62ed1
* Fri Jul 14 2006 Jesse Keating <jkeating@redhat.com> - 2.16-7
b62ed1
- rebuild
b62ed1
b62ed1
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.16-6.2.1
b62ed1
- bump again for double-long bug on ppc(64)
b62ed1
b62ed1
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.16-6.2
b62ed1
- rebuilt for new gcc4.1 snapshot and glibc changes
b62ed1
b62ed1
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
b62ed1
- rebuilt
b62ed1
b62ed1
* Mon Mar 07 2005 Than Ngo <than@redhat.com> 2.16-6
b62ed1
- rebuilt
b62ed1
b62ed1
* Wed Feb 09 2005 Than Ngo <than@redhat.com> 2.16-5
b62ed1
- rebuilt
b62ed1
b62ed1
* Sat Aug 07 2004 Than Ngo <than@redhat.com> 2.16-4
b62ed1
- add missing URL (thanks to  Robert Scheck)
b62ed1
b62ed1
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
b62ed1
- rebuilt
b62ed1
b62ed1
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
b62ed1
- rebuilt
b62ed1
b62ed1
* Wed Sep 24 2003 Florian La Roche <Florian.LaRoche@redhat.de>
b62ed1
- update to 2.16
b62ed1
- fix %%preun
b62ed1
b62ed1
* Thu Jul 17 2003 Than Ngo <than@redhat.com> 2.14-8
b62ed1
- rebuild
b62ed1
b62ed1
* Thu Jul 17 2003 Than Ngo <than@redhat.com> 2.14-7
b62ed1
- added Prereq: dev (bug #99275)
b62ed1
b62ed1
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
b62ed1
- rebuilt
b62ed1
b62ed1
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
b62ed1
- rebuilt
b62ed1
b62ed1
* Tue Dec 10 2002 Than Ngo <than@redhat.com> 2.14-4
b62ed1
- cleanup code (bug #78478)
b62ed1
b62ed1
* Thu Nov 14 2002 Tim Powers <timp@redhat.com> 2.14-3
b62ed1
- redirect info dir warnings to /dev/null
b62ed1
b62ed1
* Thu Nov  7 2002 Than Ngo <than@redhat.com> 2.14-1
b62ed1
- add missing info file
b62ed1
b62ed1
* Mon Jul 29 2002 Florian La Roche <Florian.LaRoche@redhat.de>
b62ed1
- update to 2.14 wih better support for current bash
b62ed1
b62ed1
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
b62ed1
- automated rebuild
b62ed1
b62ed1
* Thu May 23 2002 Tim Powers <timp@redhat.com>
b62ed1
- automated rebuild
b62ed1
b62ed1
* Wed Feb 27 2002 Than Ngo <than@redhat.com> 2.13-3
b62ed1
- use access instead stat in AFS environment (bug #60353)
b62ed1
b62ed1
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
b62ed1
- automated rebuild
b62ed1
b62ed1
* Wed Dec 05 2001 Florian La Roche <Florian.LaRoche@redhat.de>
b62ed1
- update to 2.13
b62ed1
b62ed1
* Sat Aug  4 2001 Than Ngo <than@redhat.com>
b62ed1
- fix bug 50844
b62ed1
b62ed1
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
b62ed1
- Bump release + rebuild.
b62ed1
b62ed1
* Sun Sep 10 2000 Florian La Roche <Florian.LaRoche@redhat.de>
b62ed1
- 2.12 (only man-page fix)
b62ed1
b62ed1
* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
b62ed1
- automatic rebuild
b62ed1
b62ed1
* Sun Jun 18 2000 Than Ngo <than@redhat.de>
b62ed1
- FHS packaging.
b62ed1
b62ed1
* Sun May 21 2000 Ngo Than <than@redhat.de>
b62ed1
- put man pages in /usr/share/man/*
b62ed1
b62ed1
* Thu Apr 20 2000 Florian La Roche <Florian.LaRoche@redhat.de>
b62ed1
- update to 2.11
b62ed1
- change from root:bin -> root:root
b62ed1
b62ed1
* Mon Feb 07 2000 Preston Brown <pbrown@redhat.com>
b62ed1
- rebuild to gzip man page
b62ed1
b62ed1
* Sun Jan 16 2000 Preston Brown <pbrown@redhat.com>
b62ed1
- newer stuff rom Carlo (2.10).  Author's email: carlo@gnu.org
b62ed1
b62ed1
* Thu Jan 13 2000 Preston Brown <pbrown@redhat.com>
b62ed1
- adopted Carlo's specfile.
b62ed1
b62ed1
* Fri Sep 24 1999 Carlo Wood <carlo@gnu.org>
b62ed1
- There should not be a reason anymore to include README.alias in the rpm docs.
b62ed1
- Don't install as root.root in RPM_BUILD_ROOT, in order to allow to build
b62ed1
  rpm as non-root.
b62ed1
- Bug fix
b62ed1
- Added /etc/profile.d for automatic alias inclusion.
b62ed1
b62ed1
* Wed Aug 25 1999 Carlo Wood <carlo@gnu.org>
b62ed1
- Added README.alias.
b62ed1
b62ed1
* Wed Aug 11 1999 Carlo Wood <carlo@gnu.org>
b62ed1
- Typo in comment.
b62ed1
b62ed1
* Thu May 27 1999 Carlo Wood <carlo@gnu.org>
b62ed1
- Typo fix
b62ed1
- Moved maintainer targets from makefile to Makefile.am.
b62ed1
b62ed1
* Tue May 18 1999 Carlo Wood <carlo@gnu.org>
b62ed1
- Typo in appended changelog.
b62ed1
- Appended the old change log of `which-2.0.spec' to (this) changelog,
b62ed1
  which is generated from the CVS log of `which-2.0.spec.in'.
b62ed1
- Generate which-2.spec from which-2.spec.in with automatic VERSION
b62ed1
  and CHANGELOG substitution.
b62ed1
b62ed1
* Fri May 14 1999 Carlo Wood <carlo@gnu.org>
b62ed1
- Moved assignment of CFLAGS to the configure line, using RPM_OPT_FLAGS now.
b62ed1
- Corrected Source: line to point to ftp.gnu.org.
b62ed1
b62ed1
* Sat Apr 17 1999 Carlo Wood <carlo@gnu.org>
b62ed1
- Started to use automake and autoconf
b62ed1
b62ed1
* Fri Apr 09 1999 Carlo Wood <carlo@gnu.org>
b62ed1
- Renamed which-2.0.spec to which-2.spec
b62ed1