wiki:NetPerfExample

Version 16 (modified by Bruno Cornec, 16 years ago) ( diff )

--

Example of use on netperf (simple example)

As 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 NetPerf project.

You first have to create a .pbrc configuration file in your home directory, which will setup things globally:

$ cat > ~/.pbrc << EOF
#
# Define for each project the URL of its pbconf repository
# No default option allowed here as they need to be all different
#
pbconfurl netperf = svn+ssh://svn.mondorescue.org/mondo/svn/project-builder/netperf/pbconf

#
# Under that dir will take place everything related to pb
# If you want to use VMs/chroot/..., then use $ENV{'HOME'} to make it portable
# to your VMs/chroot/...
# if not defined then /var/cache
pbdefdir default = $ENV{'HOME'}/project-builder

EOF

Note that the format is in general

pb-keyword project = value

which 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.

The pbconfurl keyword indicates where are stored the configuration files for pb allowing us to build netperf packages with them. Here 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.

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.

The 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.

You will now need to get the latest and greatest project-builder software from our 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.

$ pb -p netperf -r 2.4.4 newproj netperf
Packages: netperf

Do not to forget to commit the pbconf directory in your CMS if needed
Project: netperf
Action: newproj

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.

Edit it and adapt it. After edition, here is the resulting file:

$ cd $HOME/project-builder/
$ ls -R netperf/pbconf/2.4.4/
netperf/pbconf/2.4.4/:
netperf  netperf.pb  pbfilter

netperf/pbconf/2.4.4/netperf:
deb  pbfilter  rpm

netperf/pbconf/2.4.4/netperf/deb:
changelog  compat  control  copyright  netperf.docs  netperf.dirs  rules

netperf/pbconf/2.4.4/netperf/pbfilter:

netperf/pbconf/2.4.4/netperf/rpm:
netperf.spec

netperf/pbconf/2.4.4/pbfilter:
all.pbf  deb.pbf  md.pbf  novell.pbf  rpm.pbf
$
$ vi netperf/pbconf/2.4.4/netperf.pb
[Modifications here]
$ cat netperf/pbconf/2.4.4/netperf.pb
#
# Project Builder configuration file
# For project netperf
#
# $Id$
#

#
# What is the project URL
#
#pburl netperf = svn://svn.netperf.org/netperf/devel
#pburl netperf = svn://svn+ssh.netperf.org/netperf/devel
#pburl netperf = cvs://cvs.netperf.org/netperf/devel
#pburl netperf = http://www.netperf.org/src/netperf-devel.tar.gz
pburl netperf = ftp://ftp.netperf.org/netperf/netperf-2.4.4.tar.bz2
#pburl netperf = file:///src/netperf-devel.tar.gz
#pburl netperf = dir:///src/netperf-devel

# Check whether project is well formed 
# (containing already a directory with the project-version name)
pbwf netperf = 1

#
# Packager label
#
pbpackager netperf = Bruno Cornec <bruno@project-builder.org>
#

# For delivery to a machine by SSH (potentially the FTP server)
# Needs hostname, account and directory
#
sshhost netperf = www.project-builder.org
sshlogin netperf = pb
sshdir netperf = /mondo/ftp
sshport netperf = 22

#
# For Virtual machines management
# Naming convention to follow: distribution name (as per ProjectBuilder::Distribution)
# followed by '-' and by release number
# followed by '-' and by architecture
# a .vmtype extension will be added to the resulting string
# a QEMU rhel-3-i286 here means that the VM will be named rhel-3-i386.qemu
#
vmlist 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

#
# Valid values for vmtype are
# qemu, (vmware, xen, ... TBD)
vmtype netperf = qemu

# Hash for VM stuff on vmtype
#vmntp default = pool.ntp.org

# We suppose we can commmunicate with the VM through SSH
vmhost netperf = localhost
vmlogin netperf = pb
vmport netperf = 2222

# Timeout to wait when VM is launched/stopped
vmtmout default = 120

# per VMs needed paramaters
vmopt netperf = -m 384 -daemonize
vmpath netperf = /home/qemu
vmsize netperf = 5G

# 
# For Virtual environment management
# Naming convention to follow: distribution name (as per ProjectBuilder::Distribution)
# followed by '-' and by release number
# followed by '-' and by architecture
# a .vetype extension will be added to the resulting string
# a chroot rhel-3-i286 here means that the VE will be named rhel-3-i386.chroot
#
#velist netperf = fedora-7-i386

# VE params
#vetype netperf = chroot
#ventp default = pool.ntp.org
#velogin netperf = pb
#vepath netperf = /var/lib/mock
#veconf netperf = /etc/mock
#verebuild netperf = false

#
# Global version/tag for the project
#
projver netperf = 2.4.4
projtag netperf = 1

# Hash of valid version names
version netperf = devel

# Adapt to your needs:
# Optional if you need to overwrite the global values above
#
#pkgver netperf = stable
#pkgtag netperf = 3
# Hash of default package/package directory
defpkgdir netperf = netperf-2.4.4
# Hash of additional package/package directory
#extpkgdir minor-pkg = dir-minor-pkg

# List of files per pkg on which to apply filters
# Files are mentioned relatively to pbroot/defpkgdir
#filteredfiles netperf = Makefile.PL,configure.in,install.sh,netperf.8
#supfiles netperf = netperf.init

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. Once 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:

$ svn add netperf
A      netperf
A      netperf/pbconf
A      netperf/pbconf/2.4.4
A      netperf/pbconf/2.4.4/netperf.pb
[..]
A      netperf/pbconf/2.4.4/pbfilter/all.pbf
$ svn ci -m "Adding pb info for netperf"
Ajout          netperf
Ajout          netperf/pbconf
Ajout          netperf/pbconf/2.4.4
[...]
Ajout          netperf/pbconf/2.4.4/pbfilter/rpm.pbf
[...]
$ svn up
[...]
$ pb -p netperf -r 2.4.4 cms2build
Project: netperf
Action: cms2build
Packages: netperf

