#---------------------------------------------------------------------------- # build_iptables.txt - how to build the iptables binaries and create folder and packages # # Creation : 2010-10-14 holbru # Last update: $Id$ # # !!! this is not a script but an step-by-step howto !!! #------------------------------------------------------------------------------ exit 1 ### download the source code from the internet, e.g. # http://www.netfilter.org/ # iptables-1.4.9.1.tar.bz2 ### extract file in a temporary location tar -xjvf iptables-1.4.9.1.tar.bz2 # 2013-01-03 -> iptables-1.4.16.3 LibC-2.8 # 2013-07-20 -> iptables-1.4.19.1 LibC-2.11.3 # with libnfnetlink # 2013-07-29 -> iptables-1.4.19.1 rebuild with ld-2.22 # 2014-12-02 -> iptables-1.4.21 # build with rpm Suse Factory # iptables-1.4.21-3.1.2.src.rpm # 2016-03-18 -> iptables-1.6.0 # build with rpm Suse # iptables-1.6.0-1.1.src.rpm # hbfl # 2017-01-03 -> iptables-1.6.0 # rebuild with rpm # included patch from Christoph Schulz fli4l team # iptables-always-wait-for-lock.patch # iptables-1.6.0-1.2.src.rpm # hbfl # 2018-03-07 -> iptables-1.6.2 # build with rpm Suse # iptables-1.6.2-104.1.src.rpm # included patch from Christoph Schulz fli4l team # iptables-always-wait-for-lock.patch # hbfl # 2019-01-05 -> iptables-1.6.2 # build with rpm Suse # iptables-1.6.2-104.2.src.rpm # included patch from Christoph Schulz fli4l team # iptables-always-wait-for-lock.patch # hbfl # 2020-01-05 -> iptables-1.8.4 # build with rpm Suse # iptables-1.8.4-1.1.src.rpm # included patch from Christoph Schulz fli4l team # iptables-always-wait-for-lock.patch # hbfl # 2020-09-19 -> iptables-1.8.5 # build with rpm Suse -> gcc-9 -> glibc-2.31 # iptables-1.8.5-1.2.src.rpm # included patch from Christoph Schulz fli4l team # iptables-always-wait-for-lock.patch # hbfl # 2021-06-17 -> iptables-1.8.7 # build with rpm Suse -> gcc-10 -> glibc-2.33 # iptables-1.8.7-1.5.src.rpm # included patch from Christoph Schulz fli4l team # iptables-always-wait-for-lock.patch # hbfl # 2023-04-16 -> iptables-1.8.9 # build with rpm Suse -> gcc-12 -> glibc-2.37 # iptables-1.8.9-1.2.src.rpm # included patch from Christoph Schulz fli4l team # iptables-always-wait-for-lock.patch # hbfl # 2024-12-11 -> iptables-1.8.11 # build with rpm Suse # iptables-1.8.11-2.1.src.rpm # included patch from Christoph Schulz fli4l team # iptables-always-wait-for-lock.patch # hbfl # 2025-04-04 -> iptables-1.8.11 # build with rpm Suse - gcc-14 -> glibc-2.41 # iptables-1.8.11-2.3.src.rpm # included patch from Christoph Schulz fli4l team # iptables-always-wait-for-lock.patch cd iptables-1.4.9.1 ### build export CFLAGS='-O2 -march=i486' export CXXFLAGS="${CFLAGS}" zwei Druchgaenge sind erforderlich einmal fuer shared mkdir build-shared20 && cd build-shared20 ../configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --enable-libipq \ --with-xtlibdir=/lib/xtables \ --with-pkgconfigdir=/usr/lib/pkgconfig \ --enable-devel \ --libdir=/lib \ --sbindir=/sbin make make DESTDIR=/public/utils/iptables/1.4.19.1-shared install # strip files/binarys for filename in `find /public/utils/iptables/1.4.19.1-shared/{sbin/*,lib/{*.so.*,xtables/*}} -type f` do echo $filename strip -R .note -R .comment "$filename" done einmal fuer static mkdir build-static20 && cd build-static20 ../configure \ --prefix=/usr \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --enable-libipq \ --with-xtlibdir=/lib/xtables \ --with-pkgconfigdir=/usr/lib/pkgconfig \ --enable-devel \ --libdir=/lib \ --sbindir=/sbin \ --enable-static make make DESTDIR=/public/utils/iptables/1.4.19.1-static install don't strip libxx.a libxx.la fron'm static build cd /usr/bin ln -sf ../sbin/xtables-multi iptables-xml sbin_files="ip6tables ip6tables-restore ip6tables-save iptables iptables-restore iptables-save" cd /usr/sbin for _fname in ${sbin_files} do rm -f ${_fname} ln -sf xtables-multi {_fname} done #UsrMerge sbin_files="ip6tables ip6tables-restore ip6tables-save iptables iptables-restore iptables-save xtables-multi cd /sbin for _fname in ${sbin_files} do rm -f ${_fname} ln -sf ../usr/sbin/${_fname} done #EndUsrMerge # copy files cp *** /lib/iptables/bin_**_iptables_1_4_9_1/*** #--------------------------------------------------------------------------- create folder Um die Folder im Hauptverszeichnis zu erstellen gibt es das Script 'iptables-folder.sh' unter iptables/_ADMIN/ mit iptables-folder.sh -v 1.4.9.1 -w create wird die folder Struktur fuer die lib Version 1.4.9.1 erstellt nun koennen die files aus dem compilat eingefuegt werden. mit iptables-folder.sh -v 1.4.9.1 -w add wird ein svn add auf die erzeugten Folder durchgefuehrt. mit iptables-folder.sh -v 1.4.9.1 -w list wird fuer jeden Folder die files-list.txt erzeugt, add muss zwingend vorher ausgefuehrt worden sein mit iptables-folder.sh -v 1.4.9.1 -w ci erfolgt der commit der erzeugten Folder In den eis und eis_dev Foldern muessen keine Anpassungen vorgenommen werden. Diese Anpassungen erfolgen beim packen der packages durch mktarball.sh mit den _do_ Scripten unter _ADMIN automatisch. In den Pack-Scripten unter _ADMIN muss dann noch die Pfadangabe geaendert werden, auf den soeben erzeugten Pfad und ein commit ausgefuehrt werden. Nach dem checkout auf eisler koennen nun die packages erzeugt werden. die wichtigsten Parameter fuer mktarball.sh sind dann -setdate now -setversion ${version} mktarball.sh - home -setdate now -setversion [version angeben] iptables iptables-dev duch die Angabe von -home werden die packages in die Folder Struktur /home/user/public_html/packages/ kopiert und koennen von da direkt auf Pack-Eis geladen werden. wichtig ist noch, dass unbedingt die 'lib' Version zuerst gebaut werden muss, da fuer die 'dev' Version Informationen aus der 'lib' Info Datei gelesen werden.