Changeset 163


Ignore:
Timestamp:
Sep 30, 2007, 11:57:47 AM (12 years ago)
Author:
bruno
Message:

Sets date in the VM to avoid build problem with configure
Improve the example script for VM

Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r162 r163  
    636636    print SCRIPT "cd ..\n";
    637637    print SCRIPT "export PBROOT=\`pwd\`\n";
     638    print SCRIPT "#Sync date\n";
     639    my $syncdate = strftime("%m%d%H%M", @date);
     640    print SCRIPT "sudo date $syncdate\n";
    638641    print SCRIPT "# Build\n";
    639642    my $p = "";
  • devel/pb/contrib/pbsetupqemu

    r162 r163  
    44# missing pb account on the QEMU VM, and adds it to sudo
    55#
    6 # Needs to use rrot account to connect to the VM
     6# Needs to use root account to connect to the VM
    77
    88# You need to specify here your local public SSH key used to access
     
    1919        mkdir /home
    2020    fi
    21     su - -c "useradd pb"
     21    useradd pb
    2222fi
    2323
     
    3737if [ -x /usr/bin/yum ]; then
    3838    yum clean all
    39     yum -y install neon newt-devel slang-devel autoconf automake libtool gcc rpm-build wget vim gcc-c++ docbook-utils-pdf ImageMagick man patch cdrecord mkisofs perl-AppConfig perl-DateManip
     39    # FC6
     40    #yum -y install neon newt-devel slang-devel autoconf automake libtool gcc rpm-build wget vim gcc-c++ docbook-utils-pdf ImageMagick man patch cdrecord mkisofs perl-AppConfig perl-DateManip
     41    # FC4
     42    yum -y install neon newt-devel slang-devel autoconf automake libtool gcc rpm-build wget gcc-c++ docbook-utils-pdf ImageMagick man patch cdrecord mkisofs perl-DateManip
     43    rm -rf AppConfig-*
     44    wget http://search.cpan.org/CPAN/authors/id/A/AB/ABW/AppConfig-1.66.tar.gz
     45    tar xvfz AppConfig-1.66.tar.gz
     46    cd AppConfig*
     47    perl Makefile.PL
     48    make
     49    make install
     50    cd ..
    4051elif [ -x /usr/sbin/urpmi ]; then
    4152    urpmi --auto-select neon newt-devel slang-devel glibc-static-devel autoconf automake libtool gcc rpm-build wget gcc-c++ docbook-utils-pdf ImageMagick man patch mindi mondo mkisofs cdrecord perl-AppConfig perl-DateManip
     
    4859fi
    4960
    50 cat > /tmp/pbpatch << EOF
    51 
    52 --- /usr/lib/perl5/vendor_perl/5.8.8/AppConfig/File.pm.orig 2007-08-09 17:44:26.000000000 +0200
    53 +++ /usr/lib/perl5/vendor_perl/5.8.8/AppConfig/File.pm  2007-08-09 18:04:46.000000000 +0200
    54 @@ -20,7 +20,7 @@
    55  
    56  require 5.005;
    57  
     61cat > /tmp/pbpatch << 'EOF'
     62--- File.pm     2007-09-29 14:55:28.000000000 +0100
     63+++ File.pm.new 2007-09-29 14:55:44.000000000 +0100
     64@@ -15,7 +15,7 @@
     65 package AppConfig::File;
     66 use strict;
     67 use warnings;
    5868-use AppConfig;
    5969+use AppConfig qw(:argcount);
    6070 use AppConfig::State;
    61  use File::HomeDir;
    62  
    63 @@ -227,6 +227,11 @@
    64  
    65         my $nargs = $state->_argcount($variable);
    66  
    67 +       # Fix a bug if the variable is a hash - 1 has been created as a key
    68 +       if (\$nargs eq AppConfig::ARGCOUNT_HASH) {
    69 +           delete \$state->{ VARIABLE }->{ \$variable }{1};
    70 +       }
     71 our $VERSION = '1.65';
     72
     73@@ -208,6 +208,11 @@
     74
     75                 my $nargs = $state->_argcount($variable);
     76
     77+                # Fix a bug if the variable is a hash - 1 has been created as a key
     78+                if ($nargs eq AppConfig::ARGCOUNT_HASH) {
     79+                    delete $state->{ VARIABLE }->{ $variable }{1};
     80+                }
    7181+
    72         # variables prefixed '-' are reset to their default values
    73         if ($flag eq '-') {
    74             $state->_default($variable);
     82                 # variables prefixed '-' are reset to their default values
     83                 if ($flag eq '-') {
     84                     $state->_default($variable);
     85
    7586EOF
    7687
    7788# Patch AppConfig
    78 grep -q 'Fix a bug if the variable is a hash' /usr/lib/perl5/vendor_perl/*/AppConfig/File.pm
     89file=`find /usr/lib/perl5 -type f -name File.pm | grep AppConfig/File.pm`
     90grep -q 'Fix a bug if the variable is a hash' $file
    7991if [ $? -ne 0 ]; then
    80     (cd /usr/lib/perl5/vendor_perl/*/AppConfig ; patch -s -p0 < /tmp/pbpatch)
     92    (cd `dirname $file` ; patch -s -p0 < /tmp/pbpatch)
    8193    if [ $? -eq 0 ]; then
    8294        rm -f /tmp/pbpatch
     
    91103make
    92104make install
     105cd ..
Note: See TracChangeset for help on using the changeset viewer.