Bug#690773: perl: Module::Build creates non group-writable site directories

Niko Tyni ntyni at debian.org
Wed Oct 17 13:04:02 UTC 2012


Package: perl
Version: 5.14.2-14

Quoting the Debian policy, section 9.1.2:
 http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.1.2

     The `/usr/local' directory itself and all the subdirectories
     created by the package should (by default) have permissions 2775
     (group-writable and set-group-id) and be owned by `root:staff'.

We have patched ExtUtils::MakeMaker for ages to set umask appropriately
for site install directories. See
 http://patch-tracker.debian.org/patch/series/view/perl/5.14.2-14/debian/writable_site_dirs.diff
 http://patch-tracker.debian.org/patch/series/view/perl/5.10.1-17squeeze3/debian/extutils_hacks.diff

It looks like Module::Build needs similar patching:

  % sudo rm -rf /usr/local/share/perl /usr/local/lib/perl
  % cpan -i File::BOM
  [...]
    sudo ./Build install  -- OK
  % ls -dl /usr/local/lib/perl /usr/local/share/perl
  drwxr-sr-x 3 root staff 4096 Oct 17 15:58 /usr/local/lib/perl
  drwxr-sr-x 3 root staff 4096 Oct 17 15:58 /usr/local/share/perl

To contrast, here's the correct behaviour by ExtUtils::MakeMaker:

  % sudo rm -rf /usr/local/share/perl /usr/local/lib/perl
  % cpan -i Shell                               
  [...]
    sudo /usr/bin/make install  -- OK
  % ls -dl /usr/local/lib/perl /usr/local/share/perl
  drwxrwsr-x 3 root staff 4096 Oct 17 15:59 /usr/local/lib/perl
  drwxrwsr-x 3 root staff 4096 Oct 17 15:59 /usr/local/share/perl

Once we have a fix, I suppose the separate libmodule-build-perl package
needs to be patched too.
-- 
Niko Tyni   ntyni at debian.org




More information about the Perl-maintainers mailing list