The tar command is documented to treat '-o' as if '--no-same-owner' had been specified when extracting from a tar. Instead tar behaves as if -o was not specified at all. An example command: tar -xvof myfile.tar Reproducible: Always Steps to Reproduce: 1.Create a tar file as the root user containing files from some other user. 2.Extract the files using 'tar -xvof myfile.tar' as a user other than root, or other than that other user. 3.The tar should extract without complaint or failure (but in fact, it reports permissions errors). Actual Results: tar: valgrind-2.0.0: Cannot change ownership to uid 500, gid 100: Operation not permitted Expected Results: What it is documented to do.
The problem is most likely upstream. Informational note: The man page does not currently document the -o option well. For more information about the recent addition of the --no-same-owner flag see this link: http://lists.gnu.org/archive/html/bug-gnu-utils/2002-06/msg00047.html So a possible workaround for the problem is to use --no-same-owner instead of -o
It would be nice if it was possible to change history, but unfortunately that is impossible. Original tar, System V tar, and GNU tar support -o options. In order to achieve cross-platform operation, it is necessary to use -o. Using --no-same-owner only works for interactive use when the user is aware that the tar is a GNU tar which supports this option (the GNU tar on my Solaris machine is old enough to not support this option). I agree that this bug is likely not Gentoo specific.
from manpage of tar-1.14: -o, --old-archive, --portability write a V7 format archive, rather than ANSI format