Subject: Re: bin/30132: Something is wrong with tar(1) --chroot
To: None <gnats-bugs@netbsd.org, gnats-admin@netbsd.org,>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 05/04/2005 11:26:07
On May 4,  3:10pm, juan@xtrarom.org (juan@xtrarom.org) wrote:
-- Subject: bin/30132: Something is wrong with tar(1) --chroot

| >Number:         30132
| >Category:       bin
| >Synopsis:       Something is wrong with tar(1) --chroot
| >Confidential:   no
| >Severity:       serious
| >Priority:       high
| >Responsible:    bin-bug-people
| >State:          open
| >Class:          sw-bug
| >Submitter-Id:   net
| >Arrival-Date:   Wed May 04 15:10:00 +0000 2005
| >Originator:     juan@xtrarom.org
| >Release:        NetBSD 3.99.3
| >Organization:
| >Environment:
| System: NetBSD xenun 3.99.3 NetBSD 3.99.3 (XenU) #11: Tue May 3 15:42:35 CEST 2005 juan@Nocturno:/home/juan/build/obj/sys/arch/i386/compile/XenU i386
| Architecture: i386
| Machine: i386
| >Description:
| 
| 	tar --chroot doesn't work correctly with last changes:
| 
| [juan@Nocturno][~/FOOBAR]> sudo tar --chroot -zxehvpf xtar.tar.gz   
| xtar
| tar: Attempt to write file `/xtar' outside current working directory `/home/juan/FOOBAR' ignored
| xtar/xtar.c
| tar: Attempt to write file `/xtar' outside current working directory `/home/juan/FOOBAR' ignored
| tar: Cannot resolve `xtar/xtar.c'
| xtar/xtar.h
| tar: Attempt to write file `/xtar' outside current working directory `/home/juan/FOOBAR' ignored
| tar: Cannot resolve `xtar/xtar.h'
| xtar/Makefile
| tar: Attempt to write file `/xtar' outside current working directory `/home/juan/FOOBAR' ignored
| tar: Cannot resolve `xtar/Makefile'
| tar: ustar vol 1, 4 files, 20480 bytes read, 0 bytes written in 1 secs (20480 bytes/sec)
| [juan@Nocturno][~/FOOBAR]>

you need to specify --insecure to extract those files. It is dubious if
--chroot should imply --insecure so I did not do it.

christos