[PATCH] tests: do not assume '.' is in Perl's @INC
Upstream Perl is going to remove '.' from @INC (the include path for modules) by default for the next major release (= 5.26) [1], as measure to fix security issues. Debian already started backporting the fixes for this [2], thus behaving this way in current Sid installations. Since the affected Perl sources are only the local daemon testing scripts, a simple fix is to force the 'requires' for the local captive-daemon.pm module to start from the current directory: this way there is no need to manually augment @INC, and only our local module is loaded automatically. [1] https://rt.perl.org/Public/Bug/Display.html?id=127810 [2] https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html --- tests/daemon/test-btrfs.pl | 2 +- tests/daemon/test-daemon-start.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/daemon/test-btrfs.pl b/tests/daemon/test-btrfs.pl index 302ecb9..7b306b7 100755 --- a/tests/daemon/test-btrfs.pl +++ b/tests/daemon/test-btrfs.pl @@ -23,7 +23,7 @@ use warnings; use File::Temp qw/tempdir/; -require 'captive-daemon.pm'; +require './captive-daemon.pm'; # Set $PATH to include directory that will have phony 'btrfs' binary. my $bindir = tempdir (CLEANUP => 1); diff --git a/tests/daemon/test-daemon-start.pl b/tests/daemon/test-daemon-start.pl index 8cc59d9..93e0b24 100755 --- a/tests/daemon/test-daemon-start.pl +++ b/tests/daemon/test-daemon-start.pl @@ -21,7 +21,7 @@ use strict; use warnings; -require 'captive-daemon.pm'; +require './captive-daemon.pm'; sub tests { my $g = shift; -- 2.7.4
On Fri, Sep 09, 2016 at 02:59:22PM +0200, Pino Toscano wrote:
Upstream Perl is going to remove '.' from @INC (the include path for modules) by default for the next major release (= 5.26) [1], as measure to fix security issues. Debian already started backporting the fixes for this [2], thus behaving this way in current Sid installations.
Since the affected Perl sources are only the local daemon testing scripts, a simple fix is to force the 'requires' for the local captive-daemon.pm module to start from the current directory: this way there is no need to manually augment @INC, and only our local module is loaded automatically.
[1] https://rt.perl.org/Public/Bug/Display.html?id=127810 [2] https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html --- tests/daemon/test-btrfs.pl | 2 +- tests/daemon/test-daemon-start.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/daemon/test-btrfs.pl b/tests/daemon/test-btrfs.pl index 302ecb9..7b306b7 100755 --- a/tests/daemon/test-btrfs.pl +++ b/tests/daemon/test-btrfs.pl @@ -23,7 +23,7 @@ use warnings;
use File::Temp qw/tempdir/;
-require 'captive-daemon.pm'; +require './captive-daemon.pm';
# Set $PATH to include directory that will have phony 'btrfs' binary. my $bindir = tempdir (CLEANUP => 1); diff --git a/tests/daemon/test-daemon-start.pl b/tests/daemon/test-daemon-start.pl index 8cc59d9..93e0b24 100755 --- a/tests/daemon/test-daemon-start.pl +++ b/tests/daemon/test-daemon-start.pl @@ -21,7 +21,7 @@ use strict; use warnings;
-require 'captive-daemon.pm'; +require './captive-daemon.pm';
sub tests { my $g = shift; -- 2.7.4
Obvious fix, ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
participants (2)
-
Pino Toscano -
Richard W.M. Jones