bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] Possible bug in 1.26 version ?


From: shift
Subject: [Bug-tar] Possible bug in 1.26 version ?
Date: Sat, 18 Aug 2012 10:32:49 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120624 Icedove/10.0.5

I think there is a bug in version 1.26 when untarring archive with symlinks inside. I've noticed this problem when tried to compile OpenWRT image and I can only suggest using it in order to reproduce the problem. I'm using debian testing 64-bit build and tar version is 1.26 and I have a problem. Please keep in mind that there is no problem in 32-bit version of tar 1.26 !!! My solution was to downgrade version to 1.23 on 64-bit. Now I do not have any problems. I'm very sorry if my reproduction steps is using OpenWRT, but it's easy and fast. So:

1. Prepare your system as stated here http://wiki.openwrt.org/doc/howto/buildroot.exigence#table.of.known.prerequisites.and.their.corresponding.packages
2.
mkdir ~/openwrt
3. cd ~/openwrt
4. svn co svn://svn.openwrt.org/openwrt/trunk/ cd trunk
5. ./scripts/feeds update -a
6. ./scripts/feeds install -a
7. echo CONFIG_TARGET_ar71xx=y > .config
8. make defconfig
9. make download
10. make (it will take long)
Now the interesting part begins!!!!
11. make target/sdk/install V=99
12. you'll get an error about permission denied
13. if you look at target/sdk/makefile you'll find line such as:
        $(TAR) -cf - -C $(TOPDIR) \
        $(foreach exclude,$(EXCLUDE_DIRS),--exclude="$(exclude)") \
        --exclude="staging_dir/$(ARCH)" \
        staging_dir/host staging_dir/target-$(ARCH)$(ARCH_SUFFIX)_$(LIBC)-$(LIBCV)$(if $(CONFIG_arm),_eabi) \
        staging_dir/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)_$(LIBC)-$(LIBCV)$(if $(CONFIG_arm),_eabi) | \
        $(TAR) -xf - -C $(SDK_BUILD_DIR)

this line in reality (when running makefile on real enviroment) lokks like this:
/bin/tar -cf - -C /home/youruser/build/openwrt/trunk \
        --exclude="*/ccache" --exclude="*/stamp" --exclude="*/stampfiles" --exclude="*/man" --exclude="*/info" \
        --exclude="staging_dir/mips" \
        staging_dir/host staging_dir/target-mips_r2_uClibc-0.9.33.2 \
        staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2 | \
        /bin/tar -xf - -C /home/youruser/build/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.33.2/OpenWrt-SDK-ar71xx-for-Linux-x86_64-gcc-4.6-linaro_uClibc-0.9.33.2

So, under the path '/home/youruser/build/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.33.2/root-ar71xx/sbin' there is lots of symlinks which point to the same file. When extracting archive someof symlinks are created of zero size and permissions set to 'none'. So it's normal that archiving back those files makes 'oermission denied' error. What is most important is that those zero size files are compeltely random everytime I make this build. I thought it could be some problems with the system, but downgrading tar to version 1.23 helped compeltely. Also, don't forget that there is no problem on 32-bit Ubuntu system. My 64-bit system is Debian testing.
14. I can understand that it might be some questions about this OpenWRT thing, but if you need some more info I'm here to answer. Sorry for not making more easy approach to reproduce the problem, but using OpenWRT buildroot is very obvious at least in my case.
15. I do not have other reports on this bug from other users. I thought I could be the only one, but as long as downgrading helped then I think that the reason is still tar 1.26 for 64 bit system.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]