Changes between Version 8 and Version 9 of NetPerfExample


Ignore:
Timestamp:
Mar 30, 2008, 5:03:45 PM (17 years ago)
Author:
Bruno Cornec
Comment:

begin of re-write with 0.9.0

Legend:

Unmodified
Added
Removed
Modified
  • NetPerfExample

    v8 v9  
    11= Example of use on netperf (simple example) =
    22
    3 As an example of how easy (or not :-) Project-Builder is to use, I decide to write that tutorial as a gift for another project which deserves it, the [http://www.netperf.org NetPerf] project .
     3As an example of how easy (or not :-) Project-Builder is to use, I decided to write that tutorial as a gift for another project which deserves it, the [http://www.netperf.org NetPerf] project.
    44
    55You first have to create a .pbrc configuration file in your home directory, which will setup things globally:
     
    88$ cat > ~/.pbrc << EOF
    99#
    10 # Root of the temp file used to store info on the project
    11 # Is also used to determine the root directory of the project
     10# Define for each project the URL of its pbconf repository
    1211# No default option allowed here as they need to be all different
    1312#
    14 pbrc netperf = $ENV{'HOME'}/netperf/src
     13pbconfurl netperf = svn+ssh://svn.mondorescue.org/mondo/svn/project-builder/netperf/pbconf
     14
     15#
     16# Under that dir will take place everything related to pb
     17# If you want to use VMs/chroot/..., then use $ENV{'HOME'} to make it portable
     18# to your VMs/chroot/...
     19# if not defined then /var/cache
     20pbdefdir default = $ENV{'HOME'}/project-builder
     21
    1522EOF
    1623}}}
    1724
    18 Should be obvious for the content. Note that the format is in general
     25Note that the format is in general
    1926{{{
    2027pb-keyword project = value
    2128}}}
    22 which means that here I named my project for netperf for Project-Builder (I can choose what I want but need to be consistent everywhere).
    23 
    24 Then get the bits of the project you want to package. It could be using a SVN or CVS access if there is such a thing, or by downloading (at worse) the tar file of the project. Then extract that under a newly created directory that you referenced in your project configuration file:
    25 
    26 {{{
    27 $ cd /tmp
    28 $ wget ftp://ftp.netperf.org/netperf/netperf-2.4.4.tar.bz2
    29 $ mkdir -p $HOME/netperf/src
    30 $ cd $HOME/netperf/src
    31 $ umask 022
    32 $ tar xvfj /tmp/netperf-2.4.4.tar.bz2
    33 $ rm -f /tmp/netperf-2.4.4.tar.bz2
    34 }}}
     29which means that here I named my project netperf for Project-Builder (I can choose what I want but need to be consistent everywhere). Also that configuration file is linked to the person who wants to package the software. Another configuration file will also be used, which only concerns the project itself.
     30
     31The pbconfurl keyword indicates where are stored the configuration files for pb allowing us to build netperf packages with them.
     32Here by default, everything will be extracted under $ENV{'HOME'}/project-builder for all projects we decide to package. Other keywords exist and may be used, but won't be needed for such a simple project.
     33
     34To get the bits of the project you want to package, different protocols may be used. Currently supported protocols are using a SVN or CVS access if there is such a thing, or URL pointing to a ftp or http server.
    3535
    3636The netperf project is a nice project using a simple environment to build itself. It uses the GNU autoconf/autmake/litool mechanism, which makes it easy to package with pb.
    3737
    38 You will now need to get the latest and greatest project-builder software from our [ftp://ftp.project-builder.org ftp] repository. Of course we provide lots of packages for your distribution ;-) Or a tar.gz file if you prefer. Once available, you can use the newproj option of pb to create the infrastructure that is mandatory for pb. It is mandatory that there is a corespondance between the directory mentioned in $HOME/.pbrc and the -r option:
    39 
    40 {{{
    41 $ pb -p netperf -r `pwd` newproj
    42 Creating /users/bruno/netperf/src/pbconf directory
    43 
    44 Do not to forget to commit the pbconf directory in your CMS if needed
    45 After having renamed the pkg1 directory to your package's name
    46 
    47 Project: netperf
    48 Action: newproj
     38You will now need to get the latest and greatest project-builder software from our [ftp://ftp.project-builder.org ftp] repository. Of course we provide lots of packages for your distribution ;-) Or a tar.gz file if you prefer. Once available, you can use the newproj option of pb to create the infrastructure that is mandatory for pb. The latest version available of netperf at the time of this writing is 2.4.4.
     39
     40{{{
     41$ pb -p netperf -r 2.4.4 newproj
    4942}}}
    5043