Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: grousse [...] cpan.org
Cc:
AdminCc:

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



Subject: Forcing read-only file perms in blib directory causes trouble with build process
Example with Device::Cdio: Creating new 'Build' script for 'Device-Cdio' version '0.2.4' + ./Build 'CFLAGS=-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables' Copying lib/perlcdio.pm -> blib/lib/perlcdio.pm Copying lib/Device/Cdio/Util.pm -> blib/lib/Device/Cdio/Util.pm Copying lib/Device/Cdio.pm -> blib/lib/Device/Cdio.pm Copying lib/perliso9660.pm -> blib/lib/perliso9660.pm Copying lib/Device/Cdio/ISO9660.pm -> blib/lib/Device/Cdio/ISO9660.pm Copying lib/perlmmc.pm -> blib/lib/perlmmc.pm Copying lib/Device/Cdio/ISO9660/FS.pm -> blib/lib/Device/Cdio/ISO9660/FS.pm Copying lib/Device/Cdio/Track.pm -> blib/lib/Device/Cdio/Track.pm Copying lib/Device/Cdio/Device.pm -> blib/lib/Device/Cdio/Device.pm Copying lib/Device/Cdio/ISO9660/IFS.pm -> blib/lib/Device/Cdio/ISO9660/IFS.pm swig -I/usr/include -o perlcdio_wrap.c -outdir blib/lib -perl perlcdio.swg read.swg:52: Warning(124): Specifying the language name in %typemap is deprecated - use #ifdef SWIG<LANG> instead. device.swg:32: Warning(124): Specifying the language name in %typemap is deprecated - use #ifdef SWIG<LANG> instead. device.swg:414: Warning(124): Specifying the language name in %typemap is deprecated - use #ifdef SWIG<LANG> instead. Unable to open file blib/lib/perlcdio.pm: Permission denied error building perlcdio_wrap.c file from 'perlcdio.swg' at /home/guillomovitch/cooker/perl-Device-Cdio/BUILD/Device-Cdio-v0.2.4/_build/lib/MyModuleBuilder.pm line 85. This happens because blib/lib/perlcdio.pm is read-only: [guillomovitch@n2 perl-Device-Cdio]$ ll BUILD/Device-Cdio-v0.2.4/blib/lib/perlcdio.pm -r--r--r-- 1 guillomovitch users 19456 2009-01-25 13:50 BUILD/Device-Cdio-v0.2.4/blib/lib/perlcdio.pm According to a comment in Module/Build/Base.pm, this seems to be on purpose: # mode is read-only + (executable if source is executable) The problem may be specific to swig usage, but M::B should not enforce a specific file perm pattern, or at least allow to make it configurable.
Download (untitled) / with headers
text/plain 406b
Actually, my example is not very happy, as the problem only arise if you modify swig source file before running the build process, and the build script of Device::Cdio has to be modified morevoer to handle recent versions of Module::Build. See patches 5 and 6 (stolen from Debian) in mandriva package repository: http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/perl-Device-Cdio/current/SOURCES/
Download (untitled) / with headers
text/plain 330b
Making blib read-only is a long standing practice, even in ExtUtil::MakeMaker. Moreover, it can be resolved using a Module::Build subclass. See the Module::Build::Cookbook and the section on modifying an action. You'll just need to figure out which action to modify for your needs. Marking this resolved as a "wontfix" issue.
Download (untitled) / with headers
text/plain 620b
Le Lun. Jun. 22 00:35:50 2009, DAGOLDEN a écrit : Show quoted text
> Making blib read-only is a long standing practice, even in > ExtUtil::MakeMaker. > > Moreover, it can be resolved using a Module::Build subclass. See the > Module::Build::Cookbook and the section on modifying an action. You'll > just need to figure out which action to modify for your needs.
My point is not 'how can I fix the issue', I already knows, and I even provided patches for it. My point is: - Device::Cdio doesn't build without modifications - making files read-only make this modification painful Just because a practice exists doesn't make it right.
Download (untitled) / with headers
text/plain 946b
I understand your frustration. However, the "practice" is for modules in blib to have the same read-only permissions as they would be installed with so that test are encountering modules in the same state. Regardless of whether you agree with the practice or not, 17000+ distributions on CPAN work just fine within that practice, so changing that is not something that Module::Build would do lightly, nor without coordination with ExtUtils::MakeMaker and other toolchain modules. Further, since Module::Build explicitly offers a subclassing mechanism for distributions that need custom behavior, that is the preferred mechanism for features that are only needed by a handful of modules. You are certainly welcome to release a Module::Build::NotReadOnlyBlib subclass to CPAN if you feel this is an important option that needs to be available to others. However, it's not a "bug" in Module::Build, so the ticket is being closed on that basis.


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.