ksh/ksh.spec

158 lines
4.4 KiB
RPMSpec
Raw Normal View History

2020-01-13 11:25:18 +08:00
Name: ksh
Version: 2020.0.0
2022-12-06 16:22:10 +08:00
Release: 11
2020-01-13 11:25:18 +08:00
Summary: The Original ATT Korn Shell
2022-04-13 15:18:17 +08:00
License: EPL-1.0
2020-01-13 11:25:18 +08:00
URL: http://www.kornshell.com/
Epoch: 1
Source0: https://github.com/att/ast/releases/download/%{version}/%{name}-%{version}.tar.gz
2020-01-13 11:25:18 +08:00
Source1: kshcomp.conf
Source2: kshrc.rhs
Source3: dotkshrc
2020-04-21 17:18:46 +08:00
Patch1: CVE-2019-14868.patch
2022-06-30 14:38:23 +08:00
Patch6000: backport-Fix-hist_nearend.patch
Patch6001: backport-functions-with-not-loaded-autoloaded-functions.patch
Patch6002: backport-Fix-interactive-restricted-shell-behavior.patch
2022-12-06 16:22:10 +08:00
Patch9000: skip-some-test.patch
2022-08-27 15:30:01 +08:00
Patch6003: backport-Fix-handling-of-skipped-directories.patch
Patch6004: backport-Change-default-build-type-to-minsize-to-imporve-the-performance.patch
2022-03-10 20:24:49 +08:00
2020-01-13 11:25:18 +08:00
Provides: /bin/ksh /usr/bin/ksh
BuildRequires: meson gcc glibc-devel ed
Conflicts: pdksh
2020-12-25 16:08:16 +08:00
Requires(post): grep, coreutils, systemd-units chkconfig
Requires(preun): chkconfig
2020-01-13 11:25:18 +08:00
Requires(postun): sed
2020-12-25 16:08:16 +08:00
Provides: ksh-help = %{epoch}:%{version}-%{release}
Obsoletes: ksh-help < %{epoch}:%{version}-%{release}
2020-01-13 11:25:18 +08:00
%description
KornShell is an interactive command language that provides access to the UNIX system and to
many other systems, on the many different computers and workstations on which it is implemented.
%prep
%autosetup -p1 -n %{name}-%{version}
2020-01-13 11:25:18 +08:00
%build
%meson -Dbuild-api-tests=false
%meson_build
%install
%meson_install
mv %{buildroot}/%{_bindir}/ksh %{buildroot}/%{_bindir}/ksh93
mv %{buildroot}/%{_bindir}/shcomp %{buildroot}/%{_bindir}/shcomp93
mv %{buildroot}/%{_mandir}/man1/ksh.1 %{buildroot}/%{_mandir}/man1/ksh93.1
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/binfmt.d/kshcomp.conf
install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/kshrc
install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.kshrc
2022-03-10 20:24:49 +08:00
%check
%meson_test
2020-01-13 11:25:18 +08:00
%post
for s in /bin/ksh /usr/bin/ksh
do
if [ ! -f /etc/shells ]; then
echo "$s" > /etc/shells
else
if ! grep -q '^'"$s"'$' /etc/shells ; then
echo "$s" >> /etc/shells
fi
fi
done
/bin/systemctl try-restart systemd-binfmt.service >/dev/null 2>&1 || :
%{_sbindir}/alternatives --install /bin/ksh ksh /bin/ksh93 50 \
--slave %{_mandir}/man1/ksh.1.gz ksh-man %{_mandir}/man1/ksh93.1.gz \
--slave /bin/shcomp shcomp93 /bin/shcomp93 2>/dev/null
%preun
if [ $1 -eq 0 ]; then
%{_sbindir}/alternatives --remove ksh /bin/ksh93
fi
%postun
for s in /bin/ksh /usr/bin/ksh
do
if [ ! -f $s ]; then
sed -i '\|^'"$s"'$|d' /etc/shells
fi
done
%triggerpostun -- ksh < 1:2020.0.0-0.1
%{_sbindir}/alternatives --auto ksh
%files
%doc src/cmd/ksh93/{COMPATIBILITY,RELEASE,TYPES}
%{_bindir}/{ksh93,shcomp93}
2020-12-25 16:08:16 +08:00
%{_mandir}/man1/*
2020-01-13 11:25:18 +08:00
%config(noreplace) %{_sysconfdir}/skel/.kshrc
%config(noreplace) %{_sysconfdir}/kshrc
%config(noreplace) %{_sysconfdir}/binfmt.d/kshcomp.conf
%changelog
2022-12-06 16:22:10 +08:00
* Tue Dec 6 2022 wangyuhang <wangyuhang27@huawei.com> - 1:2020.0.0-11
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:change patch name
2022-08-27 15:30:01 +08:00
* Sat Aug 27 2022 shixuantong <shixuantong@h-partners.com> - 1:2020.0.0-10
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Change default build type to "minsize"
2022-06-30 14:38:23 +08:00
* Thu Jun 30 2022 wangjiang <wangjiang37@h-partners.com> - 1:2020.0.0-9
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix backport-Fix-hist_nearend.patch
backport-functions-with-not-loaded-autoloaded-functions.patch
backport-Fix-interactive-restricted-shell-behavior.patch
2022-04-13 15:18:17 +08:00
* Wed Apr 13 2022 renhongxun <renhongxun@h-partners.com> - 1:2020.0.0-8
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:udpate license
2022-03-15 10:23:58 +08:00
* Tue Mar 15 2022 renhongxun <renhongxun@h-partners.com> - 1:2020.0.0-7
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix buildin path not found
2022-03-10 20:24:49 +08:00
* Thu Mar 10 2022 wangjiang <wangjiang37@h-partners.com> - 1:2020.0.0-6
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:enable check
2020-12-25 16:08:16 +08:00
* Fri Dec 25 2020 Liquor <lirui130@huawei.com> - 1:2020.0.0-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add package ksh-help to package ksh
* Tue Aug 4 2020 zhangxingliang <zhangxingliang3@huawei.com> - 1:2020.0.0-4
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update to stable release version 2020.0.0
2020-04-21 17:18:46 +08:00
* Tue Apr 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 1:2020.0.0-3
- Type:cves
- ID:CVE-2019-14868
- SUG:restart
- DESC:fix CVE-2019-14868
2020-01-13 11:25:18 +08:00
* Fri Jan 10 2020 Lijin Yang <yanglijin@huawei.com> - 1:2020.0.0-2
- Package init