[SCM] Debian packaging of CPANPLUS CPAN distribution branch, master, updated. debian/0.9136-1-3-g9b320c7

gregor herrmann gregoa at debian.org
Mon May 20 20:55:01 UTC 2013


The following commit has been merged in the master branch:
commit 12de3a7b9f3ec3478787e74121e573c45ee62c58
Author: gregor herrmann <gregoa at debian.org>
Date:   Mon May 20 22:49:45 2013 +0200

    Add the two patches that are applied to CPANPLUS in the perl package.
    
    - cpanplus_config_path.diff: Save local versions of CPANPLUS::Config::System into /etc/perl.
    - cpanplus_definstalldirs.diff: Configure CPANPLUS to use the site directories by default.
    
    Thanks: Niko Tyni for the pointer.

diff --git a/debian/patches/cpanplus_config_path.diff b/debian/patches/cpanplus_config_path.diff
new file mode 100644
index 0000000..f4627f1
--- /dev/null
+++ b/debian/patches/cpanplus_config_path.diff
@@ -0,0 +1,40 @@
+From b8ab15d6bed9e9155b2524f9c57731f2780872fa Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Mon, 6 Jul 2009 22:17:53 +0300
+Subject: Save local versions of CPANPLUS::Config::System into /etc/perl.
+
+This is a configuration file and needs to go in /etc by policy.
+Besides, /usr may not even be writable.
+
+This mirrors the Debian setup of CPAN.pm in debian/cpan_config_path.
+
+See #533707.
+
+Patch-Name: debian/cpanplus_config_path.diff
+---
+ cpan/CPANPLUS/lib/CPANPLUS/Configure.pm           |    1 +
+ cpan/CPANPLUS/lib/CPANPLUS/Internals/Constants.pm |    3 +++
+ 2 files changed, 4 insertions(+)
+
+--- a/lib/CPANPLUS/Configure.pm
++++ b/lib/CPANPLUS/Configure.pm
+@@ -280,6 +280,7 @@
+ If this package is not C<CPANPLUS::Config::System>, it will
+ be saved in your C<.cpanplus> directory, otherwise it will
+ be attempted to be saved in the system wide directory.
++(On Debian systems, this system wide directory is /etc/perl.)
+ 
+ If no argument is provided, it will default to your personal
+ config.
+--- a/lib/CPANPLUS/Internals/Constants.pm
++++ b/lib/CPANPLUS/Internals/Constants.pm
+@@ -213,6 +213,9 @@
+                                     ) . '.pm';
+                                 };
+ use constant CONFIG_SYSTEM_FILE  => sub {
++                                    # Debian-specific shortcut
++                                    return '/etc/perl/CPANPLUS/Config/System.pm';
++
+                                     require CPANPLUS::Internals;
+                                     require File::Basename;
+                                     my $dir = File::Basename::dirname(
diff --git a/debian/patches/cpanplus_definstalldirs.diff b/debian/patches/cpanplus_definstalldirs.diff
new file mode 100644
index 0000000..fe9b91c
--- /dev/null
+++ b/debian/patches/cpanplus_definstalldirs.diff
@@ -0,0 +1,52 @@
+From 43e79995e19b9e9b0f76295232087d1ea23f9b9c Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Mon, 6 Jul 2009 21:58:41 +0300
+Subject: Configure CPANPLUS to use the site directories by default.
+
+Bug-Debian: http://bugs.debian.org/533707
+
+The core modules usually default to INSTALLDIRS=perl (ExtUtils::MakeMaker)
+or installdirs=core (Module::Build), so we need to explicitly ask for
+the site destination to get upgraded versions into /usr/local.
+
+See also the sister patch, debian/cpan_definstalldirs .
+
+Patch-Name: debian/cpanplus_definstalldirs.diff
+---
+ cpan/CPANPLUS/lib/CPANPLUS/Config/System.pm |   30 +++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+ create mode 100644 cpan/CPANPLUS/lib/CPANPLUS/Config/System.pm
+
+--- /dev/null
++++ b/lib/CPANPLUS/Config/System.pm
+@@ -0,0 +1,30 @@
++### minimal pod, so you can find it with perldoc -l, etc
++=pod
++
++=head1 NAME
++
++CPANPLUS::Config::System - CPANPLUS configuration file for Debian systems
++
++=head1 DESCRIPTION
++
++This is a CPANPLUS configuration file that sets appropriate default
++settings on Debian systems.
++
++The only preconfigured settings are C<makemakerflags> (set to
++C<INSTALLDIRS=site>) and C<buildflags> (set to C<--installdirs site>).
++
++These settings will not have any effect if
++C</etc/perl/CPANPLUS/Config/System.pm> is present.
++
++=cut
++
++
++package CPANPLUS::Config::System;
++
++sub setup {
++    my $conf = shift;
++    $conf->set_conf( makemakerflags => 'INSTALLDIRS=site' );
++    $conf->set_conf( buildflags => '--installdirs site' );
++}
++
++1;
diff --git a/debian/patches/series b/debian/patches/series
index 5299247..0bc2005 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
 spelling.patch
+cpanplus_config_path.diff
+cpanplus_definstalldirs.diff

-- 
Debian packaging of CPANPLUS CPAN distribution



More information about the Pkg-perl-cvs-commits mailing list