Changes between Version 1 and Version 2 of Bootstrapping


Ignore:
Timestamp:
Nov 21, 2008, 8:18:24 AM (15 years ago)
Author:
Bryan Gartner
Comment:

capture the basic bootstrapping flow recently used

Legend:

Unmodified
Added
Removed
Modified
  • Bootstrapping

    v1 v2  
    1 So, how does one start with project-builder.org on a platform where there are no existing packages ... yet ?
     1= Bootstrapping =
     2
     3''So, how does one start with project-builder.org on a platform where there are no existing packages ... yet'' ?
     4
     5Hence, the goal is to take a newer version of a previously supported platform into a fully functioning project-builder.org system using the latest source available.
     6
     7== Assumptions ==
     8
     9  * You are running on a platform that can install the types of packages that project-builder.org can already generate
     10  * You have network access and a subversion client (since that is what is used to house project-builder.org source code)
     11  * On the platform in use, you have the requisite tools to create a native package
     12
     13In this example, lets assume you are using a Debian Lenny amd64 system (presumably before this becomes the stable Debian release)
     14
     15== Setup ==
     16
     17  * Certainly the easiest way to get started is to grab the nearest equivalent format already available for project-builder.org deliverables (so, continuing the example cited above, [ftp://ftp.project-builder.org/ grab] the lastest stable release source files):
     18    * in the debian 4.0 subdirectories -- libprojectbuilder-perl_<version>.tar.gz and project-builder_<version>.tar.gz
     19  * Since these were generated with project-builder.org (likely via the cms2build or beyond), you can safely assume that they contain not only the source code for project-builder.org, but also the necessary packaging information itself, for the selected platform
     20  * In this example, one can extract the source files, enter the resulting directory, and run the typical packaging commands locally to generate installable packages
     21    * dpkg-buildpackage -rfakeroot -uc -us (and similarly for rpm-based distributions, install the src.rpm and then rpmbuild -ba SPECS/<pkg>.spec
     22    * ('''NOTE:''' ''since you are not installing from a repository, you may need to satisfy any dependencies manually via the mechanisms on your platform'')
     23
     24Viola, you have installable packages so go ahead and apply them to your system, and don't worry, we'll be upgrading them to the latest in just a few moments.
     25
     26== Configuration ==
     27
     28  * At this point you are almost ready to unleash the full power of project-builder.org, but you must attend to a couple of small details regarding the configuration process
     29
     30  * for the user (which really should not be root) intending to use project-builder.org (and to build subsequent packages), you must create a simple configuration file
     31    * create '''~/.pbrc''' with at least the following contents ('''NOTE:''' ''yes, we should supply such a template with future releases'')
     32
     33{{{
     34# how to get project-builder.org source
     35pburl pb = svn://svn.project-builder.org/mondo/svn/pb
     36
     37# where to get the packaging templates
     38pbconfurl pb = svn://svn.project-builder.org/mondo/svn/pb/pbconf
     39
     40# local prefix for sandbox checkouts and local build artifacts
     41pbdefdir default = $ENV{'HOME'}/pb/projects
     42pbdefdir pb = $ENV{'HOME'}
     43pbconfdir pb = $ENV{'HOME'}/pb/pbconf
     44
     45# location of Virtual Machine infrastructure
     46vmpath default = /home/qemu
     47
     48# location of Virtual Environment (chroot) infrastructure
     49vepath default = /home/mock
     50}}}
     51
     52  ('''NOTE:''' ''the above examples will only work after anonymous svn access to project-builder.org is enabled'')
     53
     54  * regardless of the type of virtualization you will later employ (lets assume Virtual Machines via qemu), in the directory of '''vmpath''' from the previous configuration file
     55    * create '''.pbrc''' with at least the following contents (NOTE: yes, we should also supply such a template with future releases)
     56
     57{{{
     58# type of VM
     59vmtype default = qemu
     60
     61# VM instance configuration
     62vmntp default = pool.ntp.org
     63vmhost default = localhost
     64vmlogin default = pb
     65vmport default = 2222
     66vmtmout default = 120
     67vmopt default = -m 384 -daemonize
     68vmsize default = 5G
     69
     70# a comma seperated list of all the desired tuples (distro-ver-arch)
     71vmlist default = mandriva-2008.1-i386,fedora-9-i386,rhel-2.1-i386,rhel-3-i386,rhel-4-i386,rhel-5-i386,opensuse-11.0-i386,sles-10-i386,gentoo-nover-i386,debian-4.0-i386,ubuntu-8.10-i386,debian-lenny-x86_64
     72}}}
     73
     74  ('''NOTE:''' ''the above vmlist is much abbreviated, but the key thing is to ensure the local platform you care about is in this list'')
     75
     76
     77== Usage ==
     78
     79Okay, so with much anticipation, you are now ready to build new packages for your local host
     80
     81  * as the designated user (with the ~/.pbrc) start slowly, grabbing CMS versions of project-builder.org and prepping the build
     82
     83{{{
     84pb --verbose --project pb cms2build
     85}}}
     86
     87  ('''NOTE:''' ''it may be necessary to initially seed your user's sandbox with an svn checkout to pbdefdir'')
     88
     89  * ensure you address any errors here, especially those related to the svn operations
     90  * if all went well, you're ready to build your first package now
     91
     92{{{
     93pb --verbose --project pb build2pkg
     94}}}
     95
     96  * ensure you address any errors here as well, but if this goes as planned, you are ready to try the big bang approach
     97
     98{{{
     99pb --verbose --project pb cms2pkg
     100}}}
     101
     102Viola, you should now have newly created packages for your platform, ready to install, and from the very latest cutting edge version, so be brave, upgrade your existing ones to these (and for bonuse points, repeat the pb invocations in the Usage section).
     103
     104