1 Star 0 Fork 16

yaokai13/ksh

forked from src-openEuler/ksh 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ksh.spec 2.72 KB
一键复制 编辑 原始数据 按行查看 历史
Vchanger 提交于 2020-04-21 17:18 +08:00 . ksh: fix CVE-2019-14868
Name: ksh
Version: 2020.0.0
Release: 3
Summary: The Original ATT Korn Shell
License: EPL
URL: http://www.kornshell.com/
Epoch: 1
Source0: https://github.com/att/ast/releases/download/%{version}-beta1/%{name}-%{version}-beta1.tar.gz
Source1: kshcomp.conf
Source2: kshrc.rhs
Source3: dotkshrc
Patch1: CVE-2019-14868.patch
Provides: /bin/ksh /usr/bin/ksh
BuildRequires: meson gcc glibc-devel ed
Conflicts: pdksh
Requires(post): grep, coreutils, systemd-units
Requires(postun): sed
%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.
%package help
Summary: Documentation for ksh package
%description help
Documentation for ksh package.
%prep
%autosetup -p1 -n %{name}-%{version}-beta1
%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
%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}
%config(noreplace) %{_sysconfdir}/skel/.kshrc
%config(noreplace) %{_sysconfdir}/kshrc
%config(noreplace) %{_sysconfdir}/binfmt.d/kshcomp.conf
%files help
%doc README.md
%{_mandir}/man1/*
%changelog
* 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
* Fri Jan 10 2020 Lijin Yang <yanglijin@huawei.com> - 1:2020.0.0-2
- Package init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yaokai13/ksh.git
git@gitee.com:yaokai13/ksh.git
yaokai13
ksh
ksh
master

搜索帮助