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:
parent
4b6620b962
commit
a1958fad03
42
ksh.spec
42
ksh.spec
@ -7,7 +7,7 @@ URL: http://www.kornshell.com/
|
||||
License: EPL
|
||||
Epoch: 2
|
||||
Version: %{releasedate}
|
||||
Release: 253%{?dist}
|
||||
Release: 254%{?dist}
|
||||
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
|
||||
Source2: kshcomp.conf
|
||||
@ -228,6 +228,7 @@ Requires(post): grep, coreutils, systemd
|
||||
Requires(postun): sed
|
||||
|
||||
Provides: /bin/ksh
|
||||
Provides: /bin/rksh
|
||||
|
||||
%description
|
||||
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 -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/binfmt.d/kshcomp.conf
|
||||
|
||||
ln -s %{_bindir}/ksh93 %{buildroot}/%{_bindir}/rksh
|
||||
|
||||
touch %{buildroot}%{_bindir}/ksh
|
||||
touch %{buildroot}%{_mandir}/man1/ksh.1.gz
|
||||
|
||||
touch %{buildroot}%{_bindir}/rksh
|
||||
touch %{buildroot}%{_mandir}/man1/rksh.1.gz
|
||||
|
||||
%check
|
||||
[ -f ./skipcheck -o -f ./../skipcheck ] && exit 0 ||:
|
||||
%if 0%{?rhel} > 6
|
||||
@ -307,20 +309,23 @@ then
|
||||
fi
|
||||
|
||||
%post
|
||||
for s in /bin/ksh /bin/rksh /usr/bin/ksh /usr/bin/rksh
|
||||
do
|
||||
if [ ! -f /etc/shells ]; then
|
||||
echo "/bin/ksh" > /etc/shells
|
||||
echo "/usr/bin/ksh" >> /etc/shells
|
||||
echo "$s" > /etc/shells
|
||||
else
|
||||
if ! grep -q '^/bin/ksh$' /etc/shells ; then
|
||||
echo "/bin/ksh" >> /etc/shells
|
||||
fi
|
||||
if ! grep -q '^/usr/bin/ksh$' /etc/shells ; then
|
||||
echo "/usr/bin/ksh" >> /etc/shells
|
||||
if ! grep -q '^'"$s"'$' /etc/shells ; then
|
||||
echo "$s" >> /etc/shells
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
%{_sbindir}/alternatives --install %{_bindir}/ksh ksh \
|
||||
%{_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 \
|
||||
%{_mandir}/man1/ksh93.1.gz
|
||||
|
||||
@ -335,12 +340,12 @@ fi
|
||||
/bin/systemctl try-restart systemd-binfmt.service >/dev/null 2>&1 || :
|
||||
|
||||
%postun
|
||||
if [ ! -f /bin/ksh ]; then
|
||||
sed -i '/^\/bin\/ksh$/ d' /etc/shells
|
||||
fi
|
||||
if [ ! -f /usr/bin/ksh ]; then
|
||||
sed -i '/^\/usr\/bin\/ksh$/ d' /etc/shells
|
||||
for s in /bin/ksh /bin/rksh /usr/bin/ksh /usr/bin/rksh
|
||||
do
|
||||
if [ ! -f $s ]; then
|
||||
sed -i '\|^'"$s"'$|d' /etc/shells
|
||||
fi
|
||||
done
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
@ -361,15 +366,20 @@ fi
|
||||
# LICENSE file is missing, temporarily?
|
||||
%{_bindir}/ksh93
|
||||
%ghost %{_bindir}/ksh
|
||||
%{_bindir}/rksh
|
||||
%ghost %{_bindir}/rksh
|
||||
%{_bindir}/shcomp
|
||||
%{_mandir}/man1/*
|
||||
%ghost %{_mandir}/man1/ksh.1.gz
|
||||
%ghost %{_mandir}/man1/rksh.1.gz
|
||||
%config(noreplace) %{_sysconfdir}/skel/.kshrc
|
||||
%config(noreplace) %{_sysconfdir}/kshrc
|
||||
%config(noreplace) %{_sysconfdir}/binfmt.d/kshcomp.conf
|
||||
|
||||
%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
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user