Changes between Version 13 and Version 14 of NetPerfExample


Ignore:
Timestamp:
Apr 4, 2008, 2:00:33 AM (16 years ago)
Author:
Bruno Cornec
Comment:

setupvm OK

Legend:

Unmodified
Added
Removed
Modified
  • NetPerfExample

    v13 v14  
    641641So 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.
    642642
    643 Imagine you want to build the same RPMs for the just issued Fedora 8, instead of your native distribution. First download the ISO image of your 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:
    644 {{{
    645 $ pb -p netperf -r 2.4.4 -m fedora-8-i386 -i ~/Download/Fedora-8-i386-DVD.iso newvm
     643Imagine 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:
     644{{{
     645$ pb -p netperf -r 2.4.4 -m fedora-6-i386 -i ~/Download/Fedora-6-i386-DVD.iso newvm
    646646Project: nerperf
    647647Action: newvm
    648 Creating the QEMU VM... Formating '/users/qemu/fedora_8.qemu', fmt=qcow2, size=5242880 kB
    649 OK
    650 Launching the VM /users/qemu/fedora_8.qemu... OK
    651 Waiting for VM fedora_8 to come up...
     648Creating the QEMU VM... Formating '/users/qemu/fedora-6-i386.qemu', fmt=qcow2, size=5242880 kB
     649OK
     650Launching the VM /users/qemu/fedora-6-i386.qemu... OK
     651Waiting for VM fedora-6-i386 to come up...
    652652}}}
    653653Then 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.
    654654Once your distribution is installed, stop the VM and relaunch it to finish the setup with:
    655655{{{
    656 $ pb -p netperf -r 2.4.4 -m fedora-8-i386 setupvm
     656$ pb -p netperf -r 2.4.4 -m fedora-6-i386 setupvm
    657657Project: netperf
    658658Action: launchvm
    659 Launching the VM /users/qemu/fedora_8.qemu... OK
    660 Waiting for VM fedora_8 to come up...           
    661 
    662 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.
    663 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 a contributed script in Project-Builder that may help you greatly realizing that (Cf: http://trac.project-builder.org/browser/devel/pb/contrib/pbsetupqemu and its launcher http://trac.project-builder.org/browser/devel/pb/contrib/updateqemu).
    664 
    665 $ cat pbsetupqemu* /usr/lib/perl5/vendor_perl/*/ProjectBuilder/Distribution.pm > /tmp/pbscript
    666 }}}
    667 
    668 Now that Project-Builder is installed inside your VM, you may want to try to use it to build netperf packages for Fedora 8:
    669 {{{
    670 $ pb -p netperf -r `pwd` -m fedora_8 build2vm
     659Launching the VM /users/qemu/fedora-6-i386.qemu... OK
     660Waiting for VM fedora-6-i386 to come up...           
     661
     662At 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.
     663
     664So 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:
     665{{{
     666$ pb -p netperf -r 2.4.4 -m fedora-6-i386 setupvm
    671667Project: netperf
    672 Action: build2vm
    673 VMs: fedora_8
    674 Found an existing VM /users/qemu/fedora_8.qemu (pid 28291)
    675 Packages: netperf
    676 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
    677 Preparing netperf/delivery on pb@localhost... /usr/bin/xauth:  creating new authority file /home/pb/.Xauthority
    678 OK
    679 netperf-2.4.4.tar.gz                                                       100% 1159KB   1.1MB/s   00:01
    680 pbscript                                                                   100%  369     0.4KB/s   00:00
    681 netperf.pb                                                                 100% 2214     2.2KB/s   00:00
    682 2.4.4-1.pb                                                                 100%   24     0.0KB/s   00:00
    683 .pbrc                                                                      100% 2216     2.2KB/s   00:00
    684 OK
    685 Executing pbscript on pb@localhost  if needed... ... Execution needed
    686 Setting up date on pool.ntp.org...
    687 Mon Nov 26 10:09:00 CET 2007
    688 Building packages on VM...
    689 Project: netperf
    690 Action: build2pkg
    691 Packages: netperf
    692 Source file: /home/pb/netperf/delivery/netperf-2.4.4.tar.gz
    693 Working directory: /home/pb/netperf/build
    694 Extracting build files... tar: netperf-2.4.4/pbconf/fedora-8: Not found in archive
    695 tar: Error exit delayed from previous errors
    696 Unable to open directory netperf-2.4.4/pbconf/fedora-8/ at /usr/bin/pb line 845.
    697 child (tar xfpz /home/pb/netperf/delivery/netperf-2.4.4.tar.gz netperf-2.4.4/pbconf/fedora-8/) exited with value 2
     668Action: setupvm
     669Copying local keys to vm. This will require the root password... root@localhost passwd:
     670Found an existing VM /users/qemu/fedora-6-i386.qemu (pid 30675)
     671Packages: netperf
     672Sources handled (Script): /users/bruno/project-builder/netperf/delivery/pbscript
     673Preparing project-builder/src on root@localhost:project-builder/src... OK
     674pbscript                                                                   100%   12KB  11.7KB/s   00:00
     675OK
     676Executing pbscript on root@localhost:project-builder/src if needed... distro tuple: fedora,6,rh,rpm,.fc6
     677Loading "installonlyn" plugin
     678Cleaning up Everything
     679Loading "installonlyn" plugin
     680[...]
     681
     682Dependencies Resolved
     683
     684=============================================================================
     685 Package                 Arch       Version          Repository        Size
     686=============================================================================
     687Installing:
     688 perl-DateManip          noarch     5.44-2.fc6       updates           143 k
     689 rpm-build               i386       4.4.2.1-2.fc6    updates           640 k
     690Updating:
     691 ntp                     i386       4.2.4p2-1.fc6    updates           1.4 M
     692 wget                    i386       1.10.2-8.fc6.1   updates           581 k
     693Installing for dependencies:
     694 elfutils                i386       0.131-1.fc6      updates           211 k
     695 elfutils-libelf-devel-static  i386       0.131-1.fc6      updates            62 k
     696Updating for dependencies:
     697 elfutils-libelf         i386       0.131-1.fc6      updates            56 k
     698 elfutils-libelf-devel   i386       0.131-1.fc6      updates            23 k
     699 elfutils-libs           i386       0.131-1.fc6      updates           120 k
     700 popt                    i386       1.10.2.1-2.fc6   updates            70 k
     701 rpm                     i386       4.4.2.1-2.fc6    updates           1.1 M
     702 rpm-devel               i386       4.4.2.1-2.fc6    updates           5.2 M
     703 rpm-libs                i386       4.4.2.1-2.fc6    updates           921 k
     704 rpm-python              i386       4.4.2.1-2.fc6    updates            57 k
     705
     706Transaction Summary
     707=============================================================================
     708Install      4 Package(s)
     709Update      10 Package(s)
     710Remove       0 Package(s)
     711
     712Total download size: 11 M
     713Downloading Packages:
     714Running Transaction Test
     715Finished Transaction Test
     716Transaction Test Succeeded
     717Running Transaction
     718  Updating  : elfutils-libelf              ####################### [ 1/24]
     719  Updating  : popt                         ####################### [ 2/24]
     720  Updating  : elfutils-libs                ####################### [ 3/24]
     721  Installing: elfutils                     ####################### [ 4/24]
     722  Updating  : elfutils-libelf-devel        ####################### [ 5/24]
     723  Installing: perl-DateManip               ####################### [ 6/24]
     724  Updating  : ntp                          ####################### [ 7/24]
     725  Updating  : wget                         ####################### [ 8/24]
     726  Updating  : rpm-libs                     ####################### [ 9/24]
     727  Updating  : rpm                          ####################### [10/24]
     728  Updating  : rpm-python                   ####################### [11/24]
     729  Updating  : rpm-devel                    ####################### [12/24]
     730  Installing: rpm-build                    ####################### [13/24]
     731  Installing: elfutils-libelf-devel-static ####################### [14/24]
     732
     733Installed: perl-DateManip.noarch 0:5.44-2.fc6 rpm-build.i386 0:4.4.2.1-2.fc6
     734Dependency Installed: elfutils.i386 0:0.131-1.fc6 elfutils-libelf-devel-static.i386 0:0.131-1.fc6
     735Updated: ntp.i386 0:4.2.4p2-1.fc6 wget.i386 0:1.10.2-8.fc6.1
     736Dependency 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
     737Complete!
     738[...]
     73901:46:25 (133 KB/s) - `project-builder-latest.tar.gz' saved [62364]
     740
     741project-builder-devel/
     742project-builder-devel/pbconf/
     743project-builder-devel/pbconf/suse-10.0/
     744project-builder-devel/pbconf/suse-10.0/project-builder.spec
     745project-builder-devel/pbconf/rhel-5/
     746[...]
     747project-builder-devel/contrib/newpbqemu
     748project-builder-devel/contrib/pbsetupqemu
     749project-builder-devel/INSTALL
     750Writing Makefile for pb
     751cp lib/ProjectBuilder/Base.pm blib/lib/ProjectBuilder/Base.pm
     752cp lib/ProjectBuilder/Distribution.pm blib/lib/ProjectBuilder/Distribution.pm
     753cp lib/ProjectBuilder/Version.pm blib/lib/ProjectBuilder/Version.pm
     754cp bin/pbvi blib/bin/pbvi
     755/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/bin/pbvi
     756cp bin/pb blib/bin/pb
     757/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/bin/pb
     758cp bin/pbdistrocheck blib/bin/pbdistrocheck
     759/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/bin/pbdistrocheck
     760cp bin/pbg blib/bin/pbg
     761/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/bin/pbg
     762Manifying blib/man1/pb.1
     763Writing /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/pb/.packlist
     764Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod
     765OK
     766$ pb | head
     767pb (aka project-builder.org) Version devel-352M
     768
     769Usage:
     770    pb [-vhq][-r pbroot][-p project][[-s script -a account -P port][-m
     771    mach-1[,...]]][-i iso] <action> [<pkg1> ...]
     772
     773    pb [--verbose][--help][--man][--quiet][--revision pbroot][--project
     774    project][[--script script --account account --port port][--machine
     775    mach-1[,...]]][--iso iso] <action> [<pkg1> ...]
     776
     777}}}
     778
     779Now that Project-Builder is installed inside your VM, you may want to try to use it to build netperf packages for Fedora 6:
     780{{{
     781$ pb -p netperf -r 2.2.4 -m fedora-6-i386 build2vm
     782
    698783}}}
    699784Project 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: