Rebase for perl 5.26.0 40/138040/1
authorAnas Nashif <anas.nashif@intel.com>
Thu, 8 Nov 2012 01:33:19 +0000 (17:33 -0800)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 3 Jul 2017 07:20:04 +0000 (16:20 +0900)
Change-Id: I9839ebca84a6619d1db960fbbaf6cb444d9caef0
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
26 files changed:
.gbs.conf [new file with mode: 0644]
Configure
Makefile.SH
Porting/config.sh
cpan/CPAN/lib/CPAN.pm
cpan/Compress-Raw-Zlib/config.in
cpan/Encode/bin/enc2xs
cpan/ExtUtils-Install/lib/ExtUtils/Packlist.pm
cpan/File-Temp/lib/File/Temp.pm
cpan/Sys-Syslog/t/syslog.t
cpan/libnet/lib/Net/Config.pm
ext/DynaLoader/hints/linux.pl
ext/ODBM_File/Makefile.PL
ext/ODBM_File/hints/linux.pl
hints/linux.sh
installperl
packaging/README.macros [new file with mode: 0644]
packaging/baselibs.conf [new file with mode: 0644]
packaging/macros.perl [new file with mode: 0644]
packaging/perl-rpmlintrc [new file with mode: 0644]
packaging/perl.changes [new file with mode: 0644]
packaging/perl.manifest [new file with mode: 0644]
packaging/perl.spec [new file with mode: 0644]
regcomp.c
t/op/numconvert.t
utils/perlbug.PL

diff --git a/.gbs.conf b/.gbs.conf
new file mode 100644 (file)
index 0000000..2877865
--- /dev/null
+++ b/.gbs.conf
@@ -0,0 +1,3 @@
+[general]
+upstream_branch = upstream/master
+upstream_tag = v${upstreamversion}
index 3259249..115ae98 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -117,7 +117,7 @@ paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
 paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
 paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
 paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
-paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
+paths="$paths /etc /usr/lib /usr/lib64 /usr/ucblib /lib /usr/ccs/lib"
 paths="$paths /sbin /usr/sbin /usr/libexec"
 paths="$paths /system/gnu_library/bin"
 
@@ -1464,7 +1464,7 @@ loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
 
 : general looking path for locating libraries
-glibpth="/lib /usr/lib $xlibpth"
+glibpth="/lib /usr/lib /lib64 /usr/lib64 $xlibpth"
 glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
 test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
 test -f /shlib/libc.so     && glibpth="/shlib $glibpth"
@@ -2559,7 +2559,7 @@ uname
 zip
 "
 pth=`echo $PATH | sed -e "s/$p_/ /g"`
-pth="$pth $sysroot/lib $sysroot/usr/lib"
+pth="$pth $sysroot/lib $sysroot/usr/lib $sysroot/lib64 $sysroot/usr/lib64"
 for file in $loclist; do
        eval xxx=\$$file
        case "$xxx" in
@@ -11963,7 +11963,7 @@ void xxx(int n, ...)
     va_start(args, n);
     exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
 }
-int main() { xxx(1, "foo"); }
+int main() { xxx(1, "foo"); return 0; }
 
 #else /* I_VARARGS */
 
@@ -11975,7 +11975,7 @@ va_dcl
     va_start(args);
     exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
 }
-int main() { xxx("foo"); }
+int main() { xxx("foo"); return 0; }
 
 #endif
 
@@ -20516,14 +20516,20 @@ int main(int argc, char *argv[])
 }
 EOCP
        set try
+       # this is really stupid, but we have to link in the -ldb to have
+       # the above program succeed
+       _old_libs="$libs"
+       libs="$libs -ldb"
        if eval $compile_ok && $run ./try; then
                echo 'Looks OK.' >&4
+               libs="$_old_libs"
                set `$run ./try 1`
                db_version_major=$1
                db_version_minor=$2
                db_version_patch=$3
        else
                echo "I can't use Berkeley DB with your <db.h>.  I'll disable Berkeley DB." >&4
+               libs="$_old_libs"
                i_db=$undef
                case " $libs " in
                *"-ldb "*)
@@ -20564,7 +20570,7 @@ int main()
 }
 #endif
 EOCP
-       if $cc $ccflags -c try.c >try.out 2>&1 ; then
+       if $cc $ccflags -c try.c -ldb >try.out 2>&1 ; then
                if $contains warning try.out >>/dev/null 2>&1 ; then
                        db_hashtype='int'
                else
@@ -20607,7 +20613,7 @@ int main()
 }
 #endif
 EOCP
-       if $cc $ccflags -c try.c  >try.out 2>&1 ; then
+       if $cc $ccflags -c try.c -ldb >try.out 2>&1 ; then
                if $contains warning try.out >>/dev/null 2>&1 ; then
                        db_prefixtype='int'
                else
@@ -25304,7 +25310,7 @@ passcat='$passcat'
 patchlevel='$patchlevel'
 path_sep='$path_sep'
 perl5='$perl5'
-perl='$perl'
+perl='perl'
 perl_patchlevel='$perl_patchlevel'
 perl_static_inline='$perl_static_inline'
 perladmin='$perladmin'
index 51d3c8e..7f14ee3 100755 (executable)
@@ -156,7 +156,7 @@ true)
 #! /bin/sh
 lib=$1
 shift
-test -r $lib && export LD_PRELOAD="$lib $LD_PRELOAD"
+test -r $lib && export LD_PRELOAD="$LD_PRELOAD $lib"
 exec "$@"
 EOT
                chmod 755 preload
index d0b4f7c..c207d95 100644 (file)
@@ -1201,9 +1201,9 @@ vendorhtml3direxp=''
 vendorlib=''
 vendorlib_stem=''
 vendorlibexp=''
-vendorman1dir=' '
+vendorman1dir=''
 vendorman1direxp=''
-vendorman3dir=' '
+vendorman3dir=''
 vendorman3direxp=''
 vendorprefix=''
 vendorprefixexp=''
index 4f02850..3df284b 100644 (file)
@@ -66,7 +66,7 @@ sub _uniq;
 
 no lib ".";
 
-require Mac::BuildTools if $^O eq 'MacOS';
+#require Mac::BuildTools if $^O eq 'MacOS';
 if ($ENV{PERL5_CPAN_IS_RUNNING} && $$ != $ENV{PERL5_CPAN_IS_RUNNING}) {
     $ENV{PERL5_CPAN_IS_RUNNING_IN_RECURSION} ||= $ENV{PERL5_CPAN_IS_RUNNING};
     my @rec = _uniq split(/,/, $ENV{PERL5_CPAN_IS_RUNNING_IN_RECURSION}), $$;
index c56cc03..2c6659b 100644 (file)
@@ -16,9 +16,9 @@
 #    Setting the Gzip OS Code
 #
 
-BUILD_ZLIB      = True
-INCLUDE         = ./zlib-src
-LIB             = ./zlib-src
+BUILD_ZLIB      = False
+INCLUDE         = /usr/include
+LIB             = /usr/lib
 
 OLD_ZLIB        = False
 GZIP_OS_CODE    = AUTO_DETECT
index bd39639..fa1d5df 100644 (file)
@@ -1094,13 +1094,13 @@ sub make_configlocal_pm {
            $LocalMod{$enc} ||= $mod;
        }
     };
-    File::Find::find({wanted => $wanted}, @INC);
+    File::Find::find({wanted => $wanted}, grep {$_ ne '.'} @INC);
     $_ModLines = "";
     for my $enc ( sort keys %LocalMod ) {
         $_ModLines .=
           qq(\$Encode::ExtModule{'$enc'} = "$LocalMod{$enc}";\n);
     }
-    warn $_ModLines if $_ModLines;
+    warn $_ModLines if $_ModLines ne '';
     $_LocalVer = _mkversion();
     $_E2X      = find_e2x();
     $_Inc      = $INC{"Encode.pm"};
index c1ab002..44b345e 100644 (file)
@@ -207,8 +207,11 @@ foreach my $key (sort(keys(%{$self->{data}})))
    {
    if (! -e $key)
       {
-      push(@missing, $key);
-      delete($self->{data}{$key}) if ($remove);
+      if (($key !~ m!/man/!) || ! -e "$key.gz")
+       {
+        push(@missing, $key);
+        delete($self->{data}{$key}) if ($remove);
+       }
       }
    }
 return(@missing);
index 817c6d9..67b0d52 100644 (file)
@@ -16,7 +16,7 @@ use Fcntl 1.03;
 use IO::Seekable;               # For SEEK_*
 use Errno;
 use Scalar::Util 'refaddr';
-require VMS::Stdio if $^O eq 'VMS';
+#require VMS::Stdio if $^O eq 'VMS';
 
 # pre-emptively load Carp::Heavy. If we don't when we run out of file
 # handles and attempt to call croak() we get an error message telling
index 92af0c7..4bc97c1 100644 (file)
@@ -221,6 +221,7 @@ SKIP: {
         }
     }
     else  {
+       $r = 1 unless -e '/dev/log';
         ok( $r, "setlogsock() should return true: '$r'" );
     }
 
