Changeset 1537 in ProjectBuilder for devel/pb/bin
- Timestamp:
- May 13, 2012, 11:55:55 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r1511 r1537 40 40 41 41 # Global variables 42 $Global::pb_stop_on_error = 1; 42 43 my %opts; # CLI Options 43 44 my $action; # action to realize … … 159 160 160 161 Only valid with the checkssh action, it alllows to automatically relaunch the build of the failed packages 162 163 =item B<--no-stop-on-error> 164 165 Continue through errors with best effort. 161 166 162 167 =back … … 460 465 vmopt default = -m 384 461 466 467 =head1 COMMAND DETAILS 468 469 =head2 newproj 470 471 The newproj command creates a new project-builder project. To run this command you first need to define two variables in your ~/.pbrc file: 472 473 pbconfurl I<project> = file:///home/anderse/.git/project-builder-config/I<project> 474 pbdefdir default = $ENV{HOME}/cache-project-builder 475 476 The first line defines the version controlled configuration information and the second defines the root directory for project-builder to use. 477 478 You can then run the command: 479 480 % pb -p I<$project> -r I<$version> newproj 481 482 to create the new project. Running the newproj command will then generate the file $pbdefdir/$project/pbconf/$version/$project.pb. You will need to edit that file in order to run any of the later commands. 483 484 =head2 cms2build 485 486 The cms2build command takes your files from the content management system and makes the two tar files that are necessary for building files. Before running this command, you need to run the newproj command, and edit the $project.pb configuration file. In particular, you need to set the pburl, pbrepo, pbwf, pbpackager, projver, projtag, testver, deliver, and defpkgdir lines as described in the configuration file. Then you can run a command like: 487 488 % pb -p $project -r $version cms2build 489 490 To create the $pbdefdir/$project/delivery/$project-$version.{,pbconf}.tar.gz files, the $version-$projtag.pb and pbrc files in the same directory. 491 492 =head2 build2pkg 493 494 The build2pkg command takes the tar files created in the cms2build step and attempts to build the binary packages for your current operating system. In order for this step to work, you may need to edit the files in one of the $pbdefdir/$project/pbconf/$version/$project/{deb,rpm,pkg} directories. Those files will be used to try to build your package. Note that if you change those files, you need to re-run the cms2build step. 495 496 462 497 =head1 AUTHORS 463 498 … … 499 534 "version|V=s" => \$opts{'V'}, 500 535 "keep|k" => \$opts{'k'}, 536 "stop-on-error!" => \$Global::pb_stop_on_error, 501 537 ) || pb_syntax(-1,0); 502 538 … … 1356 1392 if (@f) { 1357 1393 # We have patches... 1358 if ($debsrcfmt =~ /^1.*/) { 1394 my $patch_file = "debian/patches/pbapplypatch"; 1395 if (($debsrcfmt =~ /^1.*/) && (-x $patch_file)) { 1359 1396 # In that case we need to apply the patches ourselves locally 1360 pb_system("cat debian/patches/pbapplypatch","APPLY","verbose");1361 pb_system(" debian/patches/pbapplypatch","Applying patches to $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'} tree");1397 pb_system("cat $patch_file","APPLY","verbose"); 1398 pb_system("$patch_file","Applying patches to $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'} tree"); 1362 1399 } 1363 1400 # ...so modify the name of files to be Debian compliant … … 2264 2301 die "No VM/VE/RM defined, unable to launch" if (not defined $v); 2265 2302 # Keep only the first VM in case many were given 2266 $v =~ s/,.*//; 2303 if ($v =~ /,/) { 2304 pb_log(0,"WARNING: pruning to just the first of several vms listed ($v)\n"); 2305 $v =~ s/,.*//; 2306 } 2267 2307 2268 2308 my $pbos = pb_distro_get_context($v); … … 4042 4082 my $changes = ""; 4043 4083 foreach my $c (split(/ /,$made)) { 4044 $changes .= " $ENV{'PBBUILDDIR'}/$c" if ( $c =~ /\.changes$/);4084 $changes .= " $ENV{'PBBUILDDIR'}/$c" if (($c =~ /\.changes$/) && (-f "$ENV{PBBUILDDIR}/$c")); 4045 4085 } 4046 4086 my $debsigncmd = pb_check_req("debsign",1); 4047 pb_system("$debsigncmd -m\'$ENV{'PBPACKAGER'}\' $changes","Signing DEB packages") ;4087 pb_system("$debsigncmd -m\'$ENV{'PBPACKAGER'}\' $changes","Signing DEB packages") if ($changes ne ""); 4048 4088 } else { 4049 4089 pb_log(0,"I don't know yet how to sign packages for type $pbos->{'type'}.\nPlease give feedback to dev team\n");
Note:
See TracChangeset
for help on using the changeset viewer.