Subversion Repositories ALCASAR


Rev 1939 | Rev 2055 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log

By Rexy

ALCASAR need the following programs that don't be included as RPM in Mageia :
  - coovachilli
  - havp
  - netflow kernel module

This howto explains how to build RPM of these programs in order to keep the distribution clean

****  Prepare the RPM creation structure ***
- install the following RPMs "kernel-userspace-headers", "rpm-build", "gengetopt", "libtool" packages
- create directories structure in your home : mkdir -p ~/rpmbuild/{SRPMS,SOURCES,SPECS,tmp}
- Option : find the ".rpmmacros" file on mageia wiki ( and copy it in your home directory

****  Coova-chilli   *****
- retrieve the last tarball of coova-chilli (or the svn archive).
- Untar it and test the compilation process ("sh ./bootstrap", "./configure --enable-json --enable-libjson", "make", "make install").
- all is in the /usr/local". Remove the instaled files ("make uninstall") and the binaries ("make clean").
- compress the directory (ie : tar -cvzf coova-chilli- coova-chilli- Copy this tarball in the directory ~/rpmbuild/SOURCES/.
- copy the SPEC file from the ALCASAR archive to the directory ~/rpmbuild/SPEC
- change to the directory ~/pmbuild/SPEC and run the RPM build process excluding 'ssl' : "rpmbuild -bb coova-chilli.spec --without ssl" (or rpmbuild -ba to create also the SRPMS) 

INFO : .spec modifications since Redhat RPM :
        - ajouter en première ligne "%define _disable_ld_no_undefined 1" pour éviter les erreurs liées au variables inutisées
        - pour la version 64b, ajouter 2 lignes intégrant le répertoire "lib64" lors de la suppression des binaires statiques (rm -rf $RPM_BUILD_ROOT/usr/lib/*.la)
        - exclure de l'archive les fichiers inutiles pour ALCASAR (wpad.dat, wwwdir, etc. via la directive '%exclude')

**** HAVP ****
- install the RPM of clamav-devel
- download, uncompress, and test the compilation of the last version of havp (./configure + make)
- copy the tarball in ~/rpmbuild/SOURCES/. copy the patch file ("havp-init.diff") in ~/rpmbuil/SOURCE. Copy and adapt the .spec in ~/rpmbuid/SPEC
- rpmbuild -dd ***.spec

****  ipt_netflow  ****
- install the RPMs "kernel-server-devel", "lib64iptables-devel (or libiptables-devel in 32b arch)"
- download, uncompress and test the conpilation of the last version of ipt-netflow (configure, make all install). The module is compiled in the same directory. The lib is copied in the /lib64/iptables
- test the module : go to the directory of source and try to load it (modprobe ipt_NETFLOW), "lsmod" to verify that it's loaded, "" to test the iptables rules
- if all is ok, copy the tarball in rpmbuild/SOURCES. Copy the .spec in rpmbuild/SPECS. In this file, change the kernel number and uncoment the lines to match the architecture.
- rpmbuild -bb ****.spec