Management of netperf 2.4.4-1 (rev flat)
 ... 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]
OK
Extracting /users/bruno/tmp/pb.yE9sNZXV0A/netperf-2.4.4.tar.bz2 in /users/bruno/project-builder/netperf/delivery... OK
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,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
No Build files found for gentoo-nover
Creating netperf tar files compressed... OK
Under /users/bruno/project-builder/netperf/delivery/netperf-2.4.4.tar.gz

Ok 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.

Now 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.

$ vi netperf/pbconf/2.4.4/netperf/rpm/netperf.spec
[Modifications here]
$ cat netperf/pbconf/2.4.4/netperf/rpm/netperf.spec
#
# $Id$
#

Summary:        The netperf tool is a benchmarking network tool
Summary(fr):    netperf est un outil de benchmark réseau

Name:           PBPKG
Version:        PBVER
Release:        PBTAGPBSUF
License:        PBLIC
Group:          PBGRP
Url:            PBURL
Source:         PBSRC
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)

%description
PBDESC

%description -l fr
netperf est un outil de benchmark réseau

%prep
%setup -q

%build
./configure
make %{?_smp_mflags} VERSION=%{version}

%install
%{__rm} -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc ChangeLog
%doc INSTALL COPYING README AUTHORS NEWS

%changelog
PBLOG

That 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.

So now that we have the base for our spec file, we need to look at those filters:

$ vi netperf/pbconf/2.4.4/pbfilter/all.pbf
[Modifications here]
$ cat netperf/pbconf/2.4.4/pbfilter/all.pbf
#
# $Id$
#
# Filter for all files
#
# PBSRC is replaced by the source package format
filter PBSRC = ftp://ftp.netperf.org/netperf/%{name}-%{version}.tar.gz

# PBVER is replaced by the version ($pbver in code)
filter PBVER = $pbver

# PBDATE is replaced by the date ($pbdate in code)
filter PBDATE = $pbdate

# PBLOG is replaced by the changelog if value is yes
filter PBLOG = yes

# PBTAG is replaced by the tag ($pbtag in code)
filter PBTAG = $pbtag

# PBREV is replaced by the revision ($pbrev in code)
filter PBREV = $pbrev

# PBPKG is replaced by the package name ($pbpkg in code)
filter PBPKG = $pbpkg

# PBPACKAGER is replaced by the packager name ($pbpackager in code)
filter PBPACKAGER = $pbpackager

# PBDESC contains the description of the package
filter PBDESC = "netperf is a network benchmarking tool"

# PBURL contains the URL of the Web site of the project
filter PBURL = http://www.netperf.org

We can now try again to use pb to create again our build file with macro expansion:

$ pb -p netperf -r 2.4.4 cms2build
Project: netperf
Action: cms2build
Packages: netperf

Management of netperf 2.4.4-1 (rev flat)
[... same output as previously...]
Under /users/bruno/project-builder/netperf/delivery/netperf-2.4.4.tar.gz

You have now your first useful result from pb :-) Congrats ! Well 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:

tar tvfz /users/bruno/project-builder/netperf/delivery/netperf-2.4.4.tar.gz
drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/
-rw-r--r-- bruno/users      30 2007-10-16 20:00 netperf-2.4.4/inet_ntop.c
-rwxr-xr-x bruno/users   31743 2007-06-02 00:06 netperf-2.4.4/config.sub
drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/
drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/suse-10.0/
-rw-r--r-- bruno/users     885 2008-03-30 23:30 netperf-2.4.4/pbconf/suse-10.0/netperf.spec
drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/rhel-5/
-rw-r--r-- bruno/users     861 2008-03-30 23:30 netperf-2.4.4/pbconf/rhel-5/netperf.spec
drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/fedora-4/
-rw-r--r-- bruno/users     861 2008-03-30 23:30 netperf-2.4.4/pbconf/fedora-4/netperf.spec
[...]
drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/
-rw-r--r-- bruno/users       2 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/changelog
-rw-r--r-- bruno/users     435 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/control
-rw-r--r-- bruno/users      36 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/netperf.docs
-rw-r--r-- bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/pkg1.dirs
-rw-r--r-- bruno/users       2 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/compat
-rw-r--r-- bruno/users    3632 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/rules
-rw-r--r-- bruno/users     996 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-7.04/copyright
drwxr-xr-x bruno/users       0 2008-03-30 23:30 netperf-2.4.4/pbconf/ubuntu-6.06/
[...]
-rw-r--r-- bruno/users    2382 2007-06-02 00:06 netperf-2.4.4/README.ovms
-rwxr-xr-x bruno/users    1988 2007-06-02 00:06 netperf-2.4.4/mkinstalldirs
-rw-r--r-- bruno/users   14022 2007-06-05 03:08 netperf-2.4.4/acinclude.m4
[...]
-rw-r--r-- bruno/users   17464 2007-10-17 18:55 netperf-2.4.4/Makefile.in
-rw-r--r-- bruno/users    9240 2007-06-02 00:06 netperf-2.4.4/INSTALL

As 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.

So now, we can try to go to the next step and build a package. So issue:

