wiki:DistributionPackaging

Version 7 (modified by Bruno Cornec, 17 years ago) ( diff )

description of svn2build

SVN repository Management

First you need to get the content of the SVN repository:

    # cd /to/desired/path 
    # svn checkout svn://svn.mondorescue.org/mondorescue/branches/stable

or

    # svn checkout svn://svn.mondorescue.org/mondorescue/trunk

Package build process

This is currently working for all distributions mentioned in the file tools/DISTROS (except Slackware) From the stable SVN tree extracted you need to launch:

# tools/svn2build 

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:

  • It first computes the $TOOLHOME variable which is the location of the tools directory in the SVN tree
  • 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
  • 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).

then you can call

# tools/build2pkg 

in order to produce local packages for your distribution.

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:

# tools/build2qemu 

to produce packages for all supported distros (in tools/DISTROS)

An evolution is planned for RPM packages to create hierarchies of package to ease deployment :

                                 mondorescue
                                     |
       ----------------------------------------------------------------
       |                      |              |                        |
   mondorescue-tape     mondorescue-cd   mondorescue-nfs           .....
         |                    |              |
-------------------     --------------   ---------------
|       |         |     |      |     |   |       |
mt   buffer       |     |   cdrecord     |     nfs-utils
                  mondo-/----------------/
                    |
                    ----------------------------------------------------
                    |                |           |           |         |
                  mindi            afio       mkisofs       newt   syslinux
                    |
               mindi-busybox

RPM rebuild process

From the sources rpm packages the nearest from your distro (that you can get from ftp://ftp.mondorescue.org), you may build packages for your target distribution by doing:

# rpm -ivh mindi*.src.rpm mondo*.src.rpm
# rpmbuild -ba /usr/src/*/SPECS/mondo.spec 
# rpmbuild -ba /usr/src/*/SPECS/mindi.spec 
# rpmbuild -ba /usr/src/*/SPECS/mindi-busybox.spec 
# rpm -ivh /usr/src/*/RPMS/i?86/mondo*.i?86.rpm /usr/src/*/RPMS/i?86/mindi*.i?86.rpm 

File rebuild process

From the tar.gz files available under ftp://ftp.mondorescue.org/src, you may build and install MondoRescue by doing for each package:

# tar xvfz mondo*tar.gz
# cd mondo*
# ./configure
# make
# make install
# cd .. 
# tar xvfz mindi-busybox*tar.gz
# cd mindi-busybox*
# ./configure
# make
# make install
# cd .. 
# tar xvfz mindi-[0-9]*tar.gz
# cd mindi-[0-9]*
# ./install.sh
# cd ..

Location of mondo and mindi Files

DistributionsFile base install
/usr/sbin/mindi/usr/local/sbin/mindi
/usr/sbin/analyze-my-lvm/usr/local/sbin/analyze-my-lvm
/usr/sbin/mondoarchive/usr/local/sbin/mondoarchive
/usr/sbin/mondorestore/usr/local/sbin/mondorestore
/etc/m?nd?/usr/local/etc/m?nd?
/usr/share/doc/m?nd?*/usr/local/share/doc/m?nd?*
/usr/share/man/man8/m?nd?*.8/usr/local/share/man/man8/m?nd?*.8
/usr/lib/mindi/usr/local/lib/mindi
/usr/share/mondo/usr/local/share/mondo
Note: See TracWiki for help on using the wiki.