OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

158 lines
4.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../keepalived/keepalived-1.1.13-do-not-need-kernel-sources.patch
  5. # Copyright (C) 2007 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. diff -Nuar keepalived-1.1.13.orig/configure.in keepalived-1.1.13/configure.in
  17. --- keepalived-1.1.13.orig/configure.in 2006-10-10 02:19:38.000000000 -0700
  18. +++ keepalived-1.1.13/configure.in 2007-04-27 23:18:22.463502718 -0700
  19. @@ -48,103 +48,14 @@
  20. AC_CHECK_LIB(popt, poptGetContext,,AC_MSG_ERROR([Popt libraries is required]))
  21. dnl ----[ Kernel version check ]----
  22. -CPPFLAGS="$CPPFLAGS -I$kernelinc"
  23. -AC_MSG_CHECKING([for kernel version])
  24. -AC_TRY_RUN([
  25. - #include <stdlib.h>
  26. - #include <stdio.h>
  27. - #include <linux/version.h>
  28. - #if !defined(UTS_RELEASE)
  29. - #include <linux/utsrelease.h>
  30. - #endif
  31. - int main (void) {
  32. - FILE *fp = fopen ("linuxinfo", "w");
  33. - if (!fp) return 1;
  34. - fprintf (fp, "%s\n", UTS_RELEASE);
  35. - fclose (fp);
  36. - return 0;
  37. - }
  38. - ], [
  39. - LINUX_MAJOR=`cat linuxinfo | cut -d'.' -f1`
  40. - LINUX_MINOR=`cat linuxinfo | cut -d'.' -f2`
  41. - LINUX_PATCH=`cat linuxinfo | cut -d'.' -f3`
  42. - ], [
  43. - LINUX_MAJOR="0"
  44. - LINUX_MINOR="0"
  45. - LINUX_PATCH="0"
  46. - ], [
  47. - LINUX_MAJOR="0"
  48. - LINUX_MINOR="0"
  49. - LINUX_PATCH="0"
  50. - ])
  51. - rm -f linuxinfo
  52. - AC_MSG_RESULT([$LINUX_MAJOR.$LINUX_MINOR.$LINUX_PATCH])
  53. - if test "$LINUX_MINOR" = "6"; then
  54. - KERN="_KRNL_2_6_"
  55. - elif test "$LINUX_MINOR" = "4"; then
  56. - KERN="_KRNL_2_4_"
  57. - else
  58. - KERN="_KRNL_2_2_"
  59. - fi
  60. - if test "$LINUX_MAJOR" = "0" -a "$LINUX_MINOR" = "0" -a "$LINUX_PATCH" = "0"; then
  61. - AC_MSG_WARN([Cannot determine Linux Kernel version.])
  62. - fi
  63. -
  64. -AC_CHECK_FILE($kernelpath/net/core/link_watch.c, [
  65. - LINKWATCH_SUPPORT="_WITH_LINKWATCH_"
  66. - ], [
  67. - LINKWATCH_SUPPORT="_WITHOUT_LINKWATCH_"
  68. - ])
  69. +KERN="_KRNL_2_6_"
  70. +LINKWATCH_SUPPORT="_WITH_LINKWATCH_"
  71. AC_SUBST(LINKWATCH_SUPPORT)
  72. AC_SUBST(KERN)
  73. dnl ----[ Checks for LVS and VRRP support ]----
  74. -IPVS_SUPPORT="_WITHOUT_LVS_"
  75. -if test "$enable_lvs" != "no"; then
  76. - AC_CHECK_HEADER([net/ip_vs.h],
  77. - [IPVS_SUPPORT="_WITH_LVS_"],
  78. - [
  79. - IPVS_SUPPORT="_WITHOUT_LVS_"
  80. - IPVS_MAJOR="0"
  81. - IPVS_MINOR="0"
  82. - IPVS_PATCH="0"
  83. - AC_MSG_WARN([keepalived will be built without LVS support.])
  84. - ])
  85. -fi
  86. -
  87. -if test "$IPVS_SUPPORT" = "_WITH_LVS_"; then
  88. - AC_MSG_CHECKING([for IPVS version])
  89. - AC_TRY_RUN([
  90. - #include <stdlib.h>
  91. - #include <stdio.h>
  92. - #include <net/ip_vs.h>
  93. - int main (void) {
  94. - FILE *fp = fopen ("ipvsinfo", "w");
  95. - if (!fp) return 1;
  96. - fprintf (fp, "%d\n%d\n%d\n", NVERSION(IP_VS_VERSION_CODE));
  97. - fclose (fp);
  98. - return 0;
  99. - }
  100. - ], [
  101. - IPVS_MAJOR=`head -n 1 ipvsinfo | tail -n 1`
  102. - IPVS_MINOR=`head -n 2 ipvsinfo | tail -n 1`
  103. - IPVS_PATCH=`head -n 3 ipvsinfo | tail -n 1`
  104. - ], [
  105. - IPVS_MAJOR="0"
  106. - IPVS_MINOR="0"
  107. - IPVS_PATCH="0"
  108. - ], [
  109. - IPVS_MAJOR="0"
  110. - IPVS_MINOR="0"
  111. - IPVS_PATCH="0"
  112. - ])
  113. - rm -f ipvsinfo
  114. - AC_MSG_RESULT([$IPVS_MAJOR.$IPVS_MINOR.$IPVS_PATCH])
  115. - if test "$IPVS_MAJOR" = "0" -a "$IPVS_MINOR" = "0" -a "$IPVS_PATCH" = "0"; then
  116. - AC_MSG_WARN([Cannot determine IPVS version.])
  117. - fi
  118. -fi
  119. +IPVS_SUPPORT="_WITH_LVS_"
  120. if test "$IPVS_SUPPORT" = "_WITHOUT_LVS_" -a "$enable_vrrp" = "no"; then
  121. AC_MSG_ERROR([keepalived MUST be compiled at least with LVS or VRRP framework])
  122. @@ -153,30 +64,7 @@
  123. dnl ----[ IPVS syncd support probe ]---
  124. dnl Sync daemon is supported since IPVS 0.9.2 for kernel 2.4
  125. -IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
  126. -if test "$IPVS_SUPPORT" = "_WITH_LVS_"; then
  127. - AC_MSG_CHECKING([for IPVS syncd support])
  128. - if test "$KERN" = "_KRNL_2_6_"; then
  129. - IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
  130. - elif test "$IPVS_MAJOR" -ge 1 -a "$KERN" = "_KRNL_2_4_"; then
  131. - IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
  132. - elif test "$IPVS_MINOR" -ge 9 -a "$IPVS_PATCH" -ge 2 -a "$KERN" = "_KRNL_2_4_"; then
  133. - IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
  134. - else
  135. - IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
  136. - fi
  137. -
  138. - if test "${IPVS_SUPPORT}" = "_WITHOUT_LVS_" -o "$enable_lvs_syncd" = "no"; then
  139. - IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
  140. - fi
  141. -
  142. - if test "$IPVS_SYNCD" = "_HAVE_IPVS_SYNCD_"; then
  143. - AC_MSG_RESULT([yes])
  144. - else
  145. - AC_MSG_RESULT([no])
  146. - fi
  147. -fi
  148. -
  149. +IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
  150. AC_SUBST(IPVS_SYNCD)
  151. dnl ----[ Checks for kernel netlink support ]----