Changes between Version 9 and Version 10 of NetPerfExample


Ignore:
Timestamp:
Mar 31, 2008, 1:40:18 AM (11 years ago)
Author:
bruno
Comment:

up to changelog with 0.9.0

Legend:

Unmodified
Added
Removed
Modified
  • NetPerfExample

    v9 v10  
    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. 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
    42 }}}
    43 
    44 Explore then the pbconf directory to familiarize yourself with some of the config file. the next one we want to edit, is the main configuration file which will be used as the central piece of information for pb.
     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.4. And the only package we want to create is netperf.
     39
     40{{{
     41$ pb -p netperf -r 2.4.4 newproj netperf
     42Packages: netperf
     43
     44Do not to forget to commit the pbconf directory in your CMS if needed
     45Project: netperf
     46Action: newproj
     47}}}
     48
     49Explore then the pbconf directory to familiarize yourself with some of the config file. The next one we want to edit, is the main configuration file which will be used as the central piece of information for pb.
    4550
    4651Edit it and adapt it. After edition, here is the resulting file:
    4752{{{
    48 $ ls -R pbconf
    49 pbconf:
    50 netperf.pb  pbfilter  pkg1
    51 
    52 pbconf/pbfilter:
     53$ cd $HOME/project-builder/
     54$ ls -R netperf/pbconf/2.4.4/
     55netperf/pbconf/2.4.4/:
     56netperf  netperf.pb  pbfilter
     57
     58netperf/pbconf/2.4.4/netperf:
     59deb  pbfilter  rpm
     60
     61netperf/pbconf/2.4.4/netperf/deb:
     62changelog  compat  control  copyright  netperf.docs  pkg1.dirs  rules
     63
     64netperf/pbconf/2.4.4/netperf/pbfilter:
     65
     66netperf/pbconf/2.4.4/netperf/rpm:
     67netperf.spec
     68
     69netperf/pbconf/2.4.4/pbfilter:
    5370all.pbf  deb.pbf  md.pbf  novell.pbf  rpm.pbf
    54 
    55 pbconf/pkg1:
    56 deb  pbfilter  rpm
    57 
    58 pbconf/pkg1/deb:
    59 changelog  compat  control  copyright  pkg1.dirs  pkg1.docs  rules
    60 
    61 pbconf/pkg1/pbfilter:
    62 
    63 pbconf/pkg1/rpm:
    64 pkg1.spec
    6571$
    66 $ vi pbconf/netperf.pb
     72$ vi netperf/pbconf/2.4.4/netperf.pb
    6773[Modifications here]
    68 $ cat pbconf/netperf.pb
     74$ cat netperf/pbconf/2.4.4/netperf.pb
    6975#
    7076# Project Builder configuration file
     
    7581
    7682#
    77 # Which CMS system is used (Subversion, CVS or tar file content extracted)
    78 #
    79 #cms netperf = svn
    80 #cms netperf = cvs
    81 cms netperf = flat
     83# What is the project URL
     84#
     85#pburl netperf = svn://svn.netperf.org/netperf/devel
     86#pburl netperf = svn://svn+ssh.netperf.org/netperf/devel
     87#pburl netperf = cvs://cvs.netperf.org/netperf/devel
     88#pburl netperf = http://www.netperf.org/src/netperf-devel.tar.gz
     89pburl netperf = ftp://ftp.netperf.org/netperf/netperf-2.4.4.tar.bz2
     90#pburl netperf = file:///src/netperf-devel.tar.gz
     91#pburl netperf = dir:///src/netperf-devel
     92
     93# Check whether project is well formed
     94# (containing already a directory with the project-version name)
     95pbwf netperf = 1
    8296
    8397#
    8498# Packager label
    8599#
    86 packager netperf = "Bruno Cornec <bruno@project-builder.org>"
     100pbpackager netperf = "Bruno Cornec <bruno@project-builder.org>"
    87101#
    88102
     
    91105#
    92106sshhost netperf = www.project-builder.org
    93 sshlogin netperf = bruno
     107sshlogin netperf = pb
    94108sshdir netperf = /mondo/ftp
    95109sshport netperf = 22
     
    98112# For Virtual machines management
    99113# Naming convention to follow: distribution name (as per ProjectBuilder::Distribution)
    100 # followed by '_' and by release number
     114# followed by '-' and by release number
     115# followed by '-' and by architecture
    101116# a .vmtype extension will be added to the resulting string
    102 # a QEMU rhel_3 here means that the VM will be named rhel_3.qemu
    103 #
    104 vmlist netperf = mandrake_10.1,mandrake_10.2,mandriva_2006.0,mandriva_2007.0,mandriva_2007.1,mandriva_2008.0,redhat_7.3,redhat_9,fedora_4,fedora_5,fedora_6,fedora_7,rhel_3,rhel_4,rhel_5,suse_10.0,suse_10.1,suse_10.2,suse_10.3,sles_9,sles_10,gentoo_nover,debian_3.1,debian_4.0,ubuntu_6.06,ubuntu_7.04,ubuntu_7.10
     117# a QEMU rhel-3-i286 here means that the VM will be named rhel-3-i386.qemu
     118#
     119vmlist netperf = mandrake-10.1-i386,mandrake-10.2-i386,mandriva-2006.0-i386,mandriva-2007.0-i386,mandriva-2007.1-i386,mandriva-2008.0-i386,redhat-7.3-i386,redhat-9-i386,fedora-4-i386,fedora-5-i386,fedora-6-i386,fedora-7-i386,fedora-8-i386,rhel-3-i386,rhel-4-i386,rhel-5-i386,suse-10.0-i386,suse-10.1-i386,suse-10.2-i386,suse-10.3-i386,sles-9-i386,sles-10-i386,gentoo-nover-i386,debian-3.1-i386,debian-4.0-i386,ubuntu-6.06-i386,ubuntu-7.04-i386,ubuntu-7.10-i386,mandriva-2007.0-x86_64,mandriva-2007.1-x86_64,mandriva-2008.0-x86_64,fedora-6-x86_64,fedora-7-x86_64,fedora-8-x86_64,rhel-4-x86_64,rhel-5-x86_64,suse-10.2-x86_64,suse-10.3-x86_64,sles-10-x86_64,gentoo-nover-x86_64,debian-4.0-x86_64,ubuntu-7.04-x86_64,ubuntu-7.10-x86_64
    105120
    106121#
     
    110125
    111126# Hash for VM stuff on vmtype
    112 vmntp default = pool.ntp.org
     127#vmntp default = pool.ntp.org
    113128
    114129# We suppose we can commmunicate with the VM through SSH
    115130vmhost netperf = localhost
    116131vmlogin netperf = pb
    117 vmport netperf = 2225
     132vmport netperf = 2222
    118133
    119134# Timeout to wait when VM is launched/stopped
     
    125140vmsize netperf = 5G
    126141
     142#
     143# For Virtual environment management
     144# Naming convention to follow: distribution name (as per ProjectBuilder::Distribution)
     145# followed by '-' and by release number
     146# followed by '-' and by architecture
     147# a .vetype extension will be added to the resulting string
     148# a chroot rhel-3-i286 here means that the VE will be named rhel-3-i386.chroot
     149#
     150#velist netperf = fedora-7-i386
     151
     152# VE params
     153#vetype netperf = chroot
     154#ventp default = pool.ntp.org
     155#velogin netperf = pb
     156#vepath netperf = /var/lib/mock
     157#veconf netperf = /etc/mock
     158#verebuild netperf = false
     159
    127160#
    128161# Global version/tag for the project
     
    131164projtag netperf = 1
    132165
     166# Hash of valid version names
     167version netperf = devel
     168
    133169# Adapt to your needs:
    134170# Optional if you need to overwrite the global values above
    135171#
    136 #pkgver pkg1 = stable
    137 #pkgtag pkg1 = 3
    138 #pkgver nil
    139 #pkgtag nil
    140 
     172#pkgver netperf = stable
     173#pkgtag netperf = 3
    141174# Hash of default package/package directory
    142175defpkgdir netperf = netperf-2.4.4
    143 
    144176# Hash of additional package/package directory
    145 #extpkgdir pkg1-doc = pkg1-docdir
    146 
    147 # Hash of valid version names
    148 version devel
    149 #version stable
     177#extpkgdir minor-pkg = dir-minor-pkg
    150178
    151179# List of files per pkg on which to apply filters
    152180# Files are mentioned relatively to pbroot/defpkgdir
    153 filteredfiles netperf = configure.ac
    154 #filteredfiles pkg1-doc = configure.in
    155 }}}
    156 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. And finally, I give to pb the name of all files (per package) that it will have to filter to produce the packages - more on that later on.
    157 Once this is done, you may already try to see if pb can make something useful for you. Check the result of:
    158 
    159 {{{
    160 $ pb -p netperf -r `pwd` cms2build
     181#filteredfiles netperf = Makefile.PL,configure.in,install.sh,netperf.8
     182#supfiles netperf = netperf.init
     183}}}
     184
     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.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.
     186Once 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:
     187
     188{{{
     189$ svn add netperf
     190A      netperf
     191A      netperf/pbconf
     192A      netperf/pbconf/2.4.4
     193A      netperf/pbconf/2.4.4/netperf.pb
     194[..]
     195A      netperf/pbconf/2.4.4/pbfilter/all.pbf
     196$ svn ci -m "Adding pb info for netperf"
     197Ajout          netperf
     198Ajout          netperf/pbconf
     199Ajout          netperf/pbconf/2.4.4
     200[...]
     201Ajout          netperf/pbconf/2.4.4/pbfilter/rpm.pbf
     202[...]
     203$ svn up
     204[...]
     205$ pb -p netperf -r 2.4.4 cms2build
    161206Project: netperf
    162207Action: cms2build
     
    164209
    165210Management of netperf 2.4.4-1 (rev flat)
    166 Exporting /users/bruno/netperf/src/netperf-2.4.4 from DIR to /users/bruno/netperf/delivery/netperf-2.4.4... OK
    167 Build files generated for
    168 No Build files found 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,ubuntu-7.10,gentoo-nover,suse-10.2,mandrake-10.1,mandriva-2008.0,sles-10,fedora-6,suse-10.1,fedora-5,fedora-4,ubuntu-7.04,fedora-7,suse-10.0,debian-4.0,rhel-4,debian-3.1,redhat-7.3
    169 filter: no such variable
    170 Can't use an undefined value as a HASH reference at /usr/lib/perl5/vendor_perl/5.8.8/ProjectBuilder/Base.pm line 1077.
    171 }}}
    172 Ok we tried to make a build file from ou Configuration Management System (CMS) which didn't work completely as our structure is incomplete. However, pb already recognized the project name, action, package to build, type of CMS (flat), used our -r option to create the intermediate delivery directory where all the final files|packages will be created.
    173 
    174 So now, in order to be more useful, we need to create the structure for our package. Luckily, pb did most of the work for us, by creating a template pkg1 directory and files under pbconf. Rename them to netperf (name of our package) and explore and adapt its content:
    175 
    176 {{{
    177 $ find . -name pkg1'*'
    178 ./pbconf/pkg1
    179 ./pbconf/pkg1/rpm/pkg1.spec
    180 ./pbconf/pkg1/deb/pkg1.dirs
    181 ./pbconf/pkg1/deb/pkg1.docs
    182 $ mv ./pbconf/pkg1 ./pbconf/netperf
    183 $ mv ./pbconf/netperf/rpm/pkg1.spec ./pbconf/netperf/rpm/netperf.spec
    184 $ mv ./pbconf/netperf/deb/pkg1.dirs ./pbconf/netperf/deb/netperf.dirs
    185 $ mv ./pbconf/netperf/deb/pkg1.docs ./pbconf/netperf/deb/netperf.docs
    186 }}}
    187 
    188 Now this is done, it's time to look at those and adapt them. At the begining, we try to make RPM packages.
    189 {{{
    190 $ vi pbconf/netperf/rpm/netperf.spec
     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]
     212OK
     213Extracting /users/bruno/tmp/pb.yE9sNZXV0A/netperf-2.4.4.tar.bz2 in /users/bruno/project-builder/netperf/delivery... OK
     214Build 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
     215No Build files found for gentoo-nover
     216Creating netperf tar files compressed... OK
     217Under /users/bruno/project-builder/netperf/delivery/netperf-2.4.4.tar.gz
     218}}}
     219
     220Ok we tried to make a build file from ou Configuration Management System (CMS) which worked completely out of the box as our structure is simple. In particular, pb already recognized the project name, action, package to build, type of CMS (flat), used our -r option to create the intermediate delivery directory where all the final files|packages will be created.
     221
     222Now 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.
     223{{{
     224$ vi netperf/pbconf/2.4.4/netperf/rpm/netperf.spec
    191225[Modifications here]
    192 $ cat pbconf/netperf/rpm/netperf.spec
     226$ cat netperf/pbconf/2.4.4/netperf/rpm/netperf.spec
    193227#
    194228# $Id$
     
    201235Version:        PBVER
    202236Release:        PBTAGPBSUF
    203 License:        GPL
     237License:        PBLIC
    204238Group:          PBGRP
    205239Url:            PBURL
     
    236270}}}
    237271
    238 That spec file looks normal except that it uses a lot of PBSOMETHING keywords. Those are Project-Builder macros that will be instantiate depending on the distribution during the cms2build step.
     272That spec file looks normal except that it uses a lot of PBSOMETHING keywords. Those are Project-Builder macros that will be instantiated depending on the distribution during the cms2build step.
    239273
    240274So now that we have the base for our spec file, we need to look at those filters:
    241275
    242276{{{
    243 $ vi pbconf/pbfilter/all.pbf
     277$ vi netperf/pbconf/2.4.4/pbfilter/all.pbf
    244278[Modifications here]
    245 $ cat pbconf/pbfilter/all.pbf
     279$ cat netperf/pbconf/2.4.4/pbfilter/all.pbf
    246280#
    247281# $Id$
     
    279313filter PBURL = http://www.netperf.org
    280314}}}
    281 We can now try again to use pb to create our build file:
    282 {{{
    283 $ pb -p netperf -r `pwd` cms2build
     315We can now try again to use pb to create again our build file with macro expansion:
     316{{{
     317$ pb -p netperf -r 2.4.4 cms2build
    284318Project: netperf
    285319Action: cms2build
     
    287321
    288322Management of netperf 2.4.4-1 (rev flat)
    289 Exporting /users/bruno/netperf/src/netperf-2.4.4 from DIR to /users/bruno/netperf/delivery/netperf-2.4.4... OK
    290 Build 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,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,fedora-7,suse-10.0,debian-4.0,rhel-4,debian-3.1,redhat-7.3
    291 No Build files found for gentoo-nover
    292 Files configure.ac have been filtered
    293 Creating netperf tar files compressed... OK
    294 Under /users/bruno/netperf/delivery/netperf-2.4.4.tar.gz
    295 }}}
    296 
    297 Much better. You have now your first useful result from pb :-) Congrats !
     323[... same output as previously...]
     324Under /users/bruno/project-builder/netperf/delivery/netperf-2.4.4.tar.gz
     325}}}
     326
     327You have now your first useful result from pb :-) Congrats !
    298328Well 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:
    299329{{{
    300 tar tvfz /users/bruno/netperf/delivery/netperf-2.4.4.tar.gz
    301 drwxr-x--- bruno/users       0 2007-11-16 00:57 netperf-2.4.4/
    302 -rw-r----- bruno/users      30 2007-10-16 20:00 netperf-2.4.4/inet_ntop.c
    303 -rwxr-x--- bruno/users   31743 2007-06-02 00:06 netperf-2.4.4/config.sub
    304 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/
    305 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/suse-10.0/
    306 -rw-r--r-- bruno/users     880 2007-11-16 00:57 netperf-2.4.4/pbconf/suse-10.0/netperf.spec
    307 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/rhel-5/
    308 -rw-r--r-- bruno/users     856 2007-11-16 00:57 netperf-2.4.4/pbconf/rhel-5/netperf.spec
    309 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/fedora-4/
    310 -rw-r--r-- bruno/users     856 2007-11-16 00:57 netperf-2.4.4/pbconf/fedora-4/netperf.spec
    311 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/suse-10.1/
    312 -rw-r--r-- bruno/users     880 2007-11-16 00:57 netperf-2.4.4/pbconf/suse-10.1/netperf.spec
    313 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/redhat-7.3/
    314 -rw-r--r-- bruno/users     856 2007-11-16 00:57 netperf-2.4.4/pbconf/redhat-7.3/netperf.spec
    315 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/sles-9/
    316 -rw-r--r-- bruno/users     880 2007-11-16 00:57 netperf-2.4.4/pbconf/sles-9/netperf.spec
    317 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/mandriva-2006.0/
    318 -rw-r--r-- bruno/users     867 2007-11-16 00:57 netperf-2.4.4/pbconf/mandriva-2006.0/netperf.spec
    319 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/fedora-7/
    320 -rw-r--r-- bruno/users     856 2007-11-16 00:57 netperf-2.4.4/pbconf/fedora-7/netperf.spec
    321 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/mandriva-2007.0/
    322 -rw-r--r-- bruno/users     867 2007-11-16 00:57 netperf-2.4.4/pbconf/mandriva-2007.0/netperf.spec
    323 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/mandriva-2008.0/
    324 -rw-r--r-- bruno/users     867 2007-11-16 00:57 netperf-2.4.4/pbconf/mandriva-2008.0/netperf.spec
    325 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/sles-10/
    326 -rw-r--r-- bruno/users     880 2007-11-16 00:57 netperf-2.4.4/pbconf/sles-10/netperf.spec
    327 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.04/
    328 -rw-r--r-- bruno/users       2 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.04/changelog
    329 -rw-r--r-- bruno/users     431 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.04/control
    330 -rw-r--r-- bruno/users      36 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.04/netperf.docs
    331 -rw-r--r-- bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.04/netperf.dirs
    332 -rw-r--r-- bruno/users       2 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.04/compat
    333 -rw-r--r-- bruno/users    3632 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.04/rules
    334 -rw-r--r-- bruno/users     994 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.04/copyright
    335 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-6.06/
    336 -rw-r--r-- bruno/users       2 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-6.06/changelog
    337 -rw-r--r-- bruno/users     431 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-6.06/control
    338 -rw-r--r-- bruno/users      36 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-6.06/netperf.docs
    339 -rw-r--r-- bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-6.06/netperf.dirs
    340 -rw-r--r-- bruno/users       2 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-6.06/compat
    341 -rw-r--r-- bruno/users    3632 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-6.06/rules
    342 -rw-r--r-- bruno/users     994 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-6.06/copyright
    343 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.10/
    344 -rw-r--r-- bruno/users       2 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.10/changelog
    345 -rw-r--r-- bruno/users     431 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.10/control
    346 -rw-r--r-- bruno/users      36 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.10/netperf.docs
    347 -rw-r--r-- bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.10/netperf.dirs
    348 -rw-r--r-- bruno/users       2 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.10/compat
    349 -rw-r--r-- bruno/users    3632 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.10/rules
    350 -rw-r--r-- bruno/users     994 2007-11-16 00:57 netperf-2.4.4/pbconf/ubuntu-7.10/copyright
    351 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/suse-10.3/
    352 -rw-r--r-- bruno/users     880 2007-11-16 00:57 netperf-2.4.4/pbconf/suse-10.3/netperf.spec
    353 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/rhel-3/
    354 -rw-r--r-- bruno/users     856 2007-11-16 00:57 netperf-2.4.4/pbconf/rhel-3/netperf.spec
    355 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/mandriva-2007.1/
    356 -rw-r--r-- bruno/users     867 2007-11-16 00:57 netperf-2.4.4/pbconf/mandriva-2007.1/netperf.spec
    357 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-3.1/
    358 -rw-r--r-- bruno/users       2 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-3.1/changelog
    359 -rw-r--r-- bruno/users     431 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-3.1/control
    360 -rw-r--r-- bruno/users      36 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-3.1/netperf.docs
    361 -rw-r--r-- bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-3.1/netperf.dirs
    362 -rw-r--r-- bruno/users       2 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-3.1/compat
    363 -rw-r--r-- bruno/users    3632 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-3.1/rules
    364 -rw-r--r-- bruno/users     994 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-3.1/copyright
    365 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/fedora-5/
    366 -rw-r--r-- bruno/users     856 2007-11-16 00:57 netperf-2.4.4/pbconf/fedora-5/netperf.spec
    367 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/fedora-6/
    368 -rw-r--r-- bruno/users     856 2007-11-16 00:57 netperf-2.4.4/pbconf/fedora-6/netperf.spec
    369 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/mandrake-10.2/
    370 -rw-r--r-- bruno/users     867 2007-11-16 00:57 netperf-2.4.4/pbconf/mandrake-10.2/netperf.spec
    371 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/suse-10.2/
    372 -rw-r--r-- bruno/users     880 2007-11-16 00:57 netperf-2.4.4/pbconf/suse-10.2/netperf.spec
    373 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/redhat-9/
    374 -rw-r--r-- bruno/users     856 2007-11-16 00:57 netperf-2.4.4/pbconf/redhat-9/netperf.spec
    375 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/rhel-4/
    376 -rw-r--r-- bruno/users     856 2007-11-16 00:57 netperf-2.4.4/pbconf/rhel-4/netperf.spec
    377 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/mandrake-10.1/
    378 -rw-r--r-- bruno/users     867 2007-11-16 00:57 netperf-2.4.4/pbconf/mandrake-10.1/netperf.spec
    379 drwxr-xr-x bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-4.0/
    380 -rw-r--r-- bruno/users       2 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-4.0/changelog
    381 -rw-r--r-- bruno/users     431 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-4.0/control
    382 -rw-r--r-- bruno/users      36 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-4.0/netperf.docs
    383 -rw-r--r-- bruno/users       0 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-4.0/netperf.dirs
    384 -rw-r--r-- bruno/users       2 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-4.0/compat
    385 -rw-r--r-- bruno/users    3632 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-4.0/rules
    386 -rw-r--r-- bruno/users     994 2007-11-16 00:57 netperf-2.4.4/pbconf/debian-4.0/copyright
    387 -rw-r----- bruno/users    2382 2007-06-02 00:06 netperf-2.4.4/README.ovms
    388 -rwxr-x--- bruno/users    1988 2007-06-02 00:06 netperf-2.4.4/mkinstalldirs
    389 -rw-r----- bruno/users   14022 2007-06-05 03:08 netperf-2.4.4/acinclude.m4
    390 -rw-r----- bruno/users    4203 2007-06-14 18:51 netperf-2.4.4/README.windows
    391 -rw-r----- bruno/users    2100 2007-06-02 00:06 netperf-2.4.4/README
    392 -rw-r----- bruno/users    1048 2007-06-02 00:06 netperf-2.4.4/README.aix
    393 -rw-r----- bruno/users   45985 2007-10-17 18:55 netperf-2.4.4/aclocal.m4
    394 drwxr-x--- bruno/users       0 2007-10-17 23:42 netperf-2.4.4/doc/
    395 -rw-r----- bruno/users    1163 2007-06-02 00:06 netperf-2.4.4/doc/netserver.man
    396 [...]
    397 -rw-r----- bruno/users      27 2007-06-02 00:06 netperf-2.4.4/ChangeLog
    398 drwxr-x--- bruno/users       0 2007-10-17 23:42 netperf-2.4.4/src/
    399 -rw-r----- bruno/users    7777 2007-06-02 00:06 netperf-2.4.4/src/netperf.c
    400 [...]
    401 -rw-r----- bruno/users    4095 2007-08-08 22:30 netperf-2.4.4/src/netsh.h
    402 -rwxr-x--- bruno/users  290760 2007-10-17 18:55 netperf-2.4.4/configure
    403 -rw-r----- bruno/users     106 2007-06-02 00:06 netperf-2.4.4/Makefile.am
    404 -rw-r----- bruno/users   32819 2007-10-17 23:20 netperf-2.4.4/Release_Notes
    405 -rw-r----- bruno/users    9223 2007-10-17 23:42 netperf-2.4.4/config.h.in
    406 -rw-r----- bruno/users       0 2007-06-02 00:06 netperf-2.4.4/NEWS
    407 -rw-r----- bruno/users     258 2007-06-02 00:06 netperf-2.4.4/README.osx
    408 -rwxr-x--- bruno/users   13866 2007-06-02 00:06 netperf-2.4.4/depcomp
    409 -rw-r----- bruno/users    1260 2007-06-02 00:06 netperf-2.4.4/README.solaris
    410 -rwxr-x--- bruno/users    7122 2007-06-02 00:06 netperf-2.4.4/install-sh
    411 -rw-r----- bruno/users    1204 2007-06-02 00:06 netperf-2.4.4/netperf.spec.in
    412 -rwxr-x--- bruno/users   43499 2007-06-02 00:06 netperf-2.4.4/config.guess
    413 -rw-r----- bruno/users   14031 2007-11-16 00:57 netperf-2.4.4/configure.ac
    414 -rw-r----- bruno/users    2079 2007-06-02 00:06 netperf-2.4.4/COPYING
    415 -rwxr-x--- bruno/users   10266 2007-06-02 00:06 netperf-2.4.4/missing
    416 -rw-r----- bruno/users    6013 2007-10-15 19:41 netperf-2.4.4/AUTHORS
    417 -rw-r----- bruno/users    1772 2007-06-02 00:06 netperf-2.4.4/README.hpux
    418 -rw-r----- bruno/users   17464 2007-10-17 18:55 netperf-2.4.4/Makefile.in
    419 -rw-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.4.tar.gz
     331drwxr-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
     334drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/
     335drwxr-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
     337drwxr-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
     339drwxr-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[...]
     342drwxr-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
     350drwxr-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
    420358}}}
    421359As 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.
     
    423361So now, we can try to go to the next step and build a package. So issue:
    424362{{{
    425 $ pb -p netperf -r `pwd` build2pkg
     363$ pb -p netperf -r 2.2.4 build2pkg
    426364Project: netperf
    427365Action: build2pkg
    428366Packages: netperf
    429 Source file: /users/bruno/netperf/delivery/netperf-2.4.4.tar.gz
    430 Working directory: /users/bruno/netperf/build
    431367Extracting build files... OK
    432 Building package with /users/bruno/netperf/build/SPECS/netperf.spec under /users/bruno/netperf/build... Executing(%prep): /bin/sh -e /users/bruno/netperf/build/tmp/rpm-tmp.93873
     368Building package with /users/bruno/project-builder/netperf/build/SPECS/netperf.spec under /users/bruno/project-builder/netperf/build... Executing(%prep): /bin/sh -e /users/bruno/project-builder/netperf/build/tmp/rpm-tmp.70387
    433369+ umask 022
    434 + cd /users/bruno/netperf/build/BUILD
     370+ cd /users/bruno/project-builder/netperf/build/BUILD
    435371+ '[' 1 -eq 1 ']'
    436372+ '[' 1 -eq 1 ']'
    437 [... build execution continues ...]
     373+ '[' 1 -eq 1 ']'
     374+ 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
     377+ tar -xf -
     378+ STATUS=0
     379+ '[' 0 -ne 0 ']'
     380+ cd netperf-2.4.4
     381+ exit 0
     382Executing(%build): /bin/sh -e /users/bruno/project-builder/netperf/build/tmp/rpm-tmp.70387
     383+ umask 022
     384+ cd /users/bruno/project-builder/netperf/build/BUILD
     385+ cd netperf-2.4.4
     386+ '[' 1 -eq 1 ']'
     387+ '[' 1 -eq 1 ']'
     388+ CONFIGURE_TOP=.
     389+ CFLAGS='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fexceptions'
     390+ export CFLAGS
     391+ CXXFLAGS='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fexceptions'
     392+ export CXXFLAGS
     393+ FFLAGS='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fexceptions'
     394+ export FFLAGS
     395+ cputoolize -c .
    438396+ '[' -f ./configure.in -o -f ./configure.ac ']'
    439397+ CONFIGURE_XPATH='--x-includes=/usr/include --x-libraries=/usr/lib64'
    440398+ ./configure x86_64-mandriva-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib64 --localstatedir=/var/lib --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --x-includes=/usr/include --x-libraries=/usr/lib64
    441 [... build execution continues ...]
    442 + make -j4
    443 cd . && /bin/sh /users/bruno/netperf/build/BUILD/netperf-2.4.4/missing --run aclocal-1.7
    444 /users/bruno/netperf/build/BUILD/netperf-2.4.4/missing: line 46: aclocal-1.7: command not found
    445 WARNING: `aclocal-1.7' is missing on your system.  You should only need it if
    446          you modified `acinclude.m4' or `configure.ac'.  You might want
    447          to install the `Automake' and `Perl' packages.  Grab them from
    448          any GNU archive site.
    449 cd . && \
    450           /bin/sh /users/bruno/netperf/build/BUILD/netperf-2.4.4/missing --run automake-1.7 --gnu  Makefile
    451 cd . && /bin/sh /users/bruno/netperf/build/BUILD/netperf-2.4.4/missing --run autoconf
    452 /users/bruno/netperf/build/BUILD/netperf-2.4.4/missing: line 46: automake-1.7: command not found
    453 WARNING: `automake-1.7' is missing on your system.  You should only need it if
    454          you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
    455          You might want to install the `Automake' and `Perl' packages.
    456          Grab them from any GNU archive site.
    457 /bin/sh ./config.status --recheck
    458 [... build execution continues ...]
    459 make[2]: Leaving directory `/users/bruno/netperf/build/BUILD/netperf-2.4.4'
    460 make[1]: Leaving directory `/users/bruno/netperf/build/BUILD/netperf-2.4.4'
     399configure: WARNING: you should use --build, --host, --target
     400checking build system type... x86_64-mandriva-linux-gnu
     401checking host system type... x86_64-mandriva-linux-gnu
     402[...]
     403config.status: creating netperf.spec
     404config.status: creating config.h
     405config.status: executing depfiles commands
     406+ make -j4 VERSION=2.4.4
     407make  all-recursive
     408make[1]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4'
     409Making all in src
     410make[2]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src'
     411Making all in missing
     412make[3]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing'
     413Making all in m4
     414make[4]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing/m4'
     415make[4]: Nothing to be done for `all'.
     416make[4]: Leaving directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing/m4'
     417make[4]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing'
     418make[4]: Nothing to be done for `all-am'.
     419make[4]: Leaving directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing'
     420make[3]: Leaving directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing'
     421make[3]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src'
     422if x86_64-mandriva-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I..     -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fexceptions -MT netperf.o -MD -MP -MF ".deps/netperf.Tpo" \
     423          -c -o netperf.o `test -f 'netperf.c' || echo './'`netperf.c; \
     424        then mv -f ".deps/netperf.Tpo" ".deps/netperf.Po"; \
     425        else rm -f ".deps/netperf.Tpo"; exit 1; \
     426        fi
     427[...]
     428Executing(%doc): /bin/sh -e /users/bruno/project-builder/netperf/build/tmp/rpm-tmp.67195
     429+ umask 022
     430+ cd /users/bruno/project-builder/netperf/build/BUILD
     431+ cd netperf-2.4.4
     432+ DOCDIR=/users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot/usr/share/doc/netperf
     433+ export DOCDIR
     434+ rm -rf /users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot/usr/share/doc/netperf
     435+ /bin/mkdir -p /users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot/usr/share/doc/netperf
     436+ cp -pr ChangeLog /users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot/usr/share/doc/netperf
     437+ cp -pr INSTALL COPYING README AUTHORS NEWS /users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot/usr/share/doc/netperf
    461438+ exit 0
    462 Executing(%install): /bin/sh -e /users/bruno/netperf/build/tmp/rpm-tmp.48294
    463 + umask 022
    464 + cd /users/bruno/netperf/build/BUILD
    465 + cd netperf-2.4.4
    466 + '[' 1 -eq 1 ']'
    467 + /bin/rm -rf /users/bruno/netperf/build/tmp/netperf-2.4.4-1PBSUF-root-bruno
    468 + make DESTDIR=/users/bruno/netperf/build/tmp/netperf-2.4.4-1PBSUF-root-bruno install
    469 Making install in src
    470 [... build execution continues ...]
    471 Checking for unpackaged file(s): /usr/lib/rpm/check-files /users/bruno/netperf/build/tmp/netperf-2.4.4-1PBSUF-root-bruno
     439Finding  Provides: /usr/lib/rpm/mandriva/filter.sh ' ' ' ' '/users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot' /usr/lib/rpm/mandriva/find-provides
     440Finding  Requires: /usr/lib/rpm/mandriva/filter.sh ' ' ' ' '/users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot' /usr/lib/rpm/mandriva/find-requires /users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot x86_64
     441Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
     442Processing files: netperf-debug-2.4.4-1PBSUF
     443Checking for unpackaged file(s): /usr/lib/rpm/check-files /users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot
    472444error: Installed (but unpackaged) file(s) found:
    473445   /usr/bin/netperf
    474446   /usr/bin/netserver
    475    /usr/share/info/netperf.info.bz2
    476    /usr/share/man/man1/netperf.1.bz2
    477    /usr/share/man/man1/netserver.1.bz2
     447   /usr/share/info/netperf.info.lzma
     448   /usr/share/man/man1/netperf.1.lzma
     449   /usr/share/man/man1/netserver.1.lzma
    478450
    479451
     
    482454   /usr/bin/netperf
    483455   /usr/bin/netserver
    484    /usr/share/info/netperf.info.bz2
    485    /usr/share/man/man1/netperf.1.bz2
    486    /usr/share/man/man1/netserver.1.bz2
    487 child (rpmbuild --define "packager Bruno Cornec <bruno@project-builder.org>" --define "_topdir /users/bruno/netperf/build" -ba /users/bruno/netperf/build/SPECS/netperf.spec) exited with value 1
    488 }}}
    489 So it seems we are not there yet ;-) But it's not too bad for just having renamed a couple of files and parameters in our conf files. Now we need to solve those issues and produce the package.
    490 
    491 The first problem we've met, is that the build process seems to need automake and autoconf. However, when build separately with the classical ./configure ; make it doesn't ask for it.
    492 
    493 Project-Builder provide a means when exporting the software to build a coherent automake/autoconf setup by the way of the pbinit script.
    494 
    495 Create now such a script for your project:
    496 {{{
    497 $ cat > pbconf/netperf/pbinit << EOF
    498 #!/bin/bash
    499 aclocal
    500 autoconf
    501 automake
    502 EOF
    503 $ chmod 755 pbconf/netperf/pbinit
    504 }}}
    505 Then it seems that the PBSUF macro isn't expanded correctly. Look for it using a Project-Builder tool:
    506 {{{
    507 $ pbg PBSUF
    508 ./pbconf/pbfilter/rpm.pbf:# PBSUF is replaced by the package name ($pbpkg in code)
    509 ./pbconf/pbfilter/rpm.pbf:#filter PBSUF = $pbsuf
    510 ./pbconf/netperf/rpm/netperf.spec:Release:        PBTAGPBSUF
     456   /usr/share/info/netperf.info.lzma
     457   /usr/share/man/man1/netperf.1.lzma
     458   /usr/share/man/man1/netserver.1.lzma
     459child (rpmbuild --define 'packager "Bruno Cornec <bruno@project-builder.org>"' --define "_topdir /users/bruno/project-builder/netperf/build" -ba /users/bruno/project-builder/netperf/build/SPECS/netperf.spec) exited with value 1
     460Checking validity of rpms with rpmlint... Error: no installed packages by name RPMS/*/netperf-2.4.4-1.mdv2008.0.*.rpm
     461Error: no installed packages by name SRPMS/netperf-2.4.4-1.mdv2008.0.src.rpm
     462OK
     463}}}
     464So it seems we are not there yet ;-) But it's not too bad for just having edited a couple of files and parameters in our conf files. Now we need to solve those issues and produce the package.
     465
     466First it seems that the PBSUF macro isn't expanded correctly. Look for it using a Project-Builder tool:
     467{{{
     468$ (cd netperf/pbconf ; pbg PBSUF)
     469./2.4.4/pbfilter/rpm.pbf:# PBSUF is replaced by the package name ($pbpkg in code)
     470./2.4.4/pbfilter/rpm.pbf:#filter PBSUF = $pbsuf
     471./2.4.4/netperf/rpm/netperf.spec:Release:        PBTAGPBSUF
    511472}}}
    512473So indeed that macro is used in our spec file, but is only declared for rpm types of build in the rpm filter file. However it's currently commented. So edit that file to validate it, as well as the other variables needed:
    513474{{{
    514 $ cat ./pbconf/pbfilter/rpm.pbf
     475$ cat netperf/pbconf/2.4.4/pbfilter/rpm.pbf
    515476#
    516477# $Id$
     
    521482# PBGRP is replaced by the RPM group of apps
    522483# Cf: http://fedoraproject.org/wiki/RPMGroups
    523 filter PBGRP = Applications/Network
     484#filter PBGRP = Applications/Archiving
     485
     486# PBLIC is replaced by the license of the application
     487# Cf: http://fedoraproject.org/wiki/Licensing
     488#filter PBLIC = GPL
    524489
    525490# PBDEP is replaced by the list of dependencies
    526 # filter PBDEP =
    527 
    528 # PBSUF is replaced by the package name ($pbpkg in code)
     491#filter PBDEP =
     492
     493# PBSUF is replaced by the package suffix ($pbsuf in code)
    529494filter PBSUF = $pbsuf
    530495
     
    544509}}}
    545510
    546 Now you're ready for your second run !
    547 {{{
    548 $ pb -p netperf -r `pwd` cms2pkg
     511Now you're ready for your second run ! This time chain the 2 steos by generating from CMS to a package with cms2pkg (as you need to reparse the conf files):
     512{{{
     513$ pb -p netperf -r 2.2.4 cms2pkg
    549514[... build process ...]
    550 Wrote: /users/bruno/netperf/build/SRPMS/netperf-2.4.4-1.mdv2007.1.src.rpm
    551 Wrote: /users/bruno/netperf/build/RPMS/x86_64/netperf-2.4.4-1.mdv2007.1.x86_64.rpm
    552 Wrote: /users/bruno/netperf/build/RPMS/x86_64/netperf-debug-2.4.4-1.mdv2007.1.x86_64.rpm
     515Wrote: /users/bruno/project-builder/netperf/build/SRPMS/netperf-2.4.4-1.mdv2008.0.src.rpm
     516Wrote: /users/bruno/project-builder/netperf/build/RPMS/x86_64/netperf-2.4.4-1.mdv2008.0.x86_64.rpm
     517Wrote: /users/bruno/project-builder/netperf/build/RPMS/x86_64/netperf-debug-2.4.4-1.mdv2008.0.x86_64.rpm
    553518[... build process ...]
    554 Checking validity of rpms with rpmlint... E: netperf no-changelogname-tag
    555 E: netperf zero-length /usr/share/doc/netperf-2.4.4/NEWS
    556 E: netperf info-files-without-install-info-postin /usr/share/info/netperf.info.bz2
    557 E: netperf info-files-without-install-info-postun /usr/share/info/netperf.info.bz2
    558 E: netperf no-signature
    559 E: netperf no-changelogname-tag
    560 E: netperf no-signature
     519Checking validity of rpms with rpmlint... W: netperf manpage-not-bzipped /usr/share/man/man1/netperf.1.lzma
     520W: netperf infopage-not-bzipped /usr/share/info/netperf.info.lzma
     521W: netperf manpage-not-bzipped /usr/share/man/man1/netserver.1.lzma
     522E: netperf zero-length /usr/share/doc/netperf/NEWS
     523E: netperf info-files-without-install-info-postin /usr/share/info/netperf.info.lzma
     524[...]
    561525$
    562526}}}
     
    564528You can try to install it and check if it works:
    565529{{{
    566 $ sudo urpmi /users/bruno/netperf/build/RPMS/x86_64/netperf-2.4.4-1.mdv2007.1.x86_64.rpm
    567 
    568 installation de netperf-2.4.4-1.mdv2007.1.x86_64.rpm depuis /users/bruno/netperf/build/RPMS/x86_64
     530$ sudo urpmi /users/bruno/project-builder/netperf/build/RPMS/x86_64/netperf-2.4.4-1.mdv2008.0.x86_64.rpm
     531
     532installation de netperf-2.4.4-1.mdv2008.0.x86_64.rpm depuis /users/bruno/project-builder/netperf/build/RPMS/x86_64
    569533Préparation ...                  ##########################################################################
    570534      1/1: netperf               ##########################################################################
     535
    571536$ sudo netserver
    572537Starting netserver at port 12865
     
    579544bytes  bytes   bytes    secs.    10^6bits/sec
    580545
    581  87380  16384  16384    10.00    3665.59
     546 87380  16384  16384    10.00    8697.72
    582547}}}
    583548
    584549So it seems to work. Check now the RPM:
    585550{{{
    586 $ rpm -ql netperf
    587 /usr/bin/netperf
    588 /usr/bin/netserver
    589 /usr/share/doc/netperf-2.4.4
    590 /usr/share/doc/netperf-2.4.4/AUTHORS
    591 /usr/share/doc/netperf-2.4.4/COPYING
    592 /usr/share/doc/netperf-2.4.4/ChangeLog
    593 /usr/share/doc/netperf-2.4.4/INSTALL
    594 /usr/share/doc/netperf-2.4.4/NEWS
    595 /usr/share/doc/netperf-2.4.4/README
    596 /usr/share/info/netperf.info.bz2
    597 /usr/share/man/man1/netperf.1.bz2
    598 /usr/share/man/man1/netserver.1.bz2
     551$ rpm -qlv netperf
     552-rwxr-xr-x    1 root    root           103160 mar 31 00:06 /usr/bin/netperf
     553-rwxr-xr-x    1 root    root           110904 mar 31 00:06 /usr/bin/netserver
     554drwxr-xr-x    2 root    root                0 mar 31 00:06 /usr/share/doc/netperf
     555-rw-r--r--    1 root    root             6013 oct 15 19:41 /usr/share/doc/netperf/AUTHORS
     556-rw-r--r--    1 root    root             2079 jun  2  2007 /usr/share/doc/netperf/COPYING
     557-rw-r--r--    1 root    root               27 jun  2  2007 /usr/share/doc/netperf/ChangeLog
     558-rw-r--r--    1 root    root             9240 jun  2  2007 /usr/share/doc/netperf/INSTALL
     559-rw-r--r--    1 root    root                0 jun  2  2007 /usr/share/doc/netperf/NEWS
     560[...]
     561-rw-r--r--    1 root    root            32819 oct 17 23:20 /usr/share/doc/netperf/Release_Notes
     562drwxr-xr-x    2 root    root                0 mar 31 00:06 /usr/share/doc/netperf/examples
     563-rw-r--r--    1 root    root             7986 mar 31 00:06 /usr/share/doc/netperf/examples/Makefile
     564-rw-r--r--    1 root    root              467 jun  2  2007 /usr/share/doc/netperf/examples/Makefile.am
     565[...]
     566-rw-r--r--    1 root    root            30803 mar 31 00:06 /usr/share/info/netperf.info.lzma
     567-rw-r--r--    1 root    root             2702 mar 31 00:06 /usr/share/man/man1/netperf.1.lzma
     568-rw-r--r--    1 root    root              696 mar 31 00:06 /usr/share/man/man1/netserver.1.lzma
    599569$ rpm -qi netperf
    600570Name        : netperf                      Relocations: (not relocatable)
    601571Version     : 2.4.4                             Vendor: (none)
    602 Release     : 1.mdv2007.1                   Build Date: sam 17 nov 2007 00:40:33 CET
    603 Install Date: sam 17 nov 2007 00:47:29 CET      Build Host: victoria2.home.musique-ancienne.org
    604 Group       : Archiving/Backup              Source RPM: netperf-2.4.4-1.mdv2007.1.src.rpm
    605 Size        : 263698                           License: GPL
     572Release     : 1.mdv2008.0                   Build Date: lun 31 mar 2008 00:06:37 CEST
     573Install Date: lun 31 mar 2008 00:07:36 CEST      Build Host: victoria2.home.musique-ancienne.org
     574Group       : Applications/Networking       Source RPM: netperf-2.4.4-1.mdv2008.0.src.rpm
     575Size        : 368064                           License: GPL
    606576Signature   : (none)
    607 Packager    : Bruno Cornec <bruno@project-builder.org>
     577Packager    : "Bruno Cornec <bruno@project-builder.org>"
    608578URL         : http://www.netperf.org
    609579Summary     : netperf est un outil de benchmark réseau
     
    613583$
    614584}}}
    615 So we still have an issue with the Group used and the changelog which is empty. Also some modes are wrong and our NEWS file is empty. Again Project-Builder can will with those issues.
     585So we still have an issue with the changelog which is empty. Also some modes are wrong and our NEWS file is empty. Again Project-Builder can will with those issues.
    616586You'll have for that to create a new file under pbconf/netperf called pbcl which will be the changelog file for your project:
    617587{{{
    618 $ cp netperf-2.4.4/Release_Notes pbconf/netperf/pbcl
    619 $ vi pbconf/netperf/pbcl
     588$ cp netperf/build/BUILD/netperf-2.4.4/Release_Notes netperf/pbconf/2.4.4/netperf/pbcl
     589$ vi netperf/pbconf/2.4.4/netperf/pbcl
    620590[... format modifications ...]
    621 $ head -20 pbconf/netperf/pbcl
     591$ head -20 netperf/pbconf/2.4.4/netperf/pbcl
    622592# $Id$
    623593
    624594NETPERF CHANGES
    625595
    626 2.4.4 (2007-11-16)
     5962.4.4 (2008-03-30)
    627597-  The LOC_CPU and REM_CPU tests will report their respective beliefs
    628598   as to the number of CPUs present when the verbosity is set to more
     
    639609-  It is no longer necessary to specify a file with the global -F
    640610   option when running a _SENDFILE test.  Netperf will create a
    641    temporary file and populate it with random data and use that.  If
    642 $
    643 EOF
    644 }}}
    645 The format of the pbcl file is strict. It has 4 initital lines that you can use the way you want, the the 5th line should have 'Version (date)' wwith date using ISO format, then the following lines are the changelog content of that version. Then after a blank line, again a 'Version (date)' and the changelog, etc...
    646 
    647 I also decide to remove the useless files in the distribution, and replace them  with those that Project-Builder will generate from the pbcl file we just created from Release_Notes:
    648 {{{
    649 $ rm netperf-2.4.4/ChangeLog netperf-2.4.4/NEWS
    650 }}}
     611   temporary file and populate it with random data and use that.
     612}}}
     613The format of the pbcl file is strict. It has 4 initital lines that you can use the way you want, the 5th line should have 'Version (date)' with date using ISO format, then the following lines are the changelog content of that version. Then after a blank line, again a 'Version (date)' and the changelog, etc...
    651614
    652615Ready to check again:
    653616{{{
    654 $ pb -p netperf -r `pwd` cms2pkg
     617$ pb -p netperf -r 2.2.4 cms2pkg
    655618Project: netperf
    656619Action: cms2pkg