Browse Source

* fixed keepalived to not need kernel sources for building by including

a patch found at gentoo linux
	* added a patch that fixes a types.h conflict in vrrp_arp.c


git-svn-id: svn://svn.opensde.net/opensde/package/trunk@21982 10447126-35f2-4685-b0cf-6dd780d3921f
early
Christian Wiese 18 years ago
parent
commit
019b3a8571
  1. 158
      network/keepalived/keepalived-1.1.13-do-not-need-kernel-sources.patch
  2. 36
      network/keepalived/keepalived-1.1.13-types_h.patch
  3. 22
      network/keepalived/keepalived.conf

158
network/keepalived/keepalived-1.1.13-do-not-need-kernel-sources.patch

@ -0,0 +1,158 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../keepalived/keepalived-1.1.13-do-not-need-kernel-sources.patch
# Copyright (C) 2007 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
diff -Nuar keepalived-1.1.13.orig/configure.in keepalived-1.1.13/configure.in
--- keepalived-1.1.13.orig/configure.in 2006-10-10 02:19:38.000000000 -0700
+++ keepalived-1.1.13/configure.in 2007-04-27 23:18:22.463502718 -0700
@@ -48,103 +48,14 @@
AC_CHECK_LIB(popt, poptGetContext,,AC_MSG_ERROR([Popt libraries is required]))
dnl ----[ Kernel version check ]----
-CPPFLAGS="$CPPFLAGS -I$kernelinc"
-AC_MSG_CHECKING([for kernel version])
-AC_TRY_RUN([
- #include <stdlib.h>
- #include <stdio.h>
- #include <linux/version.h>
- #if !defined(UTS_RELEASE)
- #include <linux/utsrelease.h>
- #endif
- int main (void) {
- FILE *fp = fopen ("linuxinfo", "w");
- if (!fp) return 1;
- fprintf (fp, "%s\n", UTS_RELEASE);
- fclose (fp);
- return 0;
- }
- ], [
- LINUX_MAJOR=`cat linuxinfo | cut -d'.' -f1`
- LINUX_MINOR=`cat linuxinfo | cut -d'.' -f2`
- LINUX_PATCH=`cat linuxinfo | cut -d'.' -f3`
- ], [
- LINUX_MAJOR="0"
- LINUX_MINOR="0"
- LINUX_PATCH="0"
- ], [
- LINUX_MAJOR="0"
- LINUX_MINOR="0"
- LINUX_PATCH="0"
- ])
- rm -f linuxinfo
- AC_MSG_RESULT([$LINUX_MAJOR.$LINUX_MINOR.$LINUX_PATCH])
- if test "$LINUX_MINOR" = "6"; then
- KERN="_KRNL_2_6_"
- elif test "$LINUX_MINOR" = "4"; then
- KERN="_KRNL_2_4_"
- else
- KERN="_KRNL_2_2_"
- fi
- if test "$LINUX_MAJOR" = "0" -a "$LINUX_MINOR" = "0" -a "$LINUX_PATCH" = "0"; then
- AC_MSG_WARN([Cannot determine Linux Kernel version.])
- fi
-
-AC_CHECK_FILE($kernelpath/net/core/link_watch.c, [
- LINKWATCH_SUPPORT="_WITH_LINKWATCH_"
- ], [
- LINKWATCH_SUPPORT="_WITHOUT_LINKWATCH_"
- ])
+KERN="_KRNL_2_6_"
+LINKWATCH_SUPPORT="_WITH_LINKWATCH_"
AC_SUBST(LINKWATCH_SUPPORT)
AC_SUBST(KERN)
dnl ----[ Checks for LVS and VRRP support ]----
-IPVS_SUPPORT="_WITHOUT_LVS_"
-if test "$enable_lvs" != "no"; then
- AC_CHECK_HEADER([net/ip_vs.h],
- [IPVS_SUPPORT="_WITH_LVS_"],
- [
- IPVS_SUPPORT="_WITHOUT_LVS_"
- IPVS_MAJOR="0"
- IPVS_MINOR="0"
- IPVS_PATCH="0"
- AC_MSG_WARN([keepalived will be built without LVS support.])
- ])
-fi
-
-if test "$IPVS_SUPPORT" = "_WITH_LVS_"; then
- AC_MSG_CHECKING([for IPVS version])
- AC_TRY_RUN([
- #include <stdlib.h>
- #include <stdio.h>
- #include <net/ip_vs.h>
- int main (void) {
- FILE *fp = fopen ("ipvsinfo", "w");
- if (!fp) return 1;
- fprintf (fp, "%d\n%d\n%d\n", NVERSION(IP_VS_VERSION_CODE));
- fclose (fp);
- return 0;
- }
- ], [
- IPVS_MAJOR=`head -n 1 ipvsinfo | tail -n 1`
- IPVS_MINOR=`head -n 2 ipvsinfo | tail -n 1`
- IPVS_PATCH=`head -n 3 ipvsinfo | tail -n 1`
- ], [
- IPVS_MAJOR="0"
- IPVS_MINOR="0"
- IPVS_PATCH="0"
- ], [
- IPVS_MAJOR="0"
- IPVS_MINOR="0"
- IPVS_PATCH="0"
- ])
- rm -f ipvsinfo
- AC_MSG_RESULT([$IPVS_MAJOR.$IPVS_MINOR.$IPVS_PATCH])
- if test "$IPVS_MAJOR" = "0" -a "$IPVS_MINOR" = "0" -a "$IPVS_PATCH" = "0"; then
- AC_MSG_WARN([Cannot determine IPVS version.])
- fi
-fi
+IPVS_SUPPORT="_WITH_LVS_"
if test "$IPVS_SUPPORT" = "_WITHOUT_LVS_" -a "$enable_vrrp" = "no"; then
AC_MSG_ERROR([keepalived MUST be compiled at least with LVS or VRRP framework])
@@ -153,30 +64,7 @@
dnl ----[ IPVS syncd support probe ]---
dnl Sync daemon is supported since IPVS 0.9.2 for kernel 2.4
-IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
-if test "$IPVS_SUPPORT" = "_WITH_LVS_"; then
- AC_MSG_CHECKING([for IPVS syncd support])
- if test "$KERN" = "_KRNL_2_6_"; then
- IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
- elif test "$IPVS_MAJOR" -ge 1 -a "$KERN" = "_KRNL_2_4_"; then
- IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
- elif test "$IPVS_MINOR" -ge 9 -a "$IPVS_PATCH" -ge 2 -a "$KERN" = "_KRNL_2_4_"; then
- IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
- else
- IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
- fi
-
- if test "${IPVS_SUPPORT}" = "_WITHOUT_LVS_" -o "$enable_lvs_syncd" = "no"; then
- IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
- fi
-
- if test "$IPVS_SYNCD" = "_HAVE_IPVS_SYNCD_"; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
-fi
-
+IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
AC_SUBST(IPVS_SYNCD)
dnl ----[ Checks for kernel netlink support ]----