$ pb -p netperf -r 2.4.4 build2pkg
Project: netperf
Action: build2pkg
Packages: netperf
Extracting build files... OK
Building 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
+ umask 022
+ cd /users/bruno/project-builder/netperf/build/BUILD
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ cd /users/bruno/project-builder/netperf/build/BUILD
+ rm -rf netperf-2.4.4
+ /usr/bin/gzip -dc /users/bruno/project-builder/netperf/build/SOURCES/netperf-2.4.4.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd netperf-2.4.4
+ exit 0
Executing(%build): /bin/sh -e /users/bruno/project-builder/netperf/build/tmp/rpm-tmp.70387
+ umask 022
+ cd /users/bruno/project-builder/netperf/build/BUILD
+ cd netperf-2.4.4
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ CONFIGURE_TOP=.
+ CFLAGS='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fexceptions'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fexceptions'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fexceptions'
+ export FFLAGS
+ cputoolize -c .
+ '[' -f ./configure.in -o -f ./configure.ac ']'
+ CONFIGURE_XPATH='--x-includes=/usr/include --x-libraries=/usr/lib64'
+ ./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
configure: WARNING: you should use --build, --host, --target
checking build system type... x86_64-mandriva-linux-gnu
checking host system type... x86_64-mandriva-linux-gnu
[...]
config.status: creating netperf.spec
config.status: creating config.h
config.status: executing depfiles commands
+ make -j4 VERSION=2.4.4
make  all-recursive
make[1]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4'
Making all in src
make[2]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src'
Making all in missing
make[3]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing'
Making all in m4
make[4]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing/m4'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing/m4'
make[4]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing'
make[3]: Leaving directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src/missing'
make[3]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src'
if 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" \
          -c -o netperf.o `test -f 'netperf.c' || echo './'`netperf.c; \
        then mv -f ".deps/netperf.Tpo" ".deps/netperf.Po"; \
        else rm -f ".deps/netperf.Tpo"; exit 1; \
        fi
[...]
Executing(%doc): /bin/sh -e /users/bruno/project-builder/netperf/build/tmp/rpm-tmp.67195
+ umask 022
+ cd /users/bruno/project-builder/netperf/build/BUILD
+ cd netperf-2.4.4
+ DOCDIR=/users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot/usr/share/doc/netperf
+ export DOCDIR
+ rm -rf /users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot/usr/share/doc/netperf
+ /bin/mkdir -p /users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot/usr/share/doc/netperf
+ cp -pr ChangeLog /users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot/usr/share/doc/netperf
+ cp -pr INSTALL COPYING README AUTHORS NEWS /users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot/usr/share/doc/netperf
+ exit 0
Finding  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
Finding  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
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
Processing files: netperf-debug-2.4.4-1PBSUF
Checking for unpackaged file(s): /usr/lib/rpm/check-files /users/bruno/project-builder/netperf/build/tmp/netperf-2.4.4-1PBSUF-buildroot
error: Installed (but unpackaged) file(s) found:
   /usr/bin/netperf
   /usr/bin/netserver
   /usr/share/info/netperf.info.lzma
   /usr/share/man/man1/netperf.1.lzma
   /usr/share/man/man1/netserver.1.lzma


RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/bin/netperf
   /usr/bin/netserver
   /usr/share/info/netperf.info.lzma
   /usr/share/man/man1/netperf.1.lzma
   /usr/share/man/man1/netserver.1.lzma
