Package init
This commit is contained in:
commit
4580425486
10
CVE-2018-18312-1.patch
Normal file
10
CVE-2018-18312-1.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- a/regcomp.c 2018-05-21 20:29:23.000000000 +0800
|
||||||
|
+++ b/regcomp-change.c 2019-04-11 09:51:08.493000000 +0800
|
||||||
|
@@ -15591,7 +15591,6 @@ redo_curchar:
|
||||||
|
if (UCHARAT(RExC_parse) != ')')
|
||||||
|
vFAIL("Expecting close paren for wrapper for nested extended charclass");
|
||||||
|
|
||||||
|
- RExC_parse++;
|
||||||
|
RExC_flags = save_flags;
|
||||||
|
goto handle_operand;
|
||||||
|
}
|
||||||
11
CVE-2018-18312-2.patch
Normal file
11
CVE-2018-18312-2.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/t/re/reg_mesg.t 2018-05-21 20:29:23.000000000 +0800
|
||||||
|
+++ b/t/re/reg_mesg-change.t 2019-04-11 09:54:59.622000000 +0800
|
||||||
|
@@ -122,6 +122,8 @@ my $tab_hex = sprintf "%02X", ord("\t");
|
||||||
|
#
|
||||||
|
# The first set are those that should be fatal errors.
|
||||||
|
|
||||||
|
+my $bug133423 = "(?[(?^:(?[\\\x00]))\\]\x00|2[^^]\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80])R.\\670";
|
||||||
|
+
|
||||||
|
my @death =
|
||||||
|
(
|
||||||
|
'/[[=foo=]]/' => 'POSIX syntax [= =] is reserved for future extensions {#} m/[[=foo=]{#}]/',
|
||||||
10
CVE-2018-18312-3.patch
Normal file
10
CVE-2018-18312-3.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- a/t/re/reg_mesg-change.t 2019-04-11 10:07:36.626000000 +0800
|
||||||
|
+++ b/t/re/reg_mesg.t 2019-04-11 10:08:20.032000000 +0800
|
||||||
|
@@ -309,6 +309,7 @@ my @death =
|
||||||
|
'/\A{/' => 'Unescaped left brace in regex is illegal here {#} m/\A{{#}/',
|
||||||
|
'/(?<=/' => 'Sequence (?... not terminated {#} m/(?<={#}/', # [perl #128170]
|
||||||
|
'/\p{vertical tab}/' => 'Can\'t find Unicode property definition "vertical tab" {#} m/\\p{vertical tab}{#}/', # [perl #132055]
|
||||||
|
+ "/$bug133423/" => "Operand with no preceding operator {#} m/(?[(?^:(?[\\\0]))\\{#}]\0|2[^^]\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80])R.\\670/",
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
93
Fix-script-run-bug-1-followed-by-Thai-digit.patch
Normal file
93
Fix-script-run-bug-1-followed-by-Thai-digit.patch
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
From 7da8e27b9d7d2be4e770d074405ddb9941e6c8b7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karl Williamson <khw@cpan.org>
|
||||||
|
Date: Thu, 16 Aug 2018 16:14:01 -0600
|
||||||
|
Subject: [PATCH] Fix script run bug '1' followed by Thai digit
|
||||||
|
|
||||||
|
This does not have a ticket, but was pointed out in
|
||||||
|
http://nntp.perl.org/group/perl.perl5.porters/251870
|
||||||
|
|
||||||
|
The logic for deciding if it was needed to check if a character is a
|
||||||
|
digit was flawed.
|
||||||
|
---
|
||||||
|
regexec.c | 46 +++++++++++++++++++++++++++++++---------------
|
||||||
|
t/re/script_run.t | 5 +++++
|
||||||
|
2 files changed, 36 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/regexec.c b/regexec.c
|
||||||
|
index 6f39670c4a..c927abc611 100644
|
||||||
|
--- a/regexec.c
|
||||||
|
+++ b/regexec.c
|
||||||
|
@@ -10626,23 +10626,39 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target)
|
||||||
|
scripts_match:
|
||||||
|
|
||||||
|
/* Here, the script of the character is compatible with that of the
|
||||||
|
- * run. Either they match exactly, or one or both can be any of
|
||||||
|
- * several scripts, and the intersection is not empty. If the
|
||||||
|
- * character is not a decimal digit, we are done with it. Otherwise,
|
||||||
|
- * it could still fail if it is from a different set of 10 than seen
|
||||||
|
- * already (or we may not have seen any, and we need to set the
|
||||||
|
- * sequence). If we have determined a single script and that script
|
||||||
|
- * only has one set of digits (almost all scripts are like that), then
|
||||||
|
- * this isn't a problem, as any digit must come from the same sequence.
|
||||||
|
- * The only scripts that have multiple sequences have been constructed
|
||||||
|
- * to be 0 in 'script_zeros[]'.
|
||||||
|
+ * run. That means that in most cases, it continues the script run.
|
||||||
|
+ * Either it and the run match exactly, or one or both can be in any of
|
||||||
|
+ * several scripts, and the intersection is not empty. But if the
|
||||||
|
+ * character is a decimal digit, we need further handling. If we
|
||||||
|
+ * haven't seen a digit before, it would establish what set of 10 all
|
||||||
|
+ * must come from; and if we have established a set, we need to check
|
||||||
|
+ * that this is in it.
|
||||||
|
*
|
||||||
|
- * Here we check if it is a digit. */
|
||||||
|
+ * But there are cases we can rule out without having to look up if
|
||||||
|
+ * this is a digit:
|
||||||
|
+ * a. All instances of [0-9] have been dealt with earlier.
|
||||||
|
+ * b. The next digit encoded by Unicode is 1600 code points further
|
||||||
|
+ * on, so if the code point in this loop iteration is less than
|
||||||
|
+ * that, it isn't a digit.
|
||||||
|
+ * c. Most scripts that have digits have a single set of 10. If
|
||||||
|
+ * we've encountered a digit in such a script, 'zero_of_run' is
|
||||||
|
+ * set to the code point (call it z) whose numeric value is 0.
|
||||||
|
+ * If the code point in this loop iteration is in the range
|
||||||
|
+ * z..z+9, it is in the script's set of 10, and we've actually
|
||||||
|
+ * handled it earlier in this function and won't reach this
|
||||||
|
+ * point. But, code points in that script that aren't in that
|
||||||
|
+ * range can't be digits, so we don't have to look any such up.
|
||||||
|
+ * We can tell if this script is such a one by looking at
|
||||||
|
+ * 'script_zeros[]' for it. It is non-zero iff it has a single
|
||||||
|
+ * set of digits. This rule doesn't apply if we haven't narrowed
|
||||||
|
+ * down the possible scripts to a single one yet. Nor if the
|
||||||
|
+ * zero of the run is '0', as that also hasn't narrowed things
|
||||||
|
+ * down completely */
|
||||||
|
if ( cp >= FIRST_NON_ASCII_DECIMAL_DIGIT
|
||||||
|
- && ( ( zero_of_run == 0
|
||||||
|
- || ( ( script_of_char >= 0
|
||||||
|
- && script_zeros[script_of_char] == 0)
|
||||||
|
- || intersection))))
|
||||||
|
+ && ( intersection
|
||||||
|
+ || script_of_char < 0 /* Also implies an intersection */
|
||||||
|
+ || zero_of_run == '0'
|
||||||
|
+ || script_zeros[script_of_char] == 0))
|
||||||
|
{
|
||||||
|
SSize_t range_zero_index;
|
||||||
|
range_zero_index = _invlist_search(decimals_invlist, cp);
|
||||||
|
diff --git a/t/re/script_run.t b/t/re/script_run.t
|
||||||
|
index ca234d9d4e..10c71034c4 100644
|
||||||
|
--- a/t/re/script_run.t
|
||||||
|
+++ b/t/re/script_run.t
|
||||||
|
@@ -84,6 +84,11 @@ foreach my $type ('script_run', 'sr', 'atomic_script_run', 'asr') {
|
||||||
|
|
||||||
|
# From UTS 39
|
||||||
|
like("写真だけの結婚式", $script_run, "Mixed Hiragana and Han");
|
||||||
|
+
|
||||||
|
+ unlike "\N{THAI DIGIT FIVE}1", $script_run, "Thai digit followed by '1'";
|
||||||
|
+ unlike "1\N{THAI DIGIT FIVE}", $script_run, "'1' followed by Thai digit ";
|
||||||
|
+ unlike "\N{BENGALI DIGIT ZERO}\N{CHAKMA DIGIT SEVEN}", $script_run,
|
||||||
|
+ "Two digits in same extended script but from different sets of 10";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Until fixed, this was skipping the '['
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
175
Perl_my_setenv-handle-integer-wrap.patch
Normal file
175
Perl_my_setenv-handle-integer-wrap.patch
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
From 34716e2a6ee2af96078d62b065b7785c001194be Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Mitchell <davem@iabyn.com>
|
||||||
|
Date: Fri, 29 Jun 2018 13:37:03 +0100
|
||||||
|
Subject: [PATCH] Perl_my_setenv(); handle integer wrap
|
||||||
|
|
||||||
|
RT #133204
|
||||||
|
|
||||||
|
Wean this function off int/I32 and onto UV/Size_t.
|
||||||
|
Also, replace all malloc-ish calls with a wrapper that does
|
||||||
|
overflow checks,
|
||||||
|
|
||||||
|
In particular, it was doing (nlen + vlen + 2) which could wrap when
|
||||||
|
the combined length of the environment variable name and value
|
||||||
|
exceeded around 0x7fffffff.
|
||||||
|
|
||||||
|
The wrapper check function is probably overkill, but belt and braces...
|
||||||
|
|
||||||
|
NB this function has several variant parts, #ifdef'ed by platform
|
||||||
|
type; I have blindly changed the parts that aren't compiled under linux.
|
||||||
|
---
|
||||||
|
util.c | 76 ++++++++++++++++++++++++++++++++++++++++------------------
|
||||||
|
1 file changed, 53 insertions(+), 23 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/util.c b/util.c
|
||||||
|
index 7282dd9cfe..c5c7becc0f 100644
|
||||||
|
--- a/util.c
|
||||||
|
+++ b/util.c
|
||||||
|
@@ -2061,8 +2061,40 @@ Perl_new_warnings_bitfield(pTHX_ STRLEN *buffer, const char *const bits,
|
||||||
|
*(s+(nlen+1+vlen)) = '\0'
|
||||||
|
|
||||||
|
#ifdef USE_ENVIRON_ARRAY
|
||||||
|
- /* VMS' my_setenv() is in vms.c */
|
||||||
|
+
|
||||||
|
+/* small wrapper for use by Perl_my_setenv that mallocs, or reallocs if
|
||||||
|
+ * 'current' is non-null, with up to three sizes that are added together.
|
||||||
|
+ * It handles integer overflow.
|
||||||
|
+ */
|
||||||
|
+static char *
|
||||||
|
+S_env_alloc(void *current, Size_t l1, Size_t l2, Size_t l3, Size_t size)
|
||||||
|
+{
|
||||||
|
+ void *p;
|
||||||
|
+ Size_t sl, l = l1 + l2;
|
||||||
|
+
|
||||||
|
+ if (l < l2)
|
||||||
|
+ goto panic;
|
||||||
|
+ l += l3;
|
||||||
|
+ if (l < l3)
|
||||||
|
+ goto panic;
|
||||||
|
+ sl = l * size;
|
||||||
|
+ if (sl < l)
|
||||||
|
+ goto panic;
|
||||||
|
+
|
||||||
|
+ p = current
|
||||||
|
+ ? safesysrealloc(current, sl)
|
||||||
|
+ : safesysmalloc(sl);
|
||||||
|
+ if (p)
|
||||||
|
+ return (char*)p;
|
||||||
|
+
|
||||||
|
+ panic:
|
||||||
|
+ croak_memory_wrap();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/* VMS' my_setenv() is in vms.c */
|
||||||
|
#if !defined(WIN32) && !defined(NETWARE)
|
||||||
|
+
|
||||||
|
void
|
||||||
|
Perl_my_setenv(pTHX_ const char *nam, const char *val)
|
||||||
|
{
|
||||||
|
@@ -2078,28 +2110,27 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
|
||||||
|
#ifndef PERL_USE_SAFE_PUTENV
|
||||||
|
if (!PL_use_safe_putenv) {
|
||||||
|
/* most putenv()s leak, so we manipulate environ directly */
|
||||||
|
- I32 i;
|
||||||
|
- const I32 len = strlen(nam);
|
||||||
|
- int nlen, vlen;
|
||||||
|
+ UV i;
|
||||||
|
+ Size_t vlen, nlen = strlen(nam);
|
||||||
|
|
||||||
|
/* where does it go? */
|
||||||
|
for (i = 0; environ[i]; i++) {
|
||||||
|
- if (strnEQ(environ[i],nam,len) && environ[i][len] == '=')
|
||||||
|
+ if (strnEQ(environ[i], nam, nlen) && environ[i][nlen] == '=')
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (environ == PL_origenviron) { /* need we copy environment? */
|
||||||
|
- I32 j;
|
||||||
|
- I32 max;
|
||||||
|
+ UV j, max;
|
||||||
|
char **tmpenv;
|
||||||
|
|
||||||
|
max = i;
|
||||||
|
while (environ[max])
|
||||||
|
max++;
|
||||||
|
- tmpenv = (char**)safesysmalloc((max+2) * sizeof(char*));
|
||||||
|
+ /* XXX shouldn't that be max+1 rather than max+2 ??? - DAPM */
|
||||||
|
+ tmpenv = (char**)S_env_alloc(NULL, max, 2, 0, sizeof(char*));
|
||||||
|
for (j=0; j<max; j++) { /* copy environment */
|
||||||
|
- const int len = strlen(environ[j]);
|
||||||
|
- tmpenv[j] = (char*)safesysmalloc((len+1)*sizeof(char));
|
||||||
|
+ const Size_t len = strlen(environ[j]);
|
||||||
|
+ tmpenv[j] = S_env_alloc(NULL, len, 1, 0, 1);
|
||||||
|
Copy(environ[j], tmpenv[j], len+1, char);
|
||||||
|
}
|
||||||
|
tmpenv[max] = NULL;
|
||||||
|
@@ -2118,15 +2149,15 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
if (!environ[i]) { /* does not exist yet */
|
||||||
|
- environ = (char**)safesysrealloc(environ, (i+2) * sizeof(char*));
|
||||||
|
+ environ = (char**)S_env_alloc(environ, i, 2, 0, sizeof(char*));
|
||||||
|
environ[i+1] = NULL; /* make sure it's null terminated */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
safesysfree(environ[i]);
|
||||||
|
- nlen = strlen(nam);
|
||||||
|
+
|
||||||
|
vlen = strlen(val);
|
||||||
|
|
||||||
|
- environ[i] = (char*)safesysmalloc((nlen+vlen+2) * sizeof(char));
|
||||||
|
+ environ[i] = S_env_alloc(NULL, nlen, vlen, 2, 1);
|
||||||
|
/* all that work just for this */
|
||||||
|
my_setenv_format(environ[i], nam, nlen, val, vlen);
|
||||||
|
} else {
|
||||||
|
@@ -2150,22 +2181,21 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
|
||||||
|
if (environ) /* old glibc can crash with null environ */
|
||||||
|
(void)unsetenv(nam);
|
||||||
|
} else {
|
||||||
|
- const int nlen = strlen(nam);
|
||||||
|
- const int vlen = strlen(val);
|
||||||
|
- char * const new_env =
|
||||||
|
- (char*)safesysmalloc((nlen + vlen + 2) * sizeof(char));
|
||||||
|
+ const Size_t nlen = strlen(nam);
|
||||||
|
+ const Size_t vlen = strlen(val);
|
||||||
|
+ char * const new_env = S_env_alloc(NULL, nlen, vlen, 2, 1);
|
||||||
|
my_setenv_format(new_env, nam, nlen, val, vlen);
|
||||||
|
(void)putenv(new_env);
|
||||||
|
}
|
||||||
|
# else /* ! HAS_UNSETENV */
|
||||||
|
char *new_env;
|
||||||
|
- const int nlen = strlen(nam);
|
||||||
|
- int vlen;
|
||||||
|
+ const Size_t nlen = strlen(nam);
|
||||||
|
+ Size_t vlen;
|
||||||
|
if (!val) {
|
||||||
|
val = "";
|
||||||
|
}
|
||||||
|
vlen = strlen(val);
|
||||||
|
- new_env = (char*)safesysmalloc((nlen + vlen + 2) * sizeof(char));
|
||||||
|
+ new_env = S_env_alloc(NULL, nlen, vlen, 2, 1);
|
||||||
|
/* all that work just for this */
|
||||||
|
my_setenv_format(new_env, nam, nlen, val, vlen);
|
||||||
|
(void)putenv(new_env);
|
||||||
|
@@ -2187,14 +2217,14 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
|
||||||
|
{
|
||||||
|
dVAR;
|
||||||
|
char *envstr;
|
||||||
|
- const int nlen = strlen(nam);
|
||||||
|
- int vlen;
|
||||||
|
+ const Size_t nlen = strlen(nam);
|
||||||
|
+ Size_t vlen;
|
||||||
|
|
||||||
|
if (!val) {
|
||||||
|
val = "";
|
||||||
|
}
|
||||||
|
vlen = strlen(val);
|
||||||
|
- Newx(envstr, nlen+vlen+2, char);
|
||||||
|
+ envstr = S_env_alloc(NULL, nlen, vlen, 2, 1);
|
||||||
|
my_setenv_format(envstr, nam, nlen, val, vlen);
|
||||||
|
(void)PerlEnv_putenv(envstr);
|
||||||
|
Safefree(envstr);
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
49
Time-HiRes-t-itimer.t-avoid-race-condition.patch
Normal file
49
Time-HiRes-t-itimer.t-avoid-race-condition.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From ecbf46993f6ffbdc255f6ded3c6c05a8266a71e8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Mitchell <davem@iabyn.com>
|
||||||
|
Date: Tue, 7 Aug 2018 12:26:31 +0100
|
||||||
|
Subject: [PATCH] Time-HiRes/t/itimer.t: avoid race condition.
|
||||||
|
|
||||||
|
This test script sets a repeating interval timer going, and after 4
|
||||||
|
'ticks' (SIGVTALRM), disables the timer (by setting it to zero).
|
||||||
|
|
||||||
|
The main loop which does CPU burning, does a getitmer() every now and
|
||||||
|
again, and when the value is zero, assumes the signal handler has
|
||||||
|
disabled the timer, and so finishes.
|
||||||
|
|
||||||
|
The trouble was that it was checking the 'time left', which can reach
|
||||||
|
zero because the interval timer has counted down to zero, and the signal
|
||||||
|
handler is about to be called, but the interval hasn't been reset back
|
||||||
|
to 0.4s yet.
|
||||||
|
|
||||||
|
i.e. the code doesn't distinguish between "timer disabled" and "timer
|
||||||
|
just reached zero".
|
||||||
|
|
||||||
|
In that scenario, the cleanup code in the test script disables the
|
||||||
|
SIGVTALRM handler while the timer is still active, and so the process
|
||||||
|
gets killed if another signal is raised.
|
||||||
|
|
||||||
|
This commit changes the test to check the second value returned by
|
||||||
|
getitmer() for being zero rather than the first - the second being the
|
||||||
|
repeat interval, whichb is always 0.4 until the timer is disabled.
|
||||||
|
---
|
||||||
|
dist/Time-HiRes/t/itimer.t | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dist/Time-HiRes/t/itimer.t b/dist/Time-HiRes/t/itimer.t
|
||||||
|
index e196b1648c..432b224488 100644
|
||||||
|
--- a/dist/Time-HiRes/t/itimer.t
|
||||||
|
+++ b/dist/Time-HiRes/t/itimer.t
|
||||||
|
@@ -51,7 +51,9 @@ ok(defined $virt && abs($virt / 0.5) - 1 < $limit,
|
||||||
|
printf("# getitimer: %s\n", join(" ",
|
||||||
|
Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL)));
|
||||||
|
|
||||||
|
-while (Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL)) {
|
||||||
|
+# burn CPU until the VTALRM signal handler sets the repeat interval to
|
||||||
|
+# zero, indicating that the timer has fired 4 times.
|
||||||
|
+while ((Time::HiRes::getitimer(&Time::HiRes::ITIMER_VIRTUAL))[1]) {
|
||||||
|
my $j;
|
||||||
|
for (1..1000) { $j++ } # Can't be unbreakable, must test getitimer().
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
184
Update-Time-Piece-to-CPAN-version-1.33.patch
Normal file
184
Update-Time-Piece-to-CPAN-version-1.33.patch
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
From 9d890beed61e079102335ef5859d652b4e2c32ac Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
||||||
|
Date: Mon, 20 Aug 2018 11:15:20 +0100
|
||||||
|
Subject: [PATCH] Update Time-Piece to CPAN version 1.33
|
||||||
|
|
||||||
|
[DELTA]
|
||||||
|
|
||||||
|
1.33 2018-08-18
|
||||||
|
- Allow objects in overloaded methods
|
||||||
|
---
|
||||||
|
Porting/Maintainers.pl | 2 +-
|
||||||
|
cpan/Time-Piece/Piece.pm | 40 ++++++++++++++++++++--------------
|
||||||
|
cpan/Time-Piece/Seconds.pm | 2 +-
|
||||||
|
cpan/Time-Piece/t/06subclass.t | 15 +++++++++++++
|
||||||
|
4 files changed, 41 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
|
||||||
|
index eaf9ed3262..a137ee9483 100755
|
||||||
|
--- a/Porting/Maintainers.pl
|
||||||
|
+++ b/Porting/Maintainers.pl
|
||||||
|
@@ -1208,7 +1208,7 @@ use File::Glob qw(:case);
|
||||||
|
},
|
||||||
|
|
||||||
|
'Time::Piece' => {
|
||||||
|
- 'DISTRIBUTION' => 'ESAYM/Time-Piece-1.3204.tar.gz',
|
||||||
|
+ 'DISTRIBUTION' => 'ESAYM/Time-Piece-1.33.tar.gz',
|
||||||
|
'FILES' => q[cpan/Time-Piece],
|
||||||
|
'EXCLUDED' => [ qw[reverse_deps.txt] ],
|
||||||
|
},
|
||||||
|
diff --git a/cpan/Time-Piece/Piece.pm b/cpan/Time-Piece/Piece.pm
|
||||||
|
index 8acba86e76..d5624636c6 100644
|
||||||
|
--- a/cpan/Time-Piece/Piece.pm
|
||||||
|
+++ b/cpan/Time-Piece/Piece.pm
|
||||||
|
@@ -6,6 +6,7 @@ use XSLoader ();
|
||||||
|
use Time::Seconds;
|
||||||
|
use Carp;
|
||||||
|
use Time::Local;
|
||||||
|
+use Scalar::Util qw/ blessed /;
|
||||||
|
|
||||||
|
use Exporter ();
|
||||||
|
|
||||||
|
@@ -18,7 +19,7 @@ our %EXPORT_TAGS = (
|
||||||
|
':override' => 'internal',
|
||||||
|
);
|
||||||
|
|
||||||
|
-our $VERSION = '1.3204';
|
||||||
|
+our $VERSION = '1.33';
|
||||||
|
|
||||||
|
XSLoader::load( 'Time::Piece', $VERSION );
|
||||||
|
|
||||||
|
@@ -63,13 +64,27 @@ sub gmtime {
|
||||||
|
$class->_mktime($time, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
+# Check if the supplied param is either a normal array (as returned from
|
||||||
|
+# localtime in list context) or a Time::Piece-like wrapper around one.
|
||||||
|
+#
|
||||||
|
+# We need to differentiate between an array ref that we can interrogate and
|
||||||
|
+# other blessed objects (like overloaded values).
|
||||||
|
+sub _is_time_struct {
|
||||||
|
+ return 1 if ref($_[1]) eq 'ARRAY';
|
||||||
|
+ return 1 if blessed($_[1]) && $_[1]->isa('Time::Piece');
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
sub new {
|
||||||
|
my $class = shift;
|
||||||
|
my ($time) = @_;
|
||||||
|
|
||||||
|
my $self;
|
||||||
|
|
||||||
|
- if (ref($time)) {
|
||||||
|
+ if ($class->_is_time_struct($time)) {
|
||||||
|
$self = $time->[c_islocal] ? $class->localtime($time) : $class->gmtime($time);
|
||||||
|
}
|
||||||
|
elsif (defined($time)) {
|
||||||
|
@@ -106,10 +121,9 @@ sub parse {
|
||||||
|
sub _mktime {
|
||||||
|
my ($class, $time, $islocal) = @_;
|
||||||
|
|
||||||
|
- $class = eval { (ref $class) && (ref $class)->isa('Time::Piece') }
|
||||||
|
- ? ref $class
|
||||||
|
- : $class;
|
||||||
|
- if (ref($time)) {
|
||||||
|
+ $class = blessed($class) || $class;
|
||||||
|
+
|
||||||
|
+ if ($class->_is_time_struct($time)) {
|
||||||
|
my @new_time = @$time;
|
||||||
|
my @tm_parts = (@new_time[c_sec .. c_mon], $new_time[c_year]+1900);
|
||||||
|
$new_time[c_epoch] = $islocal ? timelocal(@tm_parts) : timegm(@tm_parts);
|
||||||
|
@@ -639,7 +653,8 @@ sub cdate {
|
||||||
|
|
||||||
|
sub str_compare {
|
||||||
|
my ($lhs, $rhs, $reverse) = @_;
|
||||||
|
- if (UNIVERSAL::isa($rhs, 'Time::Piece')) {
|
||||||
|
+
|
||||||
|
+ if (blessed($rhs) && $rhs->isa('Time::Piece')) {
|
||||||
|
$rhs = "$rhs";
|
||||||
|
}
|
||||||
|
return $reverse ? $rhs cmp $lhs->cdate : $lhs->cdate cmp $rhs;
|
||||||
|
@@ -652,9 +667,6 @@ use overload
|
||||||
|
sub subtract {
|
||||||
|
my $time = shift;
|
||||||
|
my $rhs = shift;
|
||||||
|
- if (UNIVERSAL::isa($rhs, 'Time::Seconds')) {
|
||||||
|
- $rhs = $rhs->seconds;
|
||||||
|
- }
|
||||||
|
|
||||||
|
if (shift)
|
||||||
|
{
|
||||||
|
@@ -667,7 +679,7 @@ sub subtract {
|
||||||
|
return $rhs - "$time";
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (UNIVERSAL::isa($rhs, 'Time::Piece')) {
|
||||||
|
+ if (blessed($rhs) && $rhs->isa('Time::Piece')) {
|
||||||
|
return Time::Seconds->new($time->epoch - $rhs->epoch);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
@@ -679,10 +691,6 @@ sub subtract {
|
||||||
|
sub add {
|
||||||
|
my $time = shift;
|
||||||
|
my $rhs = shift;
|
||||||
|
- if (UNIVERSAL::isa($rhs, 'Time::Seconds')) {
|
||||||
|
- $rhs = $rhs->seconds;
|
||||||
|
- }
|
||||||
|
- croak "Invalid rhs of addition: $rhs" if ref($rhs);
|
||||||
|
|
||||||
|
return $time->_mktime(($time->epoch + $rhs), $time->[c_islocal]);
|
||||||
|
}
|
||||||
|
@@ -692,7 +700,7 @@ use overload
|
||||||
|
|
||||||
|
sub get_epochs {
|
||||||
|
my ($lhs, $rhs, $reverse) = @_;
|
||||||
|
- if (!UNIVERSAL::isa($rhs, 'Time::Piece')) {
|
||||||
|
+ unless (blessed($rhs) && $rhs->isa('Time::Piece')) {
|
||||||
|
$rhs = $lhs->new($rhs);
|
||||||
|
}
|
||||||
|
if ($reverse) {
|
||||||
|
diff --git a/cpan/Time-Piece/Seconds.pm b/cpan/Time-Piece/Seconds.pm
|
||||||
|
index 3a56b74485..71a4bd27f2 100644
|
||||||
|
--- a/cpan/Time-Piece/Seconds.pm
|
||||||
|
+++ b/cpan/Time-Piece/Seconds.pm
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
package Time::Seconds;
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
-our $VERSION = '1.3204';
|
||||||
|
+our $VERSION = '1.33';
|
||||||
|
|
||||||
|
use Exporter 5.57 'import';
|
||||||
|
|
||||||
|
diff --git a/cpan/Time-Piece/t/06subclass.t b/cpan/Time-Piece/t/06subclass.t
|
||||||
|
index d6e4315c8f..a72cfb89ac 100644
|
||||||
|
--- a/cpan/Time-Piece/t/06subclass.t
|
||||||
|
+++ b/cpan/Time-Piece/t/06subclass.t
|
||||||
|
@@ -35,6 +35,21 @@ for my $method (qw(new localtime gmtime)) {
|
||||||
|
isa_ok($diff, $class, "yesterday via subtraction operator");
|
||||||
|
}
|
||||||
|
|
||||||
|
+{
|
||||||
|
+ my $g = $class->gmtime;
|
||||||
|
+ my $l = $class->localtime;
|
||||||
|
+
|
||||||
|
+ #via clone
|
||||||
|
+ my $l_clone = $class->new($l);
|
||||||
|
+ isa_ok($l_clone, $class, 'custom localtime via clone');
|
||||||
|
+ cmp_ok("$l_clone", 'eq', "$l", 'Clones match');
|
||||||
|
+
|
||||||
|
+ #via clone with gmtime
|
||||||
|
+ my $g_clone = $class->new($g);
|
||||||
|
+ isa_ok($g_clone, $class, 'custom gmtime via clone');
|
||||||
|
+ cmp_ok("$g_clone", 'eq', "$g", 'Clones match');
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
{
|
||||||
|
# let's verify that we can use gmtime from T::P without the export magic
|
||||||
|
my $piece = Time::Piece::gmtime;
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
52
locale.c-Fix-conditional-compilation.patch
Normal file
52
locale.c-Fix-conditional-compilation.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
From 17dd77cd74f0a69332c091f816162e34abff30c5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Francois Perrad <francois.perrad@gadz.org>
|
||||||
|
Date: Mon, 2 Jul 2018 00:17:44 +0200
|
||||||
|
Subject: [PATCH] locale.c: Fix conditional compilation
|
||||||
|
|
||||||
|
With Perl 5.28.0, there are some mismatches between blocks
|
||||||
|
and conditional compilation in the Perl__is_cur_LC_category_utf8() function.
|
||||||
|
The compilation of miniperl could fails like this:
|
||||||
|
```
|
||||||
|
locale.c: In function `Perl__is_cur_LC_category_utf8`:
|
||||||
|
locale.c:5481:1: error: expected declaration or statement at end of input
|
||||||
|
}
|
||||||
|
^
|
||||||
|
```
|
||||||
|
|
||||||
|
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
|
||||||
|
---
|
||||||
|
locale.c | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/locale.c b/locale.c
|
||||||
|
index f8f77fb3d0..f2731846ad 100644
|
||||||
|
--- a/locale.c
|
||||||
|
+++ b/locale.c
|
||||||
|
@@ -4649,11 +4649,12 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
|
||||||
|
&& wc == (wchar_t) UNICODE_REPLACEMENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
+# endif
|
||||||
|
+
|
||||||
|
restore_switched_locale(LC_CTYPE, original_ctype_locale);
|
||||||
|
goto finish_and_return;
|
||||||
|
}
|
||||||
|
|
||||||
|
-# endif
|
||||||
|
# else
|
||||||
|
|
||||||
|
/* Here, we must have a C89 compiler that doesn't have mbtowc(). Next
|
||||||
|
@@ -4885,9 +4886,9 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
|
||||||
|
is_utf8 = TRUE;
|
||||||
|
goto finish_and_return;
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
|
||||||
|
# endif
|
||||||
|
+ }
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Other common encodings are the ISO 8859 series, which aren't UTF-8. But
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
151
macros.perl
Normal file
151
macros.perl
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
# Sensible Perl-specific RPM build macros.
|
||||||
|
#
|
||||||
|
# Note that these depend on the generic filtering system being in place in
|
||||||
|
# rpm core; but won't cause a build to fail if they're not present.
|
||||||
|
#
|
||||||
|
# Chris Weyl <cweyl@alumni.drew.edu> 2009
|
||||||
|
# Marcela Mašláňová <mmaslano@redhat.com> 2011
|
||||||
|
|
||||||
|
# This macro unsets several common vars used to control how Makefile.PL (et
|
||||||
|
# al) build and install packages. We also set a couple to help some of the
|
||||||
|
# common systems be less interactive. This was blatantly stolen from
|
||||||
|
# cpanminus, and helps building rpms locally when one makes extensive use of
|
||||||
|
# local::lib, etc.
|
||||||
|
#
|
||||||
|
# Usage, in %build, before "%{__perl} Makefile.PL ..."
|
||||||
|
#
|
||||||
|
# %{?perl_ext_env_unset}
|
||||||
|
|
||||||
|
%perl_ext_env_unset %{expand:
|
||||||
|
unset PERL_MM_OPT MODULEBUILDRC PERL5INC
|
||||||
|
export PERL_AUTOINSTALL="--defaultdeps"
|
||||||
|
export PERL_MM_USE_DEFAULT=1
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Filtering macro incantations
|
||||||
|
|
||||||
|
# keep track of what "revision" of the filtering we're at. Each time we
|
||||||
|
# change the filter we should increment this.
|
||||||
|
|
||||||
|
%perl_default_filter_revision 3
|
||||||
|
|
||||||
|
# By default, for perl packages we want to filter all files in _docdir from
|
||||||
|
# req/prov scanning.
|
||||||
|
# Filtering out any provides caused by private libs in vendorarch/archlib
|
||||||
|
# (vendor/core) is done by rpmbuild since Fedora 20
|
||||||
|
# <https://fedorahosted.org/fpc/ticket/353>.
|
||||||
|
#
|
||||||
|
# Note that this must be invoked in the spec file, preferably as
|
||||||
|
# "%{?perl_default_filter}", before any %description block.
|
||||||
|
|
||||||
|
%perl_default_filter %{expand: \
|
||||||
|
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_docdir}
|
||||||
|
%global __requires_exclude_from %{?__requires_exclude_from:%__requires_exclude_from|}^%{_docdir}
|
||||||
|
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\\\(VMS|^perl\\\\(Win32|^perl\\\\(DB\\\\)|^perl\\\\(UNIVERSAL\\\\)
|
||||||
|
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\\\(VMS|^perl\\\\(Win32
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Macros to assist with generating a "-tests" subpackage in a semi-automatic
|
||||||
|
# manner.
|
||||||
|
#
|
||||||
|
# The following macros are still in a highly experimental stage and users
|
||||||
|
# should be aware that the interface and behaviour may change.
|
||||||
|
#
|
||||||
|
# PLEASE, PLEASE CONDITIONALIZE THESE MACROS IF YOU USE THEM.
|
||||||
|
#
|
||||||
|
# See http://gist.github.com/284409
|
||||||
|
|
||||||
|
# These macros should be invoked as above, right before the first %description
|
||||||
|
# section, and conditionalized. e.g., for the common case where all our tests
|
||||||
|
# are located under t/, the correct usage is:
|
||||||
|
#
|
||||||
|
# %{?perl_default_subpackage_tests}
|
||||||
|
#
|
||||||
|
# If custom files/directories need to be specified, this can be done as such:
|
||||||
|
#
|
||||||
|
# %{?perl_subpackage_tests:%perl_subpackage_tests t/ one/ three.sql}
|
||||||
|
#
|
||||||
|
# etc, etc.
|
||||||
|
|
||||||
|
%perl_version %(eval "`%{__perl} -V:version`"; echo $version)
|
||||||
|
%perl_testdir %{_libexecdir}/perl5-tests
|
||||||
|
%cpan_dist_name %(eval echo %{name} | %{__sed} -e 's/^perl-//')
|
||||||
|
|
||||||
|
# easily mark something as required by -tests and BR to the main package
|
||||||
|
%tests_req() %{expand:\
|
||||||
|
BuildRequires: %*\
|
||||||
|
%%tests_subpackage_requires %*\
|
||||||
|
}
|
||||||
|
|
||||||
|
# fixup (and create if needed) the shbang lines in tests, so they work and
|
||||||
|
# rpmlint doesn't (correctly) have a fit
|
||||||
|
%fix_shbang_line() \
|
||||||
|
TMPHEAD=`mktemp`\
|
||||||
|
TMPBODY=`mktemp`\
|
||||||
|
for file in %* ; do \
|
||||||
|
head -1 $file > $TMPHEAD\
|
||||||
|
tail -n +2 $file > $TMPBODY\
|
||||||
|
%{__perl} -pi -e '$f = /^#!/ ? "" : "#!%{__perl}$/"; $_="$f$_"' $TMPHEAD\
|
||||||
|
cat $TMPHEAD $TMPBODY > $file\
|
||||||
|
done\
|
||||||
|
%{__perl} -MExtUtils::MakeMaker -e "ExtUtils::MM_Unix->fixin(qw{%*})"\
|
||||||
|
%{__rm} $TMPHEAD $TMPBODY\
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
# additional -tests subpackage requires, if any
|
||||||
|
%tests_subpackage_requires() %{expand: \
|
||||||
|
%global __tests_spkg_req %{?__tests_spkg_req} %* \
|
||||||
|
}
|
||||||
|
|
||||||
|
# additional -tests subpackage provides, if any
|
||||||
|
%tests_subpackage_provides() %{expand: \
|
||||||
|
%global __tests_spkg_prov %{?__tests_spkg_prov} %* \
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Runs after the body of %check completes.
|
||||||
|
#
|
||||||
|
|
||||||
|
%__perl_check_pre %{expand: \
|
||||||
|
%{?__spec_check_pre} \
|
||||||
|
pushd %{buildsubdir} \
|
||||||
|
%define perl_br_testdir %{buildroot}%{perl_testdir}/%{cpan_dist_name} \
|
||||||
|
%{__mkdir_p} %{perl_br_testdir} \
|
||||||
|
%{__tar} -cf - %{__perl_test_dirs} | ( cd %{perl_br_testdir} && %{__tar} -xf - ) \
|
||||||
|
find . -maxdepth 1 -type f -name '*META*' -exec %{__cp} -vp {} %{perl_br_testdir} ';' \
|
||||||
|
find %{perl_br_testdir} -type f -exec %{__chmod} -c -x {} ';' \
|
||||||
|
T_FILES=`find %{perl_br_testdir} -type f -name '*.t'` \
|
||||||
|
%fix_shbang_line $T_FILES \
|
||||||
|
%{__chmod} +x $T_FILES \
|
||||||
|
%{_fixperms} %{perl_br_testdir} \
|
||||||
|
popd \
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# The actual invoked macro
|
||||||
|
#
|
||||||
|
|
||||||
|
%perl_subpackage_tests() %{expand: \
|
||||||
|
%global __perl_package 1\
|
||||||
|
%global __perl_test_dirs %* \
|
||||||
|
%global __spec_check_pre %{expand:%{__perl_check_pre}} \
|
||||||
|
%package tests\
|
||||||
|
Summary: Test suite for package %{name}\
|
||||||
|
Group: Development/Debug\
|
||||||
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}\
|
||||||
|
Requires: /usr/bin/prove \
|
||||||
|
%{?__tests_spkg_req:Requires: %__tests_spkg_req}\
|
||||||
|
%{?__tests_spkg_prov:Provides: %__tests_spkg_prov}\
|
||||||
|
AutoReqProv: 0 \
|
||||||
|
%description tests\
|
||||||
|
This package provides the test suite for package %{name}.\
|
||||||
|
%files tests\
|
||||||
|
%defattr(-,root,root,-)\
|
||||||
|
%{perl_testdir}\
|
||||||
|
}
|
||||||
|
|
||||||
|
# shortcut sugar
|
||||||
|
%perl_default_subpackage_tests %perl_subpackage_tests t/
|
||||||
|
|
||||||
106
multiconcat-mutator-not-seen-in-lex.patch
Normal file
106
multiconcat-mutator-not-seen-in-lex.patch
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
From 0fe04e1dc741a43190e79a985fb0cec0493ebfe9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Mitchell <davem@iabyn.com>
|
||||||
|
Date: Wed, 29 Aug 2018 14:32:24 +0100
|
||||||
|
Subject: [PATCH] multiconcat: mutator not seen in (lex = ...) .= ...
|
||||||
|
|
||||||
|
RT #133441
|
||||||
|
|
||||||
|
TL;DR:
|
||||||
|
(($lex = expr1.expr2) .= expr3) was being misinterpreted as
|
||||||
|
(expr1 . expr2 . expr3) when the ($lex = expr1) subtree had had the
|
||||||
|
assign op optimised away by the OPpTARGET_MY optimisation.
|
||||||
|
|
||||||
|
Full details.
|
||||||
|
|
||||||
|
S_maybe_multiconcat() looks for suitable chains of OP_CONCAT to convert
|
||||||
|
into a single OP_MULTICONCAT.
|
||||||
|
|
||||||
|
Part of the code needs to distinguish between (expr . expr) and
|
||||||
|
(expr .= expr). This didn't used to be easy, as both are just OP_CONCAT
|
||||||
|
ops, but with the OPf_STACKED set on the second one. But...
|
||||||
|
|
||||||
|
perl also used to optimise ($a . $b . $c) into ($a . $b) .= $c, to
|
||||||
|
reuse the padtmp returned by the $a.$b concat. This meant that an
|
||||||
|
OP_CONCAT could have the OPf_STACKED flag on even when it was a '.'
|
||||||
|
rather than a '.='.
|
||||||
|
|
||||||
|
I disambiguated these cases by seeing whether the top op in the LHS
|
||||||
|
expression had the OPf_MOD flag set too - if so, it implies '.='.
|
||||||
|
|
||||||
|
This fails in the specific case where the LHS expression is a
|
||||||
|
sub-expression which is assigned to a lexical variable, e.g.
|
||||||
|
|
||||||
|
($lex = $a+$b) .= $c.
|
||||||
|
|
||||||
|
Initially the top node in the LHS expression above is OP_SASSIGN, with
|
||||||
|
OPf_MOD set due to the enclosing '.='. Then the OPpTARGET_MY
|
||||||
|
optimisation kicks in, and the ($lex = $a + $b) part of the optree is
|
||||||
|
converted from
|
||||||
|
|
||||||
|
sassign sKPRMS
|
||||||
|
add[t4] sK
|
||||||
|
padsv[a$] s
|
||||||
|
padsv[$b] s
|
||||||
|
padsv[$lex] s
|
||||||
|
|
||||||
|
to
|
||||||
|
add[$lex] sK/TARGMY
|
||||||
|
padsv[a$] s
|
||||||
|
padsv[$b] s
|
||||||
|
|
||||||
|
which is all fine and dandy, except that the top node of that optree no
|
||||||
|
longer has the OPf_MOD flag set, which trips up S_maybe_multiconcat into
|
||||||
|
no longer spotting that the outer concat is a '.=' rather than a '.'.
|
||||||
|
|
||||||
|
Whether the OPpTARGET_MY optimising code should copy the OPf_MOD from
|
||||||
|
the being-removed sassign op to its successor is an issue I won't
|
||||||
|
address here. But in the meantime, the good news is that for 5.28.0
|
||||||
|
I added the OPpCONCAT_NESTED private flag, which is set whenever
|
||||||
|
($a . $b . $c) is optimised into ($a . $b) .= $c. This means that it's
|
||||||
|
no longer necessary to inspect the OPf_MOD flag of the first child to
|
||||||
|
disambiguate the two cases. So the fix is trivial.
|
||||||
|
---
|
||||||
|
op.c | 1 -
|
||||||
|
t/opbasic/concat.t | 10 +++++++++-
|
||||||
|
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/op.c b/op.c
|
||||||
|
index ddeb484b64..d0dcffbecb 100644
|
||||||
|
--- a/op.c
|
||||||
|
+++ b/op.c
|
||||||
|
@@ -2722,7 +2722,6 @@ S_maybe_multiconcat(pTHX_ OP *o)
|
||||||
|
}
|
||||||
|
else if ( topop->op_type == OP_CONCAT
|
||||||
|
&& (topop->op_flags & OPf_STACKED)
|
||||||
|
- && (cUNOPo->op_first->op_flags & OPf_MOD)
|
||||||
|
&& (!(topop->op_private & OPpCONCAT_NESTED))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
diff --git a/t/opbasic/concat.t b/t/opbasic/concat.t
|
||||||
|
index 9ce9722f5c..4b73b22c1c 100644
|
||||||
|
--- a/t/opbasic/concat.t
|
||||||
|
+++ b/t/opbasic/concat.t
|
||||||
|
@@ -39,7 +39,7 @@ sub is {
|
||||||
|
return $ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
-print "1..253\n";
|
||||||
|
+print "1..254\n";
|
||||||
|
|
||||||
|
($a, $b, $c) = qw(foo bar);
|
||||||
|
|
||||||
|
@@ -853,3 +853,11 @@ package RT132595 {
|
||||||
|
my $res = $a.$t.$a.$t;
|
||||||
|
::is($res, "b1c1b1c2", "RT #132595");
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+# RT #133441
|
||||||
|
+# multiconcat wasn't seeing a mutator as a mutator
|
||||||
|
+{
|
||||||
|
+ my ($a, $b) = qw(a b);
|
||||||
|
+ ($a = 'A'.$b) .= 'c';
|
||||||
|
+ is($a, "Abc", "RT #133441");
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
56
perl-132655-nul-terminate-result-of-unpack-u-of-inva.patch
Normal file
56
perl-132655-nul-terminate-result-of-unpack-u-of-inva.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From 12cad9bd99725bba72029e2651b2b7f0cab2e0b0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tony Cook <tony@develop-help.com>
|
||||||
|
Date: Mon, 20 Aug 2018 16:31:45 +1000
|
||||||
|
Subject: [PATCH] (perl #132655) nul terminate result of unpack "u" of invalid
|
||||||
|
data
|
||||||
|
|
||||||
|
In the given test case, Perl_atof2() would run off the end of the PV,
|
||||||
|
producing an error from ASAN.
|
||||||
|
---
|
||||||
|
pp_pack.c | 5 ++++-
|
||||||
|
t/op/pack.t | 9 ++++++++-
|
||||||
|
2 files changed, 12 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pp_pack.c b/pp_pack.c
|
||||||
|
index 5e9cc64301..f8be9d48ae 100644
|
||||||
|
--- a/pp_pack.c
|
||||||
|
+++ b/pp_pack.c
|
||||||
|
@@ -1727,7 +1727,10 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c
|
||||||
|
if (!checksum) {
|
||||||
|
const STRLEN l = (STRLEN) (strend - s) * 3 / 4;
|
||||||
|
sv = sv_2mortal(newSV(l));
|
||||||
|
- if (l) SvPOK_on(sv);
|
||||||
|
+ if (l) {
|
||||||
|
+ SvPOK_on(sv);
|
||||||
|
+ *SvEND(sv) = '\0';
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Note that all legal uuencoded strings are ASCII printables, so
|
||||||
|
diff --git a/t/op/pack.t b/t/op/pack.t
|
||||||
|
index cf0e286509..bb9f865091 100644
|
||||||
|
--- a/t/op/pack.t
|
||||||
|
+++ b/t/op/pack.t
|
||||||
|
@@ -12,7 +12,7 @@ my $no_endianness = $] > 5.009 ? '' :
|
||||||
|
my $no_signedness = $] > 5.009 ? '' :
|
||||||
|
"Signed/unsigned pack modifiers not available on this perl";
|
||||||
|
|
||||||
|
-plan tests => 14717;
|
||||||
|
+plan tests => 14718;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings qw(FATAL all);
|
||||||
|
@@ -2081,3 +2081,10 @@ SKIP:
|
||||||
|
fresh_perl_like('pack "c10f1073741824"', qr/Out of memory during pack/, { stderr => 1 },
|
||||||
|
"integer overflow calculating allocation (multiply)");
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+{
|
||||||
|
+ # [perl #132655] heap-buffer-overflow READ of size 11
|
||||||
|
+ # only expect failure under ASAN (and maybe valgrind)
|
||||||
|
+ fresh_perl_is('0.0 + unpack("u", "ab")', "", { stderr => 1 },
|
||||||
|
+ "ensure unpack u of invalid data nul terminates result");
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
74
perl-132683-don-t-try-to-convert-PL_sv_placeholder-i.patch
Normal file
74
perl-132683-don-t-try-to-convert-PL_sv_placeholder-i.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
From 2460a4968c375f226973ba7e7e5fe6cf5a997ddb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tony Cook <tony@develop-help.com>
|
||||||
|
Date: Wed, 21 Feb 2018 16:24:08 +1100
|
||||||
|
Subject: [PATCH] (perl #132683) don't try to convert PL_sv_placeholder into a
|
||||||
|
CV
|
||||||
|
|
||||||
|
Constant folding sets PL_warnhook to PERL_WARNHOOK_FATAL, which is
|
||||||
|
&PL_sv_placeholder, an undef SV.
|
||||||
|
|
||||||
|
If warn() is called while constant folding, invoke_exception_hook()
|
||||||
|
attempts to use the value of a non-NULL PL_warnhook as a CV, which
|
||||||
|
caused an undefined value warning.
|
||||||
|
|
||||||
|
invoke_exception_hook() now treats a PL_warnhook of PERL_WARNHOOK_FATAL
|
||||||
|
the same as NULL, falling back to the normal warning handling which
|
||||||
|
throws an exception to abort constant folding.
|
||||||
|
---
|
||||||
|
t/lib/warnings/util | 29 +++++++++++++++++++++++++++++
|
||||||
|
util.c | 2 +-
|
||||||
|
2 files changed, 30 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/t/lib/warnings/util b/t/lib/warnings/util
|
||||||
|
index e82d6a6617..92be6efa73 100644
|
||||||
|
--- a/t/lib/warnings/util
|
||||||
|
+++ b/t/lib/warnings/util
|
||||||
|
@@ -106,3 +106,32 @@ no warnings 'portable' ;
|
||||||
|
$a = oct "0047777777777" ;
|
||||||
|
EXPECT
|
||||||
|
Octal number > 037777777777 non-portable at - line 5.
|
||||||
|
+########
|
||||||
|
+# util.c
|
||||||
|
+# NAME 132683: Use of uninitialized value" in warn() with constant folding and overloaded numbers
|
||||||
|
+use strict;
|
||||||
|
+use warnings;
|
||||||
|
+
|
||||||
|
+package Foo;
|
||||||
|
+
|
||||||
|
+use overload log => sub {
|
||||||
|
+ warn "here\n"; # Use of uninitialized value in warn
|
||||||
|
+ CORE::log($_[0]->{value});
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+sub import {
|
||||||
|
+ overload::constant
|
||||||
|
+ integer => sub { __PACKAGE__->new($_[0]) };
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+sub new {
|
||||||
|
+ my ($class, $value) = @_;
|
||||||
|
+ bless {value => $value}, $class;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+package main;
|
||||||
|
+
|
||||||
|
+BEGIN { Foo->import }
|
||||||
|
+my $x = log(2);
|
||||||
|
+EXPECT
|
||||||
|
+here
|
||||||
|
diff --git a/util.c b/util.c
|
||||||
|
index 37a71a1a81..ff88a54bf6 100644
|
||||||
|
--- a/util.c
|
||||||
|
+++ b/util.c
|
||||||
|
@@ -1534,7 +1534,7 @@ S_invoke_exception_hook(pTHX_ SV *ex, bool warn)
|
||||||
|
/* sv_2cv might call Perl_croak() or Perl_warner() */
|
||||||
|
SV * const oldhook = *hook;
|
||||||
|
|
||||||
|
- if (!oldhook)
|
||||||
|
+ if (!oldhook || oldhook == PERL_WARNHOOK_FATAL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
ENTER;
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
97
perl-133314-always-close-the-directory-handle-on-cle.patch
Normal file
97
perl-133314-always-close-the-directory-handle-on-cle.patch
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
From 3d5e9c119db6b727684fe75dfcfe5831c4351bec Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tony Cook <tony@develop-help.com>
|
||||||
|
Date: Mon, 2 Jul 2018 10:43:19 +1000
|
||||||
|
Subject: [PATCH] (perl #133314) always close the directory handle on clean up
|
||||||
|
|
||||||
|
Previously the directory handle was only closed if the rest of the
|
||||||
|
magic free clean up is done, but in most success cases that code
|
||||||
|
doesn't run, leaking the directory handle.
|
||||||
|
|
||||||
|
So always close the directory if our AV is available.
|
||||||
|
---
|
||||||
|
doio.c | 56 +++++++++++++++++++++++++++++++-------------------------
|
||||||
|
1 file changed, 31 insertions(+), 25 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/doio.c b/doio.c
|
||||||
|
index 4b8923f77c..16daf9fd11 100644
|
||||||
|
--- a/doio.c
|
||||||
|
+++ b/doio.c
|
||||||
|
@@ -1163,44 +1163,50 @@ S_argvout_free(pTHX_ SV *io, MAGIC *mg) {
|
||||||
|
|
||||||
|
/* mg_obj can be NULL if a thread is created with the handle open, in which
|
||||||
|
case we leave any clean up to the parent thread */
|
||||||
|
- if (mg->mg_obj && IoIFP(io)) {
|
||||||
|
- SV **pid_psv;
|
||||||
|
+ if (mg->mg_obj) {
|
||||||
|
#ifdef ARGV_USE_ATFUNCTIONS
|
||||||
|
SV **dir_psv;
|
||||||
|
DIR *dir;
|
||||||
|
+
|
||||||
|
+ dir_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_DIRP, FALSE);
|
||||||
|
+ assert(dir_psv && *dir_psv && SvIOK(*dir_psv));
|
||||||
|
+ dir = INT2PTR(DIR *, SvIV(*dir_psv));
|
||||||
|
#endif
|
||||||
|
- PerlIO *iop = IoIFP(io);
|
||||||
|
+ if (IoIFP(io)) {
|
||||||
|
+ SV **pid_psv;
|
||||||
|
+ PerlIO *iop = IoIFP(io);
|
||||||
|
|
||||||
|
- assert(SvTYPE(mg->mg_obj) == SVt_PVAV);
|
||||||
|
+ assert(SvTYPE(mg->mg_obj) == SVt_PVAV);
|
||||||
|
|
||||||
|
- pid_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_PID, FALSE);
|
||||||
|
+ pid_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_PID, FALSE);
|
||||||
|
|
||||||
|
- assert(pid_psv && *pid_psv);
|
||||||
|
+ assert(pid_psv && *pid_psv);
|
||||||
|
|
||||||
|
- if (SvIV(*pid_psv) == (IV)PerlProc_getpid()) {
|
||||||
|
- /* if we get here the file hasn't been closed explicitly by the
|
||||||
|
- user and hadn't been closed implicitly by nextargv(), so
|
||||||
|
- abandon the edit */
|
||||||
|
- SV **temp_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_TEMP_NAME, FALSE);
|
||||||
|
- const char *temp_pv = SvPVX(*temp_psv);
|
||||||
|
+ if (SvIV(*pid_psv) == (IV)PerlProc_getpid()) {
|
||||||
|
+ /* if we get here the file hasn't been closed explicitly by the
|
||||||
|
+ user and hadn't been closed implicitly by nextargv(), so
|
||||||
|
+ abandon the edit */
|
||||||
|
+ SV **temp_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_TEMP_NAME, FALSE);
|
||||||
|
+ const char *temp_pv = SvPVX(*temp_psv);
|
||||||
|
|
||||||
|
- assert(temp_psv && *temp_psv && SvPOK(*temp_psv));
|
||||||
|
- (void)PerlIO_close(iop);
|
||||||
|
- IoIFP(io) = IoOFP(io) = NULL;
|
||||||
|
+ assert(temp_psv && *temp_psv && SvPOK(*temp_psv));
|
||||||
|
+ (void)PerlIO_close(iop);
|
||||||
|
+ IoIFP(io) = IoOFP(io) = NULL;
|
||||||
|
#ifdef ARGV_USE_ATFUNCTIONS
|
||||||
|
- dir_psv = av_fetch((AV*)mg->mg_obj, ARGVMG_ORIG_DIRP, FALSE);
|
||||||
|
- assert(dir_psv && *dir_psv && SvIOK(*dir_psv));
|
||||||
|
- dir = INT2PTR(DIR *, SvIV(*dir_psv));
|
||||||
|
- if (dir) {
|
||||||
|
- if (unlinkat(my_dirfd(dir), temp_pv, 0) < 0 &&
|
||||||
|
- NotSupported(errno))
|
||||||
|
- (void)UNLINK(temp_pv);
|
||||||
|
- closedir(dir);
|
||||||
|
- }
|
||||||
|
+ if (dir) {
|
||||||
|
+ if (unlinkat(my_dirfd(dir), temp_pv, 0) < 0 &&
|
||||||
|
+ NotSupported(errno))
|
||||||
|
+ (void)UNLINK(temp_pv);
|
||||||
|
+ }
|
||||||
|
#else
|
||||||
|
- (void)UNLINK(temp_pv);
|
||||||
|
+ (void)UNLINK(temp_pv);
|
||||||
|
#endif
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
+#ifdef ARGV_USE_ATFUNCTIONS
|
||||||
|
+ if (dir)
|
||||||
|
+ closedir(dir);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
76
perl-133314-test-for-handle-leaks-from-in-place-edit.patch
Normal file
76
perl-133314-test-for-handle-leaks-from-in-place-edit.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
From 028f02e7e97a6026ba9ef084c3803ea08d36aa5b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tony Cook <tony@develop-help.com>
|
||||||
|
Date: Wed, 1 Aug 2018 11:55:22 +1000
|
||||||
|
Subject: [PATCH] (perl #133314) test for handle leaks from in-place editing
|
||||||
|
|
||||||
|
---
|
||||||
|
t/io/nargv.t | 46 +++++++++++++++++++++++++++++++++++++++++++++-
|
||||||
|
1 file changed, 45 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/t/io/nargv.t b/t/io/nargv.t
|
||||||
|
index 598ceed617..4482572aeb 100644
|
||||||
|
--- a/t/io/nargv.t
|
||||||
|
+++ b/t/io/nargv.t
|
||||||
|
@@ -6,7 +6,7 @@ BEGIN {
|
||||||
|
set_up_inc('../lib');
|
||||||
|
}
|
||||||
|
|
||||||
|
-print "1..6\n";
|
||||||
|
+print "1..7\n";
|
||||||
|
|
||||||
|
my $j = 1;
|
||||||
|
for $i ( 1,2,5,4,3 ) {
|
||||||
|
@@ -84,6 +84,50 @@ sub other {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+{
|
||||||
|
+ # (perl #133314) directory handle leak
|
||||||
|
+ #
|
||||||
|
+ # We process a significant number of files here to make sure any
|
||||||
|
+ # leaks are significant
|
||||||
|
+ @ARGV = mkfiles(1 .. 10);
|
||||||
|
+ for my $file (@ARGV) {
|
||||||
|
+ open my $f, ">", $file;
|
||||||
|
+ print $f "\n";
|
||||||
|
+ close $f;
|
||||||
|
+ }
|
||||||
|
+ local $^I = ".bak";
|
||||||
|
+ local $_;
|
||||||
|
+ while (<>) {
|
||||||
|
+ s/^/foo/;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+{
|
||||||
|
+ # (perl #133314) directory handle leak
|
||||||
|
+ # We open three handles here because the file processing opened:
|
||||||
|
+ # - the original file
|
||||||
|
+ # - the output file, and finally
|
||||||
|
+ # - the directory
|
||||||
|
+ # so we need to open the first two to use up the slots used for the original
|
||||||
|
+ # and output files.
|
||||||
|
+ # This test assumes fd are allocated in the typical *nix way - lowest
|
||||||
|
+ # available, which I believe is the case for the Win32 CRTs too.
|
||||||
|
+ # If this turns out not to be the case this test will need to skip on
|
||||||
|
+ # such platforms or only run on a small set of known-good platforms.
|
||||||
|
+ my $tfile = mkfiles(1);
|
||||||
|
+ open my $f, "<", $tfile
|
||||||
|
+ or die "Cannot open temp: $!";
|
||||||
|
+ open my $f2, "<", $tfile
|
||||||
|
+ or die "Cannot open temp: $!";
|
||||||
|
+ open my $f3, "<", $tfile
|
||||||
|
+ or die "Cannot open temp: $!";
|
||||||
|
+ print +(fileno($f3) < 20 ? "ok" : "not ok"), " 7 check fd leak\n";
|
||||||
|
+ close $f;
|
||||||
|
+ close $f2;
|
||||||
|
+ close $f3;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
my @files;
|
||||||
|
sub mkfiles {
|
||||||
|
foreach (@_) {
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
12
perl-5.10.0-libresolv.patch
Normal file
12
perl-5.10.0-libresolv.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up perl-5.10.0/Configure.didi perl-5.10.0/Configure
|
||||||
|
--- perl-5.10.0/Configure.didi 2007-12-18 11:47:07.000000000 +0100
|
||||||
|
+++ perl-5.10.0/Configure 2008-07-21 10:51:16.000000000 +0200
|
||||||
|
@@ -1483,7 +1483,7 @@ archname=''
|
||||||
|
usereentrant='undef'
|
||||||
|
: List of libraries we want.
|
||||||
|
: If anyone needs extra -lxxx, put those in a hint file.
|
||||||
|
-libswanted="cl pthread socket bind inet nsl ndbm gdbm dbm db malloc dl ld"
|
||||||
|
+libswanted="cl pthread socket resolv inet nsl ndbm gdbm dbm db malloc dl ld"
|
||||||
|
libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
|
||||||
|
: We probably want to search /usr/shlib before most other libraries.
|
||||||
|
: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
From b598ba3f2d4b8347c6621cff022b8e2329b79ea5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Wed, 3 Jul 2013 11:01:02 +0200
|
||||||
|
Subject: [PATCH] Link XS modules to libperl.so with EU::CBuilder on Linux
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
<https://bugzilla.redhat.com/show_bug.cgi?id=960048>
|
||||||
|
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585#50>
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
MANIFEST | 1 +
|
||||||
|
.../lib/ExtUtils/CBuilder/Platform/linux.pm | 26 ++++++++++++++++++++++
|
||||||
|
2 files changed, 27 insertions(+)
|
||||||
|
create mode 100644 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
||||||
|
|
||||||
|
diff --git a/MANIFEST b/MANIFEST
|
||||||
|
index 397252a..d7c519b 100644
|
||||||
|
--- a/MANIFEST
|
||||||
|
+++ b/MANIFEST
|
||||||
|
@@ -3424,6 +3424,7 @@ dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm CBuilder methods fo
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm CBuilder methods for cygwin
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm CBuilder methods for darwin
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm CBuilder methods for OSF
|
||||||
|
+dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm CBuilder methods for Linux
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm CBuilder methods for OS/2
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm CBuilder methods for Unix
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm CBuilder methods for VMS
|
||||||
|
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..e3251c4
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
||||||
|
@@ -0,0 +1,26 @@
|
||||||
|
+package ExtUtils::CBuilder::Platform::linux;
|
||||||
|
+
|
||||||
|
+use strict;
|
||||||
|
+use ExtUtils::CBuilder::Platform::Unix;
|
||||||
|
+use File::Spec;
|
||||||
|
+
|
||||||
|
+use vars qw($VERSION @ISA);
|
||||||
|
+$VERSION = '0.280206';
|
||||||
|
+@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
|
||||||
|
+
|
||||||
|
+sub link {
|
||||||
|
+ my ($self, %args) = @_;
|
||||||
|
+ my $cf = $self->{config};
|
||||||
|
+
|
||||||
|
+ # Link XS modules to libperl.so explicitly because multiple
|
||||||
|
+ # dlopen(, RTLD_LOCAL) hides libperl symbols from XS module.
|
||||||
|
+ local $cf->{lddlflags} = $cf->{lddlflags};
|
||||||
|
+ if ($ENV{PERL_CORE}) {
|
||||||
|
+ $cf->{lddlflags} .= ' -L' . $self->perl_inc();
|
||||||
|
+ }
|
||||||
|
+ $cf->{lddlflags} .= ' -lperl';
|
||||||
|
+
|
||||||
|
+ return $self->SUPER::link(%args);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+1;
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
From fc1f8ac36c34c35bad84fb7b99a26ab83c9ba075 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Wed, 3 Jul 2013 12:59:09 +0200
|
||||||
|
Subject: [PATCH] Link XS modules to libperl.so with EU::MM on Linux
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
<https://bugzilla.redhat.com/show_bug.cgi?id=960048>
|
||||||
|
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327585#50>
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
||||||
|
index a8b172f..a3fbce2 100644
|
||||||
|
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
||||||
|
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
||||||
|
@@ -30,6 +30,7 @@ BEGIN {
|
||||||
|
$Is{IRIX} = $^O eq 'irix';
|
||||||
|
$Is{NetBSD} = $^O eq 'netbsd';
|
||||||
|
$Is{Interix} = $^O eq 'interix';
|
||||||
|
+ $Is{Linux} = $^O eq 'linux';
|
||||||
|
$Is{SunOS4} = $^O eq 'sunos';
|
||||||
|
$Is{Solaris} = $^O eq 'solaris';
|
||||||
|
$Is{SunOS} = $Is{SunOS4} || $Is{Solaris};
|
||||||
|
@@ -1028,7 +1029,7 @@ sub xs_make_dynamic_lib {
|
||||||
|
push(@m," \$(RM_F) \$\@\n");
|
||||||
|
|
||||||
|
my $libs = '$(LDLOADLIBS)';
|
||||||
|
- if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
|
||||||
|
+ if (($Is{Linux} || $Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
|
||||||
|
# Use nothing on static perl platforms, and to the flags needed
|
||||||
|
# to link against the shared libperl library on shared perl
|
||||||
|
# platforms. We peek at lddlflags to see if we need -Wl,-R
|
||||||
|
@@ -1041,6 +1042,11 @@ sub xs_make_dynamic_lib {
|
||||||
|
# The Android linker will not recognize symbols from
|
||||||
|
# libperl unless the module explicitly depends on it.
|
||||||
|
$libs .= ' "-L$(PERL_INC)" -lperl';
|
||||||
|
+ } else {
|
||||||
|
+ if ($ENV{PERL_CORE}) {
|
||||||
|
+ $libs .= ' "-L$(PERL_INC)"';
|
||||||
|
+ }
|
||||||
|
+ $libs .= ' -lperl';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
||||||
52
perl-5.16.3-create_libperl_soname.patch
Normal file
52
perl-5.16.3-create_libperl_soname.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
From fa2f0dd5a7767223df10149d3f16d7ed7013e16f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Torsten Veller <tove@gentoo.org>
|
||||||
|
Date: Sat, 14 Apr 2012 13:49:18 +0200
|
||||||
|
Subject: Set libperl soname
|
||||||
|
|
||||||
|
Bug-Gentoo: https://bugs.gentoo.org/286840
|
||||||
|
|
||||||
|
Patch-Name: gentoo/create_libperl_soname.diff
|
||||||
|
---
|
||||||
|
Makefile.SH | 9 +++++++--
|
||||||
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile.SH b/Makefile.SH
|
||||||
|
index d1da0a0..7733a32 100755
|
||||||
|
--- a/Makefile.SH
|
||||||
|
+++ b/Makefile.SH
|
||||||
|
@@ -68,7 +68,7 @@ true)
|
||||||
|
${api_revision}.${api_version}.${api_subversion} \
|
||||||
|
-current_version \
|
||||||
|
${revision}.${patchlevel}.${subversion} \
|
||||||
|
- -install_name \$(shrpdir)/\$@"
|
||||||
|
+ -install_name \$(shrpdir)/libperl.${revision}.${patchlevel}.dylib"
|
||||||
|
;;
|
||||||
|
cygwin*)
|
||||||
|
shrpldflags="$shrpldflags -Wl,--out-implib=libperl.dll.a -Wl,--image-base,0x52000000"
|
||||||
|
@@ -76,13 +76,15 @@ true)
|
||||||
|
;;
|
||||||
|
sunos*)
|
||||||
|
linklibperl="-lperl"
|
||||||
|
+ shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
||||||
|
;;
|
||||||
|
netbsd*|freebsd[234]*|openbsd*|dragonfly*|bitrig*)
|
||||||
|
linklibperl="-L. -lperl"
|
||||||
|
+ shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
||||||
|
;;
|
||||||
|
interix*)
|
||||||
|
linklibperl="-L. -lperl"
|
||||||
|
- shrpldflags="$shrpldflags -Wl,--image-base,0x57000000"
|
||||||
|
+ shrpldflags="$shrpldflags -Wl,--image-base,0x57000000 -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
||||||
|
;;
|
||||||
|
aix*)
|
||||||
|
case "$cc" in
|
||||||
|
@@ -120,6 +122,9 @@ true)
|
||||||
|
linklibperl='libperl.x'
|
||||||
|
DPERL_EXTERNAL_GLOB=''
|
||||||
|
;;
|
||||||
|
+ linux*)
|
||||||
|
+ shrpldflags="$shrpldflags -Wl,-soname -Wl,libperl.so.${revision}.${patchlevel}"
|
||||||
|
+ ;;
|
||||||
|
esac
|
||||||
|
case "$ldlibpthname" in
|
||||||
|
'') ;;
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
From 862c89c81d26dae0dcef138e19df8b45615e69c9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Mon, 2 Dec 2013 10:10:56 +0100
|
||||||
|
Subject: [PATCH] Document Math::BigInt::CalcEmu requires Math::BigInt
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
<https://rt.cpan.org/Public/Bug/Display.html?id=85015>
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
dist/Math-BigInt/lib/Math/BigInt/CalcEmu.pm | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/dist/Math-BigInt/lib/Math/BigInt/CalcEmu.pm b/dist/Math-BigInt/lib/Math/BigInt/CalcEmu.pm
|
||||||
|
index c82e153..0c0b496 100644
|
||||||
|
--- a/cpan/Math-BigInt/lib/Math/BigInt/CalcEmu.pm
|
||||||
|
+++ b/cpan/Math-BigInt/lib/Math/BigInt/CalcEmu.pm
|
||||||
|
@@ -292,6 +292,7 @@ Math::BigInt::CalcEmu - Emulate low-level math with BigInt code
|
||||||
|
|
||||||
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
+ use Math::BigInt;
|
||||||
|
use Math::BigInt::CalcEmu;
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -0,0 +1,233 @@
|
|||||||
|
From f793042f2bac2ace9a5c0030b47b41c4db561a5b Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Fri, 6 Jun 2014 14:31:59 +0200
|
||||||
|
Subject: [PATCH] Destroy {GDBM,NDBM,ODBM,SDBM}_File objects only from original
|
||||||
|
thread context
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
This patch fixes a crash when destroing a hash tied to a *_File
|
||||||
|
database after spawning a thread:
|
||||||
|
|
||||||
|
use Fcntl;
|
||||||
|
use SDBM_File;
|
||||||
|
use threads;
|
||||||
|
tie(my %dbtest, 'SDBM_File', "test.db", O_RDWR|O_CREAT, 0666);
|
||||||
|
threads->new(sub {})->join;
|
||||||
|
|
||||||
|
This crashed or paniced depending on how perl was configured.
|
||||||
|
|
||||||
|
Closes RT#61912.
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
ext/GDBM_File/GDBM_File.xs | 16 ++++++++++------
|
||||||
|
ext/NDBM_File/NDBM_File.xs | 16 ++++++++++------
|
||||||
|
ext/ODBM_File/ODBM_File.xs | 18 +++++++++++-------
|
||||||
|
ext/SDBM_File/SDBM_File.xs | 4 +++-
|
||||||
|
t/lib/dbmt_common.pl | 35 +++++++++++++++++++++++++++++++++++
|
||||||
|
5 files changed, 69 insertions(+), 20 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
|
||||||
|
index 33e08e2..7160f54 100644
|
||||||
|
--- a/ext/GDBM_File/GDBM_File.xs
|
||||||
|
+++ b/ext/GDBM_File/GDBM_File.xs
|
||||||
|
@@ -13,6 +13,7 @@
|
||||||
|
#define store_value 3
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
+ tTHX owner;
|
||||||
|
GDBM_FILE dbp ;
|
||||||
|
SV * filter[4];
|
||||||
|
int filtering ;
|
||||||
|
@@ -98,6 +99,7 @@ gdbm_TIEHASH(dbtype, name, read_write, m
|
||||||
|
}
|
||||||
|
if (dbp) {
|
||||||
|
RETVAL = (GDBM_File)safecalloc(1, sizeof(GDBM_File_type));
|
||||||
|
+ RETVAL->owner = aTHX;
|
||||||
|
RETVAL->dbp = dbp;
|
||||||
|
} else {
|
||||||
|
RETVAL = NULL;
|
||||||
|
@@ -118,12 +120,14 @@ gdbm_DESTROY(db)
|
||||||
|
PREINIT:
|
||||||
|
int i = store_value;
|
||||||
|
CODE:
|
||||||
|
- gdbm_close(db);
|
||||||
|
- do {
|
||||||
|
- if (db->filter[i])
|
||||||
|
- SvREFCNT_dec(db->filter[i]);
|
||||||
|
- } while (i-- > 0);
|
||||||
|
- safefree(db);
|
||||||
|
+ if (db && db->owner == aTHX) {
|
||||||
|
+ gdbm_close(db);
|
||||||
|
+ do {
|
||||||
|
+ if (db->filter[i])
|
||||||
|
+ SvREFCNT_dec(db->filter[i]);
|
||||||
|
+ } while (i-- > 0);
|
||||||
|
+ safefree(db);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
#define gdbm_FETCH(db,key) gdbm_fetch(db->dbp,key)
|
||||||
|
datum_value
|
||||||
|
diff --git a/ext/NDBM_File/NDBM_File.xs b/ext/NDBM_File/NDBM_File.xs
|
||||||
|
index 52e60fc..af223e5 100644
|
||||||
|
--- a/ext/NDBM_File/NDBM_File.xs
|
||||||
|
+++ b/ext/NDBM_File/NDBM_File.xs
|
||||||
|
@@ -33,6 +33,7 @@ END_EXTERN_C
|
||||||
|
#define store_value 3
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
+ tTHX owner;
|
||||||
|
DBM * dbp ;
|
||||||
|
SV * filter[4];
|
||||||
|
int filtering ;
|
||||||
|
@@ -71,6 +72,7 @@ ndbm_TIEHASH(dbtype, filename, flags, mode)
|
||||||
|
RETVAL = NULL ;
|
||||||
|
if ((dbp = dbm_open(filename, flags, mode))) {
|
||||||
|
RETVAL = (NDBM_File)safecalloc(1, sizeof(NDBM_File_type));
|
||||||
|
+ RETVAL->owner = aTHX;
|
||||||
|
RETVAL->dbp = dbp ;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -84,12 +86,14 @@ ndbm_DESTROY(db)
|
||||||
|
PREINIT:
|
||||||
|
int i = store_value;
|
||||||
|
CODE:
|
||||||
|
- dbm_close(db->dbp);
|
||||||
|
- do {
|
||||||
|
- if (db->filter[i])
|
||||||
|
- SvREFCNT_dec(db->filter[i]);
|
||||||
|
- } while (i-- > 0);
|
||||||
|
- safefree(db);
|
||||||
|
+ if (db && db->owner == aTHX) {
|
||||||
|
+ dbm_close(db->dbp);
|
||||||
|
+ do {
|
||||||
|
+ if (db->filter[i])
|
||||||
|
+ SvREFCNT_dec(db->filter[i]);
|
||||||
|
+ } while (i-- > 0);
|
||||||
|
+ safefree(db);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
#define ndbm_FETCH(db,key) dbm_fetch(db->dbp,key)
|
||||||
|
datum_value
|
||||||
|
diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs
|
||||||
|
index d1ece7f..f7e00a0 100644
|
||||||
|
--- a/ext/ODBM_File/ODBM_File.xs
|
||||||
|
+++ b/ext/ODBM_File/ODBM_File.xs
|
||||||
|
@@ -49,6 +49,7 @@ datum nextkey(datum key);
|
||||||
|
#define store_value 3
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
+ tTHX owner;
|
||||||
|
void * dbp ;
|
||||||
|
SV * filter[4];
|
||||||
|
int filtering ;
|
||||||
|
@@ -137,6 +138,7 @@ odbm_TIEHASH(dbtype, filename, flags, mode)
|
||||||
|
}
|
||||||
|
dbp = (void*)(dbminit(filename) >= 0 ? &dbmrefcnt : 0);
|
||||||
|
RETVAL = (ODBM_File)safecalloc(1, sizeof(ODBM_File_type));
|
||||||
|
+ RETVAL->owner = aTHX;
|
||||||
|
RETVAL->dbp = dbp ;
|
||||||
|
}
|
||||||
|
OUTPUT:
|
||||||
|
@@ -149,13 +151,15 @@ DESTROY(db)
|
||||||
|
dMY_CXT;
|
||||||
|
int i = store_value;
|
||||||
|
CODE:
|
||||||
|
- dbmrefcnt--;
|
||||||
|
- dbmclose();
|
||||||
|
- do {
|
||||||
|
- if (db->filter[i])
|
||||||
|
- SvREFCNT_dec(db->filter[i]);
|
||||||
|
- } while (i-- > 0);
|
||||||
|
- safefree(db);
|
||||||
|
+ if (db && db->owner == aTHX) {
|
||||||
|
+ dbmrefcnt--;
|
||||||
|
+ dbmclose();
|
||||||
|
+ do {
|
||||||
|
+ if (db->filter[i])
|
||||||
|
+ SvREFCNT_dec(db->filter[i]);
|
||||||
|
+ } while (i-- > 0);
|
||||||
|
+ safefree(db);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
datum_value
|
||||||
|
odbm_FETCH(db, key)
|
||||||
|
diff --git a/ext/SDBM_File/SDBM_File.xs b/ext/SDBM_File/SDBM_File.xs
|
||||||
|
index 291e41b..0bdae9a 100644
|
||||||
|
--- a/ext/SDBM_File/SDBM_File.xs
|
||||||
|
+++ b/ext/SDBM_File/SDBM_File.xs
|
||||||
|
@@ -10,6 +10,7 @@
|
||||||
|
#define store_value 3
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
+ tTHX owner;
|
||||||
|
DBM * dbp ;
|
||||||
|
SV * filter[4];
|
||||||
|
int filtering ;
|
||||||
|
@@ -51,6 +52,7 @@ sdbm_TIEHASH(dbtype, filename, flags, mode)
|
||||||
|
}
|
||||||
|
if (dbp) {
|
||||||
|
RETVAL = (SDBM_File)safecalloc(1, sizeof(SDBM_File_type));
|
||||||
|
+ RETVAL->owner = aTHX;
|
||||||
|
RETVAL->dbp = dbp ;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -62,7 +64,7 @@ void
|
||||||
|
sdbm_DESTROY(db)
|
||||||
|
SDBM_File db
|
||||||
|
CODE:
|
||||||
|
- if (db) {
|
||||||
|
+ if (db && db->owner == aTHX) {
|
||||||
|
int i = store_value;
|
||||||
|
sdbm_close(db->dbp);
|
||||||
|
do {
|
||||||
|
diff --git a/t/lib/dbmt_common.pl b/t/lib/dbmt_common.pl
|
||||||
|
index 5d4098c..a0a4d52 100644
|
||||||
|
--- a/t/lib/dbmt_common.pl
|
||||||
|
+++ b/t/lib/dbmt_common.pl
|
||||||
|
@@ -510,5 +510,40 @@ unlink <Op_dbmx*>, $Dfile;
|
||||||
|
unlink <Op1_dbmx*>;
|
||||||
|
}
|
||||||
|
|
||||||
|
+{
|
||||||
|
+ # Check DBM back-ends do not destroy objects from then-spawned threads.
|
||||||
|
+ # RT#61912.
|
||||||
|
+ SKIP: {
|
||||||
|
+ my $threads_count = 2;
|
||||||
|
+ skip 'Threads are disabled', 3 + 2 * $threads_count
|
||||||
|
+ unless $Config{usethreads};
|
||||||
|
+ use_ok('threads');
|
||||||
|
+
|
||||||
|
+ my %h;
|
||||||
|
+ unlink <Op1_dbmx*>;
|
||||||
|
+
|
||||||
|
+ my $db = tie %h, $DBM_Class, 'Op1_dbmx', $create, 0640;
|
||||||
|
+ isa_ok($db, $DBM_Class);
|
||||||
|
+
|
||||||
|
+ for (1 .. 2) {
|
||||||
|
+ ok(threads->create(
|
||||||
|
+ sub {
|
||||||
|
+ $SIG{'__WARN__'} = sub { fail(shift) }; # debugging perl panics
|
||||||
|
+ # report it by spurious TAP line
|
||||||
|
+ 1;
|
||||||
|
+ }), "Thread $_ created");
|
||||||
|
+ }
|
||||||
|
+ for (threads->list) {
|
||||||
|
+ is($_->join, 1, "A thread exited successfully");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ pass("Tied object survived exiting threads");
|
||||||
|
+
|
||||||
|
+ undef $db;
|
||||||
|
+ untie %h;
|
||||||
|
+ unlink <Op1_dbmx*>;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
done_testing();
|
||||||
|
1;
|
||||||
|
--
|
||||||
|
1.9.3
|
||||||
|
|
||||||
61
perl-5.22.0-Install-libperl.so-to-shrpdir-on-Linux.patch
Normal file
61
perl-5.22.0-Install-libperl.so-to-shrpdir-on-Linux.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
From 9644657c4 10326749fd321d9c24944ec25afad2f Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Thu, 20 Jun 2013 15:22:53 +0200
|
||||||
|
Subject: [PATCH] Install libperl.so to shrpdir on Linux
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
Configure | 7 ++++---
|
||||||
|
Makefile.SH | 2 +-
|
||||||
|
2 files changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Configure b/Configure
|
||||||
|
index 2f30261..825496e 100755
|
||||||
|
--- a/Configure
|
||||||
|
+++ b/Configure
|
||||||
|
@@ -8762,7 +8762,9 @@ esac
|
||||||
|
|
||||||
|
# Detect old use of shrpdir via undocumented Configure -Dshrpdir
|
||||||
|
case "$shrpdir" in
|
||||||
|
-'') ;;
|
||||||
|
+'')
|
||||||
|
+shrpdir=$archlibexp/CORE
|
||||||
|
+;;
|
||||||
|
*) $cat >&4 <<EOM
|
||||||
|
WARNING: Use of the shrpdir variable for the installation location of
|
||||||
|
the shared $libperl is not supported. It was never documented and
|
||||||
|
@@ -8792,7 +8794,6 @@ esac
|
||||||
|
# Add $xxx to ccdlflags.
|
||||||
|
# If we can't figure out a command-line option, use $shrpenv to
|
||||||
|
# set env LD_RUN_PATH. The main perl makefile uses this.
|
||||||
|
-shrpdir=$archlibexp/CORE
|
||||||
|
xxx=''
|
||||||
|
tmp_shrpenv=''
|
||||||
|
if "$useshrplib"; then
|
||||||
|
@@ -8807,7 +8808,7 @@ if "$useshrplib"; then
|
||||||
|
xxx="-Wl,-R$shrpdir"
|
||||||
|
;;
|
||||||
|
bsdos|linux|irix*|dec_osf|gnu*|haiku)
|
||||||
|
- xxx="-Wl,-rpath,$shrpdir"
|
||||||
|
+ # We want standard path
|
||||||
|
;;
|
||||||
|
hpux*)
|
||||||
|
# hpux doesn't like the default, either.
|
||||||
|
diff --git a/Makefile.SH b/Makefile.SH
|
||||||
|
index 7733a32..a481183 100755
|
||||||
|
--- a/Makefile.SH
|
||||||
|
+++ b/Makefile.SH
|
||||||
|
@@ -288,7 +288,7 @@ ranlib = $ranlib
|
||||||
|
# installman commandline.
|
||||||
|
bin = $installbin
|
||||||
|
scriptdir = $scriptdir
|
||||||
|
-shrpdir = $archlibexp/CORE
|
||||||
|
+shrpdir = $shrpdir
|
||||||
|
privlib = $installprivlib
|
||||||
|
man1dir = $man1dir
|
||||||
|
man1ext = $man1ext
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
@ -0,0 +1,110 @@
|
|||||||
|
From 9575301256f67116eccdbb99b38fc804ba3dcf53 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Mon, 18 Apr 2016 16:24:03 +0200
|
||||||
|
Subject: [PATCH] Provide ExtUtils::MM methods as standalone
|
||||||
|
ExtUtils::MM::Utils
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
If you cannot afford depending on ExtUtils::MakeMaker, you can
|
||||||
|
depend on ExtUtils::MM::Utils instead.
|
||||||
|
|
||||||
|
<https://bugzilla.redhat.com/show_bug.cgi?id=1129443>
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
MANIFEST | 1 +
|
||||||
|
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm | 68 ++++++++++++++++++++++++
|
||||||
|
2 files changed, 69 insertions(+)
|
||||||
|
create mode 100644 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
|
||||||
|
|
||||||
|
diff --git a/MANIFEST b/MANIFEST
|
||||||
|
index 6af238c..d4f0c56 100644
|
||||||
|
--- a/MANIFEST
|
||||||
|
+++ b/MANIFEST
|
||||||
|
@@ -784,6 +784,7 @@ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm MakeMaker methods for OS/2
|
||||||
|
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm MakeMaker methods for OS/2
|
||||||
|
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm MakeMaker methods for QNX
|
||||||
|
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm MakeMaker methods for Unix
|
||||||
|
+cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm Independed MM methods
|
||||||
|
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm MakeMaker methods for U/WIN
|
||||||
|
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm MakeMaker methods for VMS
|
||||||
|
cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm MakeMaker methods for VOS
|
||||||
|
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..6bbc0d8
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
|
||||||
|
@@ -0,0 +1,68 @@
|
||||||
|
+package ExtUtils::MM::Utils;
|
||||||
|
+
|
||||||
|
+require 5.006;
|
||||||
|
+
|
||||||
|
+use strict;
|
||||||
|
+use vars qw($VERSION);
|
||||||
|
+$VERSION = '7.11_06';
|
||||||
|
+$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval]
|
||||||
|
+
|
||||||
|
+=head1 NAME
|
||||||
|
+
|
||||||
|
+ExtUtils::MM::Utils - ExtUtils::MM methods without dependency on ExtUtils::MakeMaker
|
||||||
|
+
|
||||||
|
+=head1 SYNOPSIS
|
||||||
|
+
|
||||||
|
+ require ExtUtils::MM::Utils;
|
||||||
|
+ MM->maybe_command($file);
|
||||||
|
+
|
||||||
|
+=head1 DESCRIPTION
|
||||||
|
+
|
||||||
|
+This is a collection of L<ExtUtils::MM> subroutines that are used by many
|
||||||
|
+other modules but that do not need full-featured L<ExtUtils::MakeMaker>. The
|
||||||
|
+issue with L<ExtUtils::MakeMaker> is it pulls in Perl header files and that is
|
||||||
|
+an overkill for small subroutines.
|
||||||
|
+
|
||||||
|
+An example is the L<IPC::Cmd> that caused installing GCC just because of
|
||||||
|
+three-line I<maybe_command()> from L<ExtUtils::MM_Unix>.
|
||||||
|
+
|
||||||
|
+The intentions is to use L<ExtUtils::MM::Utils> instead of
|
||||||
|
+L<ExtUtils::MakeMaker> for these trivial methods. You can still call them via
|
||||||
|
+L<MM> class name.
|
||||||
|
+
|
||||||
|
+=head1 METHODS
|
||||||
|
+
|
||||||
|
+=over 4
|
||||||
|
+
|
||||||
|
+=item maybe_command
|
||||||
|
+
|
||||||
|
+Returns true, if the argument is likely to be a command.
|
||||||
|
+
|
||||||
|
+=cut
|
||||||
|
+
|
||||||
|
+if (!exists $INC{'ExtUtils/MM.pm'}) {
|
||||||
|
+ *MM::maybe_command = *ExtUtils::MM::maybe_command = \&maybe_command;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+sub maybe_command {
|
||||||
|
+ my($self,$file) = @_;
|
||||||
|
+ return $file if -x $file && ! -d $file;
|
||||||
|
+ return;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+1;
|
||||||
|
+
|
||||||
|
+=back
|
||||||
|
+
|
||||||
|
+=head1 BUGS
|
||||||
|
+
|
||||||
|
+These methods are copied from L<ExtUtils::MM_Unix>. Other operating systems
|
||||||
|
+are not supported yet. The reason is this
|
||||||
|
+L<a hack for Linux
|
||||||
|
+distributions|https://bugzilla.redhat.com/show_bug.cgi?id=1129443>.
|
||||||
|
+
|
||||||
|
+=head1 SEE ALSO
|
||||||
|
+
|
||||||
|
+L<ExtUtils::MakeMaker>, L<ExtUtils::MM>
|
||||||
|
+
|
||||||
|
+=cut
|
||||||
|
--
|
||||||
|
2.5.5
|
||||||
|
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
From 216ddd39adb0043930acad70ff242c30a1b0c6cf Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Mon, 18 Apr 2016 16:39:32 +0200
|
||||||
|
Subject: [PATCH] Replace EU::MM dependnecy with EU::MM::Utils in IPC::Cmd
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
This allows to free from a run-time dependency on fat
|
||||||
|
ExtUtils::MakeMaker.
|
||||||
|
|
||||||
|
<https://bugzilla.redhat.com/show_bug.cgi?id=1129443>
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
cpan/IPC-Cmd/lib/IPC/Cmd.pm | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/cpan/IPC-Cmd/lib/IPC/Cmd.pm b/cpan/IPC-Cmd/lib/IPC/Cmd.pm
|
||||||
|
index 6a82bdf..b6cd7ef 100644
|
||||||
|
--- a/cpan/IPC-Cmd/lib/IPC/Cmd.pm
|
||||||
|
+++ b/cpan/IPC-Cmd/lib/IPC/Cmd.pm
|
||||||
|
@@ -232,7 +232,7 @@ sub can_run {
|
||||||
|
}
|
||||||
|
|
||||||
|
require File::Spec;
|
||||||
|
- require ExtUtils::MakeMaker;
|
||||||
|
+ require ExtUtils::MM::Utils;
|
||||||
|
|
||||||
|
my @possibles;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.5.5
|
||||||
|
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
From cb2fda94b02c5b7e8d16582410034f5a3dae526f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tony Cook <tony@develop-help.com>
|
||||||
|
Date: Tue, 25 Jul 2017 16:21:22 +1000
|
||||||
|
Subject: [PATCH] (perl #131588) be a little more careful in arybase::_tie_it()
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Original patch by John Leitch <john@autosectools.com>
|
||||||
|
Petr Pisar: Ported to 5.26.0.
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
ext/arybase/arybase.xs | 10 ++++++----
|
||||||
|
ext/arybase/t/arybase.t | 4 +++-
|
||||||
|
2 files changed, 9 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ext/arybase/arybase.xs b/ext/arybase/arybase.xs
|
||||||
|
index 880bbe3..216442a 100644
|
||||||
|
--- a/ext/arybase/arybase.xs
|
||||||
|
+++ b/ext/arybase/arybase.xs
|
||||||
|
@@ -428,10 +428,12 @@ _tie_it(SV *sv)
|
||||||
|
INIT:
|
||||||
|
GV * const gv = (GV *)sv;
|
||||||
|
CODE:
|
||||||
|
- if (GvSV(gv))
|
||||||
|
- /* This is *our* scalar now! */
|
||||||
|
- sv_unmagic(GvSV(gv), PERL_MAGIC_sv);
|
||||||
|
- tie(aTHX_ GvSVn(gv), NULL, GvSTASH(CvGV(cv)));
|
||||||
|
+ if (isGV(gv)) {
|
||||||
|
+ if (GvSV(gv))
|
||||||
|
+ /* This is *our* scalar now! */
|
||||||
|
+ sv_unmagic(GvSV(gv), PERL_MAGIC_sv);
|
||||||
|
+ tie(aTHX_ GvSVn(gv), NULL, GvSTASH(CvGV(cv)));
|
||||||
|
+ }
|
||||||
|
|
||||||
|
void
|
||||||
|
FETCH(...)
|
||||||
|
diff --git a/ext/arybase/t/arybase.t b/ext/arybase/t/arybase.t
|
||||||
|
index f3d3287..41e90df 100644
|
||||||
|
--- a/ext/arybase/t/arybase.t
|
||||||
|
+++ b/ext/arybase/t/arybase.t
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
# plus miscellaneous bug fix tests
|
||||||
|
|
||||||
|
no warnings 'deprecated';
|
||||||
|
-use Test::More tests => 7;
|
||||||
|
+use Test::More tests => 8;
|
||||||
|
|
||||||
|
sub outside_base_scope { return "${'['}" }
|
||||||
|
|
||||||
|
@@ -34,4 +34,6 @@ is $@, "That use of \$[ is unsupported at $f line $l.\n",
|
||||||
|
|
||||||
|
sub foo { my $x; $x = wait } # compilation of this routine used to crash
|
||||||
|
|
||||||
|
+ok eval { arybase::_tie_it(1); 1 }, "don't crash on bad call to _tie_it()";
|
||||||
|
+
|
||||||
|
1;
|
||||||
|
--
|
||||||
|
2.9.4
|
||||||
|
|
||||||
61
perl-5.27.8-hints-linux-Add-lphtread-to-lddlflags.patch
Normal file
61
perl-5.27.8-hints-linux-Add-lphtread-to-lddlflags.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
From f6bc8fb3d26892ba1a84ba2df76beedd51998dd2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Mon, 29 Jan 2018 16:34:17 +0100
|
||||||
|
Subject: [PATCH] hints/linux: Add -lphtread to lddlflags
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Passing -z defs to linker flags causes perl to fail to build if threads are
|
||||||
|
enabled:
|
||||||
|
|
||||||
|
gcc -shared -Wl,-z,relro -Wl,-z,defs -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -fstack-protector-strong Bzip2.o -o ../../lib/auto/Compress/Raw/Bzip2/Bzip2.so \
|
||||||
|
-L/usr/lib64 -lbz2 "-L../.." -lperl \
|
||||||
|
|
||||||
|
Bzip2.o: In function `deRef':
|
||||||
|
/builddir/build/BUILD/perl-5.26.1/cpan/Compress-Raw-Bzip2/Bzip2.xs:256: undefined reference to `pthread_getspecific'
|
||||||
|
|
||||||
|
The reason is Bzip2.xs calls dTHX macro included from thread.h via perl.h that
|
||||||
|
expands to pthread_getspecific() function call that is defined in pthread
|
||||||
|
library. But the pthread library is not explicitly linked to Bzip.so (see the
|
||||||
|
gcc command). This is exactly what -z defs linker flag enforces.
|
||||||
|
|
||||||
|
Underlinking ELFs can be dangerous because in case of versioned
|
||||||
|
symbols it can cause run-time binding to an improper version symbol or
|
||||||
|
even to an symbold from different library.
|
||||||
|
|
||||||
|
This patch fixes hints for Linux by adding -lpthreads to lddlflags. It
|
||||||
|
also adds -shared there because Configure.sh adds it only hints return
|
||||||
|
lddlflags empty.
|
||||||
|
|
||||||
|
<https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/3RHZEHLRUHJFF2XGHI5RB6YPDNLDR4HG/>
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
hints/linux.sh | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/hints/linux.sh b/hints/linux.sh
|
||||||
|
index 3f38ea07f1..9ec3bc02ef 100644
|
||||||
|
--- a/hints/linux.sh
|
||||||
|
+++ b/hints/linux.sh
|
||||||
|
@@ -353,12 +353,16 @@ if [ -f /etc/synoinfo.conf -a -d /usr/syno ]; then
|
||||||
|
echo "$libswanted" >&4
|
||||||
|
fi
|
||||||
|
|
||||||
|
+# Flags needed to produce shared libraries.
|
||||||
|
+lddlflags='-shared'
|
||||||
|
+
|
||||||
|
# This script UU/usethreads.cbu will get 'called-back' by Configure
|
||||||
|
# after it has prompted the user for whether to use threads.
|
||||||
|
cat > UU/usethreads.cbu <<'EOCBU'
|
||||||
|
case "$usethreads" in
|
||||||
|
$define|true|[yY]*)
|
||||||
|
ccflags="-D_REENTRANT -D_GNU_SOURCE $ccflags"
|
||||||
|
+ lddlflags="-lpthread $lddlflags"
|
||||||
|
if echo $libswanted | grep -v pthread >/dev/null
|
||||||
|
then
|
||||||
|
set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
|
||||||
|
--
|
||||||
|
2.13.6
|
||||||
|
|
||||||
BIN
perl-5.28.0.tar.xz
Normal file
BIN
perl-5.28.0.tar.xz
Normal file
Binary file not shown.
94
perl-5.29.0-Remove-ext-GDBM_File-t-fatal.t.patch
Normal file
94
perl-5.29.0-Remove-ext-GDBM_File-t-fatal.t.patch
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
From 892e8b006aa99ac2c880cdc2a81fd16f06c1a0f3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Mon, 9 Jul 2018 16:18:36 +0200
|
||||||
|
Subject: [PATCH] Remove ext/GDBM_File/t/fatal.t
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
gdbm-1.15 defaults to a memory-mapped I/O and does not report any I/O
|
||||||
|
errors on store and close operations. Thus ext/GDBM_File/t/fatal.t
|
||||||
|
test that expects these fatal error reports fails. Because there is
|
||||||
|
no other way to provoke a fatal error in gdbm-1.15 this patch
|
||||||
|
removes the test. Future gdbm version promisses reporting a regular
|
||||||
|
error on closing a database.
|
||||||
|
|
||||||
|
RT#133295
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
MANIFEST | 1 -
|
||||||
|
ext/GDBM_File/t/fatal.t | 49 -------------------------------------------------
|
||||||
|
2 files changed, 50 deletions(-)
|
||||||
|
delete mode 100644 ext/GDBM_File/t/fatal.t
|
||||||
|
|
||||||
|
diff --git a/MANIFEST b/MANIFEST
|
||||||
|
index 95fa539095..b07fed1f54 100644
|
||||||
|
--- a/MANIFEST
|
||||||
|
+++ b/MANIFEST
|
||||||
|
@@ -4100,7 +4100,6 @@ ext/GDBM_File/GDBM_File.pm GDBM extension Perl module
|
||||||
|
ext/GDBM_File/GDBM_File.xs GDBM extension external subroutines
|
||||||
|
ext/GDBM_File/hints/sco.pl Hint for GDBM_File for named architecture
|
||||||
|
ext/GDBM_File/Makefile.PL GDBM extension makefile writer
|
||||||
|
-ext/GDBM_File/t/fatal.t Test the fatal_func argument to gdbm_open
|
||||||
|
ext/GDBM_File/t/gdbm.t See if GDBM_File works
|
||||||
|
ext/GDBM_File/typemap GDBM extension interface types
|
||||||
|
ext/Hash-Util/Changes Change history of Hash::Util
|
||||||
|
diff --git a/ext/GDBM_File/t/fatal.t b/ext/GDBM_File/t/fatal.t
|
||||||
|
deleted file mode 100644
|
||||||
|
index 0e426d4dbc..0000000000
|
||||||
|
--- a/ext/GDBM_File/t/fatal.t
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,49 +0,0 @@
|
||||||
|
-#!./perl -w
|
||||||
|
-use strict;
|
||||||
|
-
|
||||||
|
-use Test::More;
|
||||||
|
-use Config;
|
||||||
|
-
|
||||||
|
-BEGIN {
|
||||||
|
- plan(skip_all => "GDBM_File was not built")
|
||||||
|
- unless $Config{extensions} =~ /\bGDBM_File\b/;
|
||||||
|
-
|
||||||
|
- # https://rt.perl.org/Public/Bug/Display.html?id=117967
|
||||||
|
- plan(skip_all => "GDBM_File is flaky in $^O")
|
||||||
|
- if $^O =~ /darwin/;
|
||||||
|
-
|
||||||
|
- plan(tests => 8);
|
||||||
|
- use_ok('GDBM_File');
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-unlink <Op_dbmx*>;
|
||||||
|
-
|
||||||
|
-open my $fh, '<', $^X or die "Can't open $^X: $!";
|
||||||
|
-my $fileno = fileno $fh;
|
||||||
|
-isnt($fileno, undef, "Can find next available file descriptor");
|
||||||
|
-close $fh or die $!;
|
||||||
|
-
|
||||||
|
-is((open $fh, "<&=$fileno"), undef,
|
||||||
|
- "Check that we cannot open fileno $fileno. \$! is $!");
|
||||||
|
-
|
||||||
|
-umask(0);
|
||||||
|
-my %h;
|
||||||
|
-isa_ok(tie(%h, 'GDBM_File', 'Op_dbmx', GDBM_WRCREAT, 0640), 'GDBM_File');
|
||||||
|
-
|
||||||
|
-isnt((open $fh, "<&=$fileno"), undef, "dup fileno $fileno")
|
||||||
|
- or diag("\$! = $!");
|
||||||
|
-isnt(close $fh, undef,
|
||||||
|
- "close fileno $fileno, out from underneath the GDBM_File");
|
||||||
|
-is(eval {
|
||||||
|
- $h{Perl} = 'Rules';
|
||||||
|
- untie %h;
|
||||||
|
- 1;
|
||||||
|
-}, undef, 'Trapped error when attempting to write to knobbled GDBM_File');
|
||||||
|
-
|
||||||
|
-# Observed "File write error" and "lseek error" from two different systems.
|
||||||
|
-# So there might be more variants. Important part was that we trapped the error
|
||||||
|
-# via croak.
|
||||||
|
-like($@, qr/ at .*\bfatal\.t line \d+\.\n\z/,
|
||||||
|
- 'expected error message from GDBM_File');
|
||||||
|
-
|
||||||
|
-unlink <Op_dbmx*>;
|
||||||
|
--
|
||||||
|
2.14.4
|
||||||
|
|
||||||
47
perl-5.8.0-libdir64.patch
Normal file
47
perl-5.8.0-libdir64.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
diff -up perl-5.28.0-RC1/Configure.orig perl-5.28.0-RC1/Configure
|
||||||
|
--- perl-5.28.0-RC1/Configure.orig 2018-05-21 12:44:04.000000000 +0200
|
||||||
|
+++ perl-5.28.0-RC1/Configure 2018-05-22 12:21:53.908599933 +0200
|
||||||
|
@@ -7269,8 +7269,8 @@ esac'
|
||||||
|
: Reproduce behavior of 5.005 and earlier, maybe drop that in 5.7.
|
||||||
|
case "$installstyle" in
|
||||||
|
'') case "$prefix" in
|
||||||
|
- *perl*) dflt='lib';;
|
||||||
|
- *) dflt='lib/perl5' ;;
|
||||||
|
+ *perl*) dflt='lib64';;
|
||||||
|
+ *) dflt='lib64/perl5' ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*) dflt="$installstyle" ;;
|
||||||
|
@@ -7336,8 +7336,8 @@ esac
|
||||||
|
: /opt/perl/lib/perl5... would be redundant.
|
||||||
|
: The default "style" setting is made in installstyle.U
|
||||||
|
case "$installstyle" in
|
||||||
|
-*lib/perl5*) set dflt privlib lib/$package/$version ;;
|
||||||
|
-*) set dflt privlib lib/$version ;;
|
||||||
|
+*lib64/perl5*) set dflt privlib lib64/$package/$version ;;
|
||||||
|
+*) set dflt privlib lib64/$version ;;
|
||||||
|
esac
|
||||||
|
eval $prefixit
|
||||||
|
$cat <<EOM
|
||||||
|
@@ -7584,8 +7584,8 @@ siteprefixexp="$ansexp"
|
||||||
|
prog=`echo $package | $sed 's/-*[0-9.]*$//'`
|
||||||
|
case "$sitelib" in
|
||||||
|
'') case "$installstyle" in
|
||||||
|
- *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
|
||||||
|
- *) dflt=$siteprefix/lib/site_$prog/$version ;;
|
||||||
|
+ *lib64/perl5*) dflt=$siteprefix/lib64/$package/site_$prog/$version ;;
|
||||||
|
+ *) dflt=$siteprefix/lib64/site_$prog/$version ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*) dflt="$sitelib"
|
||||||
|
@@ -8001,8 +8001,8 @@ case "$vendorprefix" in
|
||||||
|
'')
|
||||||
|
prog=`echo $package | $sed 's/-*[0-9.]*$//'`
|
||||||
|
case "$installstyle" in
|
||||||
|
- *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
|
||||||
|
- *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
|
||||||
|
+ *lib64/perl5*) dflt=$vendorprefix/lib64/$package/vendor_$prog/$version ;;
|
||||||
|
+ *) dflt=$vendorprefix/lib64/vendor_$prog/$version ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*) dflt="$vendorlib"
|
||||||
109
perl-USE_MM_LD_RUN_PATH.patch
Normal file
109
perl-USE_MM_LD_RUN_PATH.patch
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
diff -up perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm.usem perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm
|
||||||
|
--- perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm.usem 2011-05-08 05:10:08.000000000 +0200
|
||||||
|
+++ perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm 2011-05-17 11:14:22.169115984 +0200
|
||||||
|
@@ -89,6 +89,11 @@ libraries. LD_RUN_PATH is a colon separ
|
||||||
|
in LDLOADLIBS. It is passed as an environment variable to the process
|
||||||
|
that links the shared library.
|
||||||
|
|
||||||
|
+Fedora extension: This generation of LD_RUN_PATH is disabled by default.
|
||||||
|
+To use the generated LD_RUN_PATH for all links, set the USE_MM_LD_RUN_PATH
|
||||||
|
+MakeMaker object attribute / argument, (or set the $USE_MM_LD_RUN_PATH
|
||||||
|
+environment variable).
|
||||||
|
+
|
||||||
|
=head2 BSLOADLIBS
|
||||||
|
|
||||||
|
List of those libraries that are needed but can be linked in
|
||||||
|
diff -up perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm.usem perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm
|
||||||
|
--- perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm.usem 2011-05-08 05:10:08.000000000 +0200
|
||||||
|
+++ perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 2011-05-17 13:39:26.912586030 +0200
|
||||||
|
@@ -317,7 +317,7 @@ sub full_setup {
|
||||||
|
PERM_DIR PERM_RW PERM_RWX MAGICXS
|
||||||
|
PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE
|
||||||
|
PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
|
||||||
|
- SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST VERSION VERSION_FROM XS
|
||||||
|
+ SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST USE_MM_LD_RUN_PATH VERSION VERSION_FROM XS
|
||||||
|
XSBUILD XSMULTI XSOPT XSPROTOARG XS_VERSION
|
||||||
|
clean depend dist dynamic_lib linkext macro realclean tool_autosplit
|
||||||
|
|
||||||
|
@@ -501,7 +501,27 @@ sub new {
|
||||||
|
# PRINT_PREREQ is RedHatism.
|
||||||
|
if ("@ARGV" =~ /\bPRINT_PREREQ\b/) {
|
||||||
|
$self->_PRINT_PREREQ;
|
||||||
|
- }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ # USE_MM_LD_RUN_PATH - another RedHatism to disable automatic RPATH generation
|
||||||
|
+ if ( ( ! $self->{USE_MM_LD_RUN_PATH} )
|
||||||
|
+ &&( ("@ARGV" =~ /\bUSE_MM_LD_RUN_PATH(=([01]))?\b/)
|
||||||
|
+ ||( exists( $ENV{USE_MM_LD_RUN_PATH} )
|
||||||
|
+ &&( $ENV{USE_MM_LD_RUN_PATH} =~ /([01])?$/ )
|
||||||
|
+ )
|
||||||
|
+ )
|
||||||
|
+ )
|
||||||
|
+ {
|
||||||
|
+ my $v = $1;
|
||||||
|
+ if( $v )
|
||||||
|
+ {
|
||||||
|
+ $v = ($v=~/=([01])$/)[0];
|
||||||
|
+ }else
|
||||||
|
+ {
|
||||||
|
+ $v = 1;
|
||||||
|
+ };
|
||||||
|
+ $self->{USE_MM_LD_RUN_PATH}=$v;
|
||||||
|
+ };
|
||||||
|
|
||||||
|
print "MakeMaker (v$VERSION)\n" if $Verbose;
|
||||||
|
if (-f "MANIFEST" && ! -f "Makefile" && ! $UNDER_CORE){
|
||||||
|
@@ -2821,6 +2841,40 @@ precedence. A typemap in the current di
|
||||||
|
precedence, even if it isn't listed in TYPEMAPS. The default system
|
||||||
|
typemap has lowest precedence.
|
||||||
|
|
||||||
|
+=item USE_MM_LD_RUN_PATH
|
||||||
|
+
|
||||||
|
+boolean
|
||||||
|
+The Fedora perl MakeMaker distribution differs from the standard
|
||||||
|
+upstream release in that it disables use of the MakeMaker generated
|
||||||
|
+LD_RUN_PATH by default, UNLESS this attribute is specified , or the
|
||||||
|
+USE_MM_LD_RUN_PATH environment variable is set during the MakeMaker run.
|
||||||
|
+
|
||||||
|
+The upstream MakeMaker will set the ld(1) environment variable LD_RUN_PATH
|
||||||
|
+to the concatenation of every -L ld(1) option directory in which a -l ld(1)
|
||||||
|
+option library is found, which is used as the ld(1) -rpath option if none
|
||||||
|
+is specified. This means that, if your application builds shared libraries
|
||||||
|
+and your MakeMaker application links to them, that the absolute paths of the
|
||||||
|
+libraries in the build tree will be inserted into the RPATH header of all
|
||||||
|
+MakeMaker generated binaries, and that such binaries will be unable to link
|
||||||
|
+to these libraries if they do not still reside in the build tree directories
|
||||||
|
+(unlikely) or in the system library directories (/lib or /usr/lib), regardless
|
||||||
|
+of any LD_LIBRARY_PATH setting. So if you specified -L../mylib -lmylib , and
|
||||||
|
+ your 'libmylib.so' gets installed into /some_directory_other_than_usr_lib,
|
||||||
|
+ your MakeMaker application will be unable to link to it, even if LD_LIBRARY_PATH
|
||||||
|
+is set to include /some_directory_other_than_usr_lib, because RPATH overrides
|
||||||
|
+LD_LIBRARY_PATH.
|
||||||
|
+
|
||||||
|
+So for Fedora MakeMaker builds LD_RUN_PATH is NOT generated by default for
|
||||||
|
+every link. You can still use explicit -rpath ld options or the LD_RUN_PATH
|
||||||
|
+environment variable during the build to generate an RPATH for the binaries.
|
||||||
|
+
|
||||||
|
+You can set the USE_MM_LD_RUN_PATH attribute to 1 on the MakeMaker command
|
||||||
|
+line or in the WriteMakefile arguments to enable generation of LD_RUN_PATH
|
||||||
|
+for every link command.
|
||||||
|
+
|
||||||
|
+USE_MM_LD_RUN_PATH will default to 1 (LD_RUN_PATH will be used) IF the
|
||||||
|
+$USE_MM_LD_RUN_PATH environment variable is set during a MakeMaker run.
|
||||||
|
+
|
||||||
|
=item VENDORPREFIX
|
||||||
|
|
||||||
|
Like PERLPREFIX, but only for the vendor install locations.
|
||||||
|
diff -up perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm.usem perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
||||||
|
--- perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm.usem 2011-05-08 05:10:08.000000000 +0200
|
||||||
|
+++ perl-5.14.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2011-05-17 11:14:22.172115972 +0200
|
||||||
|
@@ -1045,7 +1045,7 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $
|
||||||
|
}
|
||||||
|
|
||||||
|
my $ld_run_path_shell = "";
|
||||||
|
- if ($self->{LD_RUN_PATH} ne "") {
|
||||||
|
+ if (($self->{LD_RUN_PATH} ne "") && ($self->{USE_MM_LD_RUN_PATH})) {
|
||||||
|
$ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
|
||||||
|
}
|
||||||
|
|
||||||
28
perl.h-Add-parens-around-macro-arguments.patch
Normal file
28
perl.h-Add-parens-around-macro-arguments.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From ff58ca57f8442a7e2e74ab4a79a9e542f9a180e7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karl Williamson <khw@cpan.org>
|
||||||
|
Date: Mon, 11 Jun 2018 13:26:24 -0600
|
||||||
|
Subject: [PATCH] perl.h: Add parens around macro arguments
|
||||||
|
|
||||||
|
Arguments used within macros need to be parenthesized in case they are
|
||||||
|
called with an expression. This commit changes
|
||||||
|
_CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG() to do that.
|
||||||
|
---
|
||||||
|
perl.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/perl.h b/perl.h
|
||||||
|
index 6f04c6facd..3e1f6cd571 100644
|
||||||
|
--- a/perl.h
|
||||||
|
+++ b/perl.h
|
||||||
|
@@ -5632,7 +5632,7 @@ typedef struct am_table_short AMTS;
|
||||||
|
# define _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(s, send) \
|
||||||
|
STMT_START { /* Check if to warn before doing the conversion work */\
|
||||||
|
if (! PL_in_utf8_CTYPE_locale && ckWARN(WARN_LOCALE)) { \
|
||||||
|
- UV cp = utf8_to_uvchr_buf((U8 *) s, (U8 *) send, NULL); \
|
||||||
|
+ UV cp = utf8_to_uvchr_buf((U8 *) (s), (U8 *) (send), NULL); \
|
||||||
|
Perl_warner(aTHX_ packWARN(WARN_LOCALE), \
|
||||||
|
"Wide character (U+%" UVXf ") in %s", \
|
||||||
|
(cp == 0) \
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
533
perl.spec
Normal file
533
perl.spec
Normal file
@ -0,0 +1,533 @@
|
|||||||
|
%global perl_libdir %{_libdir}/perl5
|
||||||
|
%global perl_datadir %{_datadir}/perl5
|
||||||
|
%global perl_vendor_libdir %{perl_libdir}/vendor_perl
|
||||||
|
%global perl_vendor_datadir %{perl_datadir}/vendor_perl
|
||||||
|
%global perl_new LD_PRELOAD="%{buildroot}%{perl_libdir}/CORE/libperl.so" \
|
||||||
|
LD_LIBRARY_PATH="%{buildroot}%{perl_libdir}/CORE" \
|
||||||
|
PERL5LIB="%{buildroot}%{perl_libdir}:%{buildroot}%{perl_datadir}" \
|
||||||
|
%{buildroot}%{_bindir}/%{name}
|
||||||
|
|
||||||
|
#remove autofind requires and provides of {_libexecdir}/perl5-tests/
|
||||||
|
%global __provides_exclude_from ^%{_libexecdir}/perl5-tests/.*$
|
||||||
|
%global __requires_exclude_from ^%{_libexecdir}/perl5-tests/.*$
|
||||||
|
|
||||||
|
#provides module without verion, no need to provide
|
||||||
|
%global __provides_exclude perl\\((charnames|DynaLoader|DB)\\)$
|
||||||
|
|
||||||
|
Name: perl
|
||||||
|
License: (GPL+ or Artistic) and (GPLv2+ or Artistic) and HSRL and MIT and UCD and Public Domain and BSD
|
||||||
|
Epoch: 4
|
||||||
|
Version: 5.28.0
|
||||||
|
Release: 427
|
||||||
|
Summary: A highly capable, feature-rich programming language
|
||||||
|
Url: https://www.perl.org/
|
||||||
|
Source0: https://www.cpan.org/src/5.0/%{name}-%{version}.tar.xz
|
||||||
|
#we list the different licenses of subpackages in this file
|
||||||
|
Source1: perl_subpkg_license
|
||||||
|
Source2: macros.perl
|
||||||
|
#Systemtap tapset and example that make use of systemtap-sdt-devel
|
||||||
|
# build requirement. Written by lberk; Not yet upstream.
|
||||||
|
Source3: perl.stp
|
||||||
|
|
||||||
|
# PATCH-FEATURE-EULEROS
|
||||||
|
Patch1: perl-5.8.0-libdir64.patch
|
||||||
|
# PATCH-FIX-EULEROS--rh#151127
|
||||||
|
Patch2: perl-5.10.0-libresolv.patch
|
||||||
|
# PATCH-FEATURE-EULEROS
|
||||||
|
Patch3: perl-USE_MM_LD_RUN_PATH.patch
|
||||||
|
# PATCH-FIX-EULEROS--rh#1129443
|
||||||
|
Patch4: perl-5.22.1-Provide-ExtUtils-MM-methods-as-standalone-ExtUtils-M.patch
|
||||||
|
# PATCH-FIX-EULEROS
|
||||||
|
Patch5: perl-5.16.3-create_libperl_soname.patch
|
||||||
|
# PATCH-FEATURE-EULEROS
|
||||||
|
Patch6: perl-5.22.0-Install-libperl.so-to-shrpdir-on-Linux.patch
|
||||||
|
# PATCH-FIX-EULEROS--CPAN RT#85015
|
||||||
|
Patch7: perl-5.18.1-Document-Math-BigInt-CalcEmu-requires-Math-BigInt.patch
|
||||||
|
# PATCH-FIX-EULEROS--rh#1107543, RT#61912
|
||||||
|
Patch8: perl-5.18.2-Destroy-GDBM-NDBM-ODBM-SDBM-_File-objects-only-from-.patch
|
||||||
|
# PATCH-FIX-EULEROS--rh#1129443
|
||||||
|
Patch9: perl-5.22.1-Replace-EU-MM-dependnecy-with-EU-MM-Utils-in-IPC-Cmd.patch
|
||||||
|
# PATCH-FIX-EULEROS--RT#131588
|
||||||
|
Patch10: perl-5.26.0-perl-131588-be-a-little-more-careful-in-arybase-_tie.patch
|
||||||
|
# PATCH-FIX-EULEROS
|
||||||
|
Patch11: perl-5.27.8-hints-linux-Add-lphtread-to-lddlflags.patch
|
||||||
|
# PATCH-FIX-EULEROS--RT#133295
|
||||||
|
Patch12: perl-5.29.0-Remove-ext-GDBM_File-t-fatal.t.patch
|
||||||
|
# PATCH-FIX-UPSTREAM--RT#133204, upstream 5.29.0
|
||||||
|
Patch13: Perl_my_setenv-handle-integer-wrap.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- upstream 5.29.0
|
||||||
|
Patch14: regexec.c-Call-macro-with-correct-args.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- upstream 5.29.0
|
||||||
|
Patch15: perl.h-Add-parens-around-macro-arguments.patch
|
||||||
|
# PATCH-FIX-UPSTREAM--RT#133368, upstream 5.29.0
|
||||||
|
Patch16: treat-when-index-1-as-a-boolean-expression.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- upstream 5.29.0
|
||||||
|
Patch17: locale.c-Fix-conditional-compilation.patch
|
||||||
|
# PATCH-FIX-UPSTREAM--RT#133314, upstream 5.29.1
|
||||||
|
Patch18: perl-133314-test-for-handle-leaks-from-in-place-edit.patch
|
||||||
|
Patch19: perl-133314-always-close-the-directory-handle-on-cle.patch
|
||||||
|
# PATCH-FIX-UPSTREAM--Fix buffer overrun, upstream 5.29.1
|
||||||
|
Patch20: utf8.c-Make-safer-a-deprecated-function.patch
|
||||||
|
# PATCH-FIX-UPSTREAM--Fix time race, upstream 5.29.1
|
||||||
|
Patch21: Time-HiRes-t-itimer.t-avoid-race-condition.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- upstream 5.29.1
|
||||||
|
Patch22: Fix-script-run-bug-1-followed-by-Thai-digit.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- upstream 5.29.1
|
||||||
|
Patch23: Update-Time-Piece-to-CPAN-version-1.33.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- RT#133441, upstream 5.29.2
|
||||||
|
Patch24: multiconcat-mutator-not-seen-in-lex.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- RT#132683, upstream 5.29.2
|
||||||
|
Patch25: perl-132683-don-t-try-to-convert-PL_sv_placeholder-i.patch
|
||||||
|
# PATCH-FIX-UPSTREAM-- RT#132655, upstream 5.29.2
|
||||||
|
Patch26: perl-132655-nul-terminate-result-of-unpack-u-of-inva.patch
|
||||||
|
# PATCH-FIX-EULEROS--rh#960048
|
||||||
|
Patch27: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
|
||||||
|
# PATCH-FIX-EULEROS--rh#960048
|
||||||
|
Patch28: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux.patch
|
||||||
|
|
||||||
|
Patch6000: CVE-2018-18312-1.patch
|
||||||
|
Patch6001: CVE-2018-18312-2.patch
|
||||||
|
Patch6002: CVE-2018-18312-3.patch
|
||||||
|
|
||||||
|
BuildRequires: gcc bash findutils coreutils make tar procps
|
||||||
|
BuildRequires: zlib-devel systemtap-sdt-devel perl-interpreter perl-generators
|
||||||
|
|
||||||
|
Requires: perl(:MODULE_COMPAT_5.28.0) perl-version perl-threads perl-threads-shared perl-parent
|
||||||
|
Requires: perl-devel = %{epoch}:%{version}-%{release}
|
||||||
|
Requires: perl-Unicode-Collate perl-Unicode-Normalize perl-Time-Local perl-Time-HiRes
|
||||||
|
Requires: perl-Thread-Queue perl-Text-Tabs+Wrap perl-Test-Simple perl-Test-Harness perl-devel
|
||||||
|
Requires: perl-Text-Balanced perl-Text-ParseWords perl-Term-ANSIColor perl-Term-Cap
|
||||||
|
Requires: perl-Socket perl-podlators perl-Scalar-List-Utils perl-perlfaq perl-constant
|
||||||
|
Requires: perl-Digest-SHA perl-Digest perl-Digest-MD5 perl-Devel-PPPort perl-Carp perl-Env
|
||||||
|
Requires: perl-CPAN-Meta-Requirements perl-CPAN-Meta perl-CPAN-Meta-YAML perl-ExtUtils-Command
|
||||||
|
Requires: perl-ExtUtils-Install perl-ExtUtils-Manifest perl-ExtUtils-MakeMaker perl-ExtUtils-ParseXS
|
||||||
|
Requires: perl-File-Fetch perl-File-Path perl-File-Temp perl-Filter-Simple perl-Filter perl-Encode
|
||||||
|
Requires: perl-IO-Compress perl-IO-Socket-IP perl-autodie perl-bignum perl-B-Debug perl-encoding
|
||||||
|
Requires: perl-Exporter perl-experimental perl-Compress-Raw-Bzip2 perl-Compress-Raw-Zlib perl-HTTP-Tiny
|
||||||
|
Requires: perl-Locale-Codes perl-Locale-Maketext perl-Math-BigInt perl-Math-BigInt-FastCalc perl-Math-BigRat
|
||||||
|
Requires: perl-Archive-Tar perl-Config-Perl-V perl-Data-Dumper perl-DB_File perl-Getopt-Long perl-libnet
|
||||||
|
Requires: perl-IPC-Cmd perl-IPC-SysV perl-JSON-PP perl-MIME-Base64 perl-Params-Check perl-Storable
|
||||||
|
Requires: perl-Pod-Checker perl-Pod-Escapes perl-Pod-Parser perl-Pod-Perldoc perl-Pod-Simple perl-Pod-Usage
|
||||||
|
Requires: perl-Module-CoreList perl-Module-CoreList-tools perl-Module-Load perl-Module-Load-Conditional
|
||||||
|
Requires: perl-Module-Metadata perl-Sys-Syslog perl-PerlIO-via-QuotedPrint perl-Perl-OSType
|
||||||
|
|
||||||
|
Provides: perl-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
Provides: perl-Attribute-Handlers perl-interpreter perl(bytes_heavy.pl) perl(dumpvar.pl) perl(perl5db.pl) perl(:VERSION) = 5.28.0
|
||||||
|
Provides: perl(:MODULE_COMPAT_5.28.0) perl(:WITH_64BIT) perl(:WITH_ITHREADS) perl(:WITH_THREADS) perl(:WITH_LARGEFILES)
|
||||||
|
Provides: perl-Errno perl(:WITH_PERLIO) perl(unicore::Name) perl(utf8_heavy.pl) perl-libs perl-macros perl-Memoize
|
||||||
|
Provides: perl-ExtUtils-Embed perl-ExtUtils-Miniperl perl-IO perl-IO-Zlib perl-Locale-Maketext-Simple perl-Math-Complex
|
||||||
|
Provides: perl-Module-Loaded perl-Net-Ping perl-Pod-Html perl-SelfLoader perl-Test perl-Time-Piece perl-libnetcfg perl-open perl-utils
|
||||||
|
|
||||||
|
Obsoletes: perl-Attribute-Handlers perl-interpreter perl-libs perl-macros perl-Errno perl-ExtUtils-Embed perl-Net-Ping
|
||||||
|
Obsoletes: perl-ExtUtils-Miniperl perl-IO perl-IO-Zlib perl-Locale-Maketext-Simple perl-Math-Complex perl-Memoize perl-Module-Loaded
|
||||||
|
Obsoletes: perl-Pod-Html perl-SelfLoader perl-Test perl-Time-Piece perl-libnetcfg perl-open perl-utils
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
Perl 5 is a highly capable, feature-rich programming language with over 30 years of development.
|
||||||
|
Perl 5 runs on over 100 platforms from portables to mainframes and is suitable for both rapid
|
||||||
|
prototyping and large scale development projects.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
License: (GPL+ or Artistic) and UCD
|
||||||
|
|
||||||
|
Requires: perl = %{epoch}:%{version}-%{release} system-rpm-config systemtap-sdt-devel
|
||||||
|
Requires: perl(ExtUtils::ParseXS) perl(:MODULE_COMPAT_5.28.0) perl(Devel::PPPort)
|
||||||
|
|
||||||
|
Provides: perl-Devel-Peek perl-Devel-SelfStubber perl-tests
|
||||||
|
|
||||||
|
Obsoletes: perl-Devel-Peek perl-Devel-SelfStubber perl-tests
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains the development files and test files for %{name}.
|
||||||
|
|
||||||
|
%package_help
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
|
cp -a %{SOURCE1} .
|
||||||
|
|
||||||
|
# Configure Compress::Zlib to use system zlib
|
||||||
|
sed -i 's|BUILD_ZLIB = True|BUILD_ZLIB = False|
|
||||||
|
s|INCLUDE = ./zlib-src|INCLUDE = %{_includedir}|
|
||||||
|
s|LIB = ./zlib-src|LIB = %{_libdir}|' \
|
||||||
|
cpan/Compress-Raw-Zlib/config.in
|
||||||
|
|
||||||
|
rm -rf cpan/Compress-Raw-Zlib/zlib-src
|
||||||
|
rm -rf cpan/Compress-Raw-Bzip2/bzip2-src
|
||||||
|
sed -i '/\(bzip2\|zlib\)-src/d' MANIFEST
|
||||||
|
|
||||||
|
%build
|
||||||
|
/bin/sh Configure -des -Doptimize="none" -Dccflags="$RPM_OPT_FLAGS" \
|
||||||
|
-Dldflags="$RPM_LD_FLAGS" -Dccdlflags="-Wl,--enable-new-dtags $RPM_LD_FLAGS" \
|
||||||
|
-Dlddlflags="-shared $RPM_LD_FLAGS" -Dshrpdir="%{_libdir}" \
|
||||||
|
-DDEBUGGING=-g -Dversion=%{version} -Dmyhostname=localhost \
|
||||||
|
-Dperladmin=root@localhost -Dcc='%{__cc}' -Dprefix=%{_prefix} \
|
||||||
|
-Dvendorprefix=%{_prefix} -Dsiteprefix=%{_prefix}/local \
|
||||||
|
-Dsitelib="%{_prefix}/local/share/perl5" -Dprivlib="%{perl_datadir}" \
|
||||||
|
-Dsitearch="%{_prefix}/local/%{_lib}/perl5" \
|
||||||
|
-Dvendorlib="%{perl_vendor_datadir}" -Darchlib="%{perl_libdir}" \
|
||||||
|
-Dvendorarch="%{perl_vendor_libdir}" -Darchname="%{_arch}-%{_os}-thread-multi" \
|
||||||
|
-Dlibpth="/usr/local/lib64 /lib64 %{_prefix}/lib64" \
|
||||||
|
-Duseshrplib -Dusethreads -Duseithreads -Ui_ndbm -Di_gdbm \
|
||||||
|
-Dusedtrace='/usr/bin/dtrace' -Ubincompat5005 -Dusesitecustomize \
|
||||||
|
-Duselargefiles -Dd_semctl_semun -Di_db -Duse64bitint \
|
||||||
|
-Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dscriptdir='%{_bindir}' \
|
||||||
|
-Dinstallusrbinperl=n -Uversiononly -Dpager='/usr/bin/less -isr' \
|
||||||
|
-Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto \
|
||||||
|
-Ud_endprotoent_r_proto -Ud_setprotoent_r_proto \
|
||||||
|
-Ud_endservent_r_proto -Ud_setservent_r_proto \
|
||||||
|
|
||||||
|
BUILD_BZIP2=0
|
||||||
|
BZIP2_LIB=%{_libdir}
|
||||||
|
export BUILD_BZIP2 BZIP2_LIB
|
||||||
|
|
||||||
|
# for new perl can be executed from make.
|
||||||
|
%global soname libperl.so.%(echo '%{version}' | sed 's/^\\([^.]*\\.[^.]*\\).*/\\1/')
|
||||||
|
test -L %{soname} || ln -s libperl.so %{soname}
|
||||||
|
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
# move libperl to standard path.
|
||||||
|
mv "%{buildroot}%{perl_libdir}/CORE/libperl.so" "%{buildroot}%{_libdir}/libperl.so.%{version}"
|
||||||
|
ln -s "libperl.so.%{version}" "%{buildroot}%{_libdir}/%{soname}"
|
||||||
|
ln -s "libperl.so.%{version}" "%{buildroot}%{_libdir}/libperl.so"
|
||||||
|
# Keep symlink from original location
|
||||||
|
ln -s "../../libperl.so.%{version}" "%{buildroot}%{perl_libdir}/CORE/libperl.so"
|
||||||
|
|
||||||
|
rm -f "%{buildroot}%{perl_libdir}/CORE/%{soname}"
|
||||||
|
|
||||||
|
install -p -m 755 utils/pl2pm %{buildroot}%{_bindir}/pl2pm
|
||||||
|
|
||||||
|
for h_file in asm/termios.h syscall.h syslimits.h syslog.h sys/ioctl.h sys/socket.h sys/time.h wait.h
|
||||||
|
do
|
||||||
|
%{perl_new} %{buildroot}%{_bindir}/h2ph -a -d %{buildroot}%{perl_libdir} $h_file || true
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{perl_vendor_libdir}/auto
|
||||||
|
mkdir -p %{buildroot}%{perl_vendor_datadir}
|
||||||
|
|
||||||
|
# perl RPM macros
|
||||||
|
mkdir -p %{buildroot}%{_rpmmacrodir}
|
||||||
|
install -p -m 644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}
|
||||||
|
|
||||||
|
# This is a work-around for rpmbuild bug #878863.
|
||||||
|
find %{buildroot} -type f -name '*.bs' -empty -delete
|
||||||
|
chmod -R u+w %{buildroot}/*
|
||||||
|
|
||||||
|
rm %{buildroot}%{perl_datadir}/ExtUtils/xsubpp
|
||||||
|
ln -s ../../../bin/xsubpp %{buildroot}%{perl_datadir}/ExtUtils/
|
||||||
|
|
||||||
|
rm %{buildroot}%{perl_libdir}/.packlist
|
||||||
|
|
||||||
|
# bug #973713
|
||||||
|
rm %{buildroot}/%{perl_libdir}/File/Spec/VMS.pm
|
||||||
|
rm %{buildroot}%{_mandir}/man3/File::Spec::VMS.3*
|
||||||
|
|
||||||
|
# tests
|
||||||
|
mkdir -p %{buildroot}%{_libexecdir}/perl5-tests/perl-tests
|
||||||
|
tar -cf - t/ | ( cd %{buildroot}%{_libexecdir}/perl5-tests/perl-tests && tar -xf - )
|
||||||
|
for dir in `find ext/ -type d -name t -maxdepth 2` ; do
|
||||||
|
tar -cf - $dir | ( cd %{buildroot}%{_libexecdir}/perl5-tests/perl-tests/t && tar -xf - )
|
||||||
|
done
|
||||||
|
|
||||||
|
# fix shell bangs in tests.
|
||||||
|
%{perl_new} -MConfig -i -pn \
|
||||||
|
-e 's"\A#!(?:perl|\./perl|/usr/bin/perl|/usr/bin/env perl)\b"$Config{startperl}"' \
|
||||||
|
$(find %{buildroot}%{_libexecdir}/perl5-tests/perl-tests -type f)
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/systemtap/tapset
|
||||||
|
|
||||||
|
sed -e "s|LIBRARY_PATH|%{_libdir}/%{soname}|" %{SOURCE3} \
|
||||||
|
> %{buildroot}%{_datadir}/systemtap/tapset/libperl%{version}-64.stp
|
||||||
|
|
||||||
|
%check
|
||||||
|
%{perl_new} -I/lib regen/lib_cleanup.pl
|
||||||
|
cd t
|
||||||
|
%{perl_new} -I../lib porting/customized.t --regen
|
||||||
|
cd -
|
||||||
|
TEST_JOBS=$(echo %{?_smp_mflags} | sed 's/.*-j\([0-9][0-9]*\).*/\1/') \
|
||||||
|
make test_harness
|
||||||
|
|
||||||
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
%files
|
||||||
|
# there are many files do not need to be packaged
|
||||||
|
# in this main package
|
||||||
|
%exclude %{_bindir}/{h2xs,perlivp,corelist,prove,cpan,enc2xs}
|
||||||
|
%exclude %{_bindir}/{ptar,ptargrep,ptardiff,shasum,json_pp}
|
||||||
|
%exclude %{_bindir}/{encguess,piconv,instmodsh,xsubpp,pod2text}
|
||||||
|
%exclude %{_bindir}/{podchecker,podselect,perldoc,pod2usage,pod2man}
|
||||||
|
%exclude %dir %{perl_datadir}/Archive
|
||||||
|
%exclude %{perl_libdir}/CORE/*.h
|
||||||
|
%exclude %{perl_datadir}/Archive/{Tar,Tar.pm}
|
||||||
|
%exclude %{perl_datadir}/autodie/
|
||||||
|
%exclude %{perl_datadir}/{autodie.pm,Fatal.pm}
|
||||||
|
%exclude %{perl_datadir}/B/Debug.pm
|
||||||
|
%exclude %{perl_datadir}/{Carp,Carp.*}
|
||||||
|
%exclude %{perl_datadir}/Config/Perl
|
||||||
|
%exclude %{perl_datadir}/constant.pm
|
||||||
|
%exclude %dir %{perl_datadir}/App
|
||||||
|
%exclude %{perl_datadir}/App/Cpan.pm
|
||||||
|
%exclude %{perl_datadir}/{CPAN,CPAN.pm}
|
||||||
|
%exclude %dir %{perl_datadir}/{CPAN,CPAN/Meta,CPAN/Meta/History,Parse,Parse/CPAN}
|
||||||
|
%exclude %{perl_datadir}/CPAN/Meta.pm
|
||||||
|
%exclude %{perl_datadir}/CPAN/Meta/{Converter.pm,Feature.pm,History.pm}
|
||||||
|
%exclude %{perl_datadir}/CPAN/Meta/{Merge.pm,Prereqs.pm,Spec.pm,Validator.pm}
|
||||||
|
%exclude %{perl_datadir}/Parse/CPAN/Meta.pm
|
||||||
|
%exclude %{perl_datadir}/CPAN/Meta/Requirements.pm
|
||||||
|
%exclude %{perl_datadir}/CPAN/Meta/YAML.pm
|
||||||
|
%exclude %dir %{perl_libdir}/{Compress,Compress/Raw}
|
||||||
|
%exclude %dir %{perl_libdir}/{auto/Compress,auto/Compress/Raw}
|
||||||
|
%exclude %{perl_libdir}/Compress/Raw/Bzip2.pm
|
||||||
|
%exclude %{perl_libdir}/auto/Compress/Raw/Bzip2
|
||||||
|
%exclude %{perl_libdir}/Compress/Raw/Zlib.pm
|
||||||
|
%exclude %{perl_libdir}/auto/Compress/Raw/Zlib
|
||||||
|
%exclude %dir %{perl_libdir}/auto/Data
|
||||||
|
%exclude %dir %{perl_libdir}/auto/Data/Dumper
|
||||||
|
%exclude %{perl_libdir}/auto/Data/Dumper/Dumper.so
|
||||||
|
%exclude %dir %{perl_libdir}/Data
|
||||||
|
%exclude %{perl_libdir}/Data/Dumper.pm
|
||||||
|
%exclude %{perl_libdir}/DB_File.pm
|
||||||
|
%exclude %dir %{perl_libdir}/auto/DB_File
|
||||||
|
%exclude %{perl_libdir}/auto/DB_File/DB_File.so
|
||||||
|
%dir %exclude %{perl_libdir}/Devel
|
||||||
|
%exclude %{perl_libdir}/Devel/Peek.pm
|
||||||
|
%dir %exclude %{perl_libdir}/auto/Devel
|
||||||
|
%exclude %{perl_libdir}/auto/Devel/Peek
|
||||||
|
%exclude %{perl_libdir}/Devel/PPPort.pm
|
||||||
|
%exclude %dir %{perl_datadir}/Devel
|
||||||
|
%exclude %{perl_datadir}/Devel/SelfStubber.pm
|
||||||
|
%exclude %{perl_datadir}/Digest.pm
|
||||||
|
%exclude %dir %{perl_datadir}/Digest
|
||||||
|
%exclude %{perl_datadir}/Digest/{base.pm,file.pm}
|
||||||
|
%exclude %dir %{perl_libdir}/Digest
|
||||||
|
%exclude %{perl_libdir}/Digest/MD5.pm
|
||||||
|
%exclude %dir %{perl_libdir}/auto/Digest
|
||||||
|
%exclude %{perl_libdir}/auto/Digest/MD5
|
||||||
|
%exclude %{perl_libdir}/Digest/SHA.pm
|
||||||
|
%exclude %{perl_libdir}/auto/Digest/SHA
|
||||||
|
%exclude %{perl_libdir}/Encode*
|
||||||
|
%exclude %{perl_libdir}/auto/Encode*
|
||||||
|
%exclude %{perl_datadir}/Encode
|
||||||
|
%exclude %{perl_libdir}/encoding.pm
|
||||||
|
%exclude %dir %{perl_datadir}/Encode
|
||||||
|
%exclude %{perl_datadir}/Encode/{*.e2x,encode.h}
|
||||||
|
%exclude %{perl_datadir}/Env.pm
|
||||||
|
%exclude %{perl_datadir}/Exporter*
|
||||||
|
%exclude %{perl_datadir}/experimental*
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/{CBuilder,CBuilder.pm}
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/Command.pm
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/{Install.pm,Installed.pm,Packlist.pm}
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/{Manifest.pm,MANIFEST.SKIP}
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/{Command,Liblist,Liblist.pm,MM.pm}
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/{MakeMaker,MakeMaker.pm,MM_*.pm,MY.pm}
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/{Mkbootstrap.pm,Mksymlists.pm,testlib.pm}
|
||||||
|
%exclude %dir %{perl_datadir}/ExtUtils/MM
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/MM/Utils.pm
|
||||||
|
%exclude %dir %{perl_datadir}/ExtUtils/ParseXS
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/{ParseXS.pm,ParseXS.pod}
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/ParseXS/{Constants.pm,CountLines.pm}
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/ParseXS/{Utilities.pm,Eval.pm}
|
||||||
|
%exclude %dir %{perl_datadir}/ExtUtils/Typemaps
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/{Typemaps.pm,xsubpp}
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/Typemaps/{Cmd.pm,InputMap.pm}
|
||||||
|
%exclude %{perl_datadir}/ExtUtils/Typemaps/{OutputMap.pm,Type.pm}
|
||||||
|
%exclude %{perl_datadir}/File/{Fetch.pm,Path.pm,Temp.pm}
|
||||||
|
%exclude %dir %{perl_libdir}/auto/Filter
|
||||||
|
%exclude %{perl_libdir}/auto/Filter/Util
|
||||||
|
%exclude %dir %{perl_libdir}/Filter
|
||||||
|
%exclude %{perl_libdir}/Filter/Util
|
||||||
|
%exclude %{perl_datadir}/pod/perlfilter.pod
|
||||||
|
%exclude %dir %{perl_datadir}/Filter
|
||||||
|
%exclude %{perl_datadir}/Filter/Simple.pm
|
||||||
|
%exclude %{_bindir}/zipdetails
|
||||||
|
%exclude %dir %{perl_datadir}/IO/Compress
|
||||||
|
%exclude %{perl_datadir}/IO/Compress/FAQ.pod
|
||||||
|
%exclude %{perl_datadir}/Getopt/Long.pm
|
||||||
|
%exclude %dir %{perl_datadir}/Compress
|
||||||
|
%exclude %{perl_datadir}/Compress/Zlib.pm
|
||||||
|
%exclude %{perl_datadir}/File/GlobMapper.pm
|
||||||
|
%exclude %{perl_datadir}/IO/Compress/{Base,Base.pm}
|
||||||
|
%exclude %dir %{perl_datadir}/IO/Uncompress
|
||||||
|
%exclude %{perl_datadir}/IO/Uncompress/{AnyUncompress.pm,Base.pm}
|
||||||
|
%exclude %{perl_datadir}/IO/Compress/{Adapter,Gzip,Zip,Zlib}
|
||||||
|
%exclude %{perl_datadir}/IO/Compress/{Deflate.pm,Gzip.pm,Zip.pm}
|
||||||
|
%exclude %{perl_datadir}/IO/Compress/{RawDeflate.pm,Bzip2.pm}
|
||||||
|
%exclude %{perl_datadir}/IO/Uncompress/{Adapter,AnyInflate.pm}
|
||||||
|
%exclude %{perl_datadir}/IO/Uncompress/{Bunzip2.pm,Gunzip.pm,Unzip.pm}
|
||||||
|
%exclude %{perl_datadir}/IO/Uncompress/{Inflate.pm,RawInflate.pm}
|
||||||
|
%exclude %dir %{perl_datadir}/IO/Socket
|
||||||
|
%exclude %{perl_datadir}/IO/Socket/IP.pm
|
||||||
|
%exclude %dir %{perl_datadir}/HTTP
|
||||||
|
%exclude %{perl_datadir}/HTTP/Tiny.pm
|
||||||
|
%exclude %{perl_libdir}/Time/HiRes.pm
|
||||||
|
%exclude %{perl_libdir}/auto/Time/HiRes
|
||||||
|
%exclude %{perl_datadir}/Time/Local.pm
|
||||||
|
%exclude %{perl_datadir}/Thread/Queue.pm
|
||||||
|
%exclude %{perl_libdir}/List/
|
||||||
|
%exclude %{perl_libdir}/Scalar/
|
||||||
|
%exclude %{perl_libdir}/Sub/
|
||||||
|
%exclude %{perl_libdir}/auto/List/
|
||||||
|
%exclude %{perl_libdir}/Storable.pm
|
||||||
|
%exclude %{perl_libdir}/Sys/Syslog.pm
|
||||||
|
%exclude %{perl_datadir}/Term/ANSIColor.pm
|
||||||
|
%exclude %{perl_datadir}/Term/Cap.pm
|
||||||
|
%exclude %{perl_libdir}/auto/Sys/Syslog/
|
||||||
|
%exclude %{perl_libdir}/auto/Storable/
|
||||||
|
%exclude %{perl_datadir}/IPC/Cmd.pm
|
||||||
|
%exclude %{perl_libdir}/auto/IPC
|
||||||
|
%exclude %{perl_libdir}/IPC/{Msg.pm,Semaphore.pm,SysV.pm,SharedMem.pm}
|
||||||
|
%exclude %dir %{perl_datadir}/JSON
|
||||||
|
%exclude %{perl_datadir}/JSON/{PP,PP.pm}
|
||||||
|
%exclude %{perl_datadir}/Net/{Cmd.pm,Time.pm,SMTP.pm,POP3.pm,Netrc.pm,FTP}
|
||||||
|
%exclude %{perl_datadir}/Net/{Config.pm,NNTP.pm,libnetFAQ.pod,FTP.pm,Domain.pm}
|
||||||
|
%exclude %{perl_datadir}/Locale/{Codes,Codes.*,Script.*,Maketext.*}
|
||||||
|
%exclude %{perl_datadir}/Locale/{Country.*,Currency.*,Language.*}
|
||||||
|
%exclude %{perl_datadir}/Locale/Maketext/{Cookbook.*,Guts.*}
|
||||||
|
%exclude %{perl_datadir}/Locale/Maketext/{GutsLoader.*,TPJ13.*}
|
||||||
|
%exclude %{perl_datadir}/big*.pm
|
||||||
|
%exclude %{perl_datadir}/Math/BigFloat
|
||||||
|
%exclude %{perl_datadir}/Math/{BigFloat.pm,BigInt.pm,BigRat.pm}
|
||||||
|
%exclude %dir %{perl_datadir}/Math/BigInt
|
||||||
|
%exclude %{perl_datadir}/Math/BigInt/{Calc.pm,CalcEmu.pm,Lib.pm,Trace.pm}
|
||||||
|
%exclude %{perl_libdir}/Math
|
||||||
|
%exclude %{perl_libdir}/auto/Math
|
||||||
|
%exclude %{perl_libdir}/auto/MIME
|
||||||
|
%exclude %{perl_libdir}/MIME
|
||||||
|
%exclude %{perl_datadir}/Module/{CoreList,Load,CoreList.pm,CoreList.pod,Load.pm,Metadata.pm}
|
||||||
|
%exclude %{perl_libdir}/Cwd.pm
|
||||||
|
%exclude %{perl_libdir}/File/Spec*
|
||||||
|
%exclude %{perl_libdir}/auto/Cwd/
|
||||||
|
%exclude %{perl_datadir}/Params/
|
||||||
|
%exclude %{perl_datadir}/perlfaq.pm
|
||||||
|
%exclude %{perl_datadir}/pod/{perlfaq*,perlglossary.pod}
|
||||||
|
%exclude %{perl_datadir}/PerlIO
|
||||||
|
%exclude %dir %{perl_datadir}/Perl
|
||||||
|
%exclude %{perl_datadir}/Perl/OSType.pm
|
||||||
|
%exclude %{perl_datadir}/parent.pm
|
||||||
|
%exclude %{perl_datadir}/pod/{perldoc.pod,perlpodstyle.pod}
|
||||||
|
%exclude %{perl_datadir}/Pod/{Checker.pm,Escapes.pm,Find.pm,Select.pm}
|
||||||
|
%exclude %{perl_datadir}/Pod/{InputObjects.pm,ParseUtils.pm,Parser.pm,PlainText.pm}
|
||||||
|
%exclude %{perl_datadir}/Pod/{Perldoc.pm,Usage.pm,Man.pm}
|
||||||
|
%exclude %{perl_datadir}/Pod/Perldoc/
|
||||||
|
%exclude %{perl_datadir}/Pod/Simple/
|
||||||
|
%exclude %{perl_datadir}/Pod/{ParseLink.pm,Text,Text.pm,Simple.pm,Simple.pod}
|
||||||
|
%exclude %dir %{perl_datadir}/App
|
||||||
|
%exclude %{perl_datadir}/App/Prove*
|
||||||
|
%exclude %dir %{perl_libdir}/auto/{Socket,threads}
|
||||||
|
%exclude %{perl_libdir}/auto/Socket/Socket.*
|
||||||
|
%exclude %{perl_libdir}/auto/threads/{threads*,shared*}
|
||||||
|
%exclude %{perl_libdir}/{threads.pm,Socket.pm}
|
||||||
|
%exclude %dir %{perl_libdir}/threads
|
||||||
|
%exclude %{perl_libdir}/threads/shared*
|
||||||
|
%dir %exclude %{perl_libdir}/auto/Unicode
|
||||||
|
%exclude %{perl_libdir}/auto/Unicode/{Collate,Normalize}
|
||||||
|
%dir %exclude %{perl_libdir}/Unicode
|
||||||
|
%exclude %{perl_libdir}/Unicode/Collate
|
||||||
|
%exclude %{perl_libdir}/Unicode/{Collate.pm,Normalize.pm}
|
||||||
|
%exclude %{perl_datadir}/Unicode/Collate
|
||||||
|
%exclude %{perl_datadir}/{TAP*,ok*,Test2*}
|
||||||
|
%exclude %dir %{perl_datadir}/Test
|
||||||
|
%exclude %{perl_datadir}/Test/{Harness*,More*,Builder*,use}
|
||||||
|
%exclude %{perl_datadir}/Test/{Tester*,Simple*,Tutorial*}
|
||||||
|
%exclude %{perl_datadir}/Text/{Balanced.pm,ParseWords.pm}
|
||||||
|
%exclude %{perl_datadir}/Text/{Tabs.pm,Wrap.pm}
|
||||||
|
%exclude %{perl_datadir}/{version.pm,version.pod}
|
||||||
|
%exclude %{perl_datadir}/version/
|
||||||
|
|
||||||
|
%license Artistic Copying
|
||||||
|
%doc AUTHORS
|
||||||
|
%{_bindir}/*
|
||||||
|
%dir %{perl_libdir}
|
||||||
|
%{perl_libdir}/*
|
||||||
|
%dir %{perl_datadir}
|
||||||
|
%{perl_datadir}/*
|
||||||
|
%{_libdir}/libperl.so.*
|
||||||
|
%{_rpmmacrodir}/macros.perl
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_bindir}/{h2xs,perlivp}
|
||||||
|
%{perl_libdir}/CORE/*.h
|
||||||
|
%{_libdir}/libperl.so
|
||||||
|
%dir %{_datadir}/systemtap
|
||||||
|
%dir %{_datadir}/systemtap/tapset
|
||||||
|
%{_datadir}/systemtap/tapset/libperl%{version}-64.stp
|
||||||
|
%dir %{perl_libdir}/Devel
|
||||||
|
%{perl_libdir}/Devel/Peek.pm
|
||||||
|
%dir %{perl_libdir}/auto/Devel
|
||||||
|
%{perl_libdir}/auto/Devel/Peek
|
||||||
|
%dir %{perl_datadir}/Devel
|
||||||
|
%{perl_datadir}/Devel/SelfStubber.pm
|
||||||
|
%{_libexecdir}/perl5-tests/
|
||||||
|
|
||||||
|
%files help
|
||||||
|
# there are many man docs don not need to be packaged
|
||||||
|
%exclude %{_mandir}/man1/{ptar.1*,ptardiff.1*,ptargrep.1*,cpan.1*,shasum.1*,perlfilter.*}
|
||||||
|
%exclude %{_mandir}/man1/{encguess.1*,piconv.1*,enc2xs.1*,instmodsh.1*,xsubpp*,podchecker.*}
|
||||||
|
%exclude %{_mandir}/man1/{zipdetails.*,json_pp.1*,corelist*,perlfaq*,perlglossary.*}
|
||||||
|
%exclude %{_mandir}/man1/{podselect.1*,perldoc.1*,pod2usage.*,pod2man.1*,pod2text.1*}
|
||||||
|
%exclude %{_mandir}/man1/{perlpodstyle.1*,prove.1*}
|
||||||
|
%exclude %{_mandir}/man3/{Archive::Tar*,autodie*,Fatal.3*,B::Debug.3*,Pod::Find.*}
|
||||||
|
%exclude %{_mandir}/man3/{big*.*,Carp.*,Config::Perl::V.*,constant.3*,Pod::InputObjects.*}
|
||||||
|
%exclude %{_mandir}/man3/{App::Cpan.*,*CPAN*,Compress::Raw::*,Data::Dumper.3*,Pod::ParseUtils.*}
|
||||||
|
%exclude %{_mandir}/man3/{Digest*,DB_File*,Encode*.3*,encoding.3*,Env.3*,Exporter*,Pod::Parser.*}
|
||||||
|
%exclude %{_mandir}/man3/{experimental*,ExtUtils::CBuilder*,ExtUtils::Command.*,ExtUtils::Install.3*}
|
||||||
|
%exclude %{_mandir}/man3/{ExtUtils::Installed.3*,ExtUtils::Packlist.3*,ExtUtils::Manifest.3*}
|
||||||
|
%exclude %{_mandir}/man3/{ExtUtils::Command::MM*,ExtUtils::Liblist.3*,ExtUtils::MM.3*,ExtUtils::MM_*}
|
||||||
|
%exclude %{_mandir}/man3/{ExtUtils::MY.3*,ExtUtils::MakeMaker*,ExtUtils::Mkbootstrap.3*,IPC::Semaphore.*}
|
||||||
|
%exclude %{_mandir}/man3/{ExtUtils::Mksymlists.3*,ExtUtils::testlib.3*,ExtUtils::MM::Utils.*,IPC::SharedMem.*}
|
||||||
|
%exclude %{_mandir}/man3/{ExtUtils::ParseXS*,ExtUtils::Typemaps*,File::Fetch.3*,File::Path.3*,IPC::SysV.*}
|
||||||
|
%exclude %{_mandir}/man3/{File::Temp.3*,Filter::Util::*,Filter::Simple.3*,Getopt::Long.3*,IPC::Msg.*}
|
||||||
|
%exclude %{_mandir}/man3/{IO::Compress::*,Compress::Zlib*,File::GlobMapper.*,IO::Uncompress::*}
|
||||||
|
%exclude %{_mandir}/man3/{IO::Socket::IP.*,HTTP::Tiny*,IPC::Cmd.3*,JSON::PP*,Net::Cmd.*,Net::Config.*}
|
||||||
|
%exclude %{_mandir}/man3/{Net::Domain.*,Net::FTP.*,Net::libnetFAQ.*,Net::NNTP.*,Net::Netrc.*,Net::POP3.*}
|
||||||
|
%exclude %{_mandir}/man3/{Net::SMTP.*,Net::Time.*,Locale::Codes::*,Locale::Codes.*,Locale::Country.*}
|
||||||
|
%exclude %{_mandir}/man3/{Locale::Currency.*,Locale::Language.*,Locale::Script.*,Locale::Maketext.*}
|
||||||
|
%exclude %{_mandir}/man3/{Locale::Maketext::Cookbook.*,Locale::Maketext::Guts.*,Locale::Maketext::GutsLoader.*}
|
||||||
|
%exclude %{_mandir}/man3/{Locale::Maketext::TPJ13.*,Math::BigFloat.*,Math::BigInt*,Math::BigRat.*,MIME::*,Cwd*}
|
||||||
|
%exclude %{_mandir}/man3/{Module::CoreList*,Module::Load.*,Module::Load::Conditional*,Module::Metadata.3pm*}
|
||||||
|
%exclude %{_mandir}/man3/{File::Spec*,Params::Check*,PerlIO::via::QuotedPrint.*,Perl::OSType.3pm*,parent.3*}
|
||||||
|
%exclude %{_mandir}/man3/{Pod::Checker.*,Pod::Escapes.*,Pod::PlainText.*,Pod::Select.*,Pod::Perldoc*,Pod::Usage.*}
|
||||||
|
%exclude %{_mandir}/man3/{Pod::Man*,Pod::ParseLink*,Pod::Text*,Pod::Simple*,List::Util*,Scalar::Util*,Sub::Util*}
|
||||||
|
%exclude %{_mandir}/man3/{Storable.*,Sys::Syslog.*,Term::ANSIColor*,Term::Cap.*,App::Prove*,TAP*,Test::Harness*}
|
||||||
|
%exclude %{_mandir}/man3/{ok*,Test::More*,Test::Builder*,Test::Tester*,Test::Simple*,Test::Tutorial*,Test::use::*}
|
||||||
|
%exclude %{_mandir}/man3/{Test2*,Text::Balanced.*,Text::ParseWords.*,Text::Tabs.*,Text::Wrap.*,Thread::Queue.*}
|
||||||
|
%exclude %{_mandir}/man3/{Time::HiRes.*,Time::Local.*,Socket.3*,threads.3*,threads::shared*,Unicode::Collate.*}
|
||||||
|
%exclude %{_mandir}/man3/{Unicode::Collate::*,Unicode::Normalize.*,version.3*,version::Internals.3*,Devel::PPPort*}
|
||||||
|
|
||||||
|
%doc README Changes
|
||||||
|
%{_mandir}/man1/*
|
||||||
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Sep 18 2019 shenyangyang<shenyangyang4@huawei.com> - 4:5.28.0-427
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:revise spec
|
||||||
|
|
||||||
|
* Tue Aug 20 2019 wangchong<wangchong56@huawei.com> - 4:5.28.0-426
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: rename patches
|
||||||
|
|
||||||
|
* Thu Apr 11 2019 zhangzhihui<zhangzhihui23@huawei.com> - 4:5.28.0-425
|
||||||
|
- Type:cves
|
||||||
|
- ID: fix CVE-2018-18312
|
||||||
|
- SUG:restart
|
||||||
|
- DESC:fix cves
|
||||||
|
|
||||||
|
* Tue Mar 5 2019 wangjia <wangjia55@huawei.com> - 4:5.28.0-424
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:restart
|
||||||
|
- DESC:disable perl-ExtUtils-CBuilder and perl-CPAN require
|
||||||
|
|
||||||
|
* Mon Sep 24 2018 openEuler Buildteam <buildteam@openeuler.org> - 4:5.28.0-423
|
||||||
|
- Package Init
|
||||||
71
perl.stp
Normal file
71
perl.stp
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
This probe will fire when the perl script enters a subroutine.
|
||||||
|
*/
|
||||||
|
|
||||||
|
probe perl.sub.call = process("LIBRARY_PATH").mark("sub__entry")
|
||||||
|
{
|
||||||
|
|
||||||
|
sub = user_string($arg1)
|
||||||
|
filename = user_string($arg2)
|
||||||
|
lineno = $arg3
|
||||||
|
package = user_string($arg4)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
This probe will fire when the return from a subroutine has been
|
||||||
|
hit.
|
||||||
|
*/
|
||||||
|
|
||||||
|
probe perl.sub.return = process("LIBRARY_PATH").mark("sub__return")
|
||||||
|
{
|
||||||
|
|
||||||
|
sub = user_string($arg1)
|
||||||
|
filename = user_string($arg2)
|
||||||
|
lineno = $arg3
|
||||||
|
package = user_string($arg4)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
This probe will fire when the Perl interperter changes state.
|
||||||
|
*/
|
||||||
|
|
||||||
|
probe perl.phase.change = process("LIBRARY_PATH").mark("phase__change")
|
||||||
|
{
|
||||||
|
newphase = user_string($arg1)
|
||||||
|
oldphase = user_string($arg2)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Fires when Perl has successfully loaded an individual file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
probe perl.loaded.file = process("LIBRARY_PATH").mark("loaded__file")
|
||||||
|
{
|
||||||
|
filename = user_string($arg1)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Fires when Perl is about to load an individual file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
probe perl.loading.file = process("LIBRARY_PATH").mark("loading__file")
|
||||||
|
{
|
||||||
|
filename = user_string($arg1)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Traces the execution of each opcode in the Perl runloop.
|
||||||
|
*/
|
||||||
|
|
||||||
|
probe perl.op.entry = process("LIBRARY_PATH").mark("op__entry")
|
||||||
|
{
|
||||||
|
opname = user_string($arg1)
|
||||||
|
}
|
||||||
36
perl_subpkg_license
Normal file
36
perl_subpkg_license
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# We found there many licenses of subpackages; We list here as below
|
||||||
|
# subpackages.
|
||||||
|
# dist/Tie-File/lib/Tie/File.pm: GPLv2+ or Artistic
|
||||||
|
# cpan/Getopt-Long/lib/Getopt/Long.pm: GPLv2+ or Artistic
|
||||||
|
# cpan/Compress-Raw-Zlib/Zlib.xs: (GPL+ or Artistic) and zlib
|
||||||
|
# cpan/Digest-MD5/MD5.xs: (GPL+ or Artistic) and BSD
|
||||||
|
# cpan/Time-Piece/Piece.xs: (GPL+ or Artistic) and BSD
|
||||||
|
# dist/PathTools/Cwd.xs: (GPL+ or Artistic) and BSD
|
||||||
|
# util.c: (GPL+ or Artistic) and BSD
|
||||||
|
# cpan/perlfaq/lib/perlfaq4.pod: (GPL+ or Artistic) and Public Domain
|
||||||
|
# cpan/Test-Simple/lib/Test/Tutorial.pod: (GPL+ or Artistic) and Public Domain
|
||||||
|
# cpan/MIME-Base64/Base64.xs: (GPL+ or Artistic) and MIT
|
||||||
|
# cpan/Test-Simple/lib/ok.pm: CC0
|
||||||
|
# cpan/Text-Tabs/lib/Text/Wrap.pm: TTWL
|
||||||
|
# cpan/Encode/bin/encguess: Artistic 2.0
|
||||||
|
# cpan/libnet/lib/Net/libnetFAQ.pod: Artistic (CPAN RT#117888)
|
||||||
|
# cpan/Unicode-Collate/Collate/allkeys.txt: Unicode
|
||||||
|
# lib/unicore: UCD
|
||||||
|
# ext/SDBM_File/sdbm.{c,h}: Public domain
|
||||||
|
# regexec.c, regcomp.c: HSRL
|
||||||
|
# cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm: MIT (with exception for Perl)
|
||||||
|
# time64.c: MIT
|
||||||
|
# pod/perlpodstyle.pod: MIT
|
||||||
|
# pod/perlunicook.pod: (GPL+ or Artistic) and Public Domain
|
||||||
|
# pod/perlgpl.pod: GPL text
|
||||||
|
# pod/perlartistic.pod: Artistic text
|
||||||
|
# ext/File-Glob/bsd_glob.{c,h}: BSD
|
||||||
|
# Other files: GPL+ or Artistic
|
||||||
|
# cpan/podlators/t/style/minimum-version.t MIT
|
||||||
|
# cpan/Term-ANSIColor/t/lib/Test/RRA/Config.pm: MIT
|
||||||
|
# cpan/Compress-Raw-Bzip2/bzip2-src: BSD
|
||||||
|
# cpan/Compress-Raw-Zlib/zlib-src: zlib
|
||||||
|
|
||||||
|
### get this license from fedora -- Pod-Html-license-clarification
|
||||||
|
### https://src.fedoraproject.org/rpms/perl/blob/master/f/Pod-Html-license-clarification
|
||||||
|
# Pod::Html license: same as rest of Perl
|
||||||
27
regexec.c-Call-macro-with-correct-args.patch
Normal file
27
regexec.c-Call-macro-with-correct-args.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From e1a2878a55b1a7f11f19b384c4ea5235c29866b2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karl Williamson <khw@cpan.org>
|
||||||
|
Date: Mon, 11 Jun 2018 13:28:53 -0600
|
||||||
|
Subject: [PATCH] regexec.c: Call macro with correct args.
|
||||||
|
|
||||||
|
The second argument to this macro is a pointer to the end, as opposed to
|
||||||
|
a length.
|
||||||
|
---
|
||||||
|
regexec.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/regexec.c b/regexec.c
|
||||||
|
index 7ed8f4fabc..ba52ae97c7 100644
|
||||||
|
--- a/regexec.c
|
||||||
|
+++ b/regexec.c
|
||||||
|
@@ -1808,7 +1808,7 @@ STMT_START {
|
||||||
|
case trie_flu8: \
|
||||||
|
_CHECK_AND_WARN_PROBLEMATIC_LOCALE; \
|
||||||
|
if (UTF8_IS_ABOVE_LATIN1(*uc)) { \
|
||||||
|
- _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(uc, uc_end - uc); \
|
||||||
|
+ _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(uc, uc_end); \
|
||||||
|
} \
|
||||||
|
goto do_trie_utf8_fold; \
|
||||||
|
case trie_utf8_exactfa_fold: \
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
98
treat-when-index-1-as-a-boolean-expression.patch
Normal file
98
treat-when-index-1-as-a-boolean-expression.patch
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
From 6b877bbd2c071b3e0659fab552a74dc2ff7e08fb Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Mitchell <davem@iabyn.com>
|
||||||
|
Date: Sat, 14 Jul 2018 10:47:04 +0100
|
||||||
|
Subject: [PATCH] treat when(index() > -1) as a boolean expression
|
||||||
|
|
||||||
|
RT #133368
|
||||||
|
|
||||||
|
when(X) is normally compiled as when($_ ~~ X) *except* when X appears to
|
||||||
|
be a boolean expression, in which case it's used directly.
|
||||||
|
|
||||||
|
5.28.0 introduced an optimisation whereby comparisons involving index
|
||||||
|
like
|
||||||
|
|
||||||
|
index(...) != -1
|
||||||
|
|
||||||
|
eliminated the comparison, and pp_index() returned a boolean value
|
||||||
|
directly. This defeated the 'look for a boolean op' mechanism, and so
|
||||||
|
|
||||||
|
when(index(...) != -1)
|
||||||
|
|
||||||
|
and similar were being incorrectly compiled as
|
||||||
|
|
||||||
|
when($_ ~~ (index(...) != -1))
|
||||||
|
---
|
||||||
|
op.c | 8 +++++++-
|
||||||
|
t/op/switch.t | 23 ++++++++++++++++++++++-
|
||||||
|
2 files changed, 29 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/op.c b/op.c
|
||||||
|
index a05a1319d4..ddeb484b64 100644
|
||||||
|
--- a/op.c
|
||||||
|
+++ b/op.c
|
||||||
|
@@ -9072,6 +9072,13 @@ S_looks_like_bool(pTHX_ const OP *o)
|
||||||
|
case OP_FLOP:
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
+
|
||||||
|
+ case OP_INDEX:
|
||||||
|
+ case OP_RINDEX:
|
||||||
|
+ /* optimised-away (index() != -1) or similar comparison */
|
||||||
|
+ if (o->op_private & OPpTRUEBOOL)
|
||||||
|
+ return TRUE;
|
||||||
|
+ return FALSE;
|
||||||
|
|
||||||
|
case OP_CONST:
|
||||||
|
/* Detect comparisons that have been optimized away */
|
||||||
|
@@ -9081,7 +9088,6 @@ S_looks_like_bool(pTHX_ const OP *o)
|
||||||
|
return TRUE;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
-
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
|
diff --git a/t/op/switch.t b/t/op/switch.t
|
||||||
|
index e5385df0b4..6ff69e0bce 100644
|
||||||
|
--- a/t/op/switch.t
|
||||||
|
+++ b/t/op/switch.t
|
||||||
|
@@ -10,7 +10,7 @@ use strict;
|
||||||
|
use warnings;
|
||||||
|
no warnings 'experimental::smartmatch';
|
||||||
|
|
||||||
|
-plan tests => 195;
|
||||||
|
+plan tests => 197;
|
||||||
|
|
||||||
|
# The behaviour of the feature pragma should be tested by lib/feature.t
|
||||||
|
# using the tests in t/lib/feature/*. This file tests the behaviour of
|
||||||
|
@@ -1358,6 +1358,27 @@ given("xyz") {
|
||||||
|
"scalar value of false when";
|
||||||
|
}
|
||||||
|
|
||||||
|
+# RT #133368
|
||||||
|
+# index() and rindex() comparisons such as '> -1' are optimised away. Make
|
||||||
|
+# sure that they're still treated as a direct boolean expression rather
|
||||||
|
+# than when(X) being implicitly converted to when($_ ~~ X)
|
||||||
|
+
|
||||||
|
+{
|
||||||
|
+ my $s = "abc";
|
||||||
|
+ my $ok = 0;
|
||||||
|
+ given("xyz") {
|
||||||
|
+ when (index($s, 'a') > -1) { $ok = 1; }
|
||||||
|
+ }
|
||||||
|
+ ok($ok, "RT #133368 index");
|
||||||
|
+
|
||||||
|
+ $ok = 0;
|
||||||
|
+ given("xyz") {
|
||||||
|
+ when (rindex($s, 'a') > -1) { $ok = 1; }
|
||||||
|
+ }
|
||||||
|
+ ok($ok, "RT #133368 rindex");
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
# Okay, that'll do for now. The intricacies of the smartmatch
|
||||||
|
# semantics are tested in t/op/smartmatch.t. Taintedness of
|
||||||
|
# returned values is checked in t/op/taint.t.
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
44
utf8.c-Make-safer-a-deprecated-function.patch
Normal file
44
utf8.c-Make-safer-a-deprecated-function.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From 016c8ffcc6c9d41d145035ef5df607568880e3b3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karl Williamson <khw@cpan.org>
|
||||||
|
Date: Tue, 24 Jul 2018 17:20:08 -0600
|
||||||
|
Subject: [PATCH] utf8.c: Make safer a deprecated function
|
||||||
|
|
||||||
|
This function is only called from deprecated functions, but they may be
|
||||||
|
moved to ppport.h. It is lacking a length parameter, so malformed UTF-8
|
||||||
|
may cause it to read beyond the buffer. This commit causes it to not
|
||||||
|
read beyond a NUL character, which makes it safe for the common case
|
||||||
|
that the input is a C string.
|
||||||
|
---
|
||||||
|
utf8.c | 9 +++++----
|
||||||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/utf8.c b/utf8.c
|
||||||
|
index 8471fb8093..3062f58338 100644
|
||||||
|
--- a/utf8.c
|
||||||
|
+++ b/utf8.c
|
||||||
|
@@ -3100,7 +3100,9 @@ S_is_utf8_common(pTHX_ const U8 *const p, SV **swash,
|
||||||
|
* Note that it is assumed that the buffer length of <p> is enough to
|
||||||
|
* contain all the bytes that comprise the character. Thus, <*p> should
|
||||||
|
* have been checked before this call for mal-formedness enough to assure
|
||||||
|
- * that. */
|
||||||
|
+ * that. This function, does make sure to not look past any NUL, so it is
|
||||||
|
+ * safe to use on C, NUL-terminated, strings */
|
||||||
|
+ STRLEN len = my_strnlen((char *) p, UTF8SKIP(p));
|
||||||
|
|
||||||
|
PERL_ARGS_ASSERT_IS_UTF8_COMMON;
|
||||||
|
|
||||||
|
@@ -3109,9 +3111,8 @@ S_is_utf8_common(pTHX_ const U8 *const p, SV **swash,
|
||||||
|
* as far as there being enough bytes available in it to accommodate the
|
||||||
|
* character without reading beyond the end, and pass that number on to the
|
||||||
|
* validating routine */
|
||||||
|
- if (! isUTF8_CHAR(p, p + UTF8SKIP(p))) {
|
||||||
|
- _force_out_malformed_utf8_message(p, p + UTF8SKIP(p),
|
||||||
|
- _UTF8_NO_CONFIDENCE_IN_CURLEN,
|
||||||
|
+ if (! isUTF8_CHAR(p, p + len)) {
|
||||||
|
+ _force_out_malformed_utf8_message(p, p + len, _UTF8_NO_CONFIDENCE_IN_CURLEN,
|
||||||
|
1 /* Die */ );
|
||||||
|
NOT_REACHED; /* NOTREACHED */
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user