Skip Menu |

This queue is for tickets about the Archive-Tar CPAN distribution.

Report information
The Basics
Id: 57312
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Archive-Tar

People
Owner: BINGOS [...] cpan.org
Requestors: jjore [...] cpan.org
SNOWHARE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Long filename creation test fails on eCryptfs filesystem
While doing a build test on 5.12 RC1 (which uses Archive::Tar 1.54) the cpan/Archive-Tar/t/02_methods test failed with cpan/Archive-Tar/t/02_methods..................................Could not create directory '/home/snowhare/src/perl-5.12.0-RC1/cpan/Archive-Tar/t/directory/really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-long-directory-name' for 'directory/really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-long-directory-name': mkdir /home/snowhare/src/perl-5.12.0-RC1/cpan/Archive-Tar/t/directory/really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-long-directory-name: File name too long at ../lib/Archive/Tar.pm line 741 at t/02_methods.t line 435 Could not extract 'directory/really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-really-long-directory-name' at t/02_methods.t line 435 # Failed test ' Extracted 'src/long/out.tar' with 'extract'' # at t/02_methods.t line 435. FAILED at test 218 The failure happens when the test is run on an eCryptfs https://launchpad.net/ecryptfs encrypted partition. It is probably related to https://bugs.launchpad.net/ecryptfs/+bug/344878 Attempting to install 1.58 from CPAN results in the same error.
Subject: Re: [rt.cpan.org #56163] Long filename creation test fails on eCryptfs filesystem
Date: Wed, 31 Mar 2010 21:39:40 +0100
To: SNOWHARE via RT <bug-Archive-Tar [...] rt.cpan.org>
From: "Chris 'BinGOs' Williams" <chris [...] bingosnet.co.uk>
On Wed, Mar 31, 2010 at 11:52:45AM -0400, SNOWHARE via RT wrote: Show quoted text
> > The failure happens when the test is run on an eCryptfs > https://launchpad.net/ecryptfs encrypted partition. It is probably > related to https://bugs.launchpad.net/ecryptfs/+bug/344878 > > Attempting to install 1.58 from CPAN results in the same error. >
Any magical way to determine if we are operating on such a file-system ? I can make that test skip if we are. -- Chris Williams aka BinGOs PGP ID 0x4658671F http://www.gumbynet.org.uk ==========================
Download (untitled)
application/pgp-signature 189b

Message body not shown because it is not plain text.

CC: SNOWHARE [...] cpan.org
Subject: Re: [rt.cpan.org #56163] Long filename creation test fails on eCryptfs filesystem
Date: Thu, 1 Apr 2010 12:34:09 -0700 (PDT)
To: "chris [...] bingosnet.co.uk via RT" <bug-Archive-Tar [...] rt.cpan.org>
From: Benjamin Franz <snowhare [...] nihongo.org>
On Wed, 31 Mar 2010, chris@bingosnet.co.uk via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=56163 > > > On Wed, Mar 31, 2010 at 11:52:45AM -0400, SNOWHARE via RT wrote:
>> >> The failure happens when the test is run on an eCryptfs >> https://launchpad.net/ecryptfs encrypted partition. It is probably >> related to https://bugs.launchpad.net/ecryptfs/+bug/344878 >> >> Attempting to install 1.58 from CPAN results in the same error. >>
> > Any magical way to determine if we are operating on such a > file-system ? I can make that test skip if we are.
You can look in /etc/mtab for mounted filesystems and their types. -- Benjamin Franz "When you have no basis for an argument, abuse the plaintiff." - Marcus Tullius Cicero (106-43 B.C.)
Subject: 02_methods.t misc failures on eCrypt
While building perl-5.12.0 which uses Archive-Tar-1.54 found the below error. Manually updated $perl/cpan/Archive-Tar to 1.60 and it also fails 13 tests out of 38. josh@roo:~/src/perl/t$ ../perl -I../lib ../cpan/Archive-Tar/t/02_methods.t ok 1 - use Archive::Tar; ok 2 - Archive::Tar->can('has_zlib_support') ok 3 - Archive::Tar->can('has_bzip2_support') ok 4 - Object created ok 5 - The object isa Archive::Tar ok 6 - The error string is empty ok 7 - Function read returns 0 files on error ok 8 - error string is non empty ok 9 - error string from create() ok 10 - error string does not contain add ok 11 - 'add_data' returns undef on error ok 12 - error string is non empty ok 13 - error string contains add ok 14 - error string does not contain create ok 15 - Error 'Unable to add file: ''' matches Archive::Tar->error method ok 16 - Does not contain file '20186' ok 17 - No warnings issued during lookup ok 18 - Object created ok 19 - The object isa Archive::Tar Could not open 'src/long/bar.tar' for reading: No such file or directory at ../cpan/Archive-Tar/t/02_methods.t line 174 not ok 20 - Reading 'src/long/bar.tar' using 'read()' # Failed test 'Reading 'src/long/bar.tar' using 'read()'' # at ../cpan/Archive-Tar/t/02_methods.t line 178. not ok 21 - All files accounted for # Failed test ' All files accounted for' # at ../cpan/Archive-Tar/t/02_methods.t line 179. # got: '0' # expected: '5' Could not open 'src/long/bar.tar' for reading: No such file or directory at ../cpan/Archive-Tar/t/02_methods.t line 207 No data could be read from file at ../cpan/Archive-Tar/t/02_methods.t line 207 not ok 22 - Reading 'src/long/bar.tar' using 'list_archive' # Failed test 'Reading 'src/long/bar.tar' using 'list_archive'' # at ../cpan/Archive-Tar/t/02_methods.t line 211. not ok 23 - All files accounted for # Failed test ' All files accounted for' # at ../cpan/Archive-Tar/t/02_methods.t line 212. # got: '0' # expected: '5' ok 24 - Object created ok 25 - The object isa Archive::Tar Could not open 'src/long/foo.tgz' for reading: No such file or directory at ../cpan/Archive-Tar/t/02_methods.t line 174 not ok 26 - Reading 'src/long/foo.tgz' using 'read()' # Failed test 'Reading 'src/long/foo.tgz' using 'read()'' # at ../cpan/Archive-Tar/t/02_methods.t line 178. not ok 27 - All files accounted for # Failed test ' All files accounted for' # at ../cpan/Archive-Tar/t/02_methods.t line 179. # got: '0' # expected: '5' Could not open 'src/long/foo.tgz' for reading: No such file or directory at ../cpan/Archive-Tar/t/02_methods.t line 207 No data could be read from file at ../cpan/Archive-Tar/t/02_methods.t line 207 not ok 28 - Reading 'src/long/foo.tgz' using 'list_archive' # Failed test 'Reading 'src/long/foo.tgz' using 'list_archive'' # at ../cpan/Archive-Tar/t/02_methods.t line 211. not ok 29 - All files accounted for # Failed test ' All files accounted for' # at ../cpan/Archive-Tar/t/02_methods.t line 212. # got: '0' # expected: '5' ok 30 - Object created ok 31 - The object isa Archive::Tar Could not open 'src/long/foo.tbz' for reading: No such file or directory at ../cpan/Archive-Tar/t/02_methods.t line 174 not ok 32 - Reading 'src/long/foo.tbz' using 'read()' # Failed test 'Reading 'src/long/foo.tbz' using 'read()'' # at ../cpan/Archive-Tar/t/02_methods.t line 178. not ok 33 - All files accounted for # Failed test ' All files accounted for' # at ../cpan/Archive-Tar/t/02_methods.t line 179. # got: '0' # expected: '5' Could not open 'src/long/foo.tbz' for reading: No such file or directory at ../cpan/Archive-Tar/t/02_methods.t line 207 No data could be read from file at ../cpan/Archive-Tar/t/02_methods.t line 207 not ok 34 - Reading 'src/long/foo.tbz' using 'list_archive' # Failed test 'Reading 'src/long/foo.tbz' using 'list_archive'' # at ../cpan/Archive-Tar/t/02_methods.t line 211. not ok 35 - All files accounted for # Failed test ' All files accounted for' # at ../cpan/Archive-Tar/t/02_methods.t line 212. # got: '0' # expected: '5' ok 36 - Object created ok 37 - The object isa Archive::Tar No such file: 'src/long/b' at ../cpan/Archive-Tar/t/02_methods.t line 237 not ok 38 - Adding files # Failed test ' Adding files' # at ../cpan/Archive-Tar/t/02_methods.t line 239. # got: '0' # expected: '1' Can't call method "name" on an undefined value at ../cpan/Archive-Tar/t/02_methods.t line 241. 1..38 # Looks like you failed 13 tests of 38. # Looks like your test exited with 2 just after 38. josh@roo:~/src/perl/t$ ../perl -I../lib ../cpan/Archive-Tar/t/02_methods.t
From: jjore [...] cpan.org
On Sat May 08 22:48:47 2010, JJORE wrote: Show quoted text
> While building perl-5.12.0 which uses Archive-Tar-1.54 found the below > error. Manually updated $perl/cpan/Archive-Tar to 1.60 and it also fails
Here is my /etc/mtab. BTW, if I'm somehow revealing a crypto secret by showing this, please let me know. I don't. /dev/sda1 / ext4 rw,errors=remount-ro 0 0 proc /proc proc rw,noexec,nosuid,nodev 0 0 none /sys sysfs rw,noexec,nosuid,nodev 0 0 none /sys/fs/fuse/connections fusectl rw 0 0 none /sys/kernel/debug debugfs rw 0 0 none /sys/kernel/security securityfs rw 0 0 none /dev devtmpfs rw,mode=0755 0 0 none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0 none /dev/shm tmpfs rw,nosuid,nodev 0 0 none /var/run tmpfs rw,nosuid,mode=0755 0 0 none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0 none /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0 binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0 /home/josh/.Private /home/josh ecryptfs ecryptfs_sig=a489cc8b9611d8f6,ecryptfs_fnek_sig=1156b9d7690307f5,ecryptfs_cipher=aes,ecryptfs_key_bytes=16 0 0 gvfs-fuse-daemon /home/josh/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=josh 0 0
From: jjore [...] cpan.org
On Sat May 08 22:52:32 2010, JJORE wrote: Show quoted text
> On Sat May 08 22:48:47 2010, JJORE wrote:
> > While building perl-5.12.0 which uses Archive-Tar-1.54 found the
> below
> > error. Manually updated $perl/cpan/Archive-Tar to 1.60 and it also
> fails
The eCryptfs shipped in Ubuntu lucid circa linux-image-2.6.32-22-generic package version 2.6.32-22.33 appears to include the bug https://bugs.launchpad.net/ecryptfs/+bug/372014 which causes empty files to return the error EIO on read.
From: colin.newell [...] gmail.com
On Wed Mar 31 16:39:54 2010, chris@bingosnet.co.uk wrote: Show quoted text
> On Wed, Mar 31, 2010 at 11:52:45AM -0400, SNOWHARE via RT wrote:
> > > > The failure happens when the test is run on an eCryptfs > > https://launchpad.net/ecryptfs encrypted partition. It is probably > > related to https://bugs.launchpad.net/ecryptfs/+bug/344878 > > > > Attempting to install 1.58 from CPAN results in the same error. > >
> > Any magical way to determine if we are operating on such a > file-system ? I can make that test skip if we are. >
I had the same problem and came up with a crude check that simply tried to create a directory manually. I've attached the patch.
Subject: heuristic_check.diff
Index: t/02_methods.t =================================================================== --- t/02_methods.t (revision 2825) +++ t/02_methods.t (working copy) @@ -63,6 +63,19 @@ my $TOO_LONG = ($^O eq 'MSWin32' or $^O eq 'cygwin' or $^O eq 'VMS') && length( cwd(). $LONG_FILE ) > 247; +if(!$TOO_LONG) { + my $alt = File::Spec->catfile( cwd(), $LONG_FILE); + eval 'mkpath([$alt]);'; + if($@) + { + $TOO_LONG = 1; + } + else + { + $@ = ''; + rmtree $alt; + } +} ### warn if we are going to skip long file names if ($TOO_LONG) { diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE};
From: colin.newell [...] gmail.com
Show quoted text
> I had the same problem and came up with a crude check that simply tried > to create a directory manually. I've attached the patch.
Actually I didn't clean up the directory created for the check properly. I've attached an improved patch. Colin.
Subject: better_cleanup_heuristic_check.txt
Index: t/02_methods.t =================================================================== --- t/02_methods.t (revision 2825) +++ t/02_methods.t (working copy) @@ -63,6 +63,20 @@ my $TOO_LONG = ($^O eq 'MSWin32' or $^O eq 'cygwin' or $^O eq 'VMS') && length( cwd(). $LONG_FILE ) > 247; +if(!$TOO_LONG) { + my $alt = File::Spec->catfile( cwd(), $LONG_FILE); + eval 'mkpath([$alt]);'; + if($@) + { + $TOO_LONG = 1; + } + else + { + $@ = ''; + my $base = File::Spec->catfile( cwd(), 'directory'); + rmtree $base; + } +} ### warn if we are going to skip long file names if ($TOO_LONG) { diag("No long filename support - long filename extraction disabled") if ! $ENV{PERL_CORE};
On Sun May 09 01:15:59 2010, JJORE wrote: Show quoted text
> On Sat May 08 22:52:32 2010, JJORE wrote:
> > On Sat May 08 22:48:47 2010, JJORE wrote:
> > > While building perl-5.12.0 which uses Archive-Tar-1.54 found the
> > below
> > > error. Manually updated $perl/cpan/Archive-Tar to 1.60 and it also
> > fails
> > The eCryptfs shipped in Ubuntu lucid circa linux-image-2.6.32-22-generic > package version 2.6.32-22.33 appears to include the bug > https://bugs.launchpad.net/ecryptfs/+bug/372014 which causes empty files > to return the error EIO on read.
I'm not sure if there's a sane way to detect that. Is there anything we can even reasonable do in this case?
RT-Send-CC: colin.newell [...] gmail.com, snowhare [...] nihongo.org, jjore [...] cpan.org
According to my records this was resolved with the 1.68 release of A::T * important changes in version 1.68 17/08/2010 - Apply a patch from Colin Newell that checks whether long files can be created or not in 02_methods.t. Hopefully resolves RT #57312 and RT #56163 Many thanks.