Changes between Version 27 and Version 28 of DistributionPackaging


Ignore:
Timestamp:
Sep 26, 2008, 10:11:01 AM (16 years ago)
Author:
Bruno Cornec
Comment:

pb is now used to build from SVN

Legend:

Unmodified
Added
Removed
Modified
  • DistributionPackaging

    v27 v28  
    1616== Package build process ==
    1717
    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:
    20 
    21 {{{
    22 # tools/svn2build
    23 }}}
    24 
    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)
    35 
    36 then you can call
    37 
    38 {{{
    39 # tools/build2pkg
    40 }}}
    41 
    42 in order to produce local packages for your distribution.
    43 
    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:
    45 
    46 {{{
    47 # tools/build2qemu
    48 }}}
    49 
    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 [http://trac.project-builder.org project-builder] tool.
     20From the last 2.2.x SVN tree extracted you need to launch:
     21
     22{{{
     23# pb -p mondorescue cms2pkg
     24}}}
     25
     26which will create for you both the compressed tar files (step cms2build) and then from those the packages (step build2pkg)
     27
     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:
     29
     30{{{
     31pb -p mondorescue -m distro-version-arch -i distro-dvd.iso newvm
     32pb -p mondorescue -m distro-version-arch setupvm
     33}}}
     34
     35Then you can use pb to generate packages for that distro by doing:
     36
     37{{{
     38pb -p mondorescue -m distro-version-arch cms2vm
     39}}}
     40
     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.
     42
    5143
    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]*
     96#
    10497# ./install.sh
    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.
    208201
    209 
    210202{{{
    211203[root@tesla yum.repos.d]# cat mondo.repo
     
    219211}}}
    220212
     213Such a file is now automatically produced by project-builder in available on the ftp srver at the same place s the pacakges.
     214
    221215Now just use the command:
    222216
     
    229223
    230224yum will discover that mindi is a dependency for mondo and add it to your list.
     225
     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 [http://trac.mondorescue.org/wiki/FAQ#Q11DoesmondoworkwithDebianUbuntudistributions CAVEAT]