Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Tar extract behaviour changed
Somewhere between Netbsd-8 and NetBSD-9 "tar" changed its behaviour
when it has to extract a directory and the path exists as a symlink.
The attached script on -8 gives:
NetBSD 8.0_STABLE
== Initial:
total 8
drwxr-xr-x 2 hannken staff 512 Oct 21 11:47 realtarget
drwxr-xr-x 2 hannken staff 512 Oct 21 11:47 target
== Change to symlink:
total 4
drwxr-xr-x 2 hannken staff 512 Oct 21 11:47 realtarget
lrwxr-xr-x 1 hannken staff 10 Oct 21 11:47 target -> realtarget
== After extract:
total 4
drwxr-xr-x 2 hannken staff 512 Oct 21 11:47 realtarget
lrwxr-xr-x 1 hannken staff 10 Oct 21 11:47 target -> realtarget
On -9 it gives:
NetBSD 9.0_BETA
== Initial:
total 4
drwxr-xr-x 2 root wheel 512 Oct 21 11:48 realtarget
drwxr-xr-x 2 root wheel 512 Oct 21 11:48 target
== Change to symlink:
total 2
drwxr-xr-x 2 root wheel 512 Oct 21 11:48 realtarget
lrwxr-xr-x 1 root wheel 10 Oct 21 11:48 target -> realtarget
== After extract:
total 4
drwxr-xr-x 2 root wheel 512 Oct 21 11:48 realtarget
drwxr-xr-x 2 root wheel 512 Oct 21 11:48 target
Here "target" was changed from symlink to directory.
On NetBSD-9 extracting the "base" set overrides the symlink "/etc/unbound"
with a directory and therefore unbound fails to start.
Is this a bug in "tar" or is there a switch to get the old behaviour back?
--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)
#! /bin/sh
uname -sr
mkdir junk
mkdir junk/target junk/realtarget
printf "\n== Initial:\n" ; ls -l junk
tar -c -f junk.tar junk
rmdir junk/target
ln -s realtarget junk/target
printf "\n== Change to symlink:\n" ; ls -l junk
tar -x -f junk.tar
printf "\n== After extract:\n" ; ls -l junk
rm -rf junk junk.tar
Home |
Main Index |
Thread Index |
Old Index