Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/ksh.git#8eb8a66ae9c94a02c06d56f19b73bea6bc8c843a
This commit is contained in:
DistroBaker 2021-03-11 20:28:02 +00:00
parent 4b6620b962
commit a1958fad03

View File

@ -7,7 +7,7 @@ URL: http://www.kornshell.com/
License: EPL License: EPL
Epoch: 2 Epoch: 2
Version: %{releasedate} Version: %{releasedate}
Release: 253%{?dist} Release: 254%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz
Source2: kshcomp.conf Source2: kshcomp.conf
@ -228,6 +228,7 @@ Requires(post): grep, coreutils, systemd
Requires(postun): sed Requires(postun): sed
Provides: /bin/ksh Provides: /bin/ksh
Provides: /bin/rksh
%description %description
KSH-93 is the most recent version of the KornShell by David Korn of KSH-93 is the most recent version of the KornShell by David Korn of
@ -274,11 +275,12 @@ install -p -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/skel/.kshrc
install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/kshrc install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/kshrc
install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/binfmt.d/kshcomp.conf install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/binfmt.d/kshcomp.conf
ln -s %{_bindir}/ksh93 %{buildroot}/%{_bindir}/rksh
touch %{buildroot}%{_bindir}/ksh touch %{buildroot}%{_bindir}/ksh
touch %{buildroot}%{_mandir}/man1/ksh.1.gz touch %{buildroot}%{_mandir}/man1/ksh.1.gz
touch %{buildroot}%{_bindir}/rksh
touch %{buildroot}%{_mandir}/man1/rksh.1.gz
%check %check
[ -f ./skipcheck -o -f ./../skipcheck ] && exit 0 ||: [ -f ./skipcheck -o -f ./../skipcheck ] && exit 0 ||:
%if 0%{?rhel} > 6 %if 0%{?rhel} > 6
@ -307,20 +309,23 @@ then
fi fi
%post %post
if [ ! -f /etc/shells ]; then for s in /bin/ksh /bin/rksh /usr/bin/ksh /usr/bin/rksh
echo "/bin/ksh" > /etc/shells do
echo "/usr/bin/ksh" >> /etc/shells if [ ! -f /etc/shells ]; then
else echo "$s" > /etc/shells
if ! grep -q '^/bin/ksh$' /etc/shells ; then else
echo "/bin/ksh" >> /etc/shells if ! grep -q '^'"$s"'$' /etc/shells ; then
echo "$s" >> /etc/shells
fi fi
if ! grep -q '^/usr/bin/ksh$' /etc/shells ; then fi
echo "/usr/bin/ksh" >> /etc/shells done
fi
fi
%{_sbindir}/alternatives --install %{_bindir}/ksh ksh \ %{_sbindir}/alternatives --install %{_bindir}/ksh ksh \
%{_bindir}/ksh93 50 \ %{_bindir}/ksh93 50 \
--slave %{_bindir}/rksh rksh \
%{_bindir}/ksh93 \
--slave %{_mandir}/man1/rksh.1.gz ksh-man \
%{_mandir}/man1/ksh93.1.gz \
--slave %{_mandir}/man1/ksh.1.gz ksh-man \ --slave %{_mandir}/man1/ksh.1.gz ksh-man \
%{_mandir}/man1/ksh93.1.gz %{_mandir}/man1/ksh93.1.gz
@ -335,12 +340,12 @@ fi
/bin/systemctl try-restart systemd-binfmt.service >/dev/null 2>&1 || : /bin/systemctl try-restart systemd-binfmt.service >/dev/null 2>&1 || :
%postun %postun
if [ ! -f /bin/ksh ]; then for s in /bin/ksh /bin/rksh /usr/bin/ksh /usr/bin/rksh
sed -i '/^\/bin\/ksh$/ d' /etc/shells do
fi if [ ! -f $s ]; then
if [ ! -f /usr/bin/ksh ]; then sed -i '\|^'"$s"'$|d' /etc/shells
sed -i '/^\/usr\/bin\/ksh$/ d' /etc/shells fi
fi done
%preun %preun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
@ -361,15 +366,20 @@ fi
# LICENSE file is missing, temporarily? # LICENSE file is missing, temporarily?
%{_bindir}/ksh93 %{_bindir}/ksh93
%ghost %{_bindir}/ksh %ghost %{_bindir}/ksh
%{_bindir}/rksh %ghost %{_bindir}/rksh
%{_bindir}/shcomp %{_bindir}/shcomp
%{_mandir}/man1/* %{_mandir}/man1/*
%ghost %{_mandir}/man1/ksh.1.gz %ghost %{_mandir}/man1/ksh.1.gz
%ghost %{_mandir}/man1/rksh.1.gz
%config(noreplace) %{_sysconfdir}/skel/.kshrc %config(noreplace) %{_sysconfdir}/skel/.kshrc
%config(noreplace) %{_sysconfdir}/kshrc %config(noreplace) %{_sysconfdir}/kshrc
%config(noreplace) %{_sysconfdir}/binfmt.d/kshcomp.conf %config(noreplace) %{_sysconfdir}/binfmt.d/kshcomp.conf
%changelog %changelog
* Tue Feb 23 2021 Vincent Mihalkovic <vmihalko@redhat.com> - 2:20120801-254
- Add alternatives switching for rksh
Resolves #1893919
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2:20120801-253 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2:20120801-253
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild