App-perlall

 view release on metacpan or  search on metacpan

.perlall  view on Meta::CPAN

# PERLALL_BUILDROOT=/usr/src/perl
# non-sudo:
# PERLALL_PREFIX=~/perl5/
# PERLALL_BUILDROOT=~/perl5/src
# PERLALL_BINDIR=~/perl5/bin
# perlbrew alike:
# PERLALL_PREFIX=~/perl5/perlbrew
# PERLALL_BUILDROOT=~/perl5/perlbrew/build
# PERLALL_BINDIR=~/perl5/perlbrew/bin

# use -thr suffix, if not use -nt for "non threaded"
#usethrsuffix=0

# 1h default. 0 for no timeout
perlall_timeout=3600

# currently used perl (set by perlall)
alias p=perl5.15.8d-nt

# for init
#cpan=cpan

Changes  view on Meta::CPAN

        * add -ddflow, -sstack, -cps, -cpi suffix support for clang
        * remove support for old -faddress-sanitizer syntax

0.46    2014-08-09
	* fix -*san sanitizer cmdline quoting, add -isan support

0.45    2014-07-25
        * use nice _gitoneliner via git describe --long --tags --dirty --always

0.44    2014-01-11
        * build: fix -Uuseithreads with -nt suffix. it compiled to a threaded version since 0.42

0.43    2013-12-09
        * build: cp -rf usr/local/lib. libs are now installed readonly

0.42    2013-12-06
        * build: -m vs -mempool. do not build multi with 5.12.5d-mempool -Accflags=-DPERL_TRACK_MEMPOOL

0.41    2013-12-03
        * build: Collapse -thread-multi to -thread when only ithreads are available

0.40    2013-11-18
        * Devel::PatchPerl::Plugin::General: CPAN #88936 fixed with 5.19.6

0.39    2013-10-23
        * added new Devel::PatchPerl::Plugin::General for yet unpatched
          CPAN #88936 Compress-Raw-Zlib -g3: final link failed: Memory exhausted
          needed for debugging builds
        * Asan: fixed _patch_hsplit_rehash
        * fix typo in t/release-pod-syntax.t

Changes  view on Meta::CPAN

	* add -Wno-unused-value to clang ccflags
	* add -Accflags=-faddress-sanitizer support
	  ensure ldflags and lddflags -faddress-sanitizer on ccflags=-faddress-sanitizer
	* improve handling of mult. -A in /usr/local/bin/perl -V:config_args
	* .perlall: implemented init-modules: \ handling and `` expansion

0.08    2012-02-23 rurban
	* fix $bindir/bin/perl -D default for new builds
	* now maketest -v does TEST_VERBOSE=1
	* fix build sudo install
	* fix build -m: no ithreads
	* stabilize build from template config_args
	* testvm: skip MANIFEST ending whitespace and comments
	* uninstall: multiple versions. e.g. perlall=5.*-m perlall uninstall

0.07    2012-02-07 rurban
	* fixed wrong sudo requirement for build
	* fixed syntax error in .perlall ppm()
	* fixed build --install dirs
	* testvm: fixed sideeffect in $remotecmd. only maketest came through

0.06	2012-02-06 rurban
	added cygwin and partial win32 support, win32 build not yet
	* do not overwrite old logfiles, backup numbered
	* build: use config vars from .perlall for building new perls: prefix, bindir
	* build: check for -thread in archname, wrong hints overrides
	* build: install static_ext which is broken in perl
	* build: add DLLNAME fix on cygwin
	* build: add LLIBPERL fix on cygwin (It was not me, who did this. I fixed it in 5.10)
	* build: fix post-configure on cygwin, -i print missing
	* build: patch installperl for custom perldll on cygwin
	* build --install: support PERLALL_BINDIR
	* fixed printing do and make results even with -q
	* help with quoting issues on win32, convert ' to "
	* INSTALL: added INSTALL instructions for root, sudo and non-sudo
	* .perlall: add perlall_timeout and more aliases

README  view on Meta::CPAN

    perlall="5.14*" perlall makeinstall
    perlall cpan My::Module
    perlall cpanm More::Modules

    perlall maketest "5.*.d*" # test with all debugging

    perlall initvm -v --all
    perlall testvm centos4 centos5 solaris10
    perlall testvm --all -c=list # see testvm in .perlall

Naming scheme: d DEBUGGING, -nt non-threaded, -m multi, @ git id

Configuration in source-able shell script ~/.perlall

You might want to link perlall to a valid command with "-command" appended
  perlall-make perlall-do perlall-cpan perlall-maketest...

See the presentation at https://docs.google.com/present/view?id=dcqmmdbh_4dmsxdqgx

I always disliked perlbrew. This uses perl installations as intended
by standard Configure.

lib/Devel/PatchPerl/Plugin/Asan.pm  view on Meta::CPAN

Note that F<buildperl.pl> from L<Devel::PPPerl> and L<Devel::PatchPerl> do
not provide such security patches, only configure and make patches.

Most fixes have very low security impact. No known exploits do exist.

You need to run C<perlall build --allpatches> or C<perlall build --patches=Asan>
to apply these.

=head1 PATCHES

The list is complete for non-threaded perls. 
For threaded perls some more patches need to be added.

    5.8.2-5.16.2: CVE-2013-1667 prevent hsplit DOS attacks
    5.10-5.15.9:  RT#111586 sdbm.c off-by-one access to global .dir
    5.12-5.16.0:  RT#72700 List::Util boot Fix off-by-two on string literal length
    5.15.4-9, 5.17.0-6: RT#115702 overlapping memcpy in to_utf8_case
    5.6-5.16.0:   RT#111594 Socket::unpack_sockaddr_un heap-buffer-overflow
    5.8-5.14.3:   RT#115992 PL_eval_start use-after-free
    5.10-5.14.3:  RT#115994 S_join_exact global-buffer-overflow
    5.17.7-8:     RT#82119 Socket::inet_ntop heap-buffer-overflow
    5.14.0-3:     RT#91678 S_anonymise_cv_maybe UTF8 cleanup

lib/Devel/PatchPerl/Plugin/Compiler.pm  view on Meta::CPAN

require various patches for various perl versions.

Some patches are mandatory for Windows or other strictly linked platforms (AIX), 
some are recommended to produce smaller and faster code.

You need to run C<perlall build --allpatches> or C<perlall build --patches=Compiler>
to apply these.

=head1 PATCHES

This list is complete for all perl versions 5.6 - 5.22.0, for all three threaded,
non-threaded and multiplicity variants.

    5.13.7-now:  RT#81332 revert 744aaba0 bloats the B compilers
    5.10-5.15.1: 8375c93e Export store_cop_label for the perl compiler
    5.15.2-3:    4497a11a Export DynaLoader symbols from libperl again
    5.22-        5.22 newPROG broke ByteLoader

=head2 Devel::PatchPerl::Plugin::Compiler::patchperl($class, {version,source,patchexe})

Apply patches in Devel::PatchPerl::Plugin::Compiler depending on the 
perl version. See L<Devel::PatchPerl::Plugin>

lib/Devel/PatchPerl/Plugin/Compiler.pm  view on Meta::CPAN

-    # the combination of having the constant stay a Proxy Constant Subroutine
-    # and its value being inlined saves a little over .5K
-
-    require XSLoader;
-    XSLoader::load();
-}
+$B::VERSION = '1.34_01';
+@B::EXPORT_OK = ();
 
 push @B::EXPORT_OK, (qw(minus_c ppname save_BEGINs
 			class peekop cast_I32 cstring cchar hash threadsv_names
@@ -38,6 +28,9 @@
 			@specialsv_name
 		      ), $] > 5.009 && 'unitcheck_av');
 
+sub OPf_KIDS ();
+use strict;
+
 @B::SV::ISA = 'B::OBJECT';
 @B::NULL::ISA = 'B::SV';
 @B::PV::ISA = 'B::SV';

lib/Devel/PatchPerl/Plugin/Compiler.pm  view on Meta::CPAN

-    # the combination of having the constant stay a Proxy Constant Subroutine
-    # and its value being inlined saves a little over .5K
-
-    require XSLoader;
-    XSLoader::load();
-}
+$B::VERSION = '1.41_01';
+@B::EXPORT_OK = ();
 
 push @B::EXPORT_OK, (qw(minus_c ppname save_BEGINs
 			class peekop cast_I32 cstring cchar hash threadsv_names
@@ -37,6 +27,9 @@
 			defstash curstash warnhook diehook inc_gv @optype
 			@specialsv_name unitcheck_av));
 
+sub OPf_KIDS ();
+use strict;
+
 @B::SV::ISA = 'B::OBJECT';
 @B::NULL::ISA = 'B::SV';
 @B::PV::ISA = 'B::SV';

perlall.txt  view on Meta::CPAN


Design Goals

Build, maintain and test with a lot of perls, on a lot of machines.

Your private cpantesters framework.




Standardize feature names: DEBUGGING and threads.




Single file    - scp to all remote vm's. Only 4 external modules - self-installer independent on CPAN.





script/perlall  view on Meta::CPAN

The currently used perl together with more options is stored as alias
C<p> in F<~/.perlall>, which can be sourced by your F<.profile>.

    alias p=perl5.15.4d-nt

Build and init perls:

Version numbers look like C<5.xx.x> and the perl C<suffix> can be any of:

    C<d>    DEBUGGING
    C<-nt>  non-threaded, or
    C<-m>   multi (non-threaded)
    C<@xxxxxx> git ids / branch names

You want to switch to use the "thr" suffix, then the default
is non-threaded. This behaviour is controlled via the config setting
C<usethrsuffix=1>. But be consistent to interpret the logfiles.

For older perls special patches are applied to successfully build
them. C<archname> and the archlibs are extended by C<-debug> and
special git suffices. The installed perl binary and on windows
the F<perl.dll> ditto.

Platforms

I use and support perlall on cygwin, linux (debian+centos),

script/perlall  view on Meta::CPAN


Build and install the given version of perl.

The optional 2nd argument C<from> can be a git tag/commit/branch id,
e.g. a smoke-me branch, or a file or url with the perl-*.tar.gz.
The branchname or commit-id is added to the archname and dll suffix, such as
C<@sproututf8> for C<sprout/utf8>, the binary name is taken from the
first argument. All unreleased git versions, like C<blead> or C<smoke-me>
branches get a C<@gitid> suffix. C<smoke-me/> is stripped from the
suffix. The special version "blead" denotes the latest version.
E.g. C<perlall build blead-nt> builds latest non-threaded.

If the checkout from a bit branch is not a release, the suffix will be
marked with C<@> and the sources are copied to the
builddir.

More special perl suffix rules:

  d     -DDEBUGGING
  -nt   non-threaded
  -m    multiplicity
  -clang -Dcc=clang
  -asan  clang -fsanitize=address
  -tsan  clang -fsanitize=thread
  -msan  clang -fsanitize=memory
  -ubsan clang -fsanitize=undefined
  -isan  clang -fsanitize=integer
  -dflow clang -fsanitize=dataflow
  -sstack clang -fsanitize=safestack
  -cps   clang-cps -fcps
  -cpi   clang-cps -fcpi
  -cow  -DPERL_NEW_COPY_ON_WRITE
  -mad  -Dmad

script/perlall  view on Meta::CPAN

  # since when was make test parallel safe?
  my @j = ("-j".$c->options->{j}) if $c->options->{j} and !$c->_older( $ps, "5.10.0");
  my ($testerr, $archname);
  my $is_cperl = $from =~ /^cperl/;

  my $dryrun = $c->options->{dryrun};
  my $srcdir = $is_cperl ? $c->config->{'cdcperl'} : $c->config->{'perl-git'};
  my ($suffix) = $p =~ /5\.\d\d?\.\d\d?(.+)$/;
  my $debug = substr($suffix,0,1) eq 'd';
  my $multi = $suffix =~ /^d?-m[^a-z]?/;
  my $ithreads = $suffix !~ /^d?-nt[^a-z]?/;
  my ($archsuffix) = $suffix =~ /d?(?:-nt|-m[^a-z]?|thr)(.+)$/;
  my ($asan, $cc);
  if ($suffix =~ /-mad/) {
    push @{$c->options->{D}}, "mad=y";
  }
  if ($suffix =~ /-cow/) {
    push @{$c->options->{A}}, "ccflags=-DPERL_NEW_COPY_ON_WRITE";
  }
  if ($suffix =~ /-(clang|asan|tsan|msan|ubsan|isan|dflow|sstack|cps|cpi)/) {
    $cc = 'clang';

script/perlall  view on Meta::CPAN

      push @{$c->options->{A}}, "ccflags=$asan";
    }
    if ($suffix =~ /-(cps|cpi)/) { # only with a levee clang yet
      my $san = $1;
      push @{$c->options->{D}}, "cc=clang-cps", "ld=clang-cps";
      push @{$c->options->{A}}, "ccflags='-f$san'",
                                "ldflags='-f$san'",
                                "lddlflags='-f$san'";
    }
    if ($suffix =~ /-(tsan|ubsan|msan|isan|dflow)/) {
      my %sanmap = (tsan => 'thread',
                    ubsan => 'undefined',
                    msan => 'memory',
                    isan => 'integer',
                    dflow => 'dataflow',
                    sstack => 'safestack',
                    # cps  => 'cps',
                    # cpi  => 'cpi'
      );
      my $san = $sanmap{$1};
      push @{$c->options->{A}}, "ccflags='-fsanitize=$san -fPIE'",
                                "ldflags='-fsanitize=$san -fpie'",
                                "lddlflags='-shared -fsanitize=$san -fpie'";
    }
  }
  $ithreads = undef if $multi;
  my $bindir = $c->config->{PERLALL_BINDIR};

  # XXX assert $p = $ps . $suffix;
  if ($c->options->{install}) {
    $c->stash->{logprefix} =~ s/^log.build-/log.build-install-/;
  }
  $c->stash->{log} = "$root/" . $c->stash->{logprefix} . $p;
  if ($c->stash->{log_fh}) {
    close $c->stash->{log_fh};
    undef $c->stash->{log_fh};

script/perlall  view on Meta::CPAN


  # prepare configure options, dependent on options and $p
  my @conf = ("sh","$srcdir/Configure","-de","-Dusedevel",
	      "-Uversiononly",
	      "-Dinstallman1dir=none","-Dinstallman3dir=none",
	      "-Dinstallsiteman1dir=none","-Dinstallsiteman3dir=none");
  # we cannot force archname, because we don't know the resulting name yet
  # we fix that post-configure
  my ($libperl);
  if ($c->config->{usethrsuffix} and !$multi) {
    $ithreads = $suffix =~ /^d?thr/; # perl5.14.2dthr
  }
  push @conf, "-Dmksymlinks" if $srcdir ne ".";
  push @conf, "-DEBUGGING" if $debug;
  push @conf, "-Doptimize='-g3'"
    if $debug and $Config{gccversion} and !grep(/^optimize=/, @{$c->options->{D}});
  push @conf, "-Dusemultiplicity" if $multi;
  if ($^O eq 'cygwin') { # fixed with 5.15.8 [perl #109968]
    push @conf, ($ithreads ? "-D" :"-U") . "usethreads";
  } else {
    push @conf, ($ithreads ? "-D" :"-U") . "useithreads";
  }
  push @conf, "-Uuseshrplib" # darwin cannot gdb step into shared libs, only lldb
    if $^O eq 'darwin' and $debug;
  push @conf, "-D'".$_."'" for @{$c->options->{D}};
  push @conf, "-A'".$_."'" for @{$c->options->{A}};
  push @conf, "-U'".$_."'" for @{$c->options->{U}};
  push @conf, "-Dprefix='$prefix'" if $prefix ne '/usr/local';
  # special *perl<xxx>.dll if non-default
  if ($^O =~ /cygwin|msys/ and $suffix) {
    if ($^O eq 'cygwin') {

script/perlall  view on Meta::CPAN

  my $new = $archname;
  for my $d (@{$c->options->{D}}) {
    if ($d =~ /^archname/) {
      $new = $d;
      $new =~ s/^archname=//;
      $new =~ s/'//g;
    }
  }
  if (($new ne $archname) or $archsuffix or $debug) {
    if ($new eq $archname) {
      if ($archname =~ /-thread-multi/ and !$c->_older($ps,"5.10.0")) {
        $new =~ s/-thread-multi/-thread/;
      }
      $new .= "-debug" if $debug and $archname !~ /-debug/;
      $new .= $archsuffix if $archsuffix and $archname !~ /$archsuffix$/;
      if (!$ithreads and $new =~ /-thread/) {
	$new =~ s/-thread//;
      } elsif ($ithreads and $new !~ /-thread/) {
	$new .= "-thread";
      }
    }
    $c->debug("post-configure archname fixes: $archname => $new");
    $c->_fail("archname not detected in config.sh") unless $archname;
    # This was very fragile: e.g. archname=darwin or mach
    # FIXME libpth was changed to /usr/lib/x86_64-linux-debug-gnu
    if ($archname and $archname ne $new) { # Time to make this stable
      $new =~ s/([\$\%\@])/\\$1/g;
      # which keys exactly? only those keys.
      # maybe redo the whole Configure step again



( run in 0.649 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )