Changeset 2252 in ProjectBuilder for devel/pb


Ignore:
Timestamp:
Aug 30, 2017, 5:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

Use .pbrc.yml now as a YAML file as well instead of .pbrc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r2251 r2252  
    481481=head1 CONFIGURATION FILES
    482482
    483 Each pb user may have a configuration in F<$HOME/.pbrc>. The values in this file may overwrite any other configuration file value.
     483Each pb user may have a configuration in F<$HOME/.pbrc.yml>. The values in this file may overwrite any other configuration file value.
    484484
    485485Here is an example of such a configuration file:
     
    493493 # svn+ssh, cvs+ssh, ...
    494494 #
    495  pbconfurl linuxcoe = cvs+ssh://:ext:bcornec@linuxcoe.cvs.sourceforge.net:/cvsroot/linuxcoe/pbconf
     495  pbconfurl:
     496    linuxcoe : cvs+ssh://:ext:bcornec@linuxcoe.cvs.sourceforge.net:/cvsroot/linuxcoe/pbconf
    496497
    497498 # This is normaly defined in the project's configuration file
    498499 # Url of the project
    499500 #
    500  pburl linuxcoe = cvs+ssh://:ext:bcornec@linuxcoe.cvs.sourceforge.net:/cvsroot/linuxcoe
     501  pburl:
     502    linuxcoe : cvs+ssh://:ext:bcornec@linuxcoe.cvs.sourceforge.net:/cvsroot/linuxcoe
    501503 
    502504 # All these URLs needs to be defined here as the are the entry point
    503505 # for how to build packages for the project
    504506 #
    505  pbconfurl pb = svn+ssh://svn.project-builder.org/mondo/svn/pb/pbconf
    506  pbconfurl mondorescue = svn+ssh://svn.project-builder.org/mondo/svn/project-builder/mondorescue/pbconf
    507  pbconfurl collectl = svn+ssh://bruno@svn.mondorescue.org/mondo/svn/project-builder/collectl/pbconf
    508  pbconfurl netperf = svn+ssh://svn.mondorescue.org/mondo/svn/project-builder/netperf/pbconf
     507  pbconfurl:
     508    pb: svn+ssh://svn.project-builder.org/mondo/svn/pb/pbconf
     509  pbconfurl:
     510    mondorescue: svn+ssh://svn.project-builder.org/mondo/svn/project-builder/mondorescue/pbconf
     511  pbconfurl:
     512    collectl: svn+ssh://bruno@svn.mondorescue.org/mondo/svn/project-builder/collectl/pbconf
     513  pbconfurl:
     514    netperf: svn+ssh://svn.mondorescue.org/mondo/svn/project-builder/netperf/pbconf
    509515 
    510516 # Under that dir will take place everything related to pb
     
    512518 # to your VMs/chroot/...
    513519 # if not defined then /var/cache
    514  pbdefdir default = $ENV{'HOME'}/project-builder
    515  pbdefdir pb = $ENV{'HOME'}
    516  pbdefdir linuxcoe = $ENV{'HOME'}/LinuxCOE/cvs
    517  pbdefdir mondorescue = $ENV{'HOME'}/mondo/svn
     520  pbdefdir:
     521    default: $ENV{'HOME'}/project-builder
     522  pbdefdir:
     523    pb: $ENV{'HOME'}
     524  pbdefdir:
     525    linuxcoe: $ENV{'HOME'}/LinuxCOE/cvs
     526  pbdefdir:
     527    mondorescue: $ENV{'HOME'}/mondo/svn
    518528 
    519529 # pbconfdir points to the directory where the CMS content of the pbconfurl is checked out
    520530 # If not defined, pbconfdir is under pbdefdir/pbproj/pbconf
    521  pbconfdir linuxcoe = $ENV{'HOME'}/LinuxCOE/cvs/pbconf
    522  pbconfdir mondorescue = $ENV{'HOME'}/mondo/svn/pbconf
     531  pbconfdir:
     532    linuxcoe: $ENV{'HOME'}/LinuxCOE/cvs/pbconf
     533  pbconfdir:
     534    mondorescue: $ENV{'HOME'}/mondo/svn/pbconf
    523535 
    524536 # pbdir points to the directory where the CMS content of the pburl is checked out
    525537 # If not defined, pbdir is under pbdefdir/pbproj
    526538 # Only defined if we have access to the dev of the project
    527  pbdir linuxcoe = $ENV{'HOME'}/LinuxCOE/cvs
    528  pbdir mondorescue = $ENV{'HOME'}/mondo/svn
     539  pbdir:
     540    linuxcoe: $ENV{'HOME'}/LinuxCOE/cvs
     541  pbdir:
     542    mondorescue: $ENV{'HOME'}/mondo/svn
    529543 
    530544 # -daemonize doesn't work with qemu 0.8.2
    531  vmopt default = -m 384
     545  vmopt:
     546    default: -m 384
    532547
    533548=head1 COMMAND DETAILS
     
    535550=head2 newproj
    536551
    537 The newproj command creates a new project-builder project.  To run this command you first need to define two variables in your ~/.pbrc file:
     552The newproj command creates a new project-builder project.  To run this command you first need to define two variables in your ~/.pbrc.yml file:
    538553
    539554 pbconfurl I<project> = file:///home/anderse/.git/project-builder-config/I<project>
     
    588603=item Update your filters and build files.
    589604
    590 You probably need to edit the files describing the build steps in one of the $pbdefdir/$project/pbconf/$version/$project/{deb,rpm,pkg} directories and the filters in $pbdefdir/$project/pbconf/$version/pbfilter. Note that you can define additional filters and transforms in the *.pbf files. The build files will be filtered by the filters defined in the *.pbf files to generate the inputs to the build step. Therefore, if you change those files, you need to re-run the cms2build step.
     605You probably need to edit the files describing the build steps in one of the $pbdefdir/$project/pbconf/$version/$project/{deb,rpm,pkg} directories and the filters in $pbdefdir/$project/pbconf/$version/pbfilter. Note that you can define additional filters and transformations in the filters files. The build files will be filtered by the filters defined in the filters files to generate the inputs to the build step. Therefore, if you change those files, you need to re-run the cms2build step.
    591606
    592607=item Build the package.
     
    606621=over 4
    607622
    608 =item Update ~/.pbrc
    609 
    610 Update your ~/.pbrc file to specify the vepath, velist, velogin, and vetype variables, e.g.:
    611 
    612  vepath default = $ENV{HOME}/cache-project-builder/chroot
    613  velist default = debian-6.0-i386
    614  velogin default = pb
    615  vetype default = chroot
     623=item Update ~/.pbrc.yml
     624
     625Update your ~/.pbrc.yml file to specify the vepath, velist, velogin, and vetype variables, e.g.:
     626
     627  vepath:
     628    default: $ENV{HOME}/cache-project-builder/chroot
     629  velist:
     630    default: debian-6.0-i386
     631  velogin:
     632    default: pb
     633  vetype:
     634    default: chroot
    616635
    617636If you are building for rpm style OS's, update the verpmtype option, and install the appropriate tool.
    618637
    619  verpmtype default = rpmbootstrap
     638  verpmtype:
     639    default: rpmbootstrap
    620640
    621641You may also choose to specify a mirror for the OS packages, and optionally http/ftp proxies.  You can specify the proxies either through environment variables ($http_proxy/$https_proxy/$ftp_proxy) or in the configuration file. The configuration file will be used if no corresponding environment variable has been set. For example, for debian and with a local squid proxy:
    622642
    623  rbsmirrorsrv debian = http://mirrors1.kernel.org/debian/
    624  http_proxy default = http://localhost:3128/
    625  https_proxy default = http://localhost:3128/
    626  ftp_proxy default = http://localhost:3128/
     643  rbsmirrorsrv:
     644    debian: http://mirrors1.kernel.org/debian/
     645  http_proxy:
     646    default: http://localhost:3128/
     647  https_proxy:
     648    default: http://localhost:3128/
     649  ftp_proxy:
     650    default: http://localhost:3128/
    627651
    628652=item Run the cms2build command
     
    648672You need to have a sshhost entry for setupve to work, so add one, even an invalid one, e.g.:
    649673
    650  sshhost $project = foo.example.org
     674  sshhost:
     675    $project: foo.example.org
    651676
    652677=item Setup the virtual environment
     
    670695You need to have a valid sshdir and sshhost entry for build2ve to work, so add them. Note that you need to be able to ssh from the host you run the command on to the repository host, preferably without needing to type in a password, so using ssh-agent or having a special passwordless project-builder ssh key will make this step easier.
    671696
    672  sshhost $project = localhost
    673  sshdir $project = $home/cache-project-builder/repos
     697  sshhost:
     698    $project: localhost
     699  sshdir:
     700    $project: $home/cache-project-builder/repos
    674701
    675702You may also need to specify additional repository files to use or rpms to install. Note the URL for repositories is not the URL of the repository, but the URL of a file that can be put in the yum.repos.d or apt.sources.d directory.
    676703
    677  addrepo centos-5-i386 = http://localhost/pb/centos-extras.repo,http://mirror.centos.org/centos/5/extras/i386/RPMS/chrpath-0.13-3.el5.centos.i386.rpm
     704  addrepo:
     705    centos-5-i386: http://localhost/pb/centos-extras.repo,http://mirror.centos.org/centos/5/extras/i386/RPMS/chrpath-0.13-3.el5.centos.i386.rpm
    678706
    679707=item Update your filters and build files
    680708
    681 You may need to update your filter files (*.pbf) as in the build2pkg step if you are building for a new OS or architecture.
     709You may need to update your filter files as in the build2pkg step if you are building for a new OS or architecture.
    682710
    683711=item Build the packages and copy them to the repository
     
    33843412    if (($action eq "build") || ($action eq "prep")) {
    33853413        print SCRIPT "# Preparation for pb\n";
    3386         print SCRIPT "rm -f \$HOME/.pbrc\n";
    3387         print SCRIPT "cp .pbrc \$HOME\n";
     3414        print SCRIPT "rm -f \$HOME/.pbrc.yml\n";
     3415        print SCRIPT "cp .pbrc.yml \$HOME\n";
    33883416        # TODO: Why ?
    33893417        print SCRIPT "cd ..\n";
Note: See TracChangeset for help on using the changeset viewer.