Changes between Version 18 and Version 19 of NetPerfExample


Ignore:
Timestamp:
Jul 12, 2009, 2:28:13 AM (15 years ago)
Author:
Bruno Cornec
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NetPerfExample

    v18 v19  
    3232Here 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.
    3333
    34 To 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.
     34To get the bits of the project you want to package, different protocols may be used. Currently supported protocols are using a SVN, SVK, CVS, Git or Mercurial access if there is such a thing, or a 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. You'll need at least version 0.9.0 of pb to support what is described here. 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. And the only package we want to create is netperf.
    39 
    40 {{{
    41 $ pb -p netperf -r 2.4.4 newproj netperf
     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. You'll need at least version 0.9.0 of pb to support what is described here. 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.5. And the only package we want to create is netperf.
     39
     40{{{
     41$ pb -p netperf -r 2.4.5 newproj netperf
    4242Packages: netperf
    4343
     
    5252{{{
    5353$ cd $HOME/project-builder/
    54 $ ls -R netperf/pbconf/2.4.4/
    55 netperf/pbconf/2.4.4/:
     54$ ls -R netperf/pbconf/2.4.5/
     55netperf/pbconf/2.4.5/:
    5656netperf  netperf.pb  pbfilter
    5757
    58 netperf/pbconf/2.4.4/netperf:
     58netperf/pbconf/2.4.5/netperf:
    5959deb  pbfilter  rpm
    6060
    61 netperf/pbconf/2.4.4/netperf/deb:
     61netperf/pbconf/2.4.5/netperf/deb:
    6262changelog  compat  control  copyright  netperf.docs  netperf.dirs  rules
    6363
    64 netperf/pbconf/2.4.4/netperf/pbfilter:
    65 
    66 netperf/pbconf/2.4.4/netperf/rpm:
     64netperf/pbconf/2.4.5/netperf/pbfilter:
     65
     66netperf/pbconf/2.4.5/netperf/rpm:
    6767netperf.spec
    6868
    69 netperf/pbconf/2.4.4/pbfilter:
     69netperf/pbconf/2.4.5/pbfilter:
    7070all.pbf  deb.pbf  md.pbf  novell.pbf  rpm.pbf
    7171$
    72 $ vi netperf/pbconf/2.4.4/netperf.pb
     72$ vi netperf/pbconf/2.4.5/netperf.pb
    7373[Modifications here]
    74 $ cat netperf/pbconf/2.4.4/netperf.pb
     74$ cat netperf/pbconf/2.4.5/netperf.pb
    7575#
    7676# Project Builder configuration file
     
    8787#pburl netperf = cvs://cvs.netperf.org/netperf/devel
    8888#pburl netperf = http://www.netperf.org/src/netperf-devel.tar.gz
    89 pburl netperf = ftp://ftp.netperf.org/netperf/netperf-2.4.4.tar.bz2
     89pburl netperf = ftp://ftp.netperf.org/netperf/netperf-2.4.5.tar.bz2
    9090#pburl netperf = file:///src/netperf-devel.tar.gz
    9191#pburl netperf = dir:///src/netperf-devel
     
    161161# Global version/tag for the project
    162162#
    163 projver netperf = 2.4.4
     163projver netperf = 2.4.5
    164164projtag netperf = 1
    165165
     
    173173#pkgtag netperf = 3
    174174# Hash of default package/package directory
    175 defpkgdir netperf = netperf-2.4.4
     175defpkgdir netperf = netperf-2.4.5
    176176# Hash of additional package/package directory
    177177#extpkgdir minor-pkg = dir-minor-pkg
     
    183183}}}
    184184
    185 I skip the parameters begining with vm and ssh for the moment. I inform pb that I will produce packages with a version-tag of 2.4.4-1, that no local package should have a different version than the project version (pkgver/pkgtag), that my default package will be netperf (pb will work on it by default all the time) and that no additional packages will be produced. In addition to standard version with numbers, pb will accept the version devel.
     185I skip the parameters begining with vm and ssh for the moment. I inform pb that I will produce packages with a version-tag of 2.4.5-1, that no local package should have a different version than the project version (pkgver/pkgtag), that my default package will be netperf (pb will work on it by default all the time) and that no additional packages will be produced. In addition to standard version with numbers, pb will accept the version devel.
    186186Once this is done, you may commit your changes in your repository and already try to see if pb can make something useful for you. Check the result of:
    187187
     
    190190A      netperf
    191191A      netperf/pbconf
    192 A      netperf/pbconf/2.4.4
    193 A      netperf/pbconf/2.4.4/netperf.pb
     192A      netperf/pbconf/2.4.5
     193A      netperf/pbconf/2.4.5/netperf.pb
    194194[..]
    195195A      netperf/pbconf/2.4.4/pbfilter/all.pbf
     
    197197Ajout          netperf
    198198Ajout          netperf/pbconf
    199 Ajout          netperf/pbconf/2.4.4
    200 [...]
    201 Ajout          netperf/pbconf/2.4.4/pbfilter/rpm.pbf
     199Ajout          netperf/pbconf/2.4.5
     200[...]
     201Ajout          netperf/pbconf/2.4.5/pbfilter/rpm.pbf
    202202[...]
    203203$ svn up
    204204[...]
    205 $ pb -p netperf -r 2.4.4 cms2build
     205$ pb -p netperf -r 2.4.5 cms2build
    206206Project: netperf
    207207Action: cms2build
    208208Packages: netperf
    209209
    210 Management of netperf 2.4.4-1 (rev flat)
    211  ... 23:16:09 URL: ftp://ftp.netperf.org/netperf/netperf-2.4.4.tar.bz2 [912615] -> "/users/bruno/tmp/pb.yE9sNZXV0A/netperf-2.4.4.tar.bz2" [1]
    212 OK
    213 Extracting /users/bruno/tmp/pb.yE9sNZXV0A/netperf-2.4.4.tar.bz2 in /users/bruno/project-builder/netperf/delivery... OK
     210Management of netperf 2.4.5-1 (rev flat)
     211 ... 23:16:09 URL: ftp://ftp.netperf.org/netperf/netperf-2.4.5.tar.bz2 [912615] -> "/users/bruno/tmp/pb.yE9sNZXV0A/netperf-2.4.5.tar.bz2" [1]
     212OK
     213Extracting /users/bruno/tmp/pb.yE9sNZXV0A/netperf-2.4.5.tar.bz2 in /users/bruno/project-builder/netperf/delivery... OK
    214214Build files generated for mandriva-2006.0,sles-9,mandrake-10.2,mandriva-2007.0,rhel-3,mandriva-2007.1,redhat-9,ubuntu-6.06,suse-10.3,rhel-5,fedora-8,ubuntu-7.10,suse-10.2,mandrake-10.1,mandriva-2008.0,sles-10,fedora-6,suse-10.1,fedora-5,fedora-4,ubuntu-7.04,suse-10.0,fedora-7,debian-4.0,rhel-4,debian-3.1,redhat-7.3
    215215No Build files found for gentoo-nover
    216216Creating netperf tar files compressed... OK
    217 Under /users/bruno/project-builder/netperf/delivery/netperf-2.4.4.tar.gz
     217Under /users/bruno/project-builder/netperf/delivery/netperf-2.4.5.tar.gz
    218218}}}
    219219
     
    222222Now this is done, it's time to look at all those files that gave been generated in addition and adapt them. At the begining, we try to make RPM packages.
    223223{{{
    224 $ vi netperf/pbconf/2.4.4/netperf/rpm/netperf.spec
     224$ vi netperf/pbconf/2.4.5/netperf/rpm/netperf.spec
    225225[Modifications here]
    226 $ cat netperf/pbconf/2.4.4/netperf/rpm/netperf.spec
     226$ cat netperf/pbconf/2.4.5/netperf/rpm/netperf.spec
    227227#
    228228# $Id$
     
    275275
    276276{{{
    277 $ vi netperf/pbconf/2.4.4/pbfilter/all.pbf
     277$ vi netperf/pbconf/2.4.5/pbfilter/all.pbf
    278278[Modifications here]
    279 $ cat netperf/pbconf/2.4.4/pbfilter/all.pbf
     279$ cat netperf/pbconf/2.4.5/pbfilter/all.pbf
    280280#
    281281# $Id$
     
    315315We can now try again to use pb to create again our build file with macro expansion:
    316316{{{
    317 $ pb -p netperf -r 2.4.4 cms2build
     317$ pb -p netperf -r 2.4.5 cms2build
    318318Project: netperf
    319319Action: cms2build
    320320Packages: netperf
    321321
    322 Management of netperf 2.4.4-1 (rev flat)
     322Management of netperf 2.4.5-1 (rev flat)
    323323[... same output as previously...]
    324 Under /users/bruno/project-builder/netperf/delivery/netperf-2.4.4.tar.gz
     324Under /users/bruno/project-builder/netperf/delivery/netperf-2.4.5.tar.gz
    325325}}}
    326326
     
    328328Well wait ! It's not really useful because we started exactly from a tar file. Well it's not exactly the same tar file. This one adds Project-Builder support:
    329329{{{
    330 tar tvfz /users/bruno/project-builder/netperf/delivery/netperf-2.4.4.tar.gz
    331 drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/
    332 -rw-r--r-- bruno/users      30 2007-10-16 20:00 netperf-2.4.4/inet_ntop.c
    333 -rwxr-xr-x bruno/users   31743 2007-06-02 00:06 netperf-2.4.4/config.sub
    334 drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/
    335 drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/suse-10.0/
    336 -rw-r--r-- bruno/users     885 2008-03-30 23:30 netperf-2.4.4/pbconf/suse-10.0/netperf.spec
    337 drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/rhel-5/
    338 -rw-r--r-- bruno/users     861 2008-03-30 23:30 netperf-2.4.4/pbconf/rhel-5/netperf.spec
    339 drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/fedora-4/
    340 -rw-r--r-- bruno/users     861 2008-03-30 23:30 netperf-2.4.4/pbconf/fedora-4/netperf.spec
    341 [...]
    342 drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/
    343 -rw-r--r-- bruno/users       2 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/changelog
    344 -rw-r--r-- bruno/users     435 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/control
    345 -rw-r--r-- bruno/users      36 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/netperf.docs
    346 -rw-r--r-- bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/pkg1.dirs
    347 -rw-r--r-- bruno/users       2 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/compat
    348 -rw-r--r-- bruno/users    3632 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/rules
    349 -rw-r--r-- bruno/users     996 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/copyright
    350 drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-6.06/
    351 [...]
    352 -rw-r--r-- bruno/users    2382 2007-06-02 00:06 netperf-2.4.4/README.ovms
    353 -rwxr-xr-x bruno/users    1988 2007-06-02 00:06 netperf-2.4.4/mkinstalldirs
    354 -rw-r--r-- bruno/users   14022 2007-06-05 03:08 netperf-2.4.4/acinclude.m4
    355 [...]
    356 -rw-r--r-- bruno/users   17464 2007-10-17 18:55 netperf-2.4.4/Makefile.in
    357 -rw-r--r-- bruno/users    9240 2007-06-02 00:06 netperf-2.4.4/INSTALL
     330tar tvfz /users/bruno/project-builder/netperf/delivery/netperf-2.4.5.tar.gz
     331drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.5/
     332-rw-r--r-- bruno/users      30 2007-10-16 20:00 netperf-2.4.5/inet_ntop.c
     333-rwxr-xr-x bruno/users   31743 2007-06-02 00:06 netperf-2.4.5/config.sub
     334drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.5/pbconf/
     335drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.5/pbconf/suse-10.0/
     336-rw-r--r-- bruno/users     885 2008-03-30 23:30 netperf-2.4.5/pbconf/suse-10.0/netperf.spec
     337drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.5/pbconf/rhel-5/
     338-rw-r--r-- bruno/users     861 2008-03-30 23:30 netperf-2.4.5/pbconf/rhel-5/netperf.spec
     339drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.5/pbconf/fedora-4/
     340-rw-r--r-- bruno/users     861 2008-03-30 23:30 netperf-2.4.5/pbconf/fedora-4/netperf.spec
     341[...]
     342drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/
     343-rw-r--r-- bruno/users       2 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/changelog
     344-rw-r--r-- bruno/users     435 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/control
     345-rw-r--r-- bruno/users      36 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/netperf.docs
     346-rw-r--r-- bruno/users       0 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/pkg1.dirs
     347-rw-r--r-- bruno/users       2 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/compat
     348-rw-r--r-- bruno/users    3632 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/rules
     349-rw-r--r-- bruno/users     996 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/copyright
     350drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-6.06/
     351[...]
     352-rw-r--r-- bruno/users    2382 2007-06-02 00:06 netperf-2.4.5/README.ovms
     353-rwxr-xr-x bruno/users    1988 2007-06-02 00:06 netperf-2.4.5/mkinstalldirs
     354-rw-r--r-- bruno/users   14022 2007-06-05 03:08 netperf-2.4.5/acinclude.m4
     355[...]
     356-rw-r--r-- bruno/users   17464 2007-10-17 18:55 netperf-2.4.5/Makefile.in
     357-rw-r--r-- bruno/users    9240 2007-06-02 00:06 netperf-2.4.5/INSTALL
    358358}}}
    359359As you can see a lot of directories and files have been created under pbconf. They correspond to all the required build files for all the distributions supported and will later be used to really create the packages.
     
    361361So now, we can try to go to the next step and build a package. So issue:
    362362{{{
    363 $ pb -p netperf -r 2.4.4 build2pkg
     363$ pb -p netperf -r 2.4.5 build2pkg
    364364Project: netperf
    365365Action: build2pkg
     
    373373+ '[' 1 -eq 1 ']'
    374374+ cd /users/bruno/project-builder/netperf/build/BUILD
    375 + rm -rf netperf-2.4.4
    376 + /usr/bin/gzip -dc /users/bruno/project-builder/netperf/build/SOURCES/netperf-2.4.4.tar.gz
     375+ rm -rf netperf-2.4.5
     376+ /usr/bin/gzip -dc /users/bruno/project-builder/netperf/build/SOURCES/netperf-2.4.5.tar.gz
    377377+ tar -xf -
    378378+ STATUS=0
    379379+ '[' 0 -ne 0 ']'
    380 + cd netperf-2.4.4
     380+ cd netperf-2.4.5
    381381+ exit 0
    382382Executing(%build): /bin/sh -e /users/bruno/project-builder/netperf/build/tmp/rpm-tmp.70387
    383383+ umask 022
    384384+ cd /users/bruno/project-builder/netperf/build/BUILD
    385 + cd netperf-2.4.4
     385+ cd netperf-2.4.5
    386386+ '[' 1 -eq 1 ']'
    387387+ '[' 1 -eq 1 ']'
     
    404404config.status: creating config.h
    405405config.status: executing depfiles commands
    406 + make -j4 VERSION=2.4.4
     406+ make -j4 VERSION=2.4.5
    407407make  all-recursive
    408 make[1]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4'
     408make[1]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.5'
    409409Making all in src
    410410make[2]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src'