I am new to BuildRoot but I think I have come across a couple of potential bugs during my learning:
First, I noticed the 'tc' package installs the ip binary, not tc binary from the iproute2 source. It looks like its an incorrect Makefile. Here is a patch that fixes the issue:
*** package/iproute2/Makefile.orig Sat Jun 4 16:55:16 2005
--- package/iproute2/Makefile Sat Jun 4 16:53:38 2005
***************
*** 41,47 ****
$(IPKG_IPROUTE2_TC):
mkdir -p $(IDIR_IPROUTE2_TC)/usr/sbin
! cp $(PKG_BUILD_DIR)/ip/ip $(IDIR_IPROUTE2_TC)/usr/sbin/
$(STRIP) $(IDIR_IPROUTE2_TC)/usr/sbin/*
$(IPKG_BUILD) $(IDIR_IPROUTE2_TC) $(PACKAGE_DIR)
--- 41,47 ----
$(IPKG_IPROUTE2_TC):
mkdir -p $(IDIR_IPROUTE2_TC)/usr/sbin
! cp $(PKG_BUILD_DIR)/tc/tc $(IDIR_IPROUTE2_TC)/usr/sbin/
$(STRIP) $(IDIR_IPROUTE2_TC)/usr/sbin/*
$(IPKG_BUILD) $(IDIR_IPROUTE2_TC) $(PACKAGE_DIR)
Second, during the package creation process, I noticed some tar errors, and it looks to be a problem with the order of options passed to tar. This could just be my version of tar running from current debian unstable. Here is the error:
PATH="/home/mike/projects/surfintown/wrt54gs/experimental/openwrt/staging_dir_mipsel/usr/bin:/home/mike/projects/surfintown/wrt54gs/experimental/openwrt/staging_dir_mipsel/bin:/bin:/sbin:/usr/bin:/usr/sbin" ipkg-build -c -o root -g root /home/mike/projects/surfintown/wrt54gs/experimental/openwrt/build_mipsel/lzo-1.08/ipkg/liblzo /home/mike/projects/surfintown/wrt54gs/experimental/openwrt/bin/packages
tar: -X: Cannot stat: No such file or directory
tar: Removing leading `/' from member names
tar: Error exit delayed from previous errors
Packaged contents of /home/mike/projects/surfintown/wrt54gs/experimental/openwrt/build_mipsel/lzo-1.08/ipkg/liblzo into /home/mike/projects/surfintown/wrt54gs/experimental/openwrt/bin/packages/liblzo_1.08-1_mipsel.ipk
This is just from one package, but all of them have the same problem. Its related to the fact that the -X option is at the end of the tar command that ipkg-build is calling. Here is staging_dir/mipsel/usr/bin/ipkg-build line 246 before and after:
before:
( cd $pkg_dir && tar $ogargs -czf $tmp_dir/data.tar.gz . -X $tmp_dir/tarX )
after:
( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
Another side affect of this problem is that the CONTROL files and the tarX file were being added to every package created by ipkg-build. Also note that if you fix your local ipkg-script, if you make distclean, it will redownload the ipkg-utils package and you have this problem all over again.