Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2519 → Rev 2520

/rpms/rpm-build-howto
1,13 → 1,16
By Rexy
 
ALCASAR need the following programs that don't be included as RPM in Mageia :
- coovachilli
- havp
- netflow kernel module
- coovachilli (the captive portal)
- havp (http antivirus proxy)
- ipt_netflow kernel module (netflow log system)
- wkhtmltopdf (html to pdf renderer)
- nfdump (collector & processor for netflow data)
 
This howto explains how to build RPM of these programs in order to keep the distribution clean
 
**** Prepare the RPM creation structure ***
- upadate your system : urpmi --auto-update
- 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 (https://wiki.mageia.org/en/Packagers_RPM_tutorial) and copy it in your home directory
34,10 → 37,10
**** ipt_netflow ****
- Must be complied on a system which runs the target kernel. So install manually the target kernel and reboot (ipt_NETFLOW will not load during this process)
- 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 libs are copied in the /lib64/iptables (libip6t_NETFLOW.so & libipt_NETFLOW.so)
- test the module : go to the directory of source and try to load it (modprobe ipt_NETFLOW), "lsmod" to verify that it's loaded, "alcasar-iptables.sh" to test the iptables rules without errors
- 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
- download, uncompress and test the compilation of the last version of ipt-netflow (./configure, make all install). The module is compiled in the same directory. The libs are copied in the /lib64/iptables (libip6t_NETFLOW.so & libipt_NETFLOW.so)
- test the module : go to the directory of source and try to load it (depmod + modprobe ipt_NETFLOW), "lsmod|grep ipt_NETFLOW" to verify that it's loaded, "alcasar-iptables.sh" to to reload netfilter rules (no errors should appear)
- if all is ok, copy the tarball in rpmbuild/SOURCES. Copy the .spec in rpmbuild/SPECS. In this file, adapt the kernel number.
- change to the directory ~/pmbuild/SPEC and run "rpmbuild -bb ****.spec"
 
**** wkhtmltopdf ****
- download the archive of the binaries of the last version (https://wkhtmltopdf.org/downloads.html) in ~/rpmbuild/SOURCES/wkhtmltox-%{version}_linux-generic-amd64.tar.xz.