index a593538..fdefac4 100644 (file)
@@ -53,7 +53,7 @@ our %NetConfig = (
 {
 ## no critic (BuiltinFunctions::ProhibitStringyEval)
 $^O eq 'MacOS' and eval <<TRY_INTERNET_CONFIG;
-use Mac::InternetConfig;
+#use Mac::InternetConfig;
 
 {
 my %nc = (
index f7196f8..8679dee 100644 (file)
@@ -2,4 +2,7 @@
 # Some Linux releases like to hide their <nlist.h>
 $self->{CCFLAGS} = $Config{ccflags} . ' -I/usr/include/libelf'
        if -f "/usr/include/libelf/nlist.h";
+# Some silly modules like mod_perl use DynaLoader.a in a shared
+# module, so add cccdlflags if we're going for a shared libperl
+$self->{CCFLAGS} = ($self->{CCFLAGS} || $Config{ccflags}) . " $Config{cccdlflags}" if $Config{'useshrplib'} eq 'true';
 1;
index 0ae31f9..db3673c 100644 (file)
@@ -1,7 +1,7 @@
 use ExtUtils::MakeMaker;
 WriteMakefile(
     NAME       => 'ODBM_File',
-    LIBS => ["-ldbm -lucb"],
+    LIBS => ["-lgdbm -lucb"],
     XSPROTOARG => '-noprototypes',             # XXX remove later?
     VERSION_FROM => 'ODBM_File.pm', 
 );
index 204bba0..4953412 100644 (file)
@@ -1,5 +1,5 @@
 # uses GDBM dbm compatibility feature - at least on SuSE 8.0
-$self->{LIBS} = ['-lgdbm'];
+$self->{LIBS} = ['-lgdbm -lgdbm_compat'];
 
 # Debian/Ubuntu have libgdbm_compat.so but not this file,
 # so linking may fail
index 3f38ea0..e759dae 100644 (file)
@@ -53,7 +53,9 @@ ignore_versioned_solibs='y'
 # BSD compatibility library no longer needed
 # 'kaffe' has a /usr/lib/libnet.so which is not at all relevant for perl.
 # bind causes issues with several reentrant functions
-set `echo X "$libswanted "| sed -e 's/ bsd / /' -e 's/ net / /' -e 's/ bind / /'`
+set `echo X "$libswanted "| \
+    sed -e 's/ bsd / /' -e 's/ net / /' -e 's/ bind / /' \
+        -e 's/ db / /' -e 's/ gdbm / /' -e 's/ ndbm / /'`
 shift
 libswanted="$*"
 
@@ -147,6 +149,7 @@ case "$optimize" in
             esac
         ;;
     esac
+    optimize="$optimize --pipe"
     ;;
 esac
 
@@ -170,7 +173,7 @@ else
 fi
 
 case "$plibpth" in
-'') plibpth=`LANG=C LC_ALL=C $gcc $ccflags $ldflags -print-search-dirs | grep libraries |
+'UBUNTU') plibpth=`LANG=C LC_ALL=C $gcc $ccflags $ldflags -print-search-dirs | grep libraries |
        cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
     set X $plibpth # Collapse all entries on one line
     shift
@@ -221,6 +224,119 @@ case "$libc" in
     ;;
 esac
 
+man1dir=/usr/share/man/man1
+man3dir=/usr/share/man/man3
+man3ext=3pm
+
+# Are we using ELF?  Thanks to Kenneth Albanowski <kjahds@kjahds.com>
+# for this test.
+cat >try.c <<'EOM'
+/* Test for whether ELF binaries are produced */
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+main() {
+       char buffer[4];
+       int i=open("a.out",O_RDONLY);
+       if(i==-1)
+               exit(1); /* fail */
+       if(read(i,&buffer[0],4)<4)
+               exit(1); /* fail */
+       if(buffer[0] != 127 || buffer[1] != 'E' ||
+           buffer[2] != 'L' || buffer[3] != 'F')
+               exit(1); /* fail */
+       exit(0); /* succeed (yes, it's ELF) */
+}
+EOM
+if ${cc:-gcc} $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
+    cat <<'EOM' >&4
+
+You appear to have ELF support.  I'll try to use it for dynamic loading.
+If dynamic loading doesn't work, read hints/linux.sh for further information.
+EOM
+
+else
+    cat <<'EOM' >&4
+
+You don't have an ELF gcc.  I will use dld if possible.  If you are
+using a version of DLD earlier than 3.2.6, or don't have it at all, you
+should probably upgrade. If you are forced to use 3.2.4, you should
+uncomment a couple of lines in hints/linux.sh and restart Configure so
+that shared libraries will be disallowed.
+
+EOM
+    lddlflags="-r $lddlflags"
+    # These empty values are so that Configure doesn't put in the
+    # Linux ELF values.
+    ccdlflags=' '
+    cccdlflags=' '
+    ccflags="-DOVR_DBL_DIG=14 $ccflags"
+    so='sa'
+    dlext='o'
+    nm_so_opt=' '
+    ## If you are using DLD 3.2.4 which does not support shared libs,
+    ## uncomment the next two lines:
+    #ldflags="-static"
+    #so='none'
+
+       # In addition, on some systems there is a problem with perl and NDBM
+       # which causes AnyDBM and NDBM_File to lock up. This is evidenced
+       # in the tests as AnyDBM just freezing.  Apparently, this only
+       # happens on a.out systems, so we disable NDBM for all a.out linux
+       # systems.  If someone can suggest a more robust test
+       #  that would be appreciated.
+       #
+       # More info:
+       # Date: Wed, 7 Feb 1996 03:21:04 +0900
+       # From: Jeffrey Friedl <jfriedl@nff.ncl.omron.co.jp>
+       #
+       # I tried compiling with DBM support and sure enough things locked up
+       # just as advertised. Checking into it, I found that the lockup was
+       # during the call to dbm_open. Not *in* dbm_open -- but between the call
+       # to and the jump into.
+       #
+       # To make a long story short, making sure that the *.a and *.sa pairs of
+       #   /usr/lib/lib{m,db,gdbm}.{a,sa}
+       # were perfectly in sync took care of it.
+       #
+       # This will generate a harmless Whoa There! message
+       case "$d_dbm_open" in
+       '')     cat <<'EOM' >&4
+
+Disabling ndbm.  This will generate a Whoa There message in Configure.
+Read hints/linux.sh for further information.
+EOM
+               # You can override this with Configure -Dd_dbm_open
+               d_dbm_open=undef
+               ;;
+       esac
+fi
+
+case `uname -m` in
+i?86) archname='i586-linux';;
+*)    archname=`uname -m`-linux;;
+esac
+
+case $archname in
+sparc64-linux) glibpth="/lib64 /usr/lib64";;
+esac
+
+cf_email='none'
+#libs='-lgdbm -ldb -ldl -lm -lc'
+#libs='-ldl -lm -lc'
+
+usedl='true'
+dlsrc='dl_dlopen.xs'
+d_dosuid='undef'
+d_bincompat3='y'
+
+# We don't want to add /usr/local/include and /usr/local/lib to the search
+# paths, they are already searched by default.
+locincpth=
+loclibpth=
+
+rm -f try.c a.out
+
 if ${sh:-/bin/sh} -c exit; then
   echo ''
   echo 'You appear to have a working bash.  Good.'
