Compare commits

...

No commits in common. 'c9' and 'i10cs' have entirely different histories.
c9 ... i10cs

@ -2,27 +2,12 @@
# Initialization script for bash, sh, mksh and ksh
case "$(basename $(readlink /proc/$$/exe))" in
*ksh*)
which_declare=""
which_opt=""
;;
zsh)
which_declare="typeset -f"
which_opt=""
*ksh*|zsh)
alias which='alias | /usr/bin/which --tty-only --read-alias --show-tilde --show-dot'
;;
bash|sh)
which_declare="declare -f"
which_opt="-f"
alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
;;
*)
which_declare=""
which_opt=""
;;
esac
function which {
(alias; eval ${which_declare}) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
}
export which_declare
export ${which_opt} which

@ -1,17 +1,19 @@
%global has_which2_alias 1
Summary: Displays where a particular program in your path is located
Name: which
Version: 2.21
Release: 29%{?dist}
License: GPLv3
Release: 43%{?dist}
License: GPL-3.0-only
Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz
Source1: which2.sh
Source2: which2.csh
Patch0: which-2.21-coverity-fixes.patch
Patch1: which-2.21-path_max.patch
Url: https://savannah.gnu.org/projects/which/
Requires: coreutils
BuildRequires: make
BuildRequires: gcc
BuildRequires: gcc
BuildRequires: readline-devel
%description
@ -19,9 +21,7 @@ The which command shows the full pathname of a specified program, if
the specified program is in your PATH.
%prep
%setup -q
%patch0 -p1 -b .coverity
%patch1 -p1 -b .path_max
%autosetup -p1
%build
%configure
@ -31,42 +31,92 @@ the specified program is in your PATH.
%make_install
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -p -m 644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
%if %{has_which2_alias}
install -p -m 644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
%endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%files
%license COPYING
%doc EXAMPLES README AUTHORS NEWS
%if %{has_which2_alias}
%attr(0644,root,root) %{_sysconfdir}/profile.d/which2.*
%endif
%{_bindir}/which
%{_infodir}/which.info*
%{_mandir}/man1/which.1*
%changelog
* Mon Mar 27 2023 Than Ngo <than@redhat.com> - 2.21-29
- Resolves: #2181974, which fails for long path
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2.21-43
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 2.21-42
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.21-42
- Bump release for June 2024 mass rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Mar 08 2023 Than Ngo <than@redhat.com> - 2.21-39
- fixed #2175953, enable which2 alias
* Sun Feb 19 2023 Than Ngo <than@redhat.com> - 2.21-38
- migrated to SPDX license
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Apr 15 2022 Than Ngo <than@redhat.com> - 2.21-28
- Resolves: #2050996, error on login when using ksh as the default shell
* Mon Nov 07 2022 Than Ngo <than@redhat.com> - 2.21-36
- which fails for long path
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.21-27
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Aug 05 2022 Than Ngo <than@redhat.com> - 2.21-35
- disable which2 alias and function by default as it caused more problems than benefits
* Fri May 07 2021 Than Ngo <than@redhat.com> - 2.21-26
- Related: #1940464, fixed unbound variable
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.21-25
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Feb 09 2022 Than Ngo <than@redhat.com> - 2.21-33
- make which2.sh script more robust,
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Dec 02 2021 Than Ngo <than@redhat.com> - 2.21-31
- check shell correctly
* Tue Oct 26 2021 Than Ngo <than@redhat.com> - 2.21-30
- disable the --read-functions option in korn shells
* Fri Oct 15 2021 Than Ngo <than@redhat.com> - 2.21-29
- Fixed regression, use export instead alias
* Sun Oct 10 2021 Than Ngo <than@redhat.com> - 2.21-28
- Resolves: #2009547, which treats function contents as aliases when parsing ksh
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue May 04 2021 Than Ngo <than@redhat.com> - 2.21-26
- Resolves: #1942153, fixed unbound variable
* Mon Apr 26 2021 Than Ngo <than@redhat.com> - 2.21-25
- improved which2.sh
* Tue Mar 23 2021 Than Ngo <than@redhat.com> - 2.21-24
- fix regression in zsh
- fixed regression if SHELL=zsh
* Sun Mar 21 2021 Than Ngo <than@redhat.com> - 2.21-23
- fixed coverity issues
- improved which2.sh
* Thu Mar 18 2021 Than Ngo <than@redhat.com> - 2.21-22
- Resolves: #1940464, fixed syntax error testcase: a=b which ls
- fixed syntax error testcase: a=b which ls
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save