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.