@@ -268,6 +384,9 @@ else
        echo "Couldn't find tcsh.  Csh-based globbing might be broken."
     fi
 fi
+csh=''
+d_csh='undef'
+full_csh=''
 
 # Shimpei Yamashita <shimpei@socrates.patnet.caltech.edu>
 # Message-Id: <33EF1634.B36B6500@pobox.com>
@@ -378,6 +497,8 @@ $define|true|[yY]*)
        d_localtime_r_proto="$define"
        d_random_r_proto="$define"
 
+       test -e /lib64/libc.so.6 && libs='-lm -ldl -lcrypt -lpthread'
+
        ;;
 esac
 EOCBU
index af61203..68b9545 100755 (executable)
@@ -685,7 +685,7 @@ sub installlib {
     return if $name eq 'ExtUtils/MakeMaker/version/regex.pm';
 
     my $installlib = $installprivlib;
-    if ($dir =~ /^auto\// ||
+    if (($dir =~ /^auto\// && $dir ne 'auto/Compress/Zlib') ||
          ($name =~ /^(.*)\.(?:pm|pod)$/ && $archpms{$1}) ||
          ($name =~ /^(.*)\.(?:h|lib)$/i && ($Is_W32 || $Is_NetWare)) ||
          $name=~/^Config_(heavy|git)\.pl\z/
diff --git a/packaging/README.macros b/packaging/README.macros
new file mode 100644 (file)
index 0000000..4a46a76
--- /dev/null
@@ -0,0 +1,42 @@
+README for perl-macros
+
+Author: Christian Wittmer <chris@computersalat.de>
+
+
+%perl_gen_filelist generates an rpmlint happy filelist of your installed files
+
+In most cases you only need to check the %doc part
+sometimes there is a "Changes" or "ChangeLog",....
+
+Requirements for %perl_gen_filelist
+You have to define following parts inside your spec file
+
+Example:
+
+BuildRequires:  perl-macros
+
+%install
+%perl_make_install
+%perl_process_packlist
+%perl_gen_filelist
+
+%files -f %{name}.files
+%defattr(-,root,root)
+%doc Changes README
+
+
+And here an Example of the generated filelist:
+
+%dir /usr/lib/perl5/vendor_perl/5.8.8/Algorithm
+/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/DiffOld.pm
+/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/diff.pl
+/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/Diff.pm
+/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/diffnew.pl
+/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/cdiff.pl
+/usr/lib/perl5/vendor_perl/5.8.8/Algorithm/htmldiff.pl
+%dir /usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/Algorithm
+%dir /usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/Algorithm/Diff
+/usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/Algorithm/Diff/.packlist
+/usr/share/man/man?/*
+/var/adm/perl-modules/perl-Algorithm-Diff
+
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644 (file)
index 0000000..b8b6ab9
--- /dev/null
@@ -0,0 +1,4 @@
+perl
++lib(64)?/perl5/.*-linux-thread-multi.*
+perl-base
++lib(64)?/perl5/.*-linux-thread-multi.*
diff --git a/packaging/macros.perl b/packaging/macros.perl
new file mode 100644 (file)
index 0000000..fd12b5e
--- /dev/null
@@ -0,0 +1,119 @@
+# macros.perl file
+# macros for perl module building. handle with care.
+
+# Useful perl macros (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
+#
+%perl_sitearch   %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch)
+%perl_sitelib    %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib)
+%perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
+%perl_vendorlib  %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
+%perl_archlib    %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib)
+%perl_privlib    %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
+
+# More useful perl macros (from Raul Dias <rsd@swi.com.br>)
+#
+%perl_version           %(perl -V:version | sed "s!.*='!!;s!'.*!!")
+%perl_man1ext           %(perl -V:man1ext | sed "s!.*='!!;s!'.*!!")
+%perl_man3ext           %(perl -V:man3ext | sed "s!.*='!!;s!'.*!!")
+%perl_man1dir           %(perl -V:man1dir | sed "s!.*='!!;s!'.*!!")
+%perl_man3dir           %(perl -V:man3dir | sed "s!.*='!!;s!'.*!!")
+%perl_installman1dir    %(perl -V:installman1dir | sed "s!.*='!!;s!'.*!!")
+%perl_installman3dir    %(perl -V:installman3dir | sed "s!.*='!!;s!'.*!!")
+%perl_installarchlib    %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!")
+%perl_prefix            %{buildroot}
+
+# suse specific macros
+#
+%perl_make_install make DESTDIR=$RPM_BUILD_ROOT install_vendor
+%perl_process_packlist(n:) \
+  if test -n "$RPM_BUILD_ROOT" -a -d $RPM_BUILD_ROOT%perl_vendorarch/auto; then \
+    find $RPM_BUILD_ROOT%perl_vendorarch/auto -name .packlist -print0 | xargs -0 -r rm \
+    if [ %{_target_cpu} == noarch ]; then \
+      find $RPM_BUILD_ROOT%perl_vendorarch/auto -depth -type d -print0 | xargs -0 -r rmdir \
+    fi \
+  fi \
+  rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \
+  %nil
+
+# macro: perl_gen_filelist (from Christian <chris@computersalat.de>)
+# do the rpmlint happy filelist generation
+# with %dir in front of directories
+#
+%perl_gen_filelist(n)\
+FILES=%{name}.files\
+# fgen_dir func\
+# IN: dir\
+fgen_dir(){\
+%{__cat} >> $FILES << EOF\
+%dir ${1}\
+EOF\
+}\
+# fgen_file func\
+# IN: file\
+fgen_file(){\
+%{__cat} >> $FILES << EOF\
+${1}\
+EOF\
+}\
+# check for files in %{perl_vendorlib}\
+RES=`find ${RPM_BUILD_ROOT}%{perl_vendorlib} -maxdepth 1 -type f`\
+if [ -n "$RES" ]; then\
+  for file in $RES; do\
+    fgen_file "%{perl_vendorlib}/$(basename ${file})"\
+  done\
+fi\
+\
+# get all dirs into array\
+base_dir="${RPM_BUILD_ROOT}%{perl_vendorlib}/"\
+for dir in `find ${base_dir} -type d | sort`; do\
+  if [ "$dir" = "${base_dir}" ]; then\
+    continue\
+  else\
+    el=`echo $dir | %{__awk} -F"${base_dir}" '{print $2}'`\
+    all_dir=(${all_dir[@]} $el)\
+  fi\
+done\
+\
+# build filelist\
+for i in ${all_dir[@]}; do\
+  # do not add "dir {perl_vendorlib/arch}/auto", included in perl package\
+  if [ "${i}" = "auto" ]; then\
+    continue\
+  fi\
+  if [ "%{perl_vendorlib}/${i}" = "%{perl_vendorarch}/auto" ]; then\
+    continue\
+  else\
+    if [ -d ${base_dir}/${i} ]; then\
+      RES=`find "${base_dir}/${i}" -maxdepth 1 -type f`\
+      if [ -n "$RES" ]; then\
+        fgen_dir "%{perl_vendorlib}/${i}"\
+        for file in $RES; do\
+          fgen_file "%{perl_vendorlib}/${i}/$(basename ${file})"\
+        done\
+      else\
+        fgen_dir "%{perl_vendorlib}/${i}"\
+      fi\
+    fi\
+  fi\
+done\
+# add man pages\
+# if exist :)\
+if [ -d "${RPM_BUILD_ROOT}%{_mandir}" ]; then\
+fgen_file "%{_mandir}/man?/*"\
+fi\
+\
+# add packlist file\
+# generated fom perllocal.pod\
+if [ -f "${RPM_BUILD_ROOT}/var/adm/perl-modules/%{name}" ]; then\
+  fgen_file "/var/adm/perl-modules/%{name}"\
+fi\
+\
+# check for files in %{_bindir}\
+if [ -d ${RPM_BUILD_ROOT}%{_bindir} ]; then\
+  RES=`find "${RPM_BUILD_ROOT}%{_bindir}" -maxdepth 1 -type f`\
+  if [ -n "$RES" ]; then\
+    for file in $RES; do\
+      fgen_file "%{_bindir}/$(basename ${file})"\
+    done\
+  fi\
+fi
diff --git a/packaging/perl-rpmlintrc b/packaging/perl-rpmlintrc
new file mode 100644 (file)
index 0000000..0c9ecf9
--- /dev/null
@@ -0,0 +1,5 @@
+# This line is mandatory to access the configuration functions
+from Config import *
+
+addFilter("perl.* devel-file-in-non-devel-package")
+
diff --git a/packaging/perl.changes b/packaging/perl.changes
new file mode 100644 (file)
index 0000000..27ff594
--- /dev/null
@@ -0,0 +1,9 @@
+* Mon Mar 25 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130322.222652@5cf5c2d
+- Provide perl-base
+
+* Fri Mar 22 2013 Anas Nashif <anas.nashif@intel.com> v5.16.3@a4faae8
+- Update to 5.16.3
+
+* Tue Mar 19 2013 Anas Nashif <anas.nashif@intel.com> v5.16.2@2f66690
+- Fixed package groups
+
diff --git a/packaging/perl.manifest b/packaging/perl.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/perl.spec b/packaging/perl.spec
new file mode 100644 (file)
index 0000000..97291ea
--- /dev/null
@@ -0,0 +1,260 @@
+Name:           perl
+Summary:        The Perl interpreter
+License:        Artistic-1.0 or GPL-2.0+
+Group:          Platform Development/Perl
+Version:        5.20.0
+Release:        0
+Url:            http://www.perl.org/
+Source:         perl-%{version}.tar.bz2
+Source1:        %name-rpmlintrc
+Source2:        macros.perl
+Source3:        README.macros
+Source4:        baselibs.conf
+Source1001:     perl.manifest
+BuildRequires:  db4-devel
+BuildRequires:  gdbm-devel
+BuildRequires:  bzip2-devel
+BuildRequires:  ncurses-devel
+BuildRequires:  zlib-devel
+#
+Provides:       /bin/perl
+Provides:       perl-500
+Provides:       perl-macros
+Provides:       perl(:MODULE_COMPAT_%{version})
+Obsoletes:      perl-macros
+Provides:       perl-base
+Obsoletes:      perl-base
+Provides:       perl-Filter-Simple
+Provides:       perl-I18N-LangTags
+Provides:       perl-MIME-Base64
+Provides:       perl-Storable
+Provides:       perl-Test-Simple = 0.98-%{release}
+Obsoletes:      perl-Filter-Simple
+Obsoletes:      perl-I18N-LangTags
+Obsoletes:      perl-MIME-Base64
+Obsoletes:      perl-Storable
+Obsoletes:      perl-Test-Simple < 0.98
+Provides:       perl-Text-Balanced
+Provides:       perl-Time-HiRes
+Provides:       perl-libnet
+Obsoletes:      perl-Text-Balanced
+Obsoletes:      perl-Time-HiRes
+Obsoletes:      perl-libnet
+Provides:       perl-Compress-Raw-Zlib
+Provides:       perl-Compress-Zlib
+Obsoletes:      perl-Compress-Raw-Zlib
+Obsoletes:      perl-Compress-Zlib
+Provides:       perl-IO-Compress-Base
+Provides:       perl-IO-Compress-Zlib
+Provides:       perl-IO-Zlib
+Obsoletes:      perl-IO-Compress-Base
+Obsoletes:      perl-IO-Compress-Zlib
+Obsoletes:      perl-IO-Zlib
+Provides:       perl-Archive-Tar
+Provides:       perl-Module-Build
+# 0.39 is smaller than 0.3601, but this is what spec files require
+Provides:       perl(Module::Build) = 0.3900
+Obsoletes:      perl-Archive-Tar
+Obsoletes:      perl-Module-Build
+Provides:       perl-Locale-Maketext-Simple
+Provides:       perl-Module-Pluggable
+Obsoletes:      perl-Locale-Maketext-Simple
+Obsoletes:      perl-Module-Pluggable
+Provides:       perl-Pod-Escapes
+Provides:       perl-Pod-Simple
+Obsoletes:      perl-Pod-Escapes
+Obsoletes:      perl-Pod-Simple
+Provides:       perl-ExtUtils-ParseXS
+Provides:       perl-version
+Obsoletes:      perl-ExtUtils-ParseXS
+Obsoletes:      perl-version
+
+%description
+perl - Practical Extraction and Report Language
+
+Perl is optimized for scanning arbitrary text files, extracting
+information from those text files, and printing reports based on that
+information.  It is also good for many system management tasks. Perl is
+intended to be practical (easy to use, efficient, and complete) rather
+than beautiful (tiny, elegant, and minimal).
+
+Some of the modules available on CPAN can be found in the "perl"
+series.
+
+
+%package doc
+Summary:        Perl Documentation
+Group:          Platform Development/Perl
+Requires:       perl = %{version}
+Provides:       perl:%{_mandir}/man3/CORE.3pm.gz
+BuildArch:      noarch
+
+%description doc
+Perl man pages and pod files.
+
+%prep
+%setup -q -n perl-%{version}
+cp %{SOURCE1001} .
+cp -p %{S:3} .
+
+%build
+RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e "s/--param=ssp-buffer-size=4//g" )
+%if "%{asan}" == "1"
+export LD_PRELOAD+=" libasan.so "
+%endif
+export RPM_OPT_FLAGS
+cp -a lib savelib
+export LD_AS_NEEDED=0
+export BZIP2_LIB=%{_libdir}
+export BZIP2_INCLUDE=%{_includedir}
+export BUILD_BZIP2=0
+export ldflags="$ldflags -lpthread"
+options="-Doptimize='$RPM_OPT_FLAGS -Wall -pipe'"
+# always use glibc's setenv
+options="$options -Accflags='-DPERL_USE_SAFE_PUTENV'"
+options="$options -Dotherlibdirs=%{_libdir}/perl5/site_perl"
+sed -e 's|/lib/|/%{_lib}/|g' -i Configure
+sed -e 's| lib/| %{_lib}/|g' -i Configure
+chmod 755 ./configure.gnu
+./configure.gnu --prefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads  -Duseshrplib=\'true\' $options
+%__make %{?_smp_mflags}
+cp -p libperl.so savelibperl.so
+cp -p lib/Config.pm saveConfig.pm
+cp -p lib/Config_heavy.pl saveConfig_heavy.pl
+%__make clean > /dev/null
+%__make clobber
+rm -rf lib
+mv savelib lib
+./configure.gnu --prefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads  $options
+%__make %{?_smp_mflags}
+
+
+%install
+%make_install
+cp -a %{buildroot}%{_libdir}/perl5/site_perl %{buildroot}%{_libdir}/perl5/vendor_perl
+cpa=`echo %{buildroot}%{_libdir}/perl5/*/*/CORE | sed -e 's@/CORE$@@'`
+cp=`echo "$cpa" | sed -e 's@/[^/]*$@@'`
+vpa=`echo $cpa | sed -e 's@/perl5/@/perl5/vendor_perl/@'`
+vp=`echo "$vpa" | sed -e 's@/[^/]*$@@'`
+install -d $vp/auto
+install -d $vpa/auto
+install -m 555 savelibperl.so $cpa/CORE/libperl.so
+install -m 444 saveConfig.pm $cpa/Config.pm
+install -m 444 saveConfig_heavy.pl $cpa/Config_heavy.pl
+# install macros.perl file
+install -D -m 644 %{S:2} %{buildroot}%{_sysconfdir}/rpm/macros.perl
+pushd %{_includedir}
+(rpm -ql glibc-devel | fgrep '.h'
+    find %{_includedir}/asm/ -name \*.h
+    find %{_includedir}/asm-generic -name \*.h
+    find %{_includedir}/linux -name \*.h
+) | while read f; do
+    %{buildroot}%{_bindir}/perl -I$cp -I$cpa %{buildroot}%{_bindir}/h2ph -d $vpa ${f/\/usr\/include\//} || :
+done
+popd
+d="`gcc -print-file-name=include`"
+test -f "$d/stdarg.h" && (cd $d ; %{buildroot}%{_bindir}/perl -I$cp -I$cpa %{buildroot}%{_bindir}/h2ph -d $vpa stdarg.h stddef.h float.h)
+# remove broken pm - we don't have the module
+rm %{buildroot}%{_libdir}/perl5/*/Pod/Perldoc/ToTk.pm
+# we don't need this in here
+#rm %%{buildroot}%{_libdir}/perl5/*/*/CORE/libperl.a
+#touch %%{buildroot}%%{_mandir}/man3/perllocal.3pm
+#touch $cpa/perllocal.pod
+# test CVE-2007-5116
+%{buildroot}%{_bindir}/perl -e '$r=chr(128)."\\x{100}";/$r/'
+# test perl-regexp-refoverflow.diff
+%{buildroot}%{_bindir}/perl -e '/\6666666666/'
+cat << EOF > perl-base-filelist
+%{_libdir}/perl5/%{version}/B/Deparse.pm
+%{_libdir}/perl5/%{version}/Carp.pm
+%{_libdir}/perl5/%{version}/Carp/
+%{_libdir}/perl5/%{version}/Class/
+%{_libdir}/perl5/%{version}/Config/
+%{_libdir}/perl5/%{version}/Digest.pm
+%{_libdir}/perl5/%{version}/Digest/
+%{_libdir}/perl5/%{version}/Exporter.pm
+%{_libdir}/perl5/%{version}/Exporter/
+%{_libdir}/perl5/%{version}/File/
+%{_libdir}/perl5/%{version}/Getopt/
+%{_libdir}/perl5/%{version}/IPC/
+%{_libdir}/perl5/%{version}/Text/
+%{_libdir}/perl5/%{version}/Tie/Hash.pm
+%{_libdir}/perl5/%{version}/XSLoader.pm
+%{_libdir}/perl5/%{version}/warnings.pm
+%{_libdir}/perl5/%{version}/warnings/
+%{_libdir}/perl5/%{version}/AutoLoader.pm
+%{_libdir}/perl5/%{version}/FileHandle.pm
+%{_libdir}/perl5/%{version}/SelectSaver.pm
+%{_libdir}/perl5/%{version}/Symbol.pm
+%{_libdir}/perl5/%{version}/base.pm
+%{_libdir}/perl5/%{version}/bytes.pm
+%{_libdir}/perl5/%{version}/bytes_heavy.pl
+%{_libdir}/perl5/%{version}/constant.pm
+%{_libdir}/perl5/%{version}/fields.pm
+%{_libdir}/perl5/%{version}/feature.pm
+%{_libdir}/perl5/%{version}/integer.pm
+%{_libdir}/perl5/%{version}/locale.pm
+%{_libdir}/perl5/%{version}/overload.pm
+%{_libdir}/perl5/%{version}/overloading.pm
+%{_libdir}/perl5/%{version}/strict.pm
+%{_libdir}/perl5/%{version}/unicore/Heavy.pl
+%{_libdir}/perl5/%{version}/utf8.pm
+%{_libdir}/perl5/%{version}/utf8_heavy.pl
+%{_libdir}/perl5/%{version}/vars.pm
+%{_libdir}/perl5/%{version}/version.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/Data/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/Digest/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/File/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/List/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/Scalar/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/IO.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/IO/Dir.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/IO/File.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/IO/Handle.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/IO/Pipe.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/IO/Poll.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/IO/Seekable.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/IO/Select.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/IO/Socket.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/IO/Socket/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/B.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/Config.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/Config_heavy.pl
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/Cwd.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/DynaLoader.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/Errno.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/Fcntl.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/POSIX.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/Socket.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/attributes.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/auto/Data/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/auto/Digest/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/auto/Fcntl/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/auto/File/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/auto/IO/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/auto/List/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/auto/Cwd/
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/auto/Socket/
+#%{_libdir}/perl5/%{version}/*-linux-thread-multi*/auto/POSIX/POSIX.bs
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/auto/POSIX/POSIX.so
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/lib.pm
+%{_libdir}/perl5/%{version}/*-linux-thread-multi*/re.pm
+EOF
+
+%files -f perl-base-filelist
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%license README
+%dir %{_libdir}/perl5/%{version}/B
+%dir %{_libdir}/perl5/%{version}/*-linux-thread-multi*/auto/POSIX
+%config %{_sysconfdir}/rpm/macros.perl
+%{_libdir}/perl5/*
+%{_bindir}/*
+
+%files doc
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%doc README.macros
+%exclude %{_libdir}/perl5/*/pod/perldiag.pod
+%doc %{_libdir}/perl5/*/pod
+%doc %{_mandir}/man?/*
index 54d641d..6b6dcb1 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -10988,7 +10988,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
 
                 ret = reg2Lanode(pRExC_state, GOSUB, num, RExC_recurse_count);
                 if (!SIZE_ONLY) {
-                   if (num > (I32)RExC_rx->nparens) {
+                   if (num < 0 || num > (I32)RExC_rx->nparens) {
                        RExC_parse++;
                        vFAIL("Reference to nonexistent group");
                    }
@@ -12996,41 +12996,43 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
                     }
                 }
 
-                /* At this point RExC_parse points at a numeric escape like
-                 * \12 or \88 or something similar, which we should NOT treat
-                 * as an octal escape. It may or may not be a valid backref
-                 * escape. For instance \88888888 is unlikely to be a valid
-                 * backref. */
-                while (isDIGIT(*RExC_parse))
-                    RExC_parse++;
-                if (hasbrace) {
-                    if (*RExC_parse != '}')
-                        vFAIL("Unterminated \\g{...} pattern");
-                    RExC_parse++;
-                }
-                if (!SIZE_ONLY) {
-                    if (num > (I32)RExC_rx->nparens)
-                        vFAIL("Reference to nonexistent group");
-                }
-                RExC_sawback = 1;
-                ret = reganode(pRExC_state,
-                               ((! FOLD)
-                                 ? REF
-                                 : (ASCII_FOLD_RESTRICTED)
-                                   ? REFFA
-                                   : (AT_LEAST_UNI_SEMANTICS)
-                                     ? REFFU
-                                     : (LOC)
-                                       ? REFFL
-                                       : REFF),
-                                num);
-                *flagp |= HASWIDTH;
-
-                /* override incorrect value set in reganode MJD */
-                Set_Node_Offset(ret, parse_start);
-                Set_Node_Cur_Length(ret, parse_start-1);
-                skip_to_be_ignored_text(pRExC_state, &RExC_parse,
-                                        FALSE /* Don't force to /x */ );
+                /* at this point RExC_parse definitely points to a backref
+                 * number */
+               {
+#ifdef RE_TRACK_PATTERN_OFFSETS
+                   char * const parse_start = RExC_parse - 1; /* MJD */
+#endif
+                   while (isDIGIT(*RExC_parse))
+                       RExC_parse++;
+                    if (hasbrace) {
+                        if (*RExC_parse != '}')
+                            vFAIL("Unterminated \\g{...} pattern");
+                        RExC_parse++;
+                    }
+                   if (!SIZE_ONLY) {
+                       if (num < 0 || num > (I32)RExC_rx->nparens)
+                           vFAIL("Reference to nonexistent group");
+                   }
+                   RExC_sawback = 1;
+                   ret = reganode(pRExC_state,
+                                  ((! FOLD)
+                                    ? REF
+                                    : (ASCII_FOLD_RESTRICTED)
+                                      ? REFFA
+                                       : (AT_LEAST_UNI_SEMANTICS)
+                                         ? REFFU
+                                         : (LOC)
+                                           ? REFFL
+                                           : REFF),
+                                   num);
+                   *flagp |= HASWIDTH;
+
+                    /* override incorrect value set in reganode MJD */
+                    Set_Node_Offset(ret, parse_start+1);
+                    Set_Node_Cur_Length(ret, parse_start);
+                   RExC_parse--;
+                   nextchar(pRExC_state);
+               }
            }
            break;
        case '\0':
index 2fbffa0..3e73d0f 100644 (file)
@@ -50,7 +50,7 @@ my $max_chain = $ENV{PERL_TEST_NUMCONVERTS} || 2;
 
 # Bulk out if unsigned type is hopelessly wrong:
 my $max_uv1 = ~0;
-my $max_uv2 = sprintf "%u", $max_uv1 ** 6; # 6 is an arbitrary number here
+my $max_uv2 = sprintf "%lu", $max_uv1 ** 6; # 6 is an arbitrary number here
 my $big_iv = do {use integer; $max_uv1 * 16}; # 16 is an arbitrary number here
 my $max_uv_less3 = $max_uv1 - 3;
 
index 2a440cd..073022d 100644 (file)
@@ -1042,6 +1042,7 @@ sub _message_headers {
     $headers{'Cc'}         = $cc        if ($cc);
     $headers{'Message-Id'} = $messageid if ($messageid);
     $headers{'Reply-To'}   = $from      if ($from);
+    $headers{'X-Webfrontend'} = 'perlbug';
     $headers{'From'}       = $from      if ($from);
     if ($have_attachment) {
         $headers{'MIME-Version'} = '1.0';