From 8af0bca68b14a95b97e7467fe97fd6cc9071900b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 27 Apr 2010 07:22:05 +0000 Subject: [PATCH] - up to 1.25 - GeoIP DB moved to /usr/share/xt_geoip Changed files: kernelrelease.patch -> 1.3 xtables-addons-geoip-dbpath.patch -> 1.3 xtables-addons-libs.patch -> 1.4 xtables-addons.spec -> 1.51 --- kernelrelease.patch | 21 +++++++-------- xtables-addons-geoip-dbpath.patch | 22 ---------------- xtables-addons-libs.patch | 20 -------------- xtables-addons.spec | 43 +++++++++++++++---------------- 4 files changed, 31 insertions(+), 75 deletions(-) delete mode 100644 xtables-addons-geoip-dbpath.patch delete mode 100644 xtables-addons-libs.patch diff --git a/kernelrelease.patch b/kernelrelease.patch index b57aa3c..d5d27a7 100644 --- a/kernelrelease.patch +++ b/kernelrelease.patch @@ -1,8 +1,8 @@ ---- xtables-addons-1.18/configure.ac~ 2009-09-09 17:37:07.000000000 +0200 -+++ xtables-addons-1.18/configure.ac 2009-11-02 11:19:36.000000000 +0100 -@@ -63,41 +63,6 @@ - kinclude_CFLAGS="$kinclude_CFLAGS -I $ksourcedir/include"; - fi; +--- xtables-addons-1.25/configure.ac~ 2010-04-26 15:12:03.000000000 +0300 ++++ xtables-addons-1.25/configure.ac 2010-04-27 09:56:25.995761262 +0300 +@@ -37,40 +37,6 @@ + -Winline -pipe -DXTABLES_LIBDIR=\\\"\${xtlibdir}\\\" \ + -I\${XA_TOPSRCDIR}/include"; -# -# check kernel version @@ -20,17 +20,16 @@ -kminor="${krel%%.*}"; -krel="${krel#*.}"; -kmicro="${krel%%.*}"; --krel2="${krel#*.}"; --if test "$krel" = "$krel2"; then +-if test "$kmicro" = "$krel"; then - kstable=0; -else -- kstable="${krel%%.*}"; +- kstable="${krel#*.}"; - if test -z "$kstable"; then - kstable=0; - fi; -fi; -echo "Found kernel version $kmajor.$kminor.$kmicro.$kstable in $kbuilddir"; --if test "$kmajor" -gt 2 -o "$kminor" -gt 6 -o "$kmicro" -gt 31; then +-if test "$kmajor" -gt 2 -o "$kminor" -gt 6 -o "$kmicro" -gt 34; then - echo "WARNING: You are trying a newer kernel. Results may vary. :-)"; -elif test \( "$kmajor" -lt 2 -o "$kminor" -lt 6 -o "$kmicro" -lt 17 \) -o \ - \( "$kmajor" -eq 2 -a "$kminor" -eq 6 -a "$kmicro" -eq 18 -a \ @@ -40,5 +39,5 @@ -fi; - AC_SUBST([regular_CFLAGS]) - AC_SUBST([xtables_CFLAGS]) - AC_SUBST([kinclude_CFLAGS]) + AC_SUBST([kbuilddir]) + AC_SUBST([xtlibdir]) diff --git a/xtables-addons-geoip-dbpath.patch b/xtables-addons-geoip-dbpath.patch deleted file mode 100644 index 4a7d0e5..0000000 --- a/xtables-addons-geoip-dbpath.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- xtables-addons-1.10/extensions/libxt_geoip.c 2009-02-18 00:31:26.000000000 +0100 -+++ xtables-addons-1.10.new/extensions/libxt_geoip.c 2009-02-18 20:33:55.112397699 +0100 -@@ -24,7 +24,7 @@ - #include - #include - #include "xt_geoip.h" --#define GEOIP_DB_DIR "/var/geoip" -+#define GEOIP_DB_DIR "/var/lib/geoip" - - static void geoip_help(void) - { ---- xtables-addons-1.10/extensions/libxt_geoip.man 2009-02-18 00:31:26.000000000 +0100 -+++ xtables-addons-1.10.new/extensions/libxt_geoip.man 2009-02-18 20:34:18.256330715 +0100 -@@ -11,6 +11,6 @@ - .P - The extra files you will need is the binary database files. They are generated - from a country-subnet database with the geoip_csv_iv0.pl tool, available at --http://jengelh.hopto.org/files/geoip/ . The files MUST be moved to /var/geoip/ -+http://jengelh.hopto.org/files/geoip/ . The files MUST be moved to /var/lib/geoip/ - as the shared library is statically looking for this pathname (e.g. --/var/geoip/LE/de.iv0). -+/var/lib/geoip/LE/de.iv0). diff --git a/xtables-addons-libs.patch b/xtables-addons-libs.patch deleted file mode 100644 index d18f490..0000000 --- a/xtables-addons-libs.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- xtables-addons-1.10/extensions/GNUmakefile.in 2009-02-18 00:31:26.000000000 +0100 -+++ xtables-addons-1.10.new/extensions/GNUmakefile.in 2009-02-18 20:31:45.005459510 +0100 -@@ -63,7 +63,7 @@ - - .PHONY: all install clean distclean FORCE - --all: subdirs modules user matches.man targets.man -+all: subdirs user matches.man targets.man - - subdirs: - @for i in ${subdirs_list}; do ${MAKE} -C $$i; done; -@@ -73,7 +73,7 @@ - - user: ${targets} - --install: modules_install subdirs-install ${targets_install} -+install: subdirs-install ${targets_install} - @mkdir -p "${DESTDIR}${xtlibdir}"; - install -pm0755 ${targets_install} "${DESTDIR}${xtlibdir}/"; - diff --git a/xtables-addons.spec b/xtables-addons.spec index 4327303..bb2dcf0 100644 --- a/xtables-addons.spec +++ b/xtables-addons.spec @@ -1,6 +1,13 @@ -# # TODO # - descriptions +# - package referenec implementation iptaccount(8) and userspace lib +# /usr/lib64/libxt_ACCOUNT_cl.la +# /usr/lib64/libxt_ACCOUNT_cl.so +# /usr/lib64/libxt_ACCOUNT_cl.so.0 +# /usr/lib64/libxt_ACCOUNT_cl.so.0.0.0 +# /usr/sbin/iptaccount +# and if packaged can remove debuginfo package omit +# - subpackage for geoip due extra deps # # Conditional build: %bcond_without dist_kernel # without distribution kernel @@ -19,7 +26,7 @@ %define _enable_debug_packages 0 %endif -%define rel 11 +%define rel 0.1 Summary: Extensible packet filtering system && extensible NAT system Summary(pl.UTF-8): System filtrowania pakietów oraz system translacji adresów (NAT) Summary(pt_BR.UTF-8): Ferramenta para controlar a filtragem de pacotes no kernel-2.6.x @@ -27,16 +34,14 @@ Summary(ru.UTF-8): Утилиты для управления пакетными Summary(uk.UTF-8): Утиліти для керування пакетними фільтрами ядра Linux Summary(zh_CN.UTF-8): Linux内核包过滤管理工具 Name: xtables-addons -Version: 1.18 +Version: 1.25 Release: %{rel} License: GPL Group: Networking/Admin -Source0: http://dl.sourceforge.net/xtables-addons/%{name}-%{version}.tar.bz2 -# Source0-md5: 5a8d2edbf5a3470bba58d6a60c350805 +Source0: http://downloads.sourceforge.net/xtables-addons/%{name}-%{version}.tar.bz2 +# Source0-md5: d2765d1e6be6194b2c24efa6684a6874 URL: http://xtables-addons.sourceforge.net/ -Patch0: %{name}-libs.patch -Patch1: %{name}-geoip-dbpath.patch -Patch2: kernelrelease.patch +Patch0: kernelrelease.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: iptables-devel >= 1.4.3 @@ -81,6 +86,7 @@ Summary: Kernel modules for xtables addons Summary(pl.UTF-8): Moudły jądra dla xtables addons Release: %{rel}@%{_kernel_ver_str} Group: Base/Kernel +Conflicts: xtables-geoip < 20090901-2 # VERSION only dependency is intentional, for allowing multiple kernel pkgs and # single userspace package installs. Requires: %{name} = %{version} @@ -96,8 +102,6 @@ Moduły jądra dla xtables addons. %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 %{__sed} -i -e 's#build_ipset=m#build_ipset=n#' mconfig @@ -107,17 +111,15 @@ Moduły jądra dla xtables addons. %{__autoconf} %{__automake} %configure \ - --with-kbuild=%{_kernelsrcdir} \ - --with-ksource=%{_kernelsrcdir} - -export XA_TOPSRCDIR=$PWD + --with-kbuild=no %if %{with kernel} -%build_kernel_modules -C extensions -m compat_xtables +srcdir=${PWD:-$(pwd)} +%build_kernel_modules XA_ABSTOPSRCDIR=$srcdir -C extensions -m compat_xtables %endif %if %{with userspace} -%{__make} -C extensions +%{__make} %endif %install @@ -135,11 +137,8 @@ cd .. %{__make} -C extensions install \ DESTDIR=$RPM_BUILD_ROOT -cd extensions -for m in $(cat .manpages.lst); do - cp -a libxt_$m.man $RPM_BUILD_ROOT%{_mandir}/man8/libxt_$m.8 -done -cd .. +install -d $RPM_BUILD_ROOT%{_mandir}/man8 +cp -a xtables-addons.8 $RPM_BUILD_ROOT%{_mandir}/man8 %endif %clean @@ -155,7 +154,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/xtables/libxt_*.so -%{_mandir}/man8/libxt_*.* +%{_mandir}/man8/xtables-addons.8* %endif %if %{with kernel} -- 2.43.0