Changes between Version 1 and Version 2 of Bootstrapping

Nov 21, 2008, 8:18:24 AM (12 years ago)
Bryan Gartner

capture the basic bootstrapping flow recently used


  • Bootstrapping

    v1 v2  
    1 So, how does one start with on a platform where there are no existing packages ... yet ?
     1= Bootstrapping =
     3''So, how does one start with on a platform where there are no existing packages ... yet'' ?
     5Hence, the goal is to take a newer version of a previously supported platform into a fully functioning system using the latest source available.
     7== Assumptions ==
     9  * You are running on a platform that can install the types of packages that can already generate
     10  * You have network access and a subversion client (since that is what is used to house source code)
     11  * On the platform in use, you have the requisite tools to create a native package
     13In this example, lets assume you are using a Debian Lenny amd64 system (presumably before this becomes the stable Debian release)
     15== Setup ==
     17  * Certainly the easiest way to get started is to grab the nearest equivalent format already available for deliverables (so, continuing the example cited above, [ 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 (likely via the cms2build or beyond), you can safely assume that they contain not only the source code for, 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'')
     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.
     26== Configuration ==
     28  * At this point you are almost ready to unleash the full power of, but you must attend to a couple of small details regarding the configuration process
     30  * for the user (which really should not be root) intending to use (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'')
     34# how to get source
     35pburl pb = svn://
     37# where to get the packaging templates
     38pbconfurl pb = svn://
     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
     45# location of Virtual Machine infrastructure
     46vmpath default = /home/qemu
     48# location of Virtual Environment (chroot) infrastructure
     49vepath default = /home/mock
     52  ('''NOTE:''' ''the above examples will only work after anonymous svn access to is enabled'')
     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)
     58# type of VM
     59vmtype default = qemu
     61# VM instance configuration
     62vmntp default =
     63vmhost default = localhost
     64vmlogin default = pb
     65vmport default = 2222
     66vmtmout default = 120
     67vmopt default = -m 384 -daemonize
     68vmsize default = 5G
     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
     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'')
     77== Usage ==
     79Okay, so with much anticipation, you are now ready to build new packages for your local host
     81  * as the designated user (with the ~/.pbrc) start slowly, grabbing CMS versions of and prepping the build
     84pb --verbose --project pb cms2build
     87  ('''NOTE:''' ''it may be necessary to initially seed your user's sandbox with an svn checkout to pbdefdir'')
     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
     93pb --verbose --project pb build2pkg
     96  * ensure you address any errors here as well, but if this goes as planned, you are ready to try the big bang approach
     99pb --verbose --project pb cms2pkg
     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).