Changes between Version 27 and Version 28 of DistributionPackaging

Sep 26, 2008, 10:11:01 AM (12 years ago)
Bruno Cornec

pb is now used to build from SVN


  • DistributionPackaging

    v27 v28  
    1616== Package build process ==
    18 This is currently working for all distributions mentioned in the file tools/DISTROS (except Slackware)
    19 From the stable SVN tree extracted you need to launch:
    21 {{{
    22 # tools/svn2build
    23 }}}
    25 which will create for you a build directory (under ../../build/stable-1) with the tar files containing the version expanded. The way svn2build works is the following:
    26  * It first computes the $TOOLHOME variable which is the location of the tools directory in the SVN tree
    27  * It then source commen-env, which sets up and creates 2 variables $TOPDIR for the delivery of the files/packages and $MONDOTMP for temporary files
    28  * It then source svn-env which creates 3 variables $VER which is mondo version, $REVISION which is the current SVN revision and finaly $TAG which is our package tag (what is after the - in an rpm/deb).
    29  * It then creates the delivery directory ($TOPDIR/$VER-$TAG)
    30  * Then for each package to be built (passed in parameter or taken by default as all except mindi-kernel), it exports from SVN the content of that package, seting up the REVISION file at the same time and a log file in the target directory. Then for each distro, it instantiate a build file (spec for RPM e.g.) with variables previously computed,  creates the log file required for it as well, and uses m4 to create the final file based on templates under each package directory/distributions files. Those steps are distro dependent (rpm, deb and emerge)
    31  * Then documentation is instantiated as well (mondo-doc is always the first package in the list in order for that step to be made before as the result is used by the other packages)
    32  * Then mindi doc is added to the delivery directory of mindi
    33  * Then mondo doc is added to the delivery directory of mondo, and bootsstrap is called which will recreate the autoconf environment.
    34  * Finaly once all these steps are done, the tar files are created (tar.gz and tar.bz2)
    36 then you can call
    38 {{{
    39 # tools/build2pkg
    40 }}}
    42 in order to produce local packages for your distribution.
    44 If you have virtual machines of other distributions that you want to generate packages for, then after setting them up following the documentation under tools/qemu-vm.txt you can call:
    46 {{{
    47 # tools/build2qemu
    48 }}}
    50 to produce packages for all supported distros (in tools/DISTROS)
     18This is currently working for a lot of distributions (including Fedora, Mandriva, openSuSE, RHEL, SLES, debian, ubuntu, gentoo)
     19In order to build mondo and mindi packages, you need to use the [ project-builder] tool.
     20From the last 2.2.x SVN tree extracted you need to launch:
     23# pb -p mondorescue cms2pkg
     26which will create for you both the compressed tar files (step cms2build) and then from those the packages (step build2pkg)
     28If you have or want to create  virtual machines of other distributions that you want to generate packages for, you ave to build and set them u using:
     31pb -p mondorescue -m distro-version-arch -i distro-dvd.iso newvm
     32pb -p mondorescue -m distro-version-arch setupvm
     35Then you can use pb to generate packages for that distro by doing:
     38pb -p mondorescue -m distro-version-arch cms2vm
     41which will create for you both the compressed tar files (step cms2build) and then from those the packages in the VM (step build2vm), and get them back and send them to a server with ssh.
    5244An evolution is planned for RPM packages to create hierarchies of package to ease deployment :
    10294# tar xvfz mindi-[0-9]*tar.gz
    10395# cd mindi-[0-9]*
    10497# ./
    10598# cd ..
    207200The ftp site is also set up as a yum repository.  You can install and update your mindi/mondo packages using yum.  First create a file in your yum repo directory like the following (you may download it from our ftp server in each fedora/version directory).  Note that this sample is for fedora.  You will need to edit a bit for other distros.
    211203[root@tesla yum.repos.d]# cat mondo.repo
     213Such a file is now automatically produced by project-builder in available on the ftp srver at the same place s the pacakges.
    221215Now just use the command:
    230224yum will discover that mindi is a dependency for mondo and add it to your list.
     226project-builder also generates debin configuration files for apt so that you can use our repositories to apt-get install your packages more easily.
     227However look for [ CAVEAT]