SHA256
1
0
forked from pool/perl

- fix testing fatal errors in gdbm

new patch: perl-gdbm-test-no-mmap.diff
- fix perl no longer setting $^X if /proc is not mounted
  new patch: perl-revert-caretx.diff

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=173
This commit is contained in:
Michael Schröder 2018-09-28 14:08:18 +00:00 committed by Git OBS Bridge
parent 8cd98ea6ec
commit 758b6dc022
4 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,10 @@
--- ./ext/GDBM_File/t/fatal.t.orig 2018-09-28 14:01:52.697941391 +0000
+++ ./ext/GDBM_File/t/fatal.t 2018-09-28 14:02:35.601833563 +0000
@@ -29,6 +29,7 @@ is((open $fh, "<&=$fileno"), undef,
umask(0);
my %h;
isa_ok(tie(%h, 'GDBM_File', 'Op_dbmx', GDBM_WRCREAT, 0640), 'GDBM_File');
+tied(%h)->setopt(7, 0, length(pack("i", 0))); # turn off mmap mode
isnt((open $fh, "<&=$fileno"), undef, "dup fileno $fileno")
or diag("\$! = $!");

48
perl-revert-caretx.diff Normal file
View File

@ -0,0 +1,48 @@
--- ./caretx.c.orig 2018-05-21 12:29:23.000000000 +0000
+++ ./caretx.c 2018-09-28 14:05:46.785353073 +0000
@@ -56,7 +56,8 @@ Perl_set_caret_X(pTHX) {
SV *const caret_x = GvSV(tmpgv);
#if defined(OS2)
sv_setpv(caret_x, os2_execname(aTHX));
-#elif defined(USE_KERN_PROC_PATHNAME)
+#else
+# ifdef USE_KERN_PROC_PATHNAME
size_t size = 0;
int mib[4];
mib[0] = CTL_KERN;
@@ -76,7 +77,7 @@ Perl_set_caret_X(pTHX) {
return;
}
}
-#elif defined(USE_NSGETEXECUTABLEPATH)
+# elif defined(USE_NSGETEXECUTABLEPATH)
char buf[1];
uint32_t size = sizeof(buf);
@@ -95,7 +96,7 @@ Perl_set_caret_X(pTHX) {
return;
}
}
-#elif defined(HAS_PROCSELFEXE)
+# elif defined(HAS_PROCSELFEXE)
char buf[MAXPATHLEN];
SSize_t len = readlink(PROCSELFEXE_PATH, buf, sizeof(buf) - 1);
/* NOTE: if the length returned by readlink() is sizeof(buf) - 1,
@@ -125,7 +126,7 @@ Perl_set_caret_X(pTHX) {
sv_setpvn(caret_x, buf, len);
return;
}
-#elif defined(WIN32)
+# elif defined(WIN32)
char *ansi;
WCHAR widename[MAX_PATH];
GetModuleFileNameW(NULL, widename, sizeof(widename)/sizeof(WCHAR));
@@ -133,7 +134,7 @@ Perl_set_caret_X(pTHX) {
sv_setpv(caret_x, ansi);
win32_free(ansi);
return;
-#else
+# endif
/* Fallback to this: */
sv_setpv(caret_x, PL_origargv[0]);
#endif

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Sep 28 16:06:46 CEST 2018 - mls@suse.de
- fix testing fatal errors in gdbm
new patch: perl-gdbm-test-no-mmap.diff
- fix perl no longer setting $^X if /proc is not mounted
new patch: perl-revert-caretx.diff
-------------------------------------------------------------------
Wed Sep 26 15:01:32 CEST 2018 - mls@suse.de

View File

@ -45,6 +45,8 @@ Patch11: perl-5.18.2-overflow.diff
Patch12: perl-reproducible.patch
Patch13: perl_skip_flaky_tests_powerpc.patch
Patch14: posix-sigaction.patch
Patch15: perl-gdbm-test-no-mmap.diff
Patch16: perl-revert-caretx.diff
BuildRequires: db-devel
BuildRequires: gdbm-devel
BuildRequires: libbz2-devel
@ -177,6 +179,8 @@ cp -p %{SOURCE3} .
%patch11
%patch12 -p1
%patch14 -p1
%patch15
%patch16
%build
cp -a lib savelib