This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author frehberg
Recipients
Date 2006-12-06.09:58:57
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The tarfile-module 0.8 shipped with Python-2.5 fails to handle archive-paths longer than 100 chars, in posix mode and GNU-mode.

AFAICS, the  path-length limit should be 256 for posix-mode and infinite for GNU-mode.

The last tarfile module I know, being able to handle long paths is tarfile-0.7.4.

Attached you will find a test-script. The script prints the tarfile.version you are using to console and runs two tests, one for posix-mode up to path-length 256 and a second test for GNU-mode with pathlengths up to 1024.

###
###Testoutput with Python-2.5
###
> /usr/local/bin/python2.5 check-tarfile-module.py
Python Version: 2.5 (r25:51908, Dec  6 2006, 10:13:25)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-47)]
Executable: /home/frehberg/tmp/bin/python
Tarfile Version:  0.8.0
TarFile pathlength check failed, do not use!!
failed for tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/fooo (length 100, posix=True)
TarFile pathlength check failed, do not use!!
failed for tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/tmp/fooo (length 100, posix=False)

###
###Workarround for Python-2.5
###
(Assuming you are using Linux and Python-2.5 has been installed with prefix /usr/local/)

Download tarfile-0.7.4 from http://www.gustaebel.de/lars/tarfile/ and run:

## remove original tarfile-module shipped with
## python2.5
rm -rf /usr/local/lib/python2.5/tarfile.py*

## install tarfile-0.7.4
tar -xvz -C /tmp/ -f /net/linux/pkg/python/tarfile-0.7.4.tar.gz
cd /tmp/tarfile-0.7.4/
/usr/local/bin/python2.5 setup.py install

###
###Testoutput with patched Python-2.5
###
> /usr/local/bin/python2.5 check-tarfile-module.py
Python Version: 2.5 (r25:51908, Dec  6 2006, 10:13:25)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-47)]
Executable: /usr/local/bin/python
Tarfile Version:  0.7.4
Tarfile module (posix=True) is Ok
Tarfile module (posix=False) is Ok
History
Date User Action Args
2007-08-23 14:50:29adminlinkissue1609958 messages
2007-08-23 14:50:29admincreate