1 Star 0 Fork 5

hongjinghao/expect

forked from src-openEuler/expect 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
expect.spec 5.04 KB
一键复制 编辑 原始数据 按行查看 历史
hongjinghao 提交于 2024-07-31 11:10 . sync patch from upstream
%{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
Name: expect
Epoch: 1
Version: 5.45.4
Release: 9
Summary: A tool for automating interactive applications
License: Public Domain
URL: https://core.tcl.tk/expect/index
Source0: http://downloads.sourceforge.net/%{name}/%{name}%{version}.tar.gz
Buildrequires: gcc tcl-devel autoconf automake chrpath
Provides: expectk
Obsoletes: expectk
# Patch0: fixes change log file permissions
Patch0: expect-5.43.0-log_file.patch
# Patch1: fixes install location, change pkgIndex
Patch1: expect-5.43.0-pkgpath.patch
# Patch2: fixes minor man page formatting issue
Patch2: expect-5.45-man-page.patch
# Patch3: fixes segmentation fault during matching characters
Patch3: expect-5.45-match-gt-numchars-segfault.patch
# Patch4: fixes memory leak when using -re, http://sourceforge.net/p/expect/patches/13/
Patch4: expect-5.45-re-memleak.patch
# Patch5: use vsnprintf instead of vsprintf to avoid buffer overflow
Patch5: expect-5.45-exp-log-buf-overflow.patch
# Patch6: fixes segfaults if Tcl is built with stubs and Expect is used directly
# from C program rhbz#1091060
Patch6: expect-5.45-segfault-with-stubs.patch
# Patch7: fixes leaked fd, patch by Matej Mužila, rhbz#1001220
Patch7: expect-5.45-fd-leak.patch
# examples patches
# Patch100: changes random function
Patch100: expect-5.32.2-random.patch
# Patch101: fixes bz674184 - mkpasswd fails randomly
Patch101: expect-5.45-mkpasswd-dash.patch
# Patch103: use full path to 'su', it's safer
Patch103: expect-5.45-passmass-su-full-path.patch
# Patch104: rhbz 963889, fixes inaccuracy in mkpasswd man page
Patch104: expect-5.45-mkpasswd-man.patch
# Patch105: Fix error with -Werror=format-security
Patch105: expect-5.45-format-security.patch
Patch6000: backport-expect-5.45-headers.patch
%description
Expect is a tool for automating interactive applications
such as telnet, ftp, passwd, fsck, rlogin, tip, etc.
Expect is also useful for testing these same applications.
This package contains expect utility.
%package devel
Summary: Header files for expect library
Requires: %{name} = %{epoch}:%{version}-%{release}
%description devel
Expect is a tool for automating interactive applications
such as telnet, ftp, passwd, fsck, rlogin, tip, etc.
Expect is also useful for testing these same applications.
This package contains header files for the expect library.
%package help
Summary: Man pages and other related documents for expect
BuildArch: noarch
%description help
Expect is a tool for automating interactive applications
such as telnet, ftp, passwd, fsck, rlogin, tip, etc.
Expect is also useful for testing these same applications.
This package contains man pages and other related documents for expect.
%prep
%autosetup -n %{name}%{version} -p1
%build
%configure \
--with-tcl=%{_libdir} \
--with-tk=%{_libdir} --enable-shared \
--with-tclinclude=%{_includedir}/tcl-private/generic
%make_build
%check
make test
%install
%make_install
# move
mv "$RPM_BUILD_ROOT"%{tcl_sitearch}/expect%{version}/libexpect%{version}.so "$RPM_BUILD_ROOT"%{_libdir}
# for linking with -lexpect
ln -s libexpect%{version}.so "$RPM_BUILD_ROOT"%{_libdir}/libexpect.so
# remove cryptdir/decryptdir, as Linux has no crypt command (bug 6668).
rm -f "$RPM_BUILD_ROOT"%{_bindir}/{cryptdir,decryptdir,autopasswd}
rm -f "$RPM_BUILD_ROOT"%{_mandir}/man1/{cryptdir,decryptdir}.1*
# remove rpath
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libexpect%{version}.so
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/expect
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
echo "%{_libdir}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc ChangeLog FAQ HISTORY NEWS README
%{_bindir}/*
%dir %{tcl_sitearch}/expect%{version}
%{tcl_sitearch}/expect%{version}/pkgIndex.tcl
%{_libdir}/libexpect*.so
%config(noreplace) /etc/ld.so.conf.d/*
%files devel
%{_includedir}/*
%files help
%{_mandir}/man1/*
%{_mandir}/man3/libexpect.3*
%changelog
* Wed Jul 31 2024 hongjinghao <hongjinghao@huawei.com> - 1:5.45.4-9
- sync patch from upstream
backport-expect-5.45-headers.patch
* Thu Feb 22 2024 hongjinghao <hongjinghao@huawei.com> - 1:5.45.4-8
- remove rpath and runpath of exec files and libraries
* Thu Jun 9 2022 yangzhao1 <yangzhao1@kylinos.cn> - 1:5.45.4-7
- Remove unnecessary Buildrequires git
* Thu Sep 9 2021 wangchen <wangchen137@huawei.com> - 1:5.45.4-6
- Delete -S git from %autosetup
* Tue Jun 22 2021 panxiaohe <panxiaohe@huawei.com> - 1:5.45.4-5
- Delete the telnet patch to remove the dependency on telnet
* Mon Apr 20 2020 openEuler Buildteam <buildteam@openeuler.org> - 1:5.45.4-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix ln error due to missing definition of majorver
* Thu Nov 21 2019 chengquan <chengquan3@huawei.com> - 1:5.45.4-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add buildrequire of git
* Fri Sep 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:5.45.4-2
- Delete redundant information
* Thu Aug 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:5.45.4-1
- Package init
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hongjinghao/expect.git
git@gitee.com:hongjinghao/expect.git
hongjinghao
expect
expect
master

搜索帮助