Fix sh syntax issue in which2.sh

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1546221.
I also included three small spec cleanups:
* Removed Group tag.
* Removed buildroot cleaning in %install.
* Removed needless %defattr in %files.
This commit is contained in:
Jason Tibbitts 2018-02-16 11:02:23 -06:00
parent bc81d7f136
commit 5f17e95f07
2 changed files with 7 additions and 6 deletions

View File

@ -1,9 +1,8 @@
Summary: Displays where a particular program in your path is located Summary: Displays where a particular program in your path is located
Name: which Name: which
Version: 2.21 Version: 2.21
Release: 7%{?dist} Release: 8%{?dist}
License: GPLv3 License: GPLv3
Group: Applications/System
Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz
Source1: which2.sh Source1: which2.sh
Source2: which2.csh Source2: which2.csh
@ -25,8 +24,6 @@ the specified program is in your PATH.
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
@ -44,7 +41,6 @@ fi
exit 0 exit 0
%files %files
%defattr(-,root,root)
%license COPYING %license COPYING
%doc EXAMPLES README AUTHORS NEWS %doc EXAMPLES README AUTHORS NEWS
%attr(0644,root,root) %{_sysconfdir}/profile.d/which2.* %attr(0644,root,root) %{_sysconfdir}/profile.d/which2.*
@ -53,6 +49,11 @@ exit 0
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Fri Feb 16 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.21-8
- Fix invalid [ ... ] syntax which results in complaints by zsh.
https://bugzilla.redhat.com/show_bug.cgi?id=1546221
- Remove pointless Group tag, buildroot cleaning and %%defattr.
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-7 * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.21-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

View File

@ -1,6 +1,6 @@
# Initialization script for bash and sh # Initialization script for bash and sh
if [ "$0" == ksh ] ; then if [ "$0" = ksh ] ; then
alias which='(alias; typeset -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot' alias which='(alias; typeset -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
else else
alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot' alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'