summaryrefslogtreecommitdiff
path: root/package/l2tpns/patches
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-05-30 20:39:07 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2009-05-30 20:39:07 +0200
commitba3359722cbf8aa7b0ed39e1f81d1d74ec88fecd (patch)
tree10c726d162bc0ded85eb7aeacf8f246bd39ad63a /package/l2tpns/patches
parentbbd610f15a71b27c955175cb98392b114717fd47 (diff)
optimize ipkg package management
- generate ipkg control file from PKG_* variables - automatically install init scripts from ./files/*.init set #PKG pkgname to set the binary package - rename FWINIT -> INIT - move postinst and conffiles meta data to ./files - update the packages to the latest upstream version - remove some unready or unused package (strongswan,..) more cleanups needed after allmodconfig
Diffstat (limited to 'package/l2tpns/patches')
-rw-r--r--package/l2tpns/patches/01-honor_includes_remove_backtrace.patch128
-rw-r--r--package/l2tpns/patches/patch-Makefile37
-rw-r--r--package/l2tpns/patches/patch-l2tpns_c35
3 files changed, 72 insertions, 128 deletions
diff --git a/package/l2tpns/patches/01-honor_includes_remove_backtrace.patch b/package/l2tpns/patches/01-honor_includes_remove_backtrace.patch
deleted file mode 100644
index a8e4d754a..000000000
--- a/package/l2tpns/patches/01-honor_includes_remove_backtrace.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-diff -urN orig/l2tpns-2.1.14/Makefile l2tpns-2.1.14/Makefile
---- orig/l2tpns-2.1.14/Makefile 2005-12-07 06:21:37.000000000 +0100
-+++ l2tpns-2.1.14/Makefile 2005-12-14 12:50:49.000000000 +0100
-@@ -11,17 +11,14 @@
- DEFINES += -DETCDIR='"$(etcdir)"'
-
- OPTIM =
--OPTIM += -g
- OPTIM += -O3
-
--CC = gcc
--LD = gcc
--INCLUDES = -I.
-+INCLUDES = -I. -I$(STAGING_DIR)/usr/include
- CPPFLAGS = $(INCLUDES) $(DEFINES)
- CFLAGS = -Wall -Wformat-security -Wno-format-zero-length $(OPTIM)
--LDFLAGS =
-+LDFLAGS = -L$(STAGING_DIR)/usr/lib
- LDLIBS =
--INSTALL = install -c -D -o root -g root
-+INSTALL = install -c -D
-
- l2tpns.LIBS = -lm -lcli -ldl
-
-diff -urN orig/l2tpns-2.1.14/l2tpns.c l2tpns-2.1.14/l2tpns.c
---- orig/l2tpns-2.1.14/l2tpns.c 2005-12-07 06:21:37.000000000 +0100
-+++ l2tpns-2.1.14/l2tpns.c 2005-12-14 12:50:36.000000000 +0100
-@@ -940,18 +940,14 @@
-
- if (!t)
- {
-- static int backtrace_count = 0;
- LOG(0, 0, t, "tunnelsend called with 0 as tunnel id\n");
- STAT(tunnel_tx_errors);
-- log_backtrace(backtrace_count, 5)
- return;
- }
-
- if (!tunnel[t].ip)
- {
-- static int backtrace_count = 0;
- LOG(1, 0, t, "Error sending data out tunnel: no remote endpoint (tunnel not set up)\n");
-- log_backtrace(backtrace_count, 5)
- STAT(tunnel_tx_errors);
- return;
- }
-@@ -4125,23 +4121,8 @@
- struct sched_param params = {0};
- params.sched_priority = 1;
-
-- if (get_nprocs() < 2)
-- {
-- LOG(0, 0, 0, "Not using FIFO scheduler, there is only 1 processor in the system.\n");
-- config->scheduler_fifo = 0;
-- }
-- else
-- {
-- if ((ret = sched_setscheduler(0, SCHED_FIFO, &params)) == 0)
-- {
-- LOG(1, 0, 0, "Using FIFO scheduler. Say goodbye to any other processes running\n");
-- }
-- else
-- {
-- LOG(0, 0, 0, "Error setting scheduler to FIFO: %s\n", strerror(errno));
-- config->scheduler_fifo = 0;
-- }
-- }
-+ LOG(0, 0, 0, "Not using FIFO scheduler, there is only 1 processor in the system.\n");
-+ config->scheduler_fifo = 0;
- }
-
- /* Set up the cluster communications port. */
-diff -urN orig/l2tpns-2.1.14/l2tpns.h l2tpns-2.1.14/l2tpns.h
---- orig/l2tpns-2.1.14/l2tpns.h 2005-12-09 01:43:17.000000000 +0100
-+++ l2tpns-2.1.14/l2tpns.h 2005-12-14 07:43:51.000000000 +0100
-@@ -5,7 +5,6 @@
- #define __L2TPNS_H__
-
- #include <netinet/in.h>
--#include <execinfo.h>
- #include <stdio.h>
- #include <signal.h>
- #include <stdlib.h>
-@@ -766,21 +765,6 @@
- extern ippoolt *ip_address_pool;
- #define sessionfree (session[0].next)
-
--#define log_backtrace(count, max) \
--if (count++ < max) { \
-- void *array[20]; \
-- char **strings; \
-- int size, i; \
-- LOG(0, 0, t, "Backtrace follows:\n"); \
-- size = backtrace(array, 10); \
-- strings = backtrace_symbols(array, size); \
-- if (strings) for (i = 0; i < size; i++) \
-- { \
-- LOG(0, 0, t, " %s\n", strings[i]); \
-- } \
-- free(strings); \
--}
--
-
- extern configt *config;
- extern time_t basetime; // Time when this process started.
-diff -urN orig/l2tpns-2.1.14/ppp.c l2tpns-2.1.14/ppp.c
---- orig/l2tpns-2.1.14/ppp.c 2005-12-07 06:21:37.000000000 +0100
-+++ l2tpns-2.1.14/ppp.c 2005-12-14 07:43:08.000000000 +0100
-@@ -1755,9 +1755,7 @@
- {
- if (size < 12) // Need more space than this!!
- {
-- static int backtrace_count = 0;
- LOG(0, s, t, "makeppp buffer too small for L2TP header (size=%d)\n", size);
-- log_backtrace(backtrace_count, 5)
- return NULL;
- }
-
-@@ -1780,9 +1778,7 @@
-
- if (l + 12 > size)
- {
-- static int backtrace_count = 0;
- LOG(2, s, t, "makeppp would overflow buffer (size=%d, header+payload=%d)\n", size, l + 12);
-- log_backtrace(backtrace_count, 5)
- return NULL;
- }
-
diff --git a/package/l2tpns/patches/patch-Makefile b/package/l2tpns/patches/patch-Makefile
new file mode 100644
index 000000000..4065c2981
--- /dev/null
+++ b/package/l2tpns/patches/patch-Makefile
@@ -0,0 +1,37 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- l2tpns-2.1.21.orig/Makefile 2005-12-07 06:21:37.000000000 +0100
++++ l2tpns-2.1.21/Makefile 2009-05-29 17:48:31.886728540 +0200
+@@ -10,18 +10,11 @@ DEFINES =
+ DEFINES += -DLIBDIR='"$(libdir)"'
+ DEFINES += -DETCDIR='"$(etcdir)"'
+
+-OPTIM =
+-OPTIM += -g
+-OPTIM += -O3
+-
+-CC = gcc
+-LD = gcc
+ INCLUDES = -I.
+ CPPFLAGS = $(INCLUDES) $(DEFINES)
+-CFLAGS = -Wall -Wformat-security -Wno-format-zero-length $(OPTIM)
+-LDFLAGS =
++CFLAGS ?= -Wall -Wformat-security -Wno-format-zero-length
+ LDLIBS =
+-INSTALL = install -c -D -o root -g root
++INSTALL = install -c -D
+
+ l2tpns.LIBS = -lm -lcli -ldl
+
+@@ -58,10 +51,10 @@ depend:
+ mv Makefile.tmp Makefile
+
+ l2tpns: $(OBJS)
+- $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) $($@.LIBS)
++ $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $($@.LIBS)
+
+ nsctl: nsctl.o control.o
+- $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) $($@.LIBS)
++ $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $($@.LIBS)
+
+ %.o: %.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
diff --git a/package/l2tpns/patches/patch-l2tpns_c b/package/l2tpns/patches/patch-l2tpns_c
new file mode 100644
index 000000000..3aa12107d
--- /dev/null
+++ b/package/l2tpns/patches/patch-l2tpns_c
@@ -0,0 +1,35 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- l2tpns-2.1.21.orig/l2tpns.c 2006-06-22 17:30:50.000000000 +0200
++++ l2tpns-2.1.21/l2tpns.c 2009-05-29 17:53:32.393095004 +0200
+@@ -4233,31 +4233,6 @@ int main(int argc, char *argv[])
+ chdir("/tmp");
+ }
+
+- if (config->scheduler_fifo)
+- {
+- int ret;
+- struct sched_param params = {0};
+- params.sched_priority = 1;
+-
+- if (get_nprocs() < 2)
+- {
+- LOG(0, 0, 0, "Not using FIFO scheduler, there is only 1 processor in the system.\n");
+- config->scheduler_fifo = 0;
+- }
+- else
+- {
+- if ((ret = sched_setscheduler(0, SCHED_FIFO, &params)) == 0)
+- {
+- LOG(1, 0, 0, "Using FIFO scheduler. Say goodbye to any other processes running\n");
+- }
+- else
+- {
+- LOG(0, 0, 0, "Error setting scheduler to FIFO: %s\n", strerror(errno));
+- config->scheduler_fifo = 0;
+- }
+- }
+- }
+-
+ /* Set up the cluster communications port. */
+ if (cluster_init() < 0)
+ exit(1);