NAME
bootstrap-perl - Bootstrap Perl inclusive CPAN from git
SYNOPSIS
Install a threaded 64bit Perl using current "blead" from git with CPAN config into a path like /opt/perl-5.15-thread-64bit-v5.15.5-258-ge7d0a3f
:
$ bootstrap-perl
Specify git revisions
latest "blead"
$ bootstrap-perl --version blead # same as default
tag
# note the different tag forms before and after Perl 5.10
$ bootstrap-perl --version perl-5.8.7
$ bootstrap-perl --version v5.14.1
branch name
$ bootstrap-perl --version remotes/origin/smoke-me/cpan
$ bootstrap-perl --version remotes/origin/zefram/pad_api
$ bootstrap-perl --version remotes/origin/maint-5.12
$ bootstrap-perl --version remotes/origin/maint-5.12^
$ bootstrap-perl --version remotes/origin/maint-5.12~3
by commit id
$ bootstrap-perl --version c14f2f9db08de3f50fe2ff7438429153d6ceb9a5
$ bootstrap-perl --version c14f2f9db08de3f50fe2ff7438429153d6ceb9a5^
Installation options
install directory
Install into other install directory than the unified naming schema (see below for more on this schema):
$ bootstrap-perl --prefix <PREFIX>
Use the unified naming schema but not under /opt
:
$ bootstrap-perl --prefixbase /foo/bar
install build dependencies
Provide the distro for which to install known build dependencies, like gcc, git, make, etc.:
$ bootstrap-perl --installdeps=debian
Currently there is only one: debian
. Simply send me a patch for your preferred distro, it's easy.
parallel build
Use this many parallel jobs to build:
$ bootstrap-perl --jobs <n>
$ bootstrap-perl -j <n>
Default is to use core count + 1.
test
Run the perl test suite:
$ bootstrap-perl --test
$ bootstrap-perl -t
Default is not to run the tests.
use threads
Build a threaded Perl (-Dusethreads
):
$ bootstrap-perl --usethreads
which is already the default. To build non-threaded Perl use:
$ bootstrap-perl --nousethreads
use 64bit
Build a 64bit enabled Perl (-Duse64bitall
):
$ bootstrap-perl --use64bit
which is already the default. To build Perl without 64bit use:
$ bootstrap-perl --nouse64bit
version numbers vs. blead
By default the Perl version number is derived from git-describe and kept for later reference (e.g., for codespeed exe name). However, if you specify
$ bootstrap-perl --blead
then the version used in paths or codespeed executables is using "blead" in order to generate a make it belong to to a common development line besides the yearly segmented graphs.
It is only possible to use --blead
with development versions in order to create consistent results from only the blead branch.
configure CPAN and modules
Configure CPAN to use these mirrors:
$ bootstrap-perl --mirror file:///home/ss5/MINICPAN/
$ bootstrap-perl -m file:///home/ss5/MINICPAN/ -m ftp://ftp.rub.de/pub/CPAN/
$ bootstrap-perl -m file:///home/ss5/MINICPAN/,ftp://ftp.rub.de/pub/CPAN/
(Option can be repeated and allow comma separated lists.)
Install these modules from CPAN:
$ bootstrap-perl --module YAML::Syck
$ bootstrap-perl -M YAML::Syck -M Digest::SHA1 -M IO::Tty -M LWP
$ bootstrap-perl -M YAML::Syck,Digest::SHA1 -M IO::Tty,LWP
(Option can be repeated and allow comma separated lists.)
run scripts
Run these scripts relative to built <PREFIX>/bin/:
$ bootstrap-perl --run tapper-testsuite-benchmark-perlformance
$ bootstrap-perl --run tapper-testsuite-benchmark-perlformance --runargs="--plugins=ALL"
$ bootstrap-perl -r tapper-testsuite-benchmark-perlformance -r primes.pl
(Option can be repeated and allow comma separated lists.)
run Perl::Formance benchmarks
To do everything in one go needed for running Benchmark::Perl::Formance do:
$ bootstrap-perl --perlformance
This is a shortcut for -M Digest::SHA1,DB_File,Mail::DKIM,IP::Country,Net::Ident,IO::Socket::INET6,Encode::Detect,Benchmark::Perl::Formance,Bundle::PerlFormance,Tapper::TestSuite::Benchmark::Perl::Formance
-m http://perlformance.net/CPAN/
--run benchmark-perlformance
--runargs=--plugins=ALL
.
Unified installation prefix schema
It uses a unified naming schema for it's installation PREFIX:
/opt/perl-5.<VERSION>-<(no)?thread>-<(no)?64bit>-<git-describe>
which leads to paths like this:
/opt/perl-5.10-thread-64bit-v5.10.0
/opt/perl-5.15-thread-64bit-v5.15.5-258-ge7d0a3f
This naming schema consist of the major version, basic configuration and git-describe.
Meta info utilities
To easily provide the raw git-describe two scripts are is put inside each install
perl-gitdescribe
perl-gitchangeset
which prints the git-describe of that installation.
Another script
perl-codespeed-executable
is put inside each install which prints a so called "executable name" for this built perl used on a codespeed instance like http://speed.perlformance.net. Although this is unlikely to be useful for others it is always created.
These two utility scripts could be derived from the install prefix but also work when you provided your own prefix.
ABOUT
The script bootstrap-perl bootstraps Perl installations with complete CPAN environment, inclusive distroprefs, from git.
It was originally developed to be used by Benchmark::Perl::Formance and now lives on its own.
It should work for Perl versions from 5.8.6 to blead. Occasionally it cherry-picks a very few patches to fix some known build issues, like for 5.8.x.
AUTHOR
Steffen Schwigon <ss5@renormalist.net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Steffen Schwigon.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.