ipset-drop-modules.patch 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. Drop all the kernel checks and let the user deal with having a new enough
  2. version of the kernel to enjoy this.
  3. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  4. ---
  5. diff -Nura ipset-6.8.orig//Makefile.am ipset-6.8/Makefile.am
  6. --- ipset-6.8.orig//Makefile.am 2011-08-17 16:10:41.999386034 -0300
  7. +++ ipset-6.8/Makefile.am 2011-08-17 16:17:34.108702969 -0300
  8. @@ -4,11 +4,6 @@
  9. include $(top_srcdir)/Make_global.am
  10. -if ! WITH_KBUILDDIR
  11. -KBUILD_OUTPUT=/lib/modules/`uname -r`/build
  12. -else
  13. -KBUILD_OUTPUT=$(KBUILDDIR)
  14. -endif
  15. if ! WITH_MAXSETS
  16. IP_SET_MAX=256
  17. else
  18. @@ -22,23 +17,6 @@
  19. SUBDIRS = lib src
  20. -modules_sparse:
  21. - ${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net/netfilter \
  22. - V=$V C=2 CF=-D__CHECK_ENDIAN__ \
  23. - IP_SET_MAX=$(IP_SET_MAX) KDIR=$$PWD/kernel modules
  24. -
  25. -modules:
  26. - ${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net/netfilter V=$V \
  27. - IP_SET_MAX=$(IP_SET_MAX) KDIR=$$PWD/kernel modules
  28. -
  29. -modules_install:
  30. - ${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net/netfilter \
  31. - KDIR=$$PWD/kernel modules_install
  32. -
  33. -modules_clean:
  34. - ${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net/netfilter \
  35. - KDIR=$$PWD/kernel clean
  36. -
  37. update_includes:
  38. ./update ip_set.h
  39. ./update ip_set_bitmap.h
  40. diff -Nura ipset-6.8.orig//configure.ac ipset-6.8/configure.ac
  41. --- ipset-6.8.orig//configure.ac 2011-08-17 16:10:42.015387986 -0300
  42. +++ ipset-6.8/configure.ac 2011-08-17 16:18:01.578056869 -0300
  43. @@ -11,51 +11,6 @@
  44. *) AC_MSG_ERROR([Linux systems supported exclusively!]);;
  45. esac
  46. -dnl Additional arguments
  47. -dnl Kernel build directory or source tree
  48. -AC_ARG_WITH([kbuild],
  49. - AS_HELP_STRING([--with-kbuild=PATH],
  50. - [Path to kernel build directory]),
  51. - [KBUILDDIR="$withval";])
  52. -AC_ARG_WITH([ksource],
  53. - AS_HELP_STRING([--with-ksource=PATH],
  54. - [Path to kernel source directory, if not the same as the kernel build directory]),
  55. - [KSOURCEDIR="$withval";])
  56. -AM_CONDITIONAL(WITH_KBUILDDIR, test "$KBUILDDIR" != "")
  57. -AC_SUBST(KBUILDDIR)
  58. -
  59. -dnl Sigh: check kernel version dependencies
  60. -if test "$KBUILDDIR" != ""
  61. -then
  62. - kbuilddir="$KBUILDDIR"
  63. -else
  64. - kbuilddir="/lib/modules/`uname -r`/build"
  65. -fi
  66. -
  67. -if test -n "$KSOURCEDIR"; then
  68. - ksourcedir="$KSOURCEDIR"
  69. -elif test -e "$kbuilddir/include/linux/netfilter/nfnetlink.h"; then
  70. - ksourcedir="$kbuilddir"
  71. -else
  72. - ksourcedir="/lib/modules/$(uname -r)/source"
  73. -fi
  74. -if test ! -e "$ksourcedir/include/linux/netfilter/nfnetlink.h"
  75. -then
  76. - AC_MSG_ERROR([Invalid kernel source directory $ksourcedir])
  77. -fi
  78. -
  79. -if test ! -e "$kbuilddir/.config"
  80. -then
  81. - AC_MSG_ERROR([The kernel build directory $kbuilddir is not configured])
  82. -fi
  83. -
  84. -AC_PROG_GREP
  85. -
  86. -if test "X`$GREP 'NFNL_SUBSYS_IPSET' $ksourcedir/include/linux/netfilter/nfnetlink.h`" = "X"
  87. -then
  88. - AC_MSG_ERROR([The kernel source directory $ksourcedir is not patched with netlink.patch to support ipset])
  89. -fi
  90. -
  91. dnl Maximal number of sets supported by the kernel, default 256
  92. AC_ARG_WITH([maxsets],
  93. AS_HELP_STRING([--with-maxsets=256],