App-Bootstrap-Perl

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

          --perlformance
            # shortcut for Perl::Formance
          --perlformance-report
            # +report results
          --blead
            # for easier micro-tracking
          --run
            # run scripts at end
          --runargs=...
            # args to run scripts
          --installprefs=debian
            # apt-get install known Debian deps

0.02      2012-01-06
        - distro maintenance

0.01      2011-12-05
        - initial public version

bin/bootstrap-perl  view on Meta::CPAN

                     'giturl|g=s'   => \$giturl,
                    );

if ($help) {
        exec("perldoc", "bootstrap-perl") or do {
                print $USER "\nPlease see 'perldoc bootstrap-perl' for help.\n";
                exit 0;
        }
}

my $DISTROPREFSREPO     = "git://github.com/renormalist/cpanpm-distroprefs.git";
my $DISTROPREFSSRCBASE  = "$build_path";
my $DISTROPREFSSRC1     = "$DISTROPREFSSRCBASE/cpanpm-distroprefs/cpanpm/distroprefs";
my $DISTROPREFSSRC2     = "$DISTROPREFSSRCBASE/cpanpm-distroprefs/renormalist/distroprefs";
my $DISTROPREFSDIR      = $prefixbase."/cpan/prefs";
my $SOURCESDIR          = $prefixbase."/cpan/sources";
my $CPANBUILDDIR        = $prefixbase."/cpan/build";

# defaults
my @default_runscripts = ();
my @default_confargs   = ();
my @default_runargs    = ();
my @default_modules    = ();
my @default_mirrors    = (qw( http://search.cpan.org/CPAN/ ));

bin/bootstrap-perl  view on Meta::CPAN


        if (system "$perl -M$module -e1 2> /dev/null" || $reinstall) { # already exists or reinstall
            print_and_system qq{$cpan -j $cfg $_f -i $module};
        }
}

if ($cpan)
{
        print $USER "*** PREPARE cpan\n";

        # distroprefs: get all from git
        print_and_system "mkdir -p $DISTROPREFSSRCBASE";
        print_and_system "cd $DISTROPREFSSRCBASE && git clone $DISTROPREFSREPO" unless -d "$DISTROPREFSSRCBASE/cpanpm-distroprefs";
        print_and_system "cd $DISTROPREFSSRCBASE/cpanpm-distroprefs && git pull";
        print_and_system "cd $DISTROPREFSSRCBASE/cpanpm-distroprefs && git submodule update --init --recursive";
        print_and_system "cd $DISTROPREFSSRCBASE/cpanpm-distroprefs && git pull";
        # distroprefs: merge our flavour
        print_and_system qq!mkdir -p $DISTROPREFSDIR!;
        print_and_system qq!rsync -r $DISTROPREFSSRC1/ $DISTROPREFSDIR/!;
        print_and_system qq!rsync -r $DISTROPREFSSRC2/ $DISTROPREFSDIR/!;

        # Cleanup build dir
        print_and_system qq!rm -fr $CPANBUILDDIR!;

        # Configure CPAN initially
        if ($forcecpancfg or ! -e $CFG) {
                print $USER "*** CONFIGURE cpan\n";

bin/bootstrap-perl  view on Meta::CPAN

executable C<perl> already exists:

  $ bootstrap-perl --forcebuildperl
  $ bootstrap-perl --noforcebuildperl

Default is B<off>.

=head3 bootstrap CPAN

You can specify whether to bootstrap a full CPAN environment with
distroprefs and dependencies:

  $ bootstrap-perl --cpan
  $ bootstrap-perl --nocpan

Default is B<on>.

=head3 (re-)configure CPAN

You can specify whether to (re-)write a CPAN config
(C<CPAN/Config.pm>, C<CPAN/MyConfig.pm>) even when it already exists:

bin/bootstrap-perl  view on Meta::CPAN


  /home/ss5/.bootstrapperl/zomtec/perl-5.10-thread-64bit-taint-v5.10.0
  /home/ss5/.bootstrapperl/zomtec/perl-5.15-thread-64bit-taint-v5.15.5-258-ge7d0a3f

This naming schema consist of the major version, basic configuration
and I<git-describe>.

=head1 ABOUT

The script B<bootstrap-perl> bootstraps Perl installations with
complete CPAN environment, inclusive distroprefs, from git.

It was originally developed to be used by
L<Benchmark::Perl::Formance|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.

=head1 AUTHOR

bin/bootstrap-perl  view on Meta::CPAN

  'mbuild_arg' => q[],
  'mbuild_install_arg' => q[],
  'mbuild_install_build_command' => q[./Build],
  'mbuildpl_arg' => q[],
  'ncftp' => q[],
  'ncftpget' => q[],
  'no_proxy' => q[],
  'pager' => q[/usr/bin/less],
  'perl5lib_verbosity' => q[v],
  'prefer_installer' => q[MB],
  'prefs_dir' => q[__DISTROPREFSDIR__],
  'prerequisites_policy' => q[follow],
  'scan_cache' => q[atstart],
  'shell' => q[/bin/bash],
  'show_unparsable_versions' => q[0],
  'show_upload_date' => q[0],
  'show_zero_versions' => q[0],
  'tar' => q[/bin/tar],
  'tar_verbosity' => q[v],
  'term_is_latin' => q[0],
  'term_ornaments' => q[1],

lib/App/Bootstrap/Perl.pm  view on Meta::CPAN


=encoding UTF-8

=head1 NAME

App::Bootstrap::Perl - Bootstrap Perl inclusive CPAN from git

=head1 ABOUT

L<bootstrap-perl|bootstrap-perl> can compile and setup a complete Perl
environment from git, inclusive initial CPAN setup with distroprefs to
ensure completely unattended installation.

=head1 AUTHOR

Steffen Schwigon <ss5@renormalist.net>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2021 by Steffen Schwigon.

xt/commands.t  view on Meta::CPAN

< /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/pod2text5.21.11

if [ ! -e /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/perl     ] ; then ln -sf /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/perl5.21.11     /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/perl     ; fi

if [ ! -e /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/cpan     ] ; then ln -sf /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/cpan5.21.11     /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/cpan     ; fi

if [ ! -e /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/perldoc  ] ; then ln -sf /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/perldoc5.21.11  /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/perldoc  ; fi

if [ ! -e /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/pod2text ] ; then ln -sf /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/pod2text5.21.11 /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/pod2text ; fi

# --- prefs

mkdir -p /tmp/bootstrap-perl-build
cd /tmp/bootstrap-perl-build && git clone git://github.com/renormalist/cpanpm-distroprefs.git
cd /tmp/bootstrap-perl-build/cpanpm-distroprefs && git pull
cd /tmp/bootstrap-perl-build/cpanpm-distroprefs && git submodule update --init --recursive
cd /tmp/bootstrap-perl-build/cpanpm-distroprefs && git pull
mkdir -p /opt/cpan/prefs
rsync -r /tmp/bootstrap-perl-build/cpanpm-distroprefs/cpanpm/distroprefs/ /opt/cpan/prefs/
rsync -r /tmp/bootstrap-perl-build/cpanpm-distroprefs/renormalist/distroprefs/ /opt/cpan/prefs/
rm -fr /opt/cpan/build

# --- cpan config

/opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/bin/perldoc5.21.11 -l CPAN | sed -e "s/CPAN.pm/CPAN\/Config.pm/"
< /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/lib/5.21.11/CPAN/Config.pm

open > /opt/perl-5.21-thread-no64bit-v5.21.10-20-gada289e/lib/5.21.11/CPAN/Config.pm

# --- cpan



( run in 0.879 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )