Summary: | Possible bug with tar, gzip, and symlinks | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Pantelis Panayiotou <oss> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED TEST-REQUEST | ||
Severity: | normal | ||
Priority: | High | ||
Version: | 2005.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Pantelis Panayiotou
2006-03-08 04:36:23 UTC
did you interrupt the extraction process ? xpak will be created as a file at first, but once tar finishes, the result will be a symlink ... rm -rf /root/tar-test mkdir /root/tar-test cd /root/tar-test tar czf foo.tar.gz /usr/bin /usr/lib/portage/ --preserve tar xzf foo.tar.gz --preserve & while true ; do [ -e usr/bin/xpak ] && ls -l usr/bin/xpak ; done ... ---------- 1 root root 0 Mar 8 23:05 usr/bin/xpak ---------- 1 root root 0 Mar 8 23:05 usr/bin/xpak ---------- 1 root root 0 Mar 8 23:05 usr/bin/xpak lrwxrwxrwx 1 root root 23 Mar 8 23:05 usr/bin/xpak -> ../lib/portage/bin/xpak lrwxrwxrwx 1 root root 23 Mar 8 23:05 usr/bin/xpak -> ../lib/portage/bin/xpak lrwxrwxrwx 1 root root 23 Mar 8 23:05 usr/bin/xpak -> ../lib/portage/bin/xpak [1]+ Done tar xzf foo.tar.gz --preserve I can't repro this bug either. I did mkdir test cd test tar czvf foo.tar.gz usr/bin usr/lib --preserve tar zxf foo.tar.gz ls -l usr/bin/xpak And the output was: usr/bin/xpak -> ../lib/portage/bin/xpak using tar version 1.15.1-r1 (In reply to comment #1) > did you interrupt the extraction process ? xpak will be created as a file at > first, but once tar finishes, the result will be a symlink ... No, I haven't interrupted the process. I've reproduced the bug many times. It only happens with relative (../) symlinks, and only when using gzip, as described above. - When doing "tar zxf ..." relative symlinks are broken. - When doing "gunzip ...; tar xf ..." relative symlinks work. They are created as symlinks (not normal files) from the begining. At first, they are broken symlinks of course but, once tar finishes, they are OK. I understand this may be a problem specific to certain tar and gzip version(s). The ones I tested with are: app-arch/tar-1.15.1 app-arch/gzip-1.3.5-r8 OK, tested again and problem doesn't happen with new app-arch/tar-1.15.1-r1. I'm leaving the bug open, but for me is resolved. |