Hi,

I spent several hours now to debug the tcpdump package and got to know
that it wont extract using paxmirabilis tar from within the makefile.

I you copy'n'paste the command to the shell it works, same if you
prepend strace but not with the head-branch make stuff.

The problem is that tcpdump is packaged as follows:
$ tar tzf dl/tcpdump-3.9.4.tar.gz
tcpdump-3.9.4/./
tcpdump-3.9.4/./lbl/
tcpdump-3.9.4/./lbl/os-osf4.h
[...]

now tar tries to to create "tcpdump-3.9.4" ok, then "tcpdump-3.9.4/."
*bam* already exists.
BTW: same with strace but strace catches the return code.

The only workaround for me was to update the tcpdump Makefile and
override the .prepared stuff:
===================================================================
--- package/tcpdump/Makefile    (revision 393)
+++ package/tcpdump/Makefile    (working copy)
@@ -13,11 +13,19 @@
        http://www.br.tcpdump.org/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

-
 include $(TOPDIR)/package/rules.mk

 $(eval $(call
PKG_template,TCPDUMP,tcpdump,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))

+$(WRKBUILD)/.prepared: ${DISTFILES}
+       rm -rf ${WRKSRC} ${WRKBUILD}
+       mkdir -p ${WRKDIR}; \
+       cd ${WRKDIR} && \
+       for file in $(DISTFILES); do gtar xzf $$file; done
+       [ ! -d ./patches ] || $(PATCH) $(WRKSRC) ./patches
+       touch $(WRKBUILD)/.prepared
+
+
 $(WRKBUILD)/.configured:
        (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
                BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \
===================================================================

any better solutions? adding gtar to tools? repackaging the source?

/Markus


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers

Reply via email to