Changes between Version 18 and Version 19 of NetPerfExample
- Timestamp:
- Jul 12, 2009, 2:28:13 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NetPerfExample
v18 v19 32 32 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. 33 33 34 To get the bits of the project you want to package, different protocols may be used. Currently supported protocols are using a SVN or CVS access if there is such a thing, orURL pointing to a ftp or http server.34 To get the bits of the project you want to package, different protocols may be used. Currently supported protocols are using a SVN, SVK, CVS, Git or Mercurial access if there is such a thing, or a URL pointing to a ftp or http server. 35 35 36 36 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. 37 37 38 You will now need to get the latest and greatest project-builder software from our [ftp://ftp.project-builder.org ftp] repository. Of course we provide lots of packages for your distribution ;-) Or a tar.gz file if you prefer. You'll need at least version 0.9.0 of pb to support what is described here. Once available, you can use the newproj option of pb to create the infrastructure that is mandatory for pb. The latest version available of netperf at the time of this writing is 2.4. 4. And the only package we want to create is netperf.39 40 {{{ 41 $ pb -p netperf -r 2.4. 4newproj netperf38 You will now need to get the latest and greatest project-builder software from our [ftp://ftp.project-builder.org ftp] repository. Of course we provide lots of packages for your distribution ;-) Or a tar.gz file if you prefer. You'll need at least version 0.9.0 of pb to support what is described here. Once available, you can use the newproj option of pb to create the infrastructure that is mandatory for pb. The latest version available of netperf at the time of this writing is 2.4.5. And the only package we want to create is netperf. 39 40 {{{ 41 $ pb -p netperf -r 2.4.5 newproj netperf 42 42 Packages: netperf 43 43 … … 52 52 {{{ 53 53 $ cd $HOME/project-builder/ 54 $ ls -R netperf/pbconf/2.4. 4/55 netperf/pbconf/2.4. 4/:54 $ ls -R netperf/pbconf/2.4.5/ 55 netperf/pbconf/2.4.5/: 56 56 netperf netperf.pb pbfilter 57 57 58 netperf/pbconf/2.4. 4/netperf:58 netperf/pbconf/2.4.5/netperf: 59 59 deb pbfilter rpm 60 60 61 netperf/pbconf/2.4. 4/netperf/deb:61 netperf/pbconf/2.4.5/netperf/deb: 62 62 changelog compat control copyright netperf.docs netperf.dirs rules 63 63 64 netperf/pbconf/2.4. 4/netperf/pbfilter:65 66 netperf/pbconf/2.4. 4/netperf/rpm:64 netperf/pbconf/2.4.5/netperf/pbfilter: 65 66 netperf/pbconf/2.4.5/netperf/rpm: 67 67 netperf.spec 68 68 69 netperf/pbconf/2.4. 4/pbfilter:69 netperf/pbconf/2.4.5/pbfilter: 70 70 all.pbf deb.pbf md.pbf novell.pbf rpm.pbf 71 71 $ 72 $ vi netperf/pbconf/2.4. 4/netperf.pb72 $ vi netperf/pbconf/2.4.5/netperf.pb 73 73 [Modifications here] 74 $ cat netperf/pbconf/2.4. 4/netperf.pb74 $ cat netperf/pbconf/2.4.5/netperf.pb 75 75 # 76 76 # Project Builder configuration file … … 87 87 #pburl netperf = cvs://cvs.netperf.org/netperf/devel 88 88 #pburl netperf = http://www.netperf.org/src/netperf-devel.tar.gz 89 pburl netperf = ftp://ftp.netperf.org/netperf/netperf-2.4. 4.tar.bz289 pburl netperf = ftp://ftp.netperf.org/netperf/netperf-2.4.5.tar.bz2 90 90 #pburl netperf = file:///src/netperf-devel.tar.gz 91 91 #pburl netperf = dir:///src/netperf-devel … … 161 161 # Global version/tag for the project 162 162 # 163 projver netperf = 2.4. 4163 projver netperf = 2.4.5 164 164 projtag netperf = 1 165 165 … … 173 173 #pkgtag netperf = 3 174 174 # Hash of default package/package directory 175 defpkgdir netperf = netperf-2.4. 4175 defpkgdir netperf = netperf-2.4.5 176 176 # Hash of additional package/package directory 177 177 #extpkgdir minor-pkg = dir-minor-pkg … … 183 183 }}} 184 184 185 I skip the parameters begining with vm and ssh for the moment. I inform pb that I will produce packages with a version-tag of 2.4. 4-1, that no local package should have a different version than the project version (pkgver/pkgtag), that my default package will be netperf (pb will work on it by default all the time) and that no additional packages will be produced. In addition to standard version with numbers, pb will accept the version devel.185 I skip the parameters begining with vm and ssh for the moment. I inform pb that I will produce packages with a version-tag of 2.4.5-1, that no local package should have a different version than the project version (pkgver/pkgtag), that my default package will be netperf (pb will work on it by default all the time) and that no additional packages will be produced. In addition to standard version with numbers, pb will accept the version devel. 186 186 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: 187 187 … … 190 190 A netperf 191 191 A netperf/pbconf 192 A netperf/pbconf/2.4. 4193 A netperf/pbconf/2.4. 4/netperf.pb192 A netperf/pbconf/2.4.5 193 A netperf/pbconf/2.4.5/netperf.pb 194 194 [..] 195 195 A netperf/pbconf/2.4.4/pbfilter/all.pbf … … 197 197 Ajout netperf 198 198 Ajout netperf/pbconf 199 Ajout netperf/pbconf/2.4. 4200 [...] 201 Ajout netperf/pbconf/2.4. 4/pbfilter/rpm.pbf199 Ajout netperf/pbconf/2.4.5 200 [...] 201 Ajout netperf/pbconf/2.4.5/pbfilter/rpm.pbf 202 202 [...] 203 203 $ svn up 204 204 [...] 205 $ pb -p netperf -r 2.4. 4cms2build205 $ pb -p netperf -r 2.4.5 cms2build 206 206 Project: netperf 207 207 Action: cms2build 208 208 Packages: netperf 209 209 210 Management of netperf 2.4. 4-1 (rev flat)211 ... 23:16:09 URL: ftp://ftp.netperf.org/netperf/netperf-2.4. 4.tar.bz2 [912615] -> "/users/bruno/tmp/pb.yE9sNZXV0A/netperf-2.4.4.tar.bz2" [1]212 OK 213 Extracting /users/bruno/tmp/pb.yE9sNZXV0A/netperf-2.4. 4.tar.bz2 in /users/bruno/project-builder/netperf/delivery... OK210 Management of netperf 2.4.5-1 (rev flat) 211 ... 23:16:09 URL: ftp://ftp.netperf.org/netperf/netperf-2.4.5.tar.bz2 [912615] -> "/users/bruno/tmp/pb.yE9sNZXV0A/netperf-2.4.5.tar.bz2" [1] 212 OK 213 Extracting /users/bruno/tmp/pb.yE9sNZXV0A/netperf-2.4.5.tar.bz2 in /users/bruno/project-builder/netperf/delivery... OK 214 214 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 215 215 No Build files found for gentoo-nover 216 216 Creating netperf tar files compressed... OK 217 Under /users/bruno/project-builder/netperf/delivery/netperf-2.4. 4.tar.gz217 Under /users/bruno/project-builder/netperf/delivery/netperf-2.4.5.tar.gz 218 218 }}} 219 219 … … 222 222 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. 223 223 {{{ 224 $ vi netperf/pbconf/2.4. 4/netperf/rpm/netperf.spec224 $ vi netperf/pbconf/2.4.5/netperf/rpm/netperf.spec 225 225 [Modifications here] 226 $ cat netperf/pbconf/2.4. 4/netperf/rpm/netperf.spec226 $ cat netperf/pbconf/2.4.5/netperf/rpm/netperf.spec 227 227 # 228 228 # $Id$ … … 275 275 276 276 {{{ 277 $ vi netperf/pbconf/2.4. 4/pbfilter/all.pbf277 $ vi netperf/pbconf/2.4.5/pbfilter/all.pbf 278 278 [Modifications here] 279 $ cat netperf/pbconf/2.4. 4/pbfilter/all.pbf279 $ cat netperf/pbconf/2.4.5/pbfilter/all.pbf 280 280 # 281 281 # $Id$ … … 315 315 We can now try again to use pb to create again our build file with macro expansion: 316 316 {{{ 317 $ pb -p netperf -r 2.4. 4cms2build317 $ pb -p netperf -r 2.4.5 cms2build 318 318 Project: netperf 319 319 Action: cms2build 320 320 Packages: netperf 321 321 322 Management of netperf 2.4. 4-1 (rev flat)322 Management of netperf 2.4.5-1 (rev flat) 323 323 [... same output as previously...] 324 Under /users/bruno/project-builder/netperf/delivery/netperf-2.4. 4.tar.gz324 Under /users/bruno/project-builder/netperf/delivery/netperf-2.4.5.tar.gz 325 325 }}} 326 326 … … 328 328 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: 329 329 {{{ 330 tar tvfz /users/bruno/project-builder/netperf/delivery/netperf-2.4. 4.tar.gz331 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4. 4/332 -rw-r--r-- bruno/users 30 2007-10-16 20:00 netperf-2.4. 4/inet_ntop.c333 -rwxr-xr-x bruno/users 31743 2007-06-02 00:06 netperf-2.4. 4/config.sub334 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4. 4/pbconf/335 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4. 4/pbconf/suse-10.0/336 -rw-r--r-- bruno/users 885 2008-03-30 23:30 netperf-2.4. 4/pbconf/suse-10.0/netperf.spec337 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4. 4/pbconf/rhel-5/338 -rw-r--r-- bruno/users 861 2008-03-30 23:30 netperf-2.4. 4/pbconf/rhel-5/netperf.spec339 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4. 4/pbconf/fedora-4/340 -rw-r--r-- bruno/users 861 2008-03-30 23:30 netperf-2.4. 4/pbconf/fedora-4/netperf.spec341 [...] 342 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4. 4/pbconf/ubuntu-7.04/343 -rw-r--r-- bruno/users 2 2008-03-30 23:30 netperf-2.4. 4/pbconf/ubuntu-7.04/changelog344 -rw-r--r-- bruno/users 435 2008-03-30 23:30 netperf-2.4. 4/pbconf/ubuntu-7.04/control345 -rw-r--r-- bruno/users 36 2008-03-30 23:30 netperf-2.4. 4/pbconf/ubuntu-7.04/netperf.docs346 -rw-r--r-- bruno/users 0 2008-03-30 23:30 netperf-2.4. 4/pbconf/ubuntu-7.04/pkg1.dirs347 -rw-r--r-- bruno/users 2 2008-03-30 23:30 netperf-2.4. 4/pbconf/ubuntu-7.04/compat348 -rw-r--r-- bruno/users 3632 2008-03-30 23:30 netperf-2.4. 4/pbconf/ubuntu-7.04/rules349 -rw-r--r-- bruno/users 996 2008-03-30 23:30 netperf-2.4. 4/pbconf/ubuntu-7.04/copyright350 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4. 4/pbconf/ubuntu-6.06/351 [...] 352 -rw-r--r-- bruno/users 2382 2007-06-02 00:06 netperf-2.4. 4/README.ovms353 -rwxr-xr-x bruno/users 1988 2007-06-02 00:06 netperf-2.4. 4/mkinstalldirs354 -rw-r--r-- bruno/users 14022 2007-06-05 03:08 netperf-2.4. 4/acinclude.m4355 [...] 356 -rw-r--r-- bruno/users 17464 2007-10-17 18:55 netperf-2.4. 4/Makefile.in357 -rw-r--r-- bruno/users 9240 2007-06-02 00:06 netperf-2.4. 4/INSTALL330 tar tvfz /users/bruno/project-builder/netperf/delivery/netperf-2.4.5.tar.gz 331 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4.5/ 332 -rw-r--r-- bruno/users 30 2007-10-16 20:00 netperf-2.4.5/inet_ntop.c 333 -rwxr-xr-x bruno/users 31743 2007-06-02 00:06 netperf-2.4.5/config.sub 334 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4.5/pbconf/ 335 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4.5/pbconf/suse-10.0/ 336 -rw-r--r-- bruno/users 885 2008-03-30 23:30 netperf-2.4.5/pbconf/suse-10.0/netperf.spec 337 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4.5/pbconf/rhel-5/ 338 -rw-r--r-- bruno/users 861 2008-03-30 23:30 netperf-2.4.5/pbconf/rhel-5/netperf.spec 339 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4.5/pbconf/fedora-4/ 340 -rw-r--r-- bruno/users 861 2008-03-30 23:30 netperf-2.4.5/pbconf/fedora-4/netperf.spec 341 [...] 342 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/ 343 -rw-r--r-- bruno/users 2 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/changelog 344 -rw-r--r-- bruno/users 435 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/control 345 -rw-r--r-- bruno/users 36 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/netperf.docs 346 -rw-r--r-- bruno/users 0 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/pkg1.dirs 347 -rw-r--r-- bruno/users 2 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/compat 348 -rw-r--r-- bruno/users 3632 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/rules 349 -rw-r--r-- bruno/users 996 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-7.04/copyright 350 drwxr-xr-x bruno/users 0 2008-03-30 23:30 netperf-2.4.5/pbconf/ubuntu-6.06/ 351 [...] 352 -rw-r--r-- bruno/users 2382 2007-06-02 00:06 netperf-2.4.5/README.ovms 353 -rwxr-xr-x bruno/users 1988 2007-06-02 00:06 netperf-2.4.5/mkinstalldirs 354 -rw-r--r-- bruno/users 14022 2007-06-05 03:08 netperf-2.4.5/acinclude.m4 355 [...] 356 -rw-r--r-- bruno/users 17464 2007-10-17 18:55 netperf-2.4.5/Makefile.in 357 -rw-r--r-- bruno/users 9240 2007-06-02 00:06 netperf-2.4.5/INSTALL 358 358 }}} 359 359 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. … … 361 361 So now, we can try to go to the next step and build a package. So issue: 362 362 {{{ 363 $ pb -p netperf -r 2.4. 4build2pkg363 $ pb -p netperf -r 2.4.5 build2pkg 364 364 Project: netperf 365 365 Action: build2pkg … … 373 373 + '[' 1 -eq 1 ']' 374 374 + cd /users/bruno/project-builder/netperf/build/BUILD 375 + rm -rf netperf-2.4. 4376 + /usr/bin/gzip -dc /users/bruno/project-builder/netperf/build/SOURCES/netperf-2.4. 4.tar.gz375 + rm -rf netperf-2.4.5 376 + /usr/bin/gzip -dc /users/bruno/project-builder/netperf/build/SOURCES/netperf-2.4.5.tar.gz 377 377 + tar -xf - 378 378 + STATUS=0 379 379 + '[' 0 -ne 0 ']' 380 + cd netperf-2.4. 4380 + cd netperf-2.4.5 381 381 + exit 0 382 382 Executing(%build): /bin/sh -e /users/bruno/project-builder/netperf/build/tmp/rpm-tmp.70387 383 383 + umask 022 384 384 + cd /users/bruno/project-builder/netperf/build/BUILD 385 + cd netperf-2.4. 4385 + cd netperf-2.4.5 386 386 + '[' 1 -eq 1 ']' 387 387 + '[' 1 -eq 1 ']' … … 404 404 config.status: creating config.h 405 405 config.status: executing depfiles commands 406 + make -j4 VERSION=2.4. 4406 + make -j4 VERSION=2.4.5 407 407 make all-recursive 408 make[1]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4. 4'408 make[1]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.5' 409 409 Making all in src 410 410 make[2]: Entering directory `/users/bruno/project-builder/netperf/build/BUILD/netperf-2.4.4/src'