Please review the attached patch for Prefix support of ssldump. Lines that spelling openssl and pcap explicitly are added, which looks not cool. I couldn't find a better way, though :( Should I bump to 0.9-r2 when applying the patch? Reproducible: Always
Benda, you forgot the patch :/ This is the relevant difference: @@ -37,7 +37,9 @@ local myconf use ssl || myconf="--without-openssl" - econf ${myconf} + econf ${myconf} \ + --with-pcap-inc="${EPREFIX}"/usr/include \ + --with-pcap-lib="${EPREFIX}"/usr/$(get_libdir) } src_install() {
Created attachment 310765 [details, diff] ssldump-tree.patch Here is the patch, which I forgot to attach.
Comment on attachment 310765 [details, diff] ssldump-tree.patch Review: needs EAPI bump to >=3
Created attachment 314489 [details, diff] ssldump.patch use EAPI=4, thanks darkside.
Created attachment 314491 [details, diff] ssldump-makefile-fix.patch Do not use ${ROOT} variable, which get overriden by portage ROOT envvar inside Makefile.
@netmon, please review my patches. if there are no objections I will commit the changes in a week. Thanks.
I think this patch should be committed.
(In reply to comment #7) > I think this patch should be committed. It helps ssldump to build and install, but not to run :-( prefix@phantom ~ $ which ssldump /home/prefix/gentoo/usr/sbin/ssldump prefix@phantom ~ $ ldd `which ssldump` linux-vdso.so.1 => (0x00007fffd35db000) libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007f17b1cb1000) libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007f17b1900000) libpcap.so.1 => not found libm.so.6 => /lib64/libm.so.6 (0x00007f17b167d000) libc.so.6 => /lib64/libc.so.6 (0x00007f17b12ed000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f17b10e9000) libz.so.1 => /lib64/libz.so.1 (0x00007f17b0ed3000) /lib64/ld-linux-x86-64.so.2 (0x00007f17b1f0e000) Pcap is not found and libssl must be taken from prefix(as i see in ldd's output of other prefix-installed binaries)
(In reply to comment #8) > Pcap is not found and libssl must be taken from prefix(as i see in ldd's > output of other prefix-installed binaries) Strange isn't libpcap pulled in?
(In reply to comment #9) > (In reply to comment #8) > > Pcap is not found and libssl must be taken from prefix(as i see in ldd's > > output of other prefix-installed binaries) > Strange isn't libpcap pulled in? Yep, it's installed in prefix and not installed in root(so everything should be ok, but it is not): prefix@phantom ~ $ equery f libpcap | head -4 /home/prefix/gentoo/usr /home/prefix/gentoo/usr/bin /home/prefix/gentoo/usr/bin/pcap-config /home/prefix/gentoo/usr/include prefix@phantom ~ $ ls /home/prefix/gentoo/usr/bin/pcap-config /home/prefix/gentoo/usr/bin/pcap-config prefix@phantom ~ $ ls /usr/bin/pcap-config ls: cannot access /usr/bin/pcap-config: No such file or directory
(In reply to comment #8) > (In reply to comment #7) > > I think this patch should be committed. > > It helps ssldump to build and install, but not to run :-( > > prefix@phantom ~ $ which ssldump > /home/prefix/gentoo/usr/sbin/ssldump > > prefix@phantom ~ $ ldd `which ssldump` > linux-vdso.so.1 => (0x00007fffd35db000) > libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007f17b1cb1000) > libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 > (0x00007f17b1900000) > libpcap.so.1 => not found > libm.so.6 => /lib64/libm.so.6 (0x00007f17b167d000) > libc.so.6 => /lib64/libc.so.6 (0x00007f17b12ed000) > libdl.so.2 => /lib64/libdl.so.2 (0x00007f17b10e9000) > libz.so.1 => /lib64/libz.so.1 (0x00007f17b0ed3000) > /lib64/ld-linux-x86-64.so.2 (0x00007f17b1f0e000) > > Pcap is not found and libssl must be taken from prefix(as i see in ldd's > output of other prefix-installed binaries) OOps, mine is different, on ~arm-linux # ldd `which ssldump` libssl.so.1.0.0 => /gentoo/usr/lib/libssl.so.1.0.0 (0x40001000) libcrypto.so.1.0.0 => /gentoo/usr/lib/libcrypto.so.1.0.0 (0x4005c000) libpcap.so.1 => /gentoo/usr/lib/libpcap.so.1 (0x401be000) libm.so.6 => /lib/libm.so.6 (0x40200000) libc.so.6 => /lib/libc.so.6 (0x402a8000) libdl.so.2 => /lib/libdl.so.2 (0x403d9000) libz.so.1 => /gentoo/lib/libz.so.1 (0x403e5000) libgcc_s.so.1 => /gentoo/lib/libgcc_s.so.1 (0x40402000) /lib/ld-linux.so.3 (0x2a000000)
Meanwhile, ldd on tcpdump shows me: prefix@phantom ~ $ ldd `which tcpdump` linux-vdso.so.1 => (0x00007fffe61ff000) libcrypto.so.1.0.0 => /home/prefix/gentoo/usr/lib/libcrypto.so.1.0.0 (0x00007fcea1aa4000) libpcap.so.1 => /home/prefix/gentoo/usr/lib/libpcap.so.1 (0x00007fcea1866000) libc.so.6 => /lib64/libc.so.6 (0x00007fcea14cf000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fcea12cb000) libz.so.1 => /home/prefix/gentoo/lib/libz.so.1 (0x00007fcea10b5000) /lib64/ld-linux-x86-64.so.2 (0x00007fcea1e79000) So, it's not libpcap problem, it's ssldump one, IMO
(In reply to comment #12) > Meanwhile, ldd on tcpdump shows me: > > prefix@phantom ~ $ ldd `which tcpdump` > linux-vdso.so.1 => (0x00007fffe61ff000) > libcrypto.so.1.0.0 => /home/prefix/gentoo/usr/lib/libcrypto.so.1.0.0 > (0x00007fcea1aa4000) > libpcap.so.1 => /home/prefix/gentoo/usr/lib/libpcap.so.1 > (0x00007fcea1866000) > libc.so.6 => /lib64/libc.so.6 (0x00007fcea14cf000) > libdl.so.2 => /lib64/libdl.so.2 (0x00007fcea12cb000) > libz.so.1 => /home/prefix/gentoo/lib/libz.so.1 (0x00007fcea10b5000) > /lib64/ld-linux-x86-64.so.2 (0x00007fcea1e79000) > > So, it's not libpcap problem, it's ssldump one, IMO Good, so maybe we can finally merge that patch. @netmon: ping.
(In reply to comment #13) > > So, it's not libpcap problem, it's ssldump one, IMO > Good, so maybe we can finally merge that patch. > > @netmon: ping. I am sorry, but did you read previous discussion? My example shows that tcpdump link correctly on libpcap, but ssldump are NOT. I have just retried with clean amd64-linux prefix and i have got the same error. So, maybe we should refine this patch someway before the inclusion?
(In reply to comment #14) > (In reply to comment #13) > > > So, it's not libpcap problem, it's ssldump one, IMO > > Good, so maybe we can finally merge that patch. > > > > @netmon: ping. > > I am sorry, but did you read previous discussion? My example shows that > tcpdump link correctly on libpcap, but ssldump are NOT. I have just retried > with clean amd64-linux prefix and i have got the same error. So, maybe we > should refine this patch someway before the inclusion? (In reply to comment #14) > (In reply to comment #13) > > > So, it's not libpcap problem, it's ssldump one, IMO > > Good, so maybe we can finally merge that patch. > > > > @netmon: ping. > > I am sorry, but did you read previous discussion? My example shows that > tcpdump link correctly on libpcap, but ssldump are NOT. I have just retried > with clean amd64-linux prefix and i have got the same error. So, maybe we > should refine this patch someway before the inclusion? Sorry, I confused tcpdump with ssldump. I had a quick look at the build-system and ${EPREFIX}/usr/lib does not get added to the rpath. Adding -Wl,-rpath ${EPREFIX}/usr/$(get_libdir) to LDFLAGS solves the issue for me. @grobian: what would be the appropriate way to fix the issue, so that is works of darwin as well?
Is the package using libtool? If so, libtool will handle the -rpath. If not, you'll have to conditionalise it, because Darwin doesn't need (and grok) it.
(In reply to comment #16) > Is the package using libtool? If so, libtool will handle the -rpath. If > not, you'll have to conditionalise it, because Darwin doesn't need (and > grok) it. No libtool. Index: ssldump-0.9-r1.ebuild =================================================================== --- ssldump-0.9-r1.ebuild (revision 61531) +++ ssldump-0.9-r1.ebuild (working copy) @@ -34,10 +34,12 @@ } src_configure() { - local myconf + local myconf xLDFLAGS use ssl || myconf="--without-openssl" + [[ ${CHOST} == *-darwin* ]] || xLDFLAGS="-Wl,-rpath ${EPREFIX}/usr/$(get_libdir)" - econf ${myconf} \ + LDFLAGS="${LDFLAGS} ${xLDFLAGS}" \ + econf ${myconf} \ --with-pcap-inc="${EPREFIX}"/usr/include \ --with-pcap-lib="${EPREFIX}"/usr/$(get_libdir) }
(In reply to comment #17) > Index: ssldump-0.9-r1.ebuild > =================================================================== > --- ssldump-0.9-r1.ebuild (revision 61531) > +++ ssldump-0.9-r1.ebuild (working copy) > @@ -34,10 +34,12 @@ > } > > src_configure() { > - local myconf > + local myconf xLDFLAGS > use ssl || myconf="--without-openssl" > + [[ ${CHOST} == *-darwin* ]] || xLDFLAGS="-Wl,-rpath > ${EPREFIX}/usr/$(get_libdir)" > > - econf ${myconf} \ > + LDFLAGS="${LDFLAGS} ${xLDFLAGS}" \ > + econf ${myconf} \ > --with-pcap-inc="${EPREFIX}"/usr/include \ > --with-pcap-lib="${EPREFIX}"/usr/$(get_libdir) > } Does append-ldflags from flag-o-matic not work in this case?
(In reply to comment #18) > Does append-ldflags from flag-o-matic not work in this case? It would, I guess it would look nicer ;-)
Actually heroxbd's makefile patch has exactly the same effect adding an rpath to ldflags. @pinkbyte: Did you test that patch on your configuration? (It is not included in the prefix overlay by default).
hm, this is strange, last time when i check this - it does not work in my configuration properly(comment #8). But now i have: prefix@phantom ~ $ which ssldump /home/prefix/gentoo/usr/sbin/ssldump prefix@phantom ~ $ ldd `which ssldump` linux-vdso.so.1 => (0x00007fff0bdff000) libssl.so.1.0.0 => /home/prefix/gentoo/usr/lib/libssl.so.1.0.0 (0x00007f33afa9a000) libcrypto.so.1.0.0 => /home/prefix/gentoo/usr/lib/libcrypto.so.1.0.0 (0x00007f33af6c5000) libpcap.so.1 => /home/prefix/gentoo/usr/lib/libpcap.so.1 (0x00007f33af487000) libm.so.6 => /lib64/libm.so.6 (0x00007f33af204000) libc.so.6 => /lib64/libc.so.6 (0x00007f33aee75000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f33aec71000) libz.so.1 => /home/prefix/gentoo/lib/libz.so.1 (0x00007f33aea5b000) /lib64/ld-linux-x86-64.so.2 (0x00007f33afd04000) So it seems that i do something wrong when i test this last time, sorry for that. + 23 Jan 2013; Sergey Popov <pinkbyte@gentoo.org> +ssldump-0.9-r2.ebuild, + +files/ssldump-0.9-prefix-fix.patch: + Revision bump: EAPI 5, utilize autotools-utils eclass, add support for + installation in Prefix, wrt bug #414359, patch by Benda Xu