diff --git a/perl-isaassert.diff b/perl-isaassert.diff new file mode 100644 index 0000000..60763b8 --- /dev/null +++ b/perl-isaassert.diff @@ -0,0 +1,11 @@ +--- ./mg.c.orig 2009-09-08 10:41:20.000000000 +0000 ++++ ./mg.c 2009-09-08 10:43:29.000000000 +0000 +@@ -1543,7 +1543,7 @@ Perl_magic_setisa(pTHX_ SV *sv, MAGIC *m + stash = GvSTASH( + SvTYPE(mg->mg_obj) == SVt_PVGV + ? (GV*)mg->mg_obj +- : (GV*)SvMAGIC(mg->mg_obj)->mg_obj ++ : (GV*)mg_find(mg->mg_obj, PERL_MAGIC_isa)->mg_obj + ); + + mro_isa_changed_in(stash); diff --git a/perl-posix-33881.diff b/perl-posix-33881.diff new file mode 100644 index 0000000..23ca77e --- /dev/null +++ b/perl-posix-33881.diff @@ -0,0 +1,213 @@ +--- perl/ext/B/t/concise-xs.t#1~32694~ 2007-12-22 01:23:09.000000000 -0800 ++++ perl/ext/B/t/concise-xs.t 2008-05-20 05:48:04.000000000 -0700 +@@ -177,7 +177,10 @@ + }, + + POSIX => { dflt => 'constant', # all but 252/589 +- skip => [qw/ _POSIX_JOB_CONTROL /], # platform varying ++ skip => [qw/ _POSIX_JOB_CONTROL /, # platform varying ++ # Might be XS or imported from Fcntl, depending on your ++ # perl version: ++ qw / S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG /], + perl => [qw/ import croak AUTOLOAD /], + + XS => [qw/ write wctomb wcstombs uname tzset tzname + +--- perl/ext/POSIX/Makefile.PL#1~32694~ 2007-12-22 01:23:09.000000000 -0800 ++++ perl/ext/POSIX/Makefile.PL 2008-05-20 05:48:04.000000000 -0700 +@@ -48,13 +48,11 @@ + MAX_INPUT MB_LEN_MAX MSG_CTRUNC MSG_DONTROUTE MSG_EOR MSG_OOB MSG_PEEK + MSG_TRUNC MSG_WAITALL NAME_MAX NCCS NGROUPS_MAX NOFLSH OPEN_MAX OPOST + PARENB PARMRK PARODD PATH_MAX PIPE_BUF RAND_MAX R_OK SCHAR_MAX +- SCHAR_MIN SEEK_CUR SEEK_END SEEK_SET SHRT_MAX SHRT_MIN SIGABRT SIGALRM ++ SCHAR_MIN SHRT_MAX SHRT_MIN SIGABRT SIGALRM + SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT + SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU + SIGUSR1 SIGUSR2 SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SSIZE_MAX +- STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX +- S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID +- S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR TCIFLUSH TCIOFF ++ STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX TCIFLUSH TCIOFF + TCIOFLUSH TCION TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW + TMP_MAX TOSTOP TZNAME_MAX VEOF VEOL VERASE VINTR VKILL VMIN VQUIT + VSTART VSTOP VSUSP VTIME WNOHANG WUNTRACED W_OK X_OK + +--- perl/ext/POSIX/POSIX.pm#2~33640~ 2008-04-03 09:03:24.000000000 -0700 ++++ perl/ext/POSIX/POSIX.pm 2008-05-20 05:48:04.000000000 -0700 +@@ -13,7 +13,10 @@ + use Fcntl qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK F_SETFD + F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND + O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC +- O_WRONLY); ++ O_WRONLY SEEK_CUR SEEK_END SEEK_SET ++ S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG ++ S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID ++ S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR); + + # Grandfather old foo_h form to new :foo_h form + my $loaded; +@@ -32,9 +35,9 @@ + + XSLoader::load 'POSIX', $VERSION; + +-my %NON_CONSTS = (map {($_,1)} +- qw(S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG WEXITSTATUS +- WIFEXITED WIFSIGNALED WIFSTOPPED WSTOPSIG WTERMSIG)); ++my %NON_CONSTS ++ = (map {($_,1)} qw(WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED WSTOPSIG ++ WTERMSIG)); + + sub AUTOLOAD { + no strict; + +--- perl/ext/POSIX/POSIX.xs#2~33119~ 2008-01-30 02:06:52.000000000 -0800 ++++ perl/ext/POSIX/POSIX.xs 2008-05-20 05:48:04.000000000 -0700 +@@ -404,7 +404,7 @@ + use ExtUtils::Constant qw (constant_types C_constant XS_constant); + + my $types = {map {($_, 1)} qw(IV)}; +-my @names = (qw(S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG WEXITSTATUS WIFEXITED ++my @names = (qw(WEXITSTATUS WIFEXITED + WIFSIGNALED WIFSTOPPED WSTOPSIG WTERMSIG)); + + print constant_types(); # macro defs +@@ -416,65 +416,14 @@ + */ + + switch (len) { +- case 7: +- /* Names all of length 7. */ +- /* S_ISBLK S_ISCHR S_ISDIR S_ISREG */ +- /* Offset 5 gives the best switch position. */ +- switch (name[5]) { +- case 'E': +- if (memEQ(name, "S_ISREG", 7)) { +- /* ^ */ +-#ifdef S_ISREG +- *arg_result = S_ISREG(*arg_result); +- return PERL_constant_ISIV; +-#else +- return PERL_constant_NOTDEF; +-#endif +- } +- break; +- case 'H': +- if (memEQ(name, "S_ISCHR", 7)) { +- /* ^ */ +-#ifdef S_ISCHR +- *arg_result = S_ISCHR(*arg_result); +- return PERL_constant_ISIV; +-#else +- return PERL_constant_NOTDEF; +-#endif +- } +- break; +- case 'I': +- if (memEQ(name, "S_ISDIR", 7)) { +- /* ^ */ +-#ifdef S_ISDIR +- *arg_result = S_ISDIR(*arg_result); +- return PERL_constant_ISIV; +-#else +- return PERL_constant_NOTDEF; +-#endif +- } +- break; +- case 'L': +- if (memEQ(name, "S_ISBLK", 7)) { +- /* ^ */ +-#ifdef S_ISBLK +- *arg_result = S_ISBLK(*arg_result); +- return PERL_constant_ISIV; +-#else +- return PERL_constant_NOTDEF; +-#endif +- } +- break; +- } +- break; + case 8: + /* Names all of length 8. */ +- /* S_ISFIFO WSTOPSIG WTERMSIG */ +- /* Offset 3 gives the best switch position. */ +- switch (name[3]) { +- case 'O': ++ /* WSTOPSIG WTERMSIG */ ++ /* Offset 1 gives the best switch position. */ ++ switch (name[1]) { ++ case 'S': + if (memEQ(name, "WSTOPSIG", 8)) { +- /* ^ */ ++ /* ^ */ + #ifdef WSTOPSIG + int i = *arg_result; + *arg_result = WSTOPSIG(WMUNGE(i)); +@@ -484,9 +433,9 @@ + #endif + } + break; +- case 'R': ++ case 'T': + if (memEQ(name, "WTERMSIG", 8)) { +- /* ^ */ ++ /* ^ */ + #ifdef WTERMSIG + int i = *arg_result; + *arg_result = WTERMSIG(WMUNGE(i)); +@@ -496,17 +445,6 @@ + #endif + } + break; +- case 'S': +- if (memEQ(name, "S_ISFIFO", 8)) { +- /* ^ */ +-#ifdef S_ISFIFO +- *arg_result = S_ISFIFO(*arg_result); +- return PERL_constant_ISIV; +-#else +- return PERL_constant_NOTDEF; +-#endif +- } +- break; + } + break; + case 9: + +--- perl/t/lib/proxy_constant_subs.t#1~32694~ 2007-12-22 01:23:09.000000000 -0800 ++++ perl/t/lib/proxy_constant_subs.t 2008-05-20 05:48:04.000000000 -0700 +@@ -7,20 +7,20 @@ + print "1..0 # Skip -- Perl configured without B module\n"; + exit 0; + } +- if ($Config::Config{'extensions'} !~ /\bPOSIX\b/) { +- print "1..0 # Skip -- Perl configured without POSIX\n"; ++ if ($Config::Config{'extensions'} !~ /\bFcntl\b/) { ++ print "1..0 # Skip -- Perl configured without Fcntl\n"; + exit 0; + } +- # errno is a real subroutine, and acts as control ++ # S_IFMT is a real subroutine, and acts as control + # SEEK_SET is a proxy constant subroutine. +- @symbols = qw(errno SEEK_SET); ++ @symbols = qw(S_IFMT SEEK_SET); + } + + use strict; + use warnings; + use Test::More tests => 4 * @symbols; + use B qw(svref_2object GVf_IMPORTED_CV); +-use POSIX @symbols; ++use Fcntl @symbols; + + # GVf_IMPORTED_CV should not be set on the original, but should be set on the + # imported GV. +@@ -29,7 +29,7 @@ + my ($ps, $ms); + { + no strict 'refs'; +- $ps = svref_2object(\*{"POSIX::$symbol"}); ++ $ps = svref_2object(\*{"Fcntl::$symbol"}); + $ms = svref_2object(\*{"::$symbol"}); + } + isa_ok($ps, 'B::GV'); + diff --git a/perl-posix-33896.diff b/perl-posix-33896.diff new file mode 100644 index 0000000..4bfc257 --- /dev/null +++ b/perl-posix-33896.diff @@ -0,0 +1,252 @@ +--- perl/ext/B/t/concise-xs.t#42~33829~ 2008-05-15 05:01:42.000000000 -0700 ++++ perl/ext/B/t/concise-xs.t 2008-05-21 02:18:00.000000000 -0700 +@@ -180,7 +180,13 @@ + skip => [qw/ _POSIX_JOB_CONTROL /, # platform varying + # Might be XS or imported from Fcntl, depending on your + # perl version: +- qw / S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG /], ++ qw / S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG /, ++ # Might be XS or AUTOLOADed, depending on your perl ++ # version: ++ qw /WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED ++ WSTOPSIG WTERMSIG/, ++ 'int_macro_int', # Removed in POSIX 1.16 ++ ], + perl => [qw/ import croak AUTOLOAD /], + + XS => [qw/ write wctomb wcstombs uname tzset tzname +@@ -194,7 +200,7 @@ + mblen lseek log10 localeconv ldexp lchown + isxdigit isupper isspace ispunct isprint + islower isgraph isdigit iscntrl isalpha +- isalnum int_macro_int getcwd frexp fpathconf ++ isalnum getcwd frexp fpathconf + fmod floor dup2 dup difftime cuserid ctime + ctermid cosh constant close clock ceil + bootstrap atan asin asctime acos access abort + +--- perl/ext/POSIX/POSIX.pm#55~33826~ 2008-05-15 04:24:43.000000000 -0700 ++++ perl/ext/POSIX/POSIX.pm 2008-05-21 02:18:00.000000000 -0700 +@@ -35,10 +35,6 @@ + + XSLoader::load 'POSIX', $VERSION; + +-my %NON_CONSTS +- = (map {($_,1)} qw(WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED WSTOPSIG +- WTERMSIG)); +- + sub AUTOLOAD { + no strict; + no warnings 'uninitialized'; +@@ -50,15 +46,9 @@ + local $! = 0; + my $constname = $AUTOLOAD; + $constname =~ s/.*:://; +- if ($NON_CONSTS{$constname}) { +- my ($val, $error) = &int_macro_int($constname, $_[0]); +- croak $error if $error; +- *$AUTOLOAD = sub { &int_macro_int($constname, $_[0]) }; +- } else { +- my ($error, $val) = constant($constname); +- croak $error if $error; +- *$AUTOLOAD = sub { $val }; +- } ++ my ($error, $val) = constant($constname); ++ croak $error if $error; ++ *$AUTOLOAD = sub { $val }; + + goto &$AUTOLOAD; + } + +--- perl/ext/POSIX/POSIX.xs#151~33826~ 2008-05-15 04:24:43.000000000 -0700 ++++ perl/ext/POSIX/POSIX.xs 2008-05-21 02:18:00.000000000 -0700 +@@ -394,116 +394,6 @@ + + #include "const-c.inc" + +-/* These were implemented in the old "constant" subroutine. They are actually +- macros that take an integer argument and return an integer result. */ +-static int +-int_macro_int (const char *name, STRLEN len, IV *arg_result) { +- /* Initially switch on the length of the name. */ +- /* This code has been edited from a "constant" function generated by: +- +-use ExtUtils::Constant qw (constant_types C_constant XS_constant); +- +-my $types = {map {($_, 1)} qw(IV)}; +-my @names = (qw(WEXITSTATUS WIFEXITED +- WIFSIGNALED WIFSTOPPED WSTOPSIG WTERMSIG)); +- +-print constant_types(); # macro defs +-foreach (C_constant ("POSIX", 'int_macro_int', 'IV', $types, undef, 5, @names) ) { +- print $_, "\n"; # C constant subs +-} +-print "#### XS Section:\n"; +-print XS_constant ("POSIX", $types); +- */ +- +- switch (len) { +- case 8: +- /* Names all of length 8. */ +- /* WSTOPSIG WTERMSIG */ +- /* Offset 1 gives the best switch position. */ +- switch (name[1]) { +- case 'S': +- if (memEQ(name, "WSTOPSIG", 8)) { +- /* ^ */ +-#ifdef WSTOPSIG +- int i = *arg_result; +- *arg_result = WSTOPSIG(WMUNGE(i)); +- return PERL_constant_ISIV; +-#else +- return PERL_constant_NOTDEF; +-#endif +- } +- break; +- case 'T': +- if (memEQ(name, "WTERMSIG", 8)) { +- /* ^ */ +-#ifdef WTERMSIG +- int i = *arg_result; +- *arg_result = WTERMSIG(WMUNGE(i)); +- return PERL_constant_ISIV; +-#else +- return PERL_constant_NOTDEF; +-#endif +- } +- break; +- } +- break; +- case 9: +- if (memEQ(name, "WIFEXITED", 9)) { +-#ifdef WIFEXITED +- int i = *arg_result; +- *arg_result = WIFEXITED(WMUNGE(i)); +- return PERL_constant_ISIV; +-#else +- return PERL_constant_NOTDEF; +-#endif +- } +- break; +- case 10: +- if (memEQ(name, "WIFSTOPPED", 10)) { +-#ifdef WIFSTOPPED +- int i = *arg_result; +- *arg_result = WIFSTOPPED(WMUNGE(i)); +- return PERL_constant_ISIV; +-#else +- return PERL_constant_NOTDEF; +-#endif +- } +- break; +- case 11: +- /* Names all of length 11. */ +- /* WEXITSTATUS WIFSIGNALED */ +- /* Offset 1 gives the best switch position. */ +- switch (name[1]) { +- case 'E': +- if (memEQ(name, "WEXITSTATUS", 11)) { +- /* ^ */ +-#ifdef WEXITSTATUS +- int i = *arg_result; +- *arg_result = WEXITSTATUS(WMUNGE(i)); +- return PERL_constant_ISIV; +-#else +- return PERL_constant_NOTDEF; +-#endif +- } +- break; +- case 'I': +- if (memEQ(name, "WIFSIGNALED", 11)) { +- /* ^ */ +-#ifdef WIFSIGNALED +- int i = *arg_result; +- *arg_result = WIFSIGNALED(WMUNGE(i)); +- return PERL_constant_ISIV; +-#else +- return PERL_constant_NOTDEF; +-#endif +- } +- break; +- } +- break; +- } +- return PERL_constant_NOTFOUND; +-} +- + static void + restore_sigmask(pTHX_ SV *osset_sv) + { +@@ -756,47 +646,29 @@ + + INCLUDE: const-xs.inc + +-void +-int_macro_int(sv, iv) +- PREINIT: +- dXSTARG; +- STRLEN len; +- int type; +- INPUT: +- SV * sv; +- const char * s = SvPV(sv, len); +- IV iv; +- PPCODE: +- /* Change this to int_macro_int(s, len, &iv, &nv); +- if you need to return both NVs and IVs */ +- type = int_macro_int(s, len, &iv); +- /* Return 1 or 2 items. First is error message, or undef if no error. +- Second, if present, is found value */ +- switch (type) { +- case PERL_constant_NOTFOUND: +- sv = sv_2mortal(newSVpvf("%s is not a valid POSIX macro", s)); +- EXTEND(SP, 1); +- PUSHs(&PL_sv_undef); +- PUSHs(sv); +- break; +- case PERL_constant_NOTDEF: +- sv = sv_2mortal(newSVpvf( +- "Your vendor has not defined POSIX macro %s, used", s)); +- EXTEND(SP, 1); +- PUSHs(&PL_sv_undef); +- PUSHs(sv); +- break; +- case PERL_constant_ISIV: +- PUSHi(iv); +- break; +- default: +- sv = sv_2mortal(newSVpvf( +- "Unexpected return type %d while processing POSIX macro %s, used", +- type, s)); +- EXTEND(SP, 1); +- PUSHs(&PL_sv_undef); +- PUSHs(sv); +- } ++int ++WEXITSTATUS(status) ++ int status ++ ++int ++WIFEXITED(status) ++ int status ++ ++int ++WIFSIGNALED(status) ++ int status ++ ++int ++WIFSTOPPED(status) ++ int status ++ ++int ++WSTOPSIG(status) ++ int status ++ ++int ++WTERMSIG(status) ++ int status + + int + isalnum(charstring) + + diff --git a/perl-posix-33897.diff b/perl-posix-33897.diff new file mode 100644 index 0000000..649069b --- /dev/null +++ b/perl-posix-33897.diff @@ -0,0 +1,61 @@ +--- perl/ext/POSIX/POSIX.xs#152~33896~ 2008-05-21 02:18:00.000000000 -0700 ++++ perl/ext/POSIX/POSIX.xs 2008-05-21 03:31:32.000000000 -0700 +@@ -649,26 +649,37 @@ + int + WEXITSTATUS(status) + int status +- +-int +-WIFEXITED(status) +- int status +- +-int +-WIFSIGNALED(status) +- int status +- +-int +-WIFSTOPPED(status) +- int status +- +-int +-WSTOPSIG(status) +- int status +- +-int +-WTERMSIG(status) +- int status ++ ALIAS: ++ POSIX::WIFEXITED = 1 ++ POSIX::WIFSIGNALED = 2 ++ POSIX::WIFSTOPPED = 3 ++ POSIX::WSTOPSIG = 4 ++ POSIX::WTERMSIG = 5 ++ CODE: ++ switch(ix) { ++ case 0: ++ RETVAL = WEXITSTATUS(status); ++ break; ++ case 1: ++ RETVAL = WIFEXITED(status); ++ break; ++ case 2: ++ RETVAL = WIFSIGNALED(status); ++ break; ++ case 3: ++ RETVAL = WIFSTOPPED(status); ++ break; ++ case 4: ++ RETVAL = WSTOPSIG(status); ++ break; ++ case 5: ++ RETVAL = WTERMSIG(status); ++ break; ++ default: ++ Perl_croak(aTHX_ "Illegal alias %d for POSIX::W*", ix); ++ } ++ OUTPUT: ++ RETVAL + + int + isalnum(charstring) + diff --git a/perl.changes b/perl.changes index 37edd51..2e00c57 100644 --- a/perl.changes +++ b/perl.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Sep 8 13:43:35 CEST 2009 - mls@suse.de + +- backport upstream fixes for POSIX module to avoid clashes + with Fcntl [bnc#446098], [bnc#515948] +- backport upstream fix for ISA assertion failure [bnc#528423] +- move unicode files from perl-doc to perl, otherwise some + perl modules will not work + ------------------------------------------------------------------- Sat Sep 5 15:47:24 CEST 2009 - coolo@novell.com diff --git a/perl.spec b/perl.spec index 76ede2b..22eb14d 100644 --- a/perl.spec +++ b/perl.spec @@ -21,7 +21,7 @@ Name: perl Summary: The Perl interpreter Version: 5.10.0 -Release: 70 +Release: 71 License: Artistic License .. ; GPL v2 or later Group: Development/Languages/Perl AutoReqProv: on @@ -43,6 +43,10 @@ Patch9: perl-zlib-growoob.diff Patch10: perl-errorcount.diff Patch11: perl-netcmdutf8.diff Patch12: perl-fast-syslog.diff +Patch13: perl-isaassert.diff +Patch14: perl-posix-33881.diff +Patch15: perl-posix-33896.diff +Patch16: perl-posix-33897.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: perl-base = %version #PreReq: %fillup_prereq @@ -150,6 +154,10 @@ cp -p %{S:3} . %patch10 %patch11 %patch12 +%patch13 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 %build export SUSE_ASNEEDED=0 @@ -364,8 +372,6 @@ EOF %exclude /usr/bin/perl %exclude /usr/bin/perl%version %exclude /usr/bin/suidperl -%exclude /usr/lib/perl5/*/Unicode/*/*.txt -%exclude /usr/lib/perl5/*/unicore/*.txt /usr/bin/* /usr/lib/perl5/* %config %{_sysconfdir}/rpm/macros.perl @@ -382,7 +388,5 @@ EOF %doc /usr/share/man/man1/* %doc /usr/share/man/man3/* %doc /usr/lib/perl5/*/pod -%doc /usr/lib/perl5/*/Unicode/*/*.txt -%doc /usr/lib/perl5/*/unicore/*.txt %changelog