SUMMARY: bizzare behaviour of stock tar (4.0f PK7)

From: Bentley, Adam ( Dist ) (Adam.Bentley_at_eme.co.uk)
Date: 03/23/04

  • Next message: Iain Barker: "LSM startup "not privileged" error"
    Date: Tue, 23 Mar 2004 10:05:58 +0000
    To: tru64-unix-managers@ornl.gov
    
    

    My thanks to Dr Blinn, Michael Polnick and Charles Richmond. It would
    appear there is a buglet in the version of tar on 4.0fpk7. However there
    are older versions of tar lurking on the system which work as expected.
    See responses below :-

    -----Original Message-----
    On Monday, March 22, 2004, at 11:57 AM, Bentley, Adam (( Dist )) wrote:

    >
    > Does anyone know if there's a fix for the following issue :-
    >
    > Unpacking a tar archive but wanting to restore to an alternative
    > location I use
    >
    > tar sxvf sometarfile.tar
    >
    > so leading '/'s are chopped off the files and they are restored below
    > my
    > current location...
    >
    > using this or its alternative form
    >
    > tar xPvf "/" sometarfile.tar
    >
    > seems to have the same effect on filename with '&' in them
    >
    > eg...
    >
    > myserver # tar tf /tmp/test.tar
    > /tmp/foo
    > /tmp/foo/cb_isolatedl&c_h_visax
    > /tmp/foo/cb_isolatedl&c_h_visax_no
    > /tmp/foo/cb_isolatedl&c_v_visax
    > /tmp/foo/cb_isolatedl&c_v_visax_no
    > myserver # pwd
    > /tmp/foo2
    > myserver # tar xvsf /tmp/test.tar
    > blocksize = 20
    > x tmp/foo
    > x tmp/foo/cb_isolatedl/c_h_visax, 243 bytes, 1 tape blocks
    > x tmp/foo/cb_isolatedl/c_h_visax_no, 352 bytes, 1 tape blocks
    > x tmp/foo/cb_isolatedl/c_v_visax, 239 bytes, 1 tape blocks
    > x tmp/foo/cb_isolatedl/c_v_visax_no, 348 bytes, 1 tape blocks
    >
    >
    > is there a fix or flag to resolve this? It works as expected when
    > unpacking without using 's' or 'P' options with tar

    ------------------------------------------------------------------------
    -
     Michael Polnick
    ------------------------------------------------------------------------
    -
    This is strange.

    Workaround: Use gtar, it does it right.

    Regards
    Michael
    ------------------------------------------------------------------------
    -
    Dr Thomas P. Blinn
    ------------------------------------------------------------------------
    -
    It's possible that if the problem was understood, there might be
    a fix in V4.0F PK8. I'd have to go find the tar/pax/cpio source
    to see if it has any edit history.

    It's also possible that the tar from, say, V4.0F unpatched, or
    the tar from the "OSFOBSOLETE" subset will work. If you've got
    the "obsolete" tar loaded, the path should be

    /usr/opt/obsolete/usr/bin/tar
    or
    /usr/opt/obsolete/sbin/tar

    and sometimes that old tar works "better" (as expected). The
    saveset format should be completely compatible.

    ------------------------------------------------------------------------
    -
    Charles Richmond
    ------------------------------------------------------------------------
    -

    If you have the "obsolete" set installed then the following works:
         /usr/opt/obsolete/usr/bin/tar -xvsf xxxx.tar

    koibito> /usr/opt/obsolete/usr/bin/tar -xvsf try.tar
    tar: blocksize = 20
    x 1&2, 0 bytes, 0 tape blocks
    x 2&3, 0 bytes, 0 tape blocks
    x 3&4, 0 bytes, 0 tape blocks
    koibito> ls -l
    total 10
    -rw-r--r-- 1 cmr system 0 Mar 22 12:49 1&2
    -rw-r--r-- 1 cmr system 0 Mar 22 12:49 2&3
    -rw-r--r-- 1 cmr system 0 Mar 22 12:49 3&4
    -rw-r--r-- 1 cmr system 10240 Mar 22 12:50 try.tar

    --
    thanks to all...
    Adam.
    ___________________________ Disclaimer Notice __________________________
    This message and any attachments are confidential and should only be read
    by those to whom they are addressed. If you are not the intended recipient, please contact us, delete the message from your computer and destroy any copies. Any distribution or copying without our prior permission is
    Prohibited.
     
    Internet communications are not always secure and therefore the Powergen 
    Group does not accept legal responsibility for this message. The recipient is responsible for verifying its authenticity before acting on the 
    contents. Any views or opinions presented are solely those of the author 
    and do not necessarily represent those of the Powergen Group. 
    Registered addresses:
     
    East Midlands Electricity Distribution plc,
    Westwood Way, Westwood Business Park, Coventry, CV4 8LG
    Registered in England & Wales No. 2366923.
    

  • Next message: Iain Barker: "LSM startup "not privileged" error"