Hello, On Fri, 23 Aug 2013, Cristian Rodríguez wrote:
On 08/22/2013 10:58 PM, David Haller wrote:
==== mc-4.8.1.4/src/vfs/tar/tar.c ==== #define NAMSIZ 100
Hrmm.. why it does not use PATH_MAX ?
Judging from a quick glance a the .c file, it's used to parse the tar archive headers for filenames and construct (together with PREFIX_SIZE) paths. And as far as I gathered from that other thread, tar has a historical limit on filenames of those 100 bytes and needs POSIX (ustar, pax) (or incompatible?) GNU extensions to store names longer than that. The tar implementation in mc seems rather rudimentary. Also, that script should probably be named /usr/lib/mc/extfs.d/utar to keep consistency with current behaviour (and be based on uar, urar or uzip)... In the long run, the mc implementation should probably be enhanced. Ah, just found something in 'man 3pm Archive::Tar': ==== By default, "Archive::Tar" is in a completely POSIX-compatible mode, which uses the POSIX-specification of "tar" to store files. For paths greater than 100 characters, this is done using the "POSIX header prefix". Non-POSIX-compatible clients may not support this part of the specification, and may only support the "GNU Extended Header" functionality. [..] Note that GNU tar earlier than version 1.14 does not cope well with the "POSIX header prefix". If you use such a version, consider setting the $Archive::Tar::DO_NOT_USE_PREFIX variable to "true ==== Oh, and some useful URLs from that manpage: The GNU tar specification http://www.gnu.org/software/tar/manual/tar.html The PAX format specification http://www.opengroup.org/onlinepubs/007904975/utilities/pax.html A comparison of GNU and POSIX tar standards; http://www.delorie.com/gnu/docs/tar/tar_114.html GNU tar intends to switch to POSIX compatibility http://www.gnu.org/software/tar/manual/html_node/Formats.html The last has: ==== ustar Archive format defined by POSIX.1-1988 specification. It stores symbolic ownership information. It is also able to store special files. However, it imposes several restrictions as well: 1. The maximum length of a file name is limited to 256 characters, provided that the file name can be split at a directory separator in two parts, first of them being at most 155 bytes long. So, in most cases the maximum file name length will be shorter than 256 characters. 2. The maximum length of a symbolic link name is limited to 100 characters. [..] ==== And Jörg's star's README.otherbugs is also mentioned to list known issues and incompatibilities. Ok, now I'm quite sure that those defines in mc's src/vfs/tar/tar.c MUST NOT be changed ... So, I guess writing a (adapting one of the existing) mc-extfs scripts using GNU tar/pax/star is the best way to handle that limitation of mc. I have not checked mc upstrem though if they know about that limitation (I guess they do) and/or if they plan to change the current simplistic "vfs-tar" implementation. HTH, -dnh -- Monotheism is a gift from the gods. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org