Skip Menu |
 

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 8190
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: julian [...] mehnle.net
Cc:
AdminCc:

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

Attachments


Subject: Files' executable bits get wiped in `./Build dist` archives
Download (untitled) / with headers
text/plain 837b
I am trying to make my Courier-Filter CPAN distribution Debian-packageable by adding Debian package control files in the "debian/" subdirectory. One of those control files, "debian/rules", must be executable. When I package up the CPAN distribution using `./Build dist`, the resulting .tar.gz archive contains the Debian package control files, but the x (executable) permission bits of the "debian/rules" file are missing (i.e. unset). As a result, one cannot build a Debian package from a `./Build dist` archive. See the attached shell script log for how to reproduce the problem. Is there a reason why Module::Build doesn't leave the file's x bits alone when I do a `./Build dist`? (Sorry for filing this bug report a second time, but I forgot to enter the subject the first time. Just close the redundant bug report, no. 8189.)
Download module-build-x-bit-bugreport.script
application/octet-stream 1.9k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 834b
The 'dist' action just tars up the result of the 'distdir' action. The 'distdir' action uses File:: Copy to copy the files. File::Copy uses open() to create the new files. Therefore I guess it's just using the default permissions that open(FH, "> foo") would have. This will be fixed in the next release with the following patch: --- lib/Module/Build/Base.pm 14 Oct 2004 03:38:12 -0000 1.343 +++ lib/Module/Build/Base.pm 30 Oct 2004 23:47:05 -0000 @@ -2036,7 +2036,9 @@ $self->add_to_cleanup($dist_dir); foreach my $file (keys %$dist_files) { - $self->copy_if_modified(from => $file, to_dir => $dist_dir, verbose => 0); + my $new = $self->copy_if_modified(from => $file, to_dir => $dist_dir, verbose => 0); + chmod +(stat $file)[2], $new + or warn "Couldn't set permissions on $new: $!"; }
From: julian [...] mehnle.net
Download (untitled) / with headers
text/plain 236b
[KWILLIAMS - Sat Oct 30 19:46:21 2004]: Show quoted text
> This will be fixed in the next release with the following patch:
Thanks for your extraordinally quick response! :-) I will apply the patch until I can install the next version of Module::Build.
Download (untitled) / with headers
text/plain 163b
Oops, why does the bugtracker reopen the bug when I just wanted to add a response to the bug report? Should I have added a _comment_ instead? Guess so... Sorry!
Download (untitled) / with headers
text/plain 312b
[JMEHNLE - Sun Oct 31 04:45:40 2004]: Show quoted text
> Oops, why does the bugtracker reopen the bug when I just wanted to add a > response to the bug report? Should I have added a _comment_ instead? > Guess so... Sorry!
No problem, I'll close it now. I'm not sure if comments are different in this respect or not. -Ken


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.