child (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
Checking validity of rpms with rpmlint... Error: no installed packages by name RPMS/*/netperf-2.4.4-1.mdv2008.0.*.rpm
Error: no installed packages by name SRPMS/netperf-2.4.4-1.mdv2008.0.src.rpm
OK

So 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.

First it seems that the PBSUF macro isn't expanded correctly. Look for it using a Project-Builder tool:

$ (cd netperf/pbconf ; pbg PBSUF)
./2.4.4/pbfilter/rpm.pbf:# PBSUF is replaced by the package name ($pbpkg in code)
./2.4.4/pbfilter/rpm.pbf:#filter PBSUF = $pbsuf
./2.4.4/netperf/rpm/netperf.spec:Release:        PBTAGPBSUF

So 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:

$ cat netperf/pbconf/2.4.4/pbfilter/rpm.pbf
#
# $Id$
#
# Filter for rpm build
#

# PBGRP is replaced by the RPM group of apps
# Cf: http://fedoraproject.org/wiki/RPMGroups
#filter PBGRP = Applications/Archiving

# PBLIC is replaced by the license of the application
# Cf: http://fedoraproject.org/wiki/Licensing
#filter PBLIC = GPL

# PBDEP is replaced by the list of dependencies
#filter PBDEP =

# PBSUF is replaced by the package suffix ($pbsuf in code)
filter PBSUF = $pbsuf

# PBOBS is replaced by the Obsolete line
#filter PBOBS =

And our final current problem is the list of files produced by the build process that need to be referenced in our %files session. So modify that section of the spec file to read like this:

%files
%defattr(-,root,root)
%doc ChangeLog
%doc INSTALL COPYING README AUTHORS NEWS
%doc README.* Release_Notes doc/examples
%{_bindir}/*
%{_mandir}/*/*
%{_infodir}/*

Now 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):

$ pb -p netperf -r 2.4.4 cms2pkg
[... build process ...]
Wrote: /users/bruno/project-builder/netperf/build/SRPMS/netperf-2.4.4-1.mdv2008.0.src.rpm
Wrote: /users/bruno/project-builder/netperf/build/RPMS/x86_64/netperf-2.4.4-1.mdv2008.0.x86_64.rpm
Wrote: /users/bruno/project-builder/netperf/build/RPMS/x86_64/netperf-debug-2.4.4-1.mdv2008.0.x86_64.rpm
[... build process ...]
Checking validity of rpms with rpmlint... W: netperf manpage-not-bzipped /usr/share/man/man1/netperf.1.lzma
W: netperf infopage-not-bzipped /usr/share/info/netperf.info.lzma
W: netperf manpage-not-bzipped /usr/share/man/man1/netserver.1.lzma
E: netperf zero-length /usr/share/doc/netperf/NEWS
E: netperf info-files-without-install-info-postin /usr/share/info/netperf.info.lzma
[...]
$

So this time we have an RPM ! You can try to install it and check if it works:

$ sudo urpmi /users/bruno/project-builder/netperf/build/RPMS/x86_64/netperf-2.4.4-1.mdv2008.0.x86_64.rpm 

installation de netperf-2.4.4-1.mdv2008.0.x86_64.rpm depuis /users/bruno/project-builder/netperf/build/RPMS/x86_64
Préparation ...                  ##########################################################################
      1/1: netperf               ##########################################################################

$ sudo netserver
Starting netserver at port 12865
Starting netserver at hostname 0.0.0.0 port 12865 and family AF_UNSPEC
$ sudo netperf
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to victoria2.home.musique-ancienne.org (127.0.0.1) port 0 AF_INET
Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 87380  16384  16384    10.00    8697.72

So it seems to work. Check now the RPM:

$ rpm -qlv netperf
-rwxr-xr-x    1 root    root           103160 mar 31 00:06 /usr/bin/netperf
-rwxr-xr-x    1 root    root           110904 mar 31 00:06 /usr/bin/netserver
drwxr-xr-x    2 root    root                0 mar 31 00:06 /usr/share/doc/netperf
-rw-r--r--    1 root    root             6013 oct 15 19:41 /usr/share/doc/netperf/AUTHORS
-rw-r--r--    1 root    root             2079 jun  2  2007 /usr/share/doc/netperf/COPYING
-rw-r--r--    1 root    root               27 jun  2  2007 /usr/share/doc/netperf/ChangeLog
-rw-r--r--    1 root    root             9240 jun  2  2007 /usr/share/doc/netperf/INSTALL
-rw-r--r--    1 root    root                0 jun  2  2007 /usr/share/doc/netperf/NEWS
[...]
-rw-r--r--    1 root    root            32819 oct 17 23:20 /usr/share/doc/netperf/Release_Notes
drwxr-xr-x    2 root    root                0 mar 31 00:06 /usr/share/doc/netperf/examples
-rw-r--r--    1 root    root             7986 mar 31 00:06 /usr/share/doc/netperf/examples/Makefile
-rw-r--r--    1 root    root              467 jun  2  2007 /usr/share/doc/netperf/examples/Makefile.am
[...]
-rw-r--r--    1 root    root            30803 mar 31 00:06 /usr/share/info/netperf.info.lzma
-rw-r--r--    1 root    root             2702 mar 31 00:06 /usr/share/man/man1/netperf.1.lzma
-rw-r--r--    1 root    root              696 mar 31 00:06 /usr/share/man/man1/netserver.1.lzma
$ rpm -qi netperf
Name        : netperf                      Relocations: (not relocatable)
Version     : 2.4.4                             Vendor: (none)
Release     : 1.mdv2008.0                   Build Date: lun 31 mar 2008 00:06:37 CEST
Install Date: lun 31 mar 2008 00:07:36 CEST      Build Host: victoria2.home.musique-ancienne.org
Group       : Applications/Networking       Source RPM: netperf-2.4.4-1.mdv2008.0.src.rpm
Size        : 368064                           License: GPL
Signature   : (none)
Packager    : "Bruno Cornec <bruno@project-builder.org>"
URL         : http://www.netperf.org
Summary     : netperf est un outil de benchmark réseau
Description :
netperf est un outil de benchmark réseau
$ rpm -q --changelog netperf
$ 

So 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. You'll have for that to create a new file under pbconf/netperf called pbcl which will be the changelog file for your project:

$ cp netperf/build/BUILD/netperf-2.4.4/Release_Notes netperf/pbconf/2.4.4/netperf/pbcl
$ vi netperf/pbconf/2.4.4/netperf/pbcl
[... format modifications ...]
$ head -20 netperf/pbconf/2.4.4/netperf/pbcl
# $Id$

NETPERF CHANGES

2.4.4 (2008-03-30)
-  The LOC_CPU and REM_CPU tests will report their respective beliefs
   as to the number of CPUs present when the verbosity is set to more
   than one.  This can be used when trying to diagnose issues with CPU
   utilization.
-  A kind soul who wishes to remain anonymous provided a patch to
   enable use of sendfile() on OSX.
-  Fix a misplaced \n in a format string of send_tcp_maerts, courtesy
   of Alexander Duyck.
-  There is an experimental global -r option which will allow one to
   include CPU utilization measurements, but make the decision about
   hitting confidence based on the result only.  The test banner will
   reflects this when -r is used.
-  It is no longer necessary to specify a file with the global -F
   option when running a _SENDFILE test.  Netperf will create a
   temporary file and populate it with random data and use that.

The 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...

Ready to check again:

$ pb -p netperf -r 2.4.4 cms2pkg
[... build continues ...]

More verifications:

$ sudo rpm -Uvh --force /users/bruno/project-builder/netperf/build/RPMS/x86_64/netperf-2.4.4-1.mdv2008.0.x86_64.rpm

Préparation...              ########################################### [100%]
   1:netperf                ########################################### [100%]
$ rpm -q --changelog netperf | head
* dim mar 30 2008 Bruno Cornec <bruno@project-builder.org> 2.4.4-1.mdv2008.0
- Updated to 2.4.4
-  The LOC_CPU and REM_CPU tests will report their respective beliefs
   as to the number of CPUs present when the verbosity is set to more
   than one.  This can be used when trying to diagnose issues with CPU
   utilization.
-  A kind soul who wishes to remain anonymous provided a patch to
   enable use of sendfile() on OSX.
-  Fix a misplaced \n in a format string of send_tcp_maerts, courtesy
   of Alexander Duyck.
$ 

So we now have a much more correct rpm built, even if not everything is solved (In order to get a good NEWS file, we whould remove the empty one part of netperf). The beauty of Project-Builder will now appear, as it's as easy to generate more RPMs for other distributions than it is for your native distribution.

Imagine you want to build the same RPMs for Fedora 6, instead of your native distribution. First download the ISO image of this distribution and put it where you have space on your disk. Then call pb to help you create a new virtual machine for that distribution:

$ pb -p netperf -r 2.4.4 -m fedora-6-i386 -i ~/Download/Fedora-6-i386-DVD.iso newvm
Project: nerperf
Action: newvm
Creating the QEMU VM... Formating '/users/qemu/fedora-6-i386.qemu', fmt=qcow2, size=5242880 kB
OK
Launching the VM /users/qemu/fedora-6-i386.qemu... OK
Waiting for VM fedora-6-i386 to come up...

Then the Virtual Machine is launched booting on your CD, and the rest is just a classical installation of a Linux distribution. Just check that you've installed a sshd package (generally OpenSSH) and that you're allowed to login as root via ssh. This will be used in the next step. I also especially disable firewall and SElinux on the VM. Once your distribution is installed, stop the VM and relaunch it to finish the setup with:

$ pb -p netperf -r 2.4.4 -m fedora-6-i386 launchvm
Project: netperf
Action: launchvm
Launching the VM /users/qemu/fedora-6-i386.qemu... OK
Waiting for VM fedora-6-i386 to come up...           

At the end of this initial setup phase log as root on your new VM installation. Check that your update mechanism for yum is correct and that you can connect on this VM as root with ssh.

So now you can finish to set up the VM by installing and configuring all what is necessary for pb to work flawlessly. There is an option to pb to exactly do that:

$ pb -p netperf -r 2.4.4 -m fedora-6-i386 setupvm
Project: netperf
Action: setupvm
Copying local keys to vm. This will require the root password... root@localhost passwd:
Found an existing VM /users/qemu/fedora-6-i386.qemu (pid 30675)
Packages: netperf
Sources handled (Script): /users/bruno/project-builder/netperf/delivery/pbscript
Preparing project-builder/src on root@localhost:project-builder/src... OK
pbscript                                                                   100%   12KB  11.7KB/s   00:00
OK
Executing pbscript on root@localhost:project-builder/src if needed... distro tuple: fedora,6,rh,rpm,.fc6
Loading "installonlyn" plugin
Cleaning up Everything
Loading "installonlyn" plugin
[...]

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 perl-DateManip          noarch     5.44-2.fc6       updates           143 k
 rpm-build               i386       4.4.2.1-2.fc6    updates           640 k
Updating:
 ntp                     i386       4.2.4p2-1.fc6    updates           1.4 M
 wget                    i386       1.10.2-8.fc6.1   updates           581 k
Installing for dependencies:
 elfutils                i386       0.131-1.fc6      updates           211 k
 elfutils-libelf-devel-static  i386       0.131-1.fc6      updates            62 k
Updating for dependencies:
 elfutils-libelf         i386       0.131-1.fc6      updates            56 k
 elfutils-libelf-devel   i386       0.131-1.fc6      updates            23 k
 elfutils-libs           i386       0.131-1.fc6      updates           120 k
 popt                    i386       1.10.2.1-2.fc6   updates            70 k
 rpm                     i386       4.4.2.1-2.fc6    updates           1.1 M
 rpm-devel               i386       4.4.2.1-2.fc6    updates           5.2 M
 rpm-libs                i386       4.4.2.1-2.fc6    updates           921 k
 rpm-python              i386       4.4.2.1-2.fc6    updates            57 k

Transaction Summary
=============================================================================
Install      4 Package(s)
Update      10 Package(s)
Remove       0 Package(s)

Total download size: 11 M
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating  : elfutils-libelf              ####################### [ 1/24]
  Updating  : popt                         ####################### [ 2/24]
  Updating  : elfutils-libs                ####################### [ 3/24]
  Installing: elfutils                     ####################### [ 4/24]
  Updating  : elfutils-libelf-devel        ####################### [ 5/24]
  Installing: perl-DateManip               ####################### [ 6/24]
  Updating  : ntp                          ####################### [ 7/24]
  Updating  : wget                         ####################### [ 8/24]
  Updating  : rpm-libs                     ####################### [ 9/24]
  Updating  : rpm                          ####################### [10/24]
  Updating  : rpm-python                   ####################### [11/24]
  Updating  : rpm-devel                    ####################### [12/24]
  Installing: rpm-build                    ####################### [13/24]
  Installing: elfutils-libelf-devel-static ####################### [14/24]

Installed: perl-DateManip.noarch 0:5.44-2.fc6 rpm-build.i386 0:4.4.2.1-2.fc6
Dependency Installed: elfutils.i386 0:0.131-1.fc6 elfutils-libelf-devel-static.i386 0:0.131-1.fc6
Updated: ntp.i386 0:4.2.4p2-1.fc6 wget.i386 0:1.10.2-8.fc6.1
Dependency Updated: elfutils-libelf.i386 0:0.131-1.fc6 elfutils-libelf-devel.i386 0:0.131-1.fc6 elfutils-libs.i386 0:0.131-1.fc6 popt.i386 0:1.10.2.1-2.fc6 rpm.i386 0:4.4.2.1-2.fc6 rpm-devel.i386 0:4.4.2.1-2.fc6 rpm-libs.i386 0:4.4.2.1-2.fc6 rpm-python.i386 0:4.4.2.1-2.fc6
Complete!
[...]
01:46:25 (133 KB/s) - `project-builder-latest.tar.gz' saved [62364]

project-builder-devel/
project-builder-devel/pbconf/
project-builder-devel/pbconf/suse-10.0/
project-builder-devel/pbconf/suse-10.0/project-builder.spec
project-builder-devel/pbconf/rhel-5/
[...]
project-builder-devel/contrib/newpbqemu
project-builder-devel/contrib/pbsetupqemu
project-builder-devel/INSTALL
Writing Makefile for pb
cp lib/ProjectBuilder/Base.pm blib/lib/ProjectBuilder/Base.pm
cp lib/ProjectBuilder/Distribution.pm blib/lib/ProjectBuilder/Distribution.pm
cp lib/ProjectBuilder/Version.pm blib/lib/ProjectBuilder/Version.pm
cp bin/pbvi blib/bin/pbvi
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/bin/pbvi
cp bin/pb blib/bin/pb
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/bin/pb
cp bin/pbdistrocheck blib/bin/pbdistrocheck
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/bin/pbdistrocheck
cp bin/pbg blib/bin/pbg
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/bin/pbg
Manifying blib/man1/pb.1
Writing /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/pb/.packlist
Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod
OK
$ pb | head 
pb (aka project-builder.org) Version devel-352M

Usage:
    pb [-vhq][-r pbroot][-p project][[-s script -a account -P port][-m
    mach-1[,...]]][-i iso] <action> [<pkg1> ...]

    pb [--verbose][--help][--man][--quiet][--revision pbroot][--project
    project][[--script script --account account --port port][--machine
    mach-1[,...]]][--iso iso] <action> [<pkg1> ...]

Now that Project-Builder is installed inside your VM, you may want to try to use it to build netperf packages for Fedora 6:

$ pb -p netperf -r 2.4.4 -m fedora-6-i386 build2vm

Project Builder didn't find in our tar file what is necessary to build an RPM on Fedora 8. This is because our configuration file doesn't indicate that we want to build on fedora 8 (of course it's a new VM). So fix your config file by adapting your vmlist entry to include also Fedora 8:

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,fedora_8,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

and then relaunch the build, starting from the CMS:

Project: netperf
Action: cms2vm
Packages: netperf

Management of netperf 2.4.4-1 (rev flat)
Exporting /users/bruno/netperf/src/netperf-2.4.4 from DIR to /users/bruno/netperf/delivery/netperf-2.4.4... OK
Generating NEWS file from /users/bruno/netperf/src/pbconf/netperf/pbcl
Empty ChangeLog file created... OK
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,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
No Build files found for gentoo-nover
Files configure.ac have been filtered
Creating netperf tar files compressed... OK
Under /users/bruno/netperf/delivery/netperf-2.4.4.tar.gz
VMs: fedora_8
Found an existing VM /users/qemu/fedora_8.qemu (pid 28291)
Packages: netperf
Sources handled (VMs): /users/bruno/netperf/delivery/netperf-2.4.4.tar.gz /users/bruno/netperf/delivery/pbscript /users/bruno/netperf/src/pbconf/netperf.pb /users/bruno/netperf/delivery/2.4.4-1.pb /users/bruno/.pbrc
Preparing netperf/delivery on pb@localhost... OK
netperf-2.4.4.tar.gz                                                       100% 1159KB   1.1MB/s   00:00
pbscript                                                                   100%  369     0.4KB/s   00:00
netperf.pb                                                                 100% 2223     2.2KB/s   00:00
2.4.4-1.pb                                                                 100%   24     0.0KB/s   00:00
.pbrc                                                                      100% 2216     2.2KB/s   00:00
OK
Executing pbscript on pb@localhost  if needed... ... Execution needed
Setting up date on pool.ntp.org...
Mon Nov 26 10:12:00 CET 2007
Building packages on VM...
Project: netperf
Action: build2pkg
Packages: netperf
Source file: /home/pb/netperf/delivery/netperf-2.4.4.tar.gz
Working directory: /home/pb/netperf/build
Extracting build files... OK
Building package with /home/pb/netperf/build/SPECS/netperf.spec under /home/pb/netperf/build... Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.44284
+ umask 022
+ cd /home/pb/netperf/build/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/pb/netperf/build/BUILD
+ rm -rf netperf-2.4.4
+ /bin/gzip -dc /home/pb/netperf/build/SOURCES/netperf-2.4.4.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd netperf-2.4.4
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.10486
+ umask 022
+ cd /home/pb/netperf/build/BUILD
+ cd netperf-2.4.4
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
+ export FFLAGS
++ find . -name config.guess -o -name config.sub
+ for i in '$(find . -name config.guess -o -name config.sub)'
++ basename ./config.sub
+ '[' -f /usr/lib/rpm/redhat/config.sub ']'
+ /bin/rm -f ./config.sub
++ basename ./config.sub
+ /bin/cp -fv /usr/lib/rpm/redhat/config.sub ./config.sub
`/usr/lib/rpm/redhat/config.sub' -> `./config.sub'
+ for i in '$(find . -name config.guess -o -name config.sub)'
++ basename ./config.guess
+ '[' -f /usr/lib/rpm/redhat/config.guess ']'
+ /bin/rm -f ./config.guess
++ basename ./config.guess
+ /bin/cp -fv /usr/lib/rpm/redhat/config.guess ./config.guess
`/usr/lib/rpm/redhat/config.guess' -> `./config.guess'
+ ./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-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/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i386-redhat-linux-gnu
[...]
netlib.o: In function `bind_to_specific_processor':
netlib.c:(.text+0x1d4a): undefined reference to `__CPU_ZERO'
netlib.c:(.text+0x1d56): undefined reference to `__CPU_SET'
collect2: ld returned 1 exit status

So we're not lucky as the application doesn't build natively on Fedora 8 due to the lack of some defines. So we can try with another existing VM to see if we are more lucky, after stoping our running VM:

$ ssh -p 2225 root@localhost halt
$ pb -p netperf -r `pwd` -m rhel_4 build2vm
Project: netperf
Action: build2vm
VMs: rhel_4
Launching the VM /users/qemu/rhel_4.qemu... OK
Waiting for VM rhel_4 to come up...
Packages: netperf
Sources handled (VMs): /users/bruno/netperf/delivery/netperf-2.4.4.tar.gz /users/bruno/netperf/delivery/pbscript /users/bruno/netperf/src/pbconf/netperf.pb /users/bruno/netperf/delivery/2.4.4-1.pb /users/bruno/.pbrc
Preparing netperf/delivery on pb@localhost... OK
netperf-2.4.4.tar.gz                                                       100% 1159KB   1.1MB/s   00:00
pbscript                                                                   100%  369     0.4KB/s   00:00
netperf.pb                                                                 100% 2223     2.2KB/s   00:00
2.4.4-1.pb                                                                 100%   24     0.0KB/s   00:00
.pbrc                                                                      100% 2216     2.2KB/s   00:00
OK
Executing pbscript on pb@localhost  if needed... ... Execution needed
Setting up date on pool.ntp.org...
lun nov 26 10:23:00 CET 2007
Building packages on VM...
Project: netperf
Action: build2pkg
Packages: netperf
Source file: /home/pb/netperf/delivery/netperf-2.4.4.tar.gz
Working directory: /home/pb/netperf/build
Extracting build files... OK
Building package with /home/pb/netperf/build/SPECS/netperf.spec under /home/pb/netperf/build... Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.90577
+ umask 022
+ cd /home/pb/netperf/build/BUILD
+ cd /home/pb/netperf/build/BUILD
+ rm -rf netperf-2.4.4
+ /usr/bin/gzip -dc /home/pb/netperf/build/SOURCES/netperf-2.4.4.tar.gz
[...]
gcc  -O2 -g -march=i386 -mcpu=i686   -o netperf  netperf.o netlib.o netsh.o nettest_bsd.o nettest_dlpi.o nettest_unix.o nettest_xti.o nettest_sctp.o nettest_sdp.o netcpu_procstat.o  -lm
netlib.o(.text+0xbb1): In function `alloc_sendfile_buf_ring':
/home/pb/netperf/build/BUILD/netperf-2.4.4/src/netlib.c:1545: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
if gcc -DHAVE_CONFIG_H -I. -I. -I..     -O2 -g -march=i386 -mcpu=i686 -MT netserver.o -MD -MP -MF ".deps/netserver.Tpo" \
  -c -o netserver.o `test -f 'netserver.c' || echo './'`netserver.c; \
then mv -f ".deps/netserver.Tpo" ".deps/netserver.Po"; \
else rm -f ".deps/netserver.Tpo"; exit 1; \
fi
gcc  -O2 -g -march=i386 -mcpu=i686   -o netserver  netserver.o netlib.o netsh.o nettest_bsd.o nettest_dlpi.o nettest_unix.o nettest_xti.o nettest_sctp.o nettest_sdp.o netcpu_procstat.o  -lm
netlib.o(.text+0xbb1): In function `alloc_sendfile_buf_ring':
/home/pb/netperf/build/BUILD/netperf-2.4.4/src/netlib.c:1545: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
make[3]: Entering directory `/home/pb/netperf/build/BUILD/netperf-2.4.4/src'
/bin/sh ../mkinstalldirs /var/tmp/netperf-2.4.4-1.rhel4-root-pb/usr/bin
mkdir -p -- /var/tmp/netperf-2.4.4-1.rhel4-root-pb/usr/bin
  /usr/bin/install -c netperf /var/tmp/netperf-2.4.4-1.rhel4-root-pb/usr/bin/netperf
  /usr/bin/install -c netserver /var/tmp/netperf-2.4.4-1.rhel4-root-pb/usr/bin/netserver
make[3]: Nothing to be done for `install-data-am'.
[...]
+ /bin/mkdir -p /var/tmp/netperf-2.4.4-1.rhel4-root-pb/usr/share/doc/netperf-2.4.4
+ cp -pr ChangeLog /var/tmp/netperf-2.4.4-1.rhel4-root-pb/usr/share/doc/netperf-2.4.4
+ cp -pr INSTALL COPYING README AUTHORS NEWS /var/tmp/netperf-2.4.4-1.rhel4-root-pb/usr/share/doc/netperf-2.4.4
+ cp -pr README.aix README.hpux README.osx README.ovms README.solaris README.windows Release_Notes doc/examples /var/tmp/netperf-2.4.4-1.rhel4-root-pb/usr/share/doc/netperf-2.4.4
+ exit 0
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /bin/sh libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.3.4) libm.so.6 libm.so.6(GLIBC_2.0)
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/netperf-2.4.4-1.rhel4-root-pb
Wrote: /home/pb/netperf/build/SRPMS/netperf-2.4.4-1.rhel4.src.rpm
Wrote: /home/pb/netperf/build/RPMS/i386/netperf-2.4.4-1.rhel4.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.25314
+ umask 022
+ cd /home/pb/netperf/build/BUILD
+ cd netperf-2.4.4
+ /bin/rm -rf /var/tmp/netperf-2.4.4-1.rhel4-root-pb
+ exit 0
OK
OK
pbgen-2.4.4-1                                                              100%   72     0.1KB/s   00:00
OK
netperf-2.4.4-1.rhel4.i386.rpm                                             100%  174KB 173.9KB/s   00:00
OK
netperf-2.4.4-1.rhel4.src.rpm                                              100% 1171KB   1.1MB/s   00:00
OK
VM cleanup on pb@localhost... OK
VM rhel_4 halt (pid 2119)... OK
Packages: netperf
Sources handled (Packages): rhel/4/netperf-2.4.4-1.rhel4.*.rpm
Preparing /mondo/ftp/rhel/4 on bruno@www.project-builder.org... OK
netperf-2.4.4-1.rhel4.i386.rpm                                             100%  174KB 173.9KB/s   00:00
netperf-2.4.4-1.rhel4.src.rpm                                              100% 1171KB  33.5KB/s   00:35
OK
Executing pbscript on bruno@www.project-builder.org  if needed... OK

This time we've been able to build our packages on RHEL 4 and at the end, as the build was successful they were automatically copied on our ftp server for public availability. In order to continue to support correctly netperf build, now that we have rpm done, we can attack the deb part. We need again to update the templates created by Project-Builder earlier: We can now try to generate packages for all the distributions supported:

$ pb -p netperf -r `pwd` build2vm
Project: netperf
Action: build2vm
VMs: 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,fedora_8,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,mandrake_10.1_64,mandrake_10.2_64,mandriva_2006.0_64,mandriva_2007.0_64,mandriva_2007.1_64,mandriva_2008.0_64,redhat_7.3_64,redhat_9_64,fedora_4_64,fedora_5_64,fedora_6_64,fedora_7_64,fedora_8_64,rhel_3_64,rhel_4_64,rhel_5_64,suse_10.0_64,suse_10.1_64,suse_10.2_64,suse_10.3_64,sles_9_64,sles_10_64,gentoo_nover_64,debian_3.1_64,debian_4.0_64,ubuntu_6.06_64,ubuntu_7.04_64,ubuntu_7.10_64
Packages: netperf
[...]
$ find . -name netperf'*'
./fedora/4/netperf-2.4.4-1.fc4.i386.rpm
./fedora/4/netperf-2.4.4-1.fc4.src.rpm
./fedora/5/netperf-2.4.4-1.fc5.i386.rpm
./fedora/5/netperf-2.4.4-1.fc5.src.rpm
./fedora/6/netperf-2.4.4-1.fc6.i386.rpm
./fedora/6/netperf-2.4.4-1.fc6.src.rpm
./fedora/6/netperf-2.4.4-1.fc6.x86_64.rpm
./fedora/7/netperf-2.4.4-1.fc7.i386.rpm
./fedora/7/netperf-2.4.4-1.fc7.src.rpm
./fedora/7/netperf-2.4.4-1.fc7.x86_64.rpm
./mandrake/10.2/netperf-2.4.4-1.mdk102.i586.rpm
./mandrake/10.2/netperf-2.4.4-1.mdk102.src.rpm
./mandrake/10.1/netperf-2.4.4-1.mdk101.i586.rpm
./mandrake/10.1/netperf-2.4.4-1.mdk101.src.rpm
./mandriva/2006.0/netperf-2.4.4-1.mdv2006.0.i586.rpm
./mandriva/2006.0/netperf-2.4.4-1.mdv2006.0.src.rpm
./mandriva/2007.0/netperf-2.4.4-1.mdv2007.0.i586.rpm
./mandriva/2007.0/netperf-2.4.4-1.mdv2007.0.src.rpm
./mandriva/2007.0/netperf-2.4.4-1.mdv2007.0.x86_64.rpm
./mandriva/2007.1/netperf-2.4.4-1.mdv2007.1.i586.rpm
./mandriva/2007.1/netperf-2.4.4-1.mdv2007.1.src.rpm
./mandriva/2007.1/netperf-2.4.4-1.mdv2007.1.x86_64.rpm
./mandriva/2008.0/netperf-2.4.4-1.mdv2008.0.i586.rpm
./mandriva/2008.0/netperf-2.4.4-1.mdv2008.0.src.rpm
./mandriva/2008.0/netperf-2.4.4-1.mdv2008.0.x86_64.rpm
./redhat/7.3/netperf-2.4.4-1.rh73.i386.rpm
./redhat/7.3/netperf-2.4.4-1.rh73.src.rpm
./redhat/9/netperf-2.4.4-1.rh9.i386.rpm
./redhat/9/netperf-2.4.4-1.rh9.src.rpm
./rhel/3/netperf-2.4.4-1.rhel3.i386.rpm
./rhel/3/netperf-2.4.4-1.rhel3.src.rpm
./rhel/4/netperf-2.4.4-1.rhel4.i386.rpm
./rhel/4/netperf-2.4.4-1.rhel4.src.rpm
./rhel/4/netperf-2.4.4-1.rhel4.x86_64.rpm
./rhel/5/netperf-2.4.4-1.rhel5.i386.rpm
./rhel/5/netperf-2.4.4-1.rhel5.src.rpm
./rhel/5/netperf-2.4.4-1.rhel5.x86_64.rpm
./sles/9/netperf-2.4.4-1.sles9.i586.rpm
./sles/9/netperf-2.4.4-1.sles9.src.rpm
./sles/10/netperf-2.4.4-1.sles10.i586.rpm
./sles/10/netperf-2.4.4-1.sles10.src.rpm
./src/netperf-latest.tar.gz
./src/netperf-2.4.4.tar.gz
./suse/10.0/netperf-2.4.4-1.suse10.0.i586.rpm
./suse/10.0/netperf-2.4.4-1.suse10.0.src.rpm
./suse/10.1/netperf-2.4.4-1.suse10.1.i586.rpm
./suse/10.1/netperf-2.4.4-1.suse10.1.src.rpm
./suse/10.2/netperf-2.4.4-1.suse10.2.i586.rpm
./suse/10.2/netperf-2.4.4-1.suse10.2.src.rpm
./suse/10.2/netperf-2.4.4-1.suse10.2.x86_64.rpm
./suse/10.3/netperf-2.4.4-1.suse10.3.i586.rpm
./suse/10.3/netperf-2.4.4-1.suse10.3.src.rpm
./suse/10.3/netperf-2.4.4-1.suse10.3.x86_64.rpm

So we now have rpms built for all the distributions support (but fedora 8 !).

Note: See TracWiki for help on using the wiki.