pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/54420
The following reply was made to PR pkg/54420; it has been noted by GNATS.
From: Matthias Ferdinand <mf+ml.pkgsrc-users%netzwerkagentursaarland.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: pkg/54420
Date: Tue, 21 Jan 2020 10:32:55 +0100
--3lcZGd9BuhuYXNfi
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Hi,
I created a crude workaround for this problem to be applied to
devel/libtool-base.
Wrappers are presumed to misorder arguments to libtool, leading to build
failure (in "bmake package" phase) for security/clamav (when unrar is
not disabled as it currently is).
This workaround adds a pre-check inside bin/libtool, which reorders
"-dlopen -L./.libs" to "-L./.libs -dlopen" and reexecs.
First try was patching it into m4/libtool.m4, but that failed.
NOTE:
- this is for bash, not sure how recent bash must be. Can it be
assumed that libtool always runs in bash-like shell under pkgsrc?
- cat/head/cp (Makefile patch) may need to be replaced with pkgsrc
vars
With this patch, security/clamav can be reverted to re-enable unrar
support and still build successfully. Leaving unrar disabled in clamav
makes it a security loophole.
Attached file check_dlopen_L_libs_misorder.sh should be placed under
devel/libtool-base/files/
Regards
Matthias Ferdinand
--3lcZGd9BuhuYXNfi
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
filename=patch_pr54420_devel_libtool-base_Makefile
--- devel/libtool-base/Makefile.orig 2020-01-21 10:00:45.295354436 +0100
+++ devel/libtool-base/Makefile 2020-01-21 10:02:14.863354436 +0100
@@ -81,6 +81,7 @@ post-build:
post-install:
${INSTALL_SCRIPT} ${WRKSRC}/shlibtool ${DESTDIR}${PREFIX}/bin/shlibtool
+ cp -p ${DESTDIR}${PREFIX}/bin/libtool ${DESTDIR}${PREFIX}/bin/__libtool && (head -n 1 ${DESTDIR}${PREFIX}/bin/libtool; cat ${FILESDIR}/check_dlopen_L_libs_misorder.sh ${DESTDIR}${PREFIX}/bin/libtool) >${DESTDIR}${PREFIX}/bin/__libtool && mv ${DESTDIR}${PREFIX}/bin/__libtool ${DESTDIR}${PREFIX}/bin/libtool
BUILDLINK_DEPMETHOD.dlcompat= build
--3lcZGd9BuhuYXNfi
Content-Type: application/x-sh
Content-Disposition: attachment; filename="check_dlopen_L_libs_misorder.sh"
Content-Transfer-Encoding: quoted-printable
=0A# crude workaround for PR pkg/54420 (clamav libunrar)=0Afunction ____che=
ck_dlopen_L_libs_misorder ()=0A{ local x y newargv=0A=0A for x in $(se=
q 0 $#); do=0A # echo x: ${!x}=0A y=3D$((x+1))=0A # ec=
ho y: ${!y}=0A if [ "${!x}" =3D "-dlopen" -a "${!y}" =3D "-L./.libs"=
]; then=0A declare -a newargv=0A # newargv indices a=
re 0-based, $1..$# are 1-based; reposition index var y=0A y=3D$(=
(x-1))=0A newargv=3D( ${1+"$@"} )=0A newargv[$y]=3D"-=
L./.libs"=0A newargv[$x]=3D"-dlopen"=0A echo "# modif=
ied at pos. $x"=0A sleep 1=0A exec $0 ${newargv[@]}=
=0A fi=0A done=0A}=0A____check_dlopen_L_libs_misorder ${1+"$@"}=
=0A=0A
--3lcZGd9BuhuYXNfi--
Home |
Main Index |
Thread Index |
Old Index