NAME
bootstrap-perl - Bootstrap Perl inclusive CPAN from git
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.
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
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.)
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 a script is put inside each install
perl-gitversion
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.
AUTHOR
Steffen Schwigon, <ss5 at renormalist.net>
COPYRIGHT & LICENSE
Copyright 2011 Steffen Schwigon, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.