36
network/keepalived/keepalived-1.1.13-types_h.patch

@ -0,0 +1,36 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../keepalived/keepalived-1.1.13-types_h.patch
# Copyright (C) 2007 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- keepalived-1.1.13/keepalived/vrrp/vrrp_arp.c.orig 2007-08-06 22:57:11.000000000 +0200
+++ keepalived-1.1.13/keepalived/vrrp/vrrp_arp.c 2007-08-06 22:55:40.000000000 +0200
@@ -22,14 +22,14 @@
* Copyright (C) 2001-2006 Alexandre Cassen, <acassen@linux-vs.org>
*/
-/* system includes */
-#include <linux/if_packet.h>
-
/* local includes */
#include "vrrp_arp.h"
#include "memory.h"
#include "utils.h"
+/* system includes */
+#include <linux/if_packet.h>
+
/* global vars */
char *garp_buffer;
int garp_fd;

22
network/keepalived/keepalived.conf

@ -0,0 +1,22 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../keepalived/keepalived.conf
# Copyright (C) 2007 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# we patch configure.in
hook_add preconf 5 "aclocal ; autoconf"
if pkginstalled ipvsadm2 ; then
var_append makeopt ' ' "IPVS_FLAG=_WITH_LVS_"
else
var_append confopt ' ' "--disable-lvs"
fi
Loading…
Cancel
Save