From 8aeaf75b143454300d336f9801e6d798595d86cc Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Dec 29 2013 13:40:15 +0000 Subject: import perl-local-lib-1.008010-3.el7.src.rpm --- diff --git a/SOURCES/local-lib-1.008010-Fix-setting-undefined-variable-in-CSH.patch b/SOURCES/local-lib-1.008010-Fix-setting-undefined-variable-in-CSH.patch new file mode 100644 index 0000000..9005842 --- /dev/null +++ b/SOURCES/local-lib-1.008010-Fix-setting-undefined-variable-in-CSH.patch @@ -0,0 +1,48 @@ +From 53297b1441539efdc44fc9c8f4f19fb6ba8290c9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 21 Nov 2013 12:03:32 +0100 +Subject: [PATCH] Fix setting undefined variable in CSH +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + + +Signed-off-by: Petr Písař +--- + lib/local/lib.pm | 19 ++++++++++++++++++- + 1 file changed, 18 insertions(+), 1 deletion(-) + +diff --git a/lib/local/lib.pm b/lib/local/lib.pm +index 289e13b..d4f8e2a 100644 +--- a/lib/local/lib.pm ++++ b/lib/local/lib.pm +@@ -343,7 +343,24 @@ sub build_bourne_env_declaration { + sub build_csh_env_declaration { + my $class = shift; + my($name, $value) = @_; +- return defined($value) ? qq{setenv ${name} "${value}";\n} : qq{unsetenv ${name};\n}; ++ if (defined($value)) { ++ if ($value =~ /(.*)(\A|\Q$Config{path_sep}\E)(\$)(.+?)(\z|\Q$Config{path_sep}\E)(.*)/) { ++ # If a variable reference exists in the value, we have to delimit it and ++ # dereference it only if it is defined. ++ return ++ qq{test 1 == \$\{?$4\} && } . ++ qq{setenv ${name} "${1}${2}${3}\{${4}\}${5}${6}"} . ++ qq{ || } . ++ qq{setenv ${name} "${1}} . ++ (($2 ne '' and $5 ne '') ? qq{${2}} : '') . ++ qq{${6}"} . ++ qq{;\n}; ++ } else { ++ return qq{setenv ${name} "${value}";\n}; ++ } ++ } else { ++ return qq{unsetenv ${name};\n}; ++ } + } + + sub build_win32_env_declaration { +-- +1.8.3.1 + diff --git a/SOURCES/perl-homedir.csh b/SOURCES/perl-homedir.csh index ef7ad3b..b00fb0d 100644 --- a/SOURCES/perl-homedir.csh +++ b/SOURCES/perl-homedir.csh @@ -11,10 +11,10 @@ if (-f "$HOME/.perl-homedir") then source "$HOME/.perl-homedir" endif -alias perlll 'eval `perl -Mlocal::lib`' +alias perlll 'eval "`perl -Mlocal::lib`"' # if system default if ("x$PERL_HOMEDIR" == "x1") then - eval `perl -Mlocal::lib` + eval "`perl -Mlocal::lib`" endif diff --git a/SPECS/perl-local-lib.spec b/SPECS/perl-local-lib.spec index 821d1aa..1d631b3 100644 --- a/SPECS/perl-local-lib.spec +++ b/SPECS/perl-local-lib.spec @@ -1,6 +1,6 @@ Name: perl-local-lib Version: 1.008010 -Release: 1%{?dist} +Release: 3%{?dist} # lib/local/lib.pm -> GPL+ or Artistic License: GPL+ or Artistic Group: Development/Libraries @@ -8,6 +8,9 @@ Summary: Create and use a local lib/ for perl modules Source: http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/local-lib-%{version}.tar.gz # Allow evaluation in CSH, RHBZ #849609, CPAN RT #60072 Patch0: local-lib-1.008009-Append-semicolon-to-setenv.patch +# Fix setting variables in CSH, RHBZ #1032195, CPAN RT #85667, +# upstream is going the refactor the whole code, patch not sent to upstream +Patch1: local-lib-1.008010-Fix-setting-undefined-variable-in-CSH.patch Url: http://search.cpan.org/dist/local-lib Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) BuildArch: noarch @@ -65,6 +68,7 @@ install this package. %prep %setup -q -n local-lib-%{version} %patch0 -p1 +%patch1 -p1 rm -rf inc %build @@ -91,6 +95,12 @@ make test %{_sysconfdir}/profile.d/* %changelog +* Fri Dec 27 2013 Daniel Mach - 1.008010-3 +- Mass rebuild 2013-12-27 + +* Thu Nov 21 2013 Petr Pisar - 1.008010-2 +- Fix setting undefined variable in CSH (bug #1032195) + * Fri Jun 07 2013 Iain Arnell 1.008010-1 - update to latest upstream version