void-packages/srcpkgs/expect/template
Shahab Vahedi 0ad10d033b expect: Fix the buffer overlow while logging
There is a buffer overflow issue with "expect" when you run it
with "--debug" flag and the expected string is too big [1].

This patch was already proposed 7 years ago [2] but never found
its away upstream. Other distros also fix it locally [3]. It's
time we have it fixed in Void Linux as well.

[1] Bug 26986 - *** buffer overflow detected ***: expect terminated
https://sourceware.org/bugzilla/show_bug.cgi?id=26986

[2] Expect / Bugs / #95 buffer overflow in exp_log.c
https://sourceforge.net/p/expect/bugs/95/

[3] fedora fixing the overflow in expect
https://src.fedoraproject.org/rpms/expect/blob/master/f/expect-5.45-exp-log-buf-overflow.patch
2020-12-01 17:55:51 -03:00

41 lines
1.1 KiB
Bash

# Template file for 'expect'
pkgname=expect
version=5.45.4
revision=3
wrksrc=${pkgname}${version}
build_style=gnu-configure
configure_args="expect_cv_wnohang_value=1"
make_check_target="test"
hostmakedepends="automake libtool tcl-devel"
makedepends="tcl-devel"
short_desc="Programmed dialogue with interactive programs"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Public Domain"
homepage="http://www.nist.gov/el/msid/expect.cfm"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/Expect/${version}/${pkgname}${version}.tar.gz"
checksum=49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34
alternatives="
mkpasswd:mkpasswd:/usr/bin/expect-mkpasswd
mkpasswd:mkpasswd.1:/usr/share/man/man1/expect-mkpasswd.1"
LDFLAGS+=" -Wl,-rpath=/usr/lib:/usr/lib/${pkgname}${version}"
pre_configure() {
autoreconf -fi
}
post_install() {
rm ${DESTDIR}/usr/bin/weather
mv ${DESTDIR}/usr/bin/{,expect-}mkpasswd
mv ${DESTDIR}/usr/share/man/man1/{,expect-}mkpasswd.1
}
expect-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" -- development files"
pkg_install() {
vmove usr/include
vmove usr/share/man/man3
}
}