Changeset 1597 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder


Ignore:
Timestamp:
May 26, 2012, 2:13:12 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • Adds option pbshowsudo (false by default) to check whether we display the detail of sudo commands (to match security requiremetns) or not (to have a nicer output)
  • Fix a template generation error in Env.pm for deb rules file (line was split)
  • In VE.pm fix modes of the chroot after the snapshot phase detection to avoid error which make the code die
  • In pb create the RPM build dirs before entering in the parallel loop as sometimes 2 identical were created simultaneously, leading to an error leading to a die
  • In pb revert the code added by Eric to check deb content creation as it was failing in my environement (naming issues). Could be added after 0.12.1 is out as an additional check, but anyway as the files are copied after, it's not that important.
  • Use full path of chown in sudo for pb
  • Make the test account a variable in pbtest
  • Start to add test case for a VM in pbtest
  • This patch makes pb build back in a debian 6 VE.
Location:
devel/pb-modules/lib/ProjectBuilder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Base.pm

    r1595 r1597  
    157157
    158158# If sudo used, then be more verbose
    159 pb_log(0,"Executing $cmd\n") if (($pbdebug < 1) && ($cmd =~ /^\s*\S*sudo/o));
     159pb_log(0,"Executing $cmd\n") if (($pbdebug < 1) && ($cmd =~ /^\s*\S*sudo/o) && (defined $Global::pb_show_sudo) && ($Global::pb_show_sudo =~ /true/oi));
    160160
    161161system("$cmd $redir");
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r1596 r1597  
    450450        pb_log(1, "INFO: missing dependency $p\n");
    451451    } elsif ($pbos->{'type'} eq "deb") {
    452         my $res = pb_system("dpkg -L $p","","mayfail");
     452        my $res = pb_system("dpkg -L $p","Looking for $p","mayfail");
    453453        next if ($res eq 0);
    454454        open(CMD,"dpkg -l $p |") or die "Unable to run dpkg -l $p: $!";
  • devel/pb-modules/lib/ProjectBuilder/Env.pm

    r1584 r1597  
    983983    INSTALL_PROGRAM += -s
    984984endif
     985
    985986config.status: configure
    986987    dh_testdir
    987988
    988989    # Configure the package.
    989     CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr
    990  --mandir=\$${prefix}/share/man
     990    CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man
    991991
    992992# Build both architecture dependent and independent
  • devel/pb-modules/lib/ProjectBuilder/VE.pm

    r1596 r1597  
    248248        }
    249249    }
    250    
    251     # Fix modes to allow access to the VE for pb user
    252     my $command = pb_check_req("chmod",0);
    253     pb_system("$sudocmd $command 755 $root/$pbos->{'name'} $root/$pbos->{'name'}/$pbos->{'version'} $root/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}","Fixing permissions");
    254250
    255251    # Test if an existing snapshot exists and use it if appropriate
     
    265261            pb_system("$sudocmd $cmd1 -rf $root/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'} ; $sudocmd $cmd2 -p $root/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'} ; $sudocmd $cmd3 xz  -C $root/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'} -f $root/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}.tar.gz","Extracting snapshot of $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}.tar.gz under $root/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}");
    266262    }
     263   
     264    # Fix modes to allow access to the VE for pb user
     265    my $command = pb_check_req("chmod",0);
     266    pb_system("$sudocmd $command 755 $root/$pbos->{'name'} $root/$pbos->{'name'}/$pbos->{'version'} $root/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}","Fixing permissions");
     267
    267268    # Nothing more to do for VE. No real launch
    268269} else {
Note: See TracChangeset for help on using the changeset viewer.