This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via 191e8b049e33fc529ca87ddd7dd118a4a06a867a (commit) via 8592b4dac265dc6a14ac1c0cd870778de599a2e2 (commit) via de45a98089bf99856cf1dfdcd4b5780ddb08bdcd (commit) via 93c5933634377b9cf31aa65b1611da7b935540b1 (commit) via 789a10989cb07b698b988dbb61d4ead3464f2108 (commit) via 7d288e76d142c42ab7c800b6a25cb73bd6493211 (commit) via 244d7a735c84e6c74afb828ed6294b87bf770edf (commit) via 6d535f727f97cd86dfd63b1c430c289d76d776af (commit) via 021a6fe9ccf61bc92fc6054751b63b962c737f0a (commit) via c836aac1960d22b35bba23ebb0a979266273bb51 (commit) via c4e1249d0baf9d84b3a2f7cedcc7eb8e402dfd89 (commit) via eadd9921208482bfd4ef6d311f8e964c09612695 (commit) from 55b0487810513ea7e7a8bfbc185e6d91544c01b8 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 191e8b049e33fc529ca87ddd7dd118a4a06a867a Merge: 8592b4d 55b0487 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Aug 2 22:21:25 2010 +0200
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-3.x
commit 8592b4dac265dc6a14ac1c0cd870778de599a2e2 Merge: 61a300f de45a98 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Aug 2 22:21:14 2010 +0200
Merge commit 'de45a98089bf99856cf1dfdcd4b5780ddb08bdcd'
commit de45a98089bf99856cf1dfdcd4b5780ddb08bdcd Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Aug 2 00:48:33 2010 +0200
bootchart2: New package.
commit 93c5933634377b9cf31aa65b1611da7b935540b1 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Jul 31 21:42:00 2010 +0200
tunctl: New package.
commit 789a10989cb07b698b988dbb61d4ead3464f2108 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat Jul 31 11:17:23 2010 +0200
udev: Update to 160.
commit 7d288e76d142c42ab7c800b6a25cb73bd6493211 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jul 30 17:43:45 2010 +0200
pptp: Import patches.
commit 244d7a735c84e6c74afb828ed6294b87bf770edf Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jul 30 17:27:11 2010 +0200
Revert "pptp: Fix build error on linux."
This reverts commit c836aac1960d22b35bba23ebb0a979266273bb51.
commit 6d535f727f97cd86dfd63b1c430c289d76d776af Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jul 30 10:03:33 2010 +0200
toolchain: Omit autoreconf in coreutils.
Generally, we need this here but only for the testsuite that isn't run.
commit 021a6fe9ccf61bc92fc6054751b63b962c737f0a Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jul 30 10:02:38 2010 +0200
cpio: Need no autoreconf here.
commit c836aac1960d22b35bba23ebb0a979266273bb51 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jul 30 09:58:31 2010 +0200
pptp: Fix build error on linux.
Removed pptp_compat.c because there is only some stuff for solaris in it.
commit c4e1249d0baf9d84b3a2f7cedcc7eb8e402dfd89 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jul 30 09:58:12 2010 +0200
Revert "pptp: Patch to fix build on linux systems."
This reverts commit eadd9921208482bfd4ef6d311f8e964c09612695.
commit eadd9921208482bfd4ef6d311f8e964c09612695 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Jul 30 09:41:29 2010 +0200
pptp: Patch to fix build on linux systems.
-----------------------------------------------------------------------
Summary of changes: .../btrfs-progs.nm => bootchart2/bootchart2.nm} | 18 +- pkgs/core/cpio/cpio.nm | 6 - pkgs/core/pptp/patches/pptp-1.7.2-compat.patch | 71 ++++++++ pkgs/core/pptp/patches/pptp-1.7.2-conn-free.patch | 90 ++++++++++ pkgs/core/pptp/patches/pptp-1.7.2-conn-free2.patch | 83 +++++++++ pkgs/core/pptp/patches/pptp-1.7.2-ip-path.patch | 186 ++++++++++++++++++++ pkgs/core/pptp/patches/pptp-1.7.2-makedeps.patch | 80 +++++++++ .../patches/pptp-1.7.2-pptpsetup-encrypt.patch | 22 +++ .../pptp/patches/pptp-1.7.2-pptpsetup-mppe.patch | 47 +++++ pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup.patch | 23 +++ pkgs/core/pptp/patches/pptp-1.7.2-waitpid.patch | 16 ++ pkgs/core/pptp/pptp.nm | 3 +- .../{etherwake/etherwake.nm => tunctl/tunctl.nm} | 24 ++- pkgs/core/udev/udev.nm | 2 +- pkgs/toolchain/coreutils/coreutils.nm | 2 + 15 files changed, 645 insertions(+), 28 deletions(-) copy pkgs/core/{btrfs-progs/btrfs-progs.nm => bootchart2/bootchart2.nm} (80%) create mode 100644 pkgs/core/pptp/patches/pptp-1.7.2-compat.patch create mode 100644 pkgs/core/pptp/patches/pptp-1.7.2-conn-free.patch create mode 100644 pkgs/core/pptp/patches/pptp-1.7.2-conn-free2.patch create mode 100644 pkgs/core/pptp/patches/pptp-1.7.2-ip-path.patch create mode 100644 pkgs/core/pptp/patches/pptp-1.7.2-makedeps.patch create mode 100644 pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup-encrypt.patch create mode 100644 pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup-mppe.patch create mode 100644 pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup.patch create mode 100644 pkgs/core/pptp/patches/pptp-1.7.2-waitpid.patch copy pkgs/core/{etherwake/etherwake.nm => tunctl/tunctl.nm} (76%)
Difference in files: diff --git a/pkgs/core/bootchart2/bootchart2.nm b/pkgs/core/bootchart2/bootchart2.nm new file mode 100644 index 0000000..f5c1709 --- /dev/null +++ b/pkgs/core/bootchart2/bootchart2.nm @@ -0,0 +1,50 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# 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, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = bootchart2 +PKG_VER = 0.12.2 +PKG_REL = 0 + +PKG_MAINTAINER = +PKG_GROUP = System/Statistics +PKG_URL = http://github.com/mmeeks/bootchart +PKG_LICENSE = GPLv2 +PKG_SUMMARY = Graphs the boot process. + +define PKG_DESCRIPTION + Graphs the boot process of the system and lets the user see what \ + consumes the most time and cpu power or I/O performance. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +define STAGE_BUILD + cd $(DIR_APP) && make CFLAGS="$(CFLAGS)" $(PARALLELISMFLAGS) +endef + +define STAGE_INSTALL + cd $(DIR_APP) && make install-collector DESTDIR=$(BUILDROOT) +endef diff --git a/pkgs/core/cpio/cpio.nm b/pkgs/core/cpio/cpio.nm index 9fe8cb6..2174b3d 100644 --- a/pkgs/core/cpio/cpio.nm +++ b/pkgs/core/cpio/cpio.nm @@ -34,8 +34,6 @@ PKG_URL = http://www.gnu.org/software/cpio/ PKG_LICENSE = GPLv3+ PKG_SUMMARY = A GNU archiving program.
-PKG_BUILD_DEPS+= autoconf automake - define PKG_DESCRIPTION GNU cpio copies files into or out of a cpio or tar archive. Archives \ are files which contain a collection of other files plus information \ @@ -51,10 +49,6 @@ CONFIGURE_OPTIONS += \ --libexecdir=/tmp \ --with-rmt=/usr/sbin/rmt
-define STAGE_PREPARE_CMDS - cd $(DIR_APP) && autoreconf --force -endef - define STAGE_TEST cd $(DIR_APP) && make check endef diff --git a/pkgs/core/pptp/patches/pptp-1.7.2-compat.patch b/pkgs/core/pptp/patches/pptp-1.7.2-compat.patch new file mode 100644 index 0000000..a6456fc --- /dev/null +++ b/pkgs/core/pptp/patches/pptp-1.7.2-compat.patch @@ -0,0 +1,71 @@ +Index: pptp_compat.c +=================================================================== +RCS file: /cvsroot/pptpclient/pptp-linux/pptp_compat.c,v +retrieving revision 1.1 +retrieving revision 1.3 +diff -u -r1.1 -r1.3 +--- a/pptp_compat.c 19 Feb 2008 21:43:28 -0000 1.1 ++++ b/pptp_compat.c 25 Jul 2008 00:13:56 -0000 1.3 +@@ -7,14 +7,15 @@ + #include <fcntl.h> + #include <sys/types.h> + #include <unistd.h> +-#include <stropts.h> + #include <stdlib.h> ++#if defined (__SVR4) && defined (__sun) /* Solaris */ ++#include <stropts.h> ++#endif + #include <strings.h> + #include "pptp_compat.h" + #include <stdio.h> + #include "util.h" + +- + #if defined (__SVR4) && defined (__sun) /* Solaris */ + /* + * daemon implementation from uClibc +Index: pptp.c +=================================================================== +RCS file: /cvsroot/pptpclient/pptp-linux/pptp.c,v +retrieving revision 1.49 +retrieving revision 1.51 +diff -u -r1.49 -r1.51 +--- a/pptp.c 14 May 2008 06:32:52 -0000 1.49 ++++ b/pptp.c 24 Jul 2008 05:53:05 -0000 1.51 +@@ -61,9 +61,8 @@ + #include "version.h" + #if defined(__linux__) + #include <sys/prctl.h> +-#else +-#include "inststr.h" + #endif ++#include "inststr.h" + #include "util.h" + #include "pptp_quirks.h" + #include "pqueue.h" +@@ -129,7 +128,7 @@ + } + + #if defined (__SVR4) && defined (__sun) +-struct in_addr localbind = { INADDR_ANY }; ++struct in_addr localbind = { .s_addr = INADDR_ANY }; + #else + struct in_addr localbind = { INADDR_NONE }; + #endif +@@ -183,6 +182,7 @@ + struct in_addr inetaddr; + volatile int callmgr_sock = -1; + char ttydev[PATH_MAX]; ++ char *tty_name; + int pty_fd, tty_fd, gre_fd, rc; + volatile pid_t parent_pid, child_pid; + u_int16_t call_id, peer_call_id; +@@ -391,7 +391,7 @@ + file2fd("/dev/null", "wb", STDERR_FILENO); + } + +- char *tty_name = ttyname(tty_fd); ++ tty_name = ttyname(tty_fd); + snprintf(buf, sizeof(buf), "pptp: GRE-to-PPP gateway on %s", + tty_name ? tty_name : "(null)"); + #ifdef PR_SET_NAME diff --git a/pkgs/core/pptp/patches/pptp-1.7.2-conn-free.patch b/pkgs/core/pptp/patches/pptp-1.7.2-conn-free.patch new file mode 100644 index 0000000..331e92e --- /dev/null +++ b/pkgs/core/pptp/patches/pptp-1.7.2-conn-free.patch @@ -0,0 +1,90 @@ +Tue Jun 15 15:00:40 2010 James Cameron quozl@laptop.org + + * pptp_ctrl.c (pptp_conn_is_dead): immediately destroying the + connection and freeing the structure has led to segmentation + faults on more recent heap implementations, since we use the + structure after it has been freed. + + Defer the free of the structure until after all uses of it have + ceased, by adding a connection state for dead and terminating the + main loop once it is detected. + +--- a/pptp_callmgr.c 2008-05-14 07:33:55.000000000 +0100 ++++ b/pptp_callmgr.c 2010-06-15 14:32:00.478100392 +0100 +@@ -167,6 +170,7 @@ + do { + int rc; + fd_set read_set = call_set, write_set; ++ if (pptp_conn_is_dead(conn)) break; + FD_ZERO (&write_set); + if (pptp_conn_established(conn)) { + FD_SET (unix_sock, &read_set); +@@ -294,6 +298,7 @@ + } + /* with extreme prejudice */ + pptp_conn_destroy(conn); ++ pptp_conn_free(conn); + vector_destroy(call_list); + } + cleanup: +--- a/pptp_ctrl.c 2008-05-14 07:33:55.000000000 +0100 ++++ b/pptp_ctrl.c 2010-06-15 14:32:00.480100647 +0100 +@@ -58,8 +62,11 @@ + struct PPTP_CONN { + int inet_sock; + /* Connection States */ +- enum { +- CONN_IDLE, CONN_WAIT_CTL_REPLY, CONN_WAIT_STOP_REPLY, CONN_ESTABLISHED ++ enum { ++ CONN_IDLE, ++ CONN_WAIT_CTL_REPLY, CONN_WAIT_STOP_REPLY, ++ CONN_ESTABLISHED, ++ CONN_DEAD + } conn_state; /* on startup: CONN_IDLE */ + /* Keep-alive states */ + enum { +@@ -448,6 +457,16 @@ + close(conn->inet_sock); + /* deallocate */ + vector_destroy(conn->call); ++ conn->conn_state = CONN_DEAD; ++} ++ ++int pptp_conn_is_dead(PPTP_CONN * conn) ++{ ++ return conn->conn_state == CONN_DEAD; ++} ++ ++void pptp_conn_free(PPTP_CONN * conn) ++{ + free(conn); + } + +@@ -1038,11 +1059,13 @@ + int i; + /* "Keep Alives and Timers, 1": check connection state */ + if (global.conn->conn_state != CONN_ESTABLISHED) { +- if (global.conn->conn_state == CONN_WAIT_STOP_REPLY) ++ if (global.conn->conn_state == CONN_WAIT_STOP_REPLY) { + /* hard close. */ + pptp_conn_destroy(global.conn); +- else /* soft close */ +- pptp_conn_close(global.conn, PPTP_STOP_NONE); ++ return; ++ } ++ /* soft close */ ++ pptp_conn_close(global.conn, PPTP_STOP_NONE); + } + /* "Keep Alives and Timers, 2": check echo status */ + if (global.conn->ka_state == KA_OUTSTANDING) { +--- a/pptp_ctrl.h 2008-05-14 07:33:55.000000000 +0100 ++++ b/pptp_ctrl.h 2010-06-15 14:32:00.864975405 +0100 +@@ -33,6 +33,8 @@ + void pptp_call_close(PPTP_CONN * conn, PPTP_CALL * call); + /* hard close. */ + void pptp_call_destroy(PPTP_CONN *conn, PPTP_CALL *call); ++int pptp_conn_is_dead(PPTP_CONN * conn); ++void pptp_conn_free(PPTP_CONN * conn); + /* soft close. Will callback on completion. */ + void pptp_conn_close(PPTP_CONN * conn, u_int8_t close_reason); + /* hard close */ diff --git a/pkgs/core/pptp/patches/pptp-1.7.2-conn-free2.patch b/pkgs/core/pptp/patches/pptp-1.7.2-conn-free2.patch new file mode 100644 index 0000000..78c021e --- /dev/null +++ b/pkgs/core/pptp/patches/pptp-1.7.2-conn-free2.patch @@ -0,0 +1,83 @@ +Fri Jun 4 10:54:04 2010 Jan Just Keijser jan.just.keijser@gmail.com + + * pptp_ctrl.c: check for failure return by pptp_send_ctrl_packet + and avoid using freed struct conn. + +--- a/pptp_ctrl.c 2010-06-15 15:05:46.743913798 +0100 ++++ b/pptp_ctrl.c 2010-06-15 14:32:00.480100647 +0100 +@@ -396,9 +400,10 @@ + /* don't check state against WAIT_DISCONNECT... allow multiple disconnect + * requests to be made. + */ +- pptp_send_ctrl_packet(conn, &rqst, sizeof(rqst)); +- pptp_reset_timer(); +- call->state.pns = PNS_WAIT_DISCONNECT; ++ if (pptp_send_ctrl_packet(conn, &rqst, sizeof(rqst))) { ++ pptp_reset_timer(); ++ call->state.pns = PNS_WAIT_DISCONNECT; ++ } + /* call structure will be freed when we have confirmation of disconnect. */ + } + +@@ -431,9 +436,10 @@ + pptp_call_close(conn, vector_get_Nth(conn->call, i)); + /* now close connection */ + log("Closing PPTP connection"); +- pptp_send_ctrl_packet(conn, &rqst, sizeof(rqst)); +- pptp_reset_timer(); /* wait 60 seconds for reply */ +- conn->conn_state = CONN_WAIT_STOP_REPLY; ++ if (pptp_send_ctrl_packet(conn, &rqst, sizeof(rqst))) { ++ pptp_reset_timer(); /* wait 60 seconds for reply */ ++ conn->conn_state = CONN_WAIT_STOP_REPLY; ++ } + return; + } + +@@ -733,8 +739,8 @@ + reply.version = packet->version; + /* protocol version not supported */ + reply.result_code = hton8(5); +- pptp_send_ctrl_packet(conn, &reply, sizeof(reply)); +- pptp_reset_timer(); /* give sender a chance for a retry */ ++ if (pptp_send_ctrl_packet(conn, &reply, sizeof(reply))) ++ pptp_reset_timer(); /* give sender a chance for a retry */ + } else { /* same or greater version */ + if (pptp_send_ctrl_packet(conn, &reply, sizeof(reply))) { + conn->conn_state = CONN_ESTABLISHED; +@@ -841,8 +847,8 @@ + hton8(1), hton8(PPTP_GENERAL_ERROR_NONE), 0 + }; + logecho( PPTP_ECHO_RQST); +- pptp_send_ctrl_packet(conn, &reply, sizeof(reply)); +- pptp_reset_timer(); ++ if (pptp_send_ctrl_packet(conn, &reply, sizeof(reply))) ++ pptp_reset_timer(); + break; + } + /* ----------- OUTGOING CALL MESSAGES ------------ */ +@@ -928,9 +935,10 @@ + vector_search(conn->call, ntoh16(packet->call_id), &call); + if (call->callback != NULL) + call->callback(conn, call, CALL_CLOSE_RQST); +- pptp_send_ctrl_packet(conn, &reply, sizeof(reply)); +- pptp_call_destroy(conn, call); +- log("Call closed (RQST) (call id %d)", (int) call->call_id); ++ if (pptp_send_ctrl_packet(conn, &reply, sizeof(reply))) { ++ pptp_call_destroy(conn, call); ++ log("Call closed (RQST) (call id %d)", (int) call->call_id); ++ } + } + break; + } +@@ -1067,8 +1075,9 @@ + } else { /* ka_state == NONE */ /* send keep-alive */ + struct pptp_echo_rqst rqst = { + PPTP_HEADER_CTRL(PPTP_ECHO_RQST), hton32(global.conn->ka_id) }; +- pptp_send_ctrl_packet(global.conn, &rqst, sizeof(rqst)); +- global.conn->ka_state = KA_OUTSTANDING; ++ if (pptp_send_ctrl_packet(global.conn, &rqst, sizeof(rqst))) { ++ global.conn->ka_state = KA_OUTSTANDING; ++ } + } + /* check incoming/outgoing call states for !IDLE && !ESTABLISHED */ + for (i = 0; i < vector_size(global.conn->call); i++) { diff --git a/pkgs/core/pptp/patches/pptp-1.7.2-ip-path.patch b/pkgs/core/pptp/patches/pptp-1.7.2-ip-path.patch new file mode 100644 index 0000000..c65cb32 --- /dev/null +++ b/pkgs/core/pptp/patches/pptp-1.7.2-ip-path.patch @@ -0,0 +1,186 @@ +Index: routing.c +=================================================================== +RCS file: /cvsroot/pptpclient/pptp-linux/routing.c,v +retrieving revision 1.1 +diff -u -r1.1 routing.c +--- a/routing.c 2 Aug 2006 07:07:37 -0000 1.1 ++++ b/routing.c 25 Mar 2009 13:58:28 -0000 +@@ -23,9 +23,26 @@ + #include <stdio.h> + #include <string.h> + #include "routing.h" ++#include "config.h" + ++#if defined (__SVR4) && defined (__sun) /* Solaris */ ++#include <sys/types.h> ++#include <sys/socket.h> ++#include <net/if.h> ++#include <arpa/inet.h> ++#include <errno.h> ++#include "util.h" ++/* PF_ROUTE socket*/ ++int rts; ++/* Destination and gateway addresses */ ++struct sockaddr_in rdst, rgw; ++/* Request sequence */ ++int rseq; ++int dorouting; ++#else /* Solaris */ + /* route to the server */ + char *route; ++#endif /* Solaris */ + + /* + +@@ -54,26 +71,113 @@ + */ + + void routing_init(char *ip) { ++#if defined (__SVR4) && defined (__sun) /* Solaris */ ++ rdst.sin_family = AF_INET; ++ if ( ! inet_pton(AF_INET, ip, &rdst.sin_addr) ) { ++ log("Cannot convert address: %s", strerror(errno)); ++ return; ++ } ++ ++ if ( (rts = socket(PF_ROUTE, SOCK_RAW, AF_INET )) < 0 ) { ++ log("Cannot open routing socket: %s", strerror(errno)); ++ return; ++ } ++ ++ struct rt_msg rtm = { ++ .hdr.rtm_msglen = sizeof(struct rt_msg), ++ .hdr.rtm_version = RTM_VERSION, ++ .hdr.rtm_type = RTM_GET, ++ .hdr.rtm_addrs = RTA_DST, ++ .hdr.rtm_pid = getpid(), ++ .hdr.rtm_seq = ++rseq, ++ .addrs[RTAX_DST] = rdst ++ }; ++ ++ if ( write(rts, &rtm, rtm.hdr.rtm_msglen) != rtm.hdr.rtm_msglen ) { ++ log("Error writing to routing socket: %s", strerror(errno)); ++ close(rts); ++ return; ++ } ++ ++ while ( read(rts, &rtm, sizeof(struct rt_msg)) > 0 ) ++ if ( rtm.hdr.rtm_pid == getpid() && rtm.hdr.rtm_seq == rseq) { ++ /* Check if host route already present */ ++ if ( ( rtm.hdr.rtm_flags & RTF_HOST ) != RTF_HOST ) { ++ rgw = rtm.addrs[RTAX_GATEWAY]; ++ dorouting = 1; ++ } ++ break; ++ } ++#else /* Solaris */ + char buf[256]; +- snprintf(buf, 255, "/bin/ip route get %s", ip); +- FILE *p = popen(buf, "r"); ++ FILE *p; ++ ++ snprintf(buf, 255, "%s route get %s", IP_BINARY, ip); ++ p = popen(buf, "r"); + fgets(buf, 255, p); + /* TODO: check for failure of fgets */ + route = strdup(buf); + pclose(p); + /* TODO: check for failure of command */ ++#endif /* Solaris */ + } + + void routing_start() { ++#if defined (__SVR4) && defined (__sun) /* Solaris */ ++ if ( ! dorouting ) ++ return; ++ ++ struct rt_msg rtm = { ++ .hdr.rtm_msglen = sizeof(struct rt_msg), ++ .hdr.rtm_version = RTM_VERSION, ++ .hdr.rtm_type = RTM_ADD, ++ .hdr.rtm_flags = RTF_HOST | RTF_GATEWAY | RTF_STATIC, ++ .hdr.rtm_addrs = RTA_DST | RTA_GATEWAY, ++ .hdr.rtm_pid = getpid(), ++ .hdr.rtm_seq = ++rseq, ++ .addrs[RTAX_DST] = rdst, ++ .addrs[RTAX_GATEWAY] = rgw ++ }; ++ ++ if ( write(rts, &rtm, rtm.hdr.rtm_msglen) != rtm.hdr.rtm_msglen ) { ++ log("Error adding route: %s", strerror(errno)); ++ } ++#else /* Solaris */ + char buf[256]; +- snprintf(buf, 255, "/bin/ip route replace %s", route); +- FILE *p = popen(buf, "r"); ++ FILE *p; ++ ++ snprintf(buf, 255, "%s route replace %s", IP_BINARY, route); ++ p = popen(buf, "r"); + pclose(p); ++#endif /* Solaris */ + } + + void routing_end() { ++#if defined (__SVR4) && defined (__sun) /* Solaris */ ++ if ( ! dorouting) ++ return; ++ ++ struct rt_msg rtm = { ++ .hdr.rtm_msglen = sizeof(struct rt_msg), ++ .hdr.rtm_version = RTM_VERSION, ++ .hdr.rtm_type = RTM_DELETE, ++ .hdr.rtm_flags = RTF_HOST | RTF_GATEWAY | RTF_STATIC, ++ .hdr.rtm_addrs = RTA_DST | RTA_GATEWAY, ++ .hdr.rtm_pid = getpid(), ++ .hdr.rtm_seq = ++rseq, ++ .addrs[RTAX_DST] = rdst, ++ .addrs[RTAX_GATEWAY] = rgw ++ }; ++ ++ if ( write(rts, &rtm, rtm.hdr.rtm_msglen) != rtm.hdr.rtm_msglen ) { ++ log("Error deleting route: %s", strerror(errno)); ++ } ++#else /* Solaris */ + char buf[256]; +- snprintf(buf, 255, "/bin/ip route delete %s", route); +- FILE *p = popen(buf, "r"); ++ FILE *p; ++ ++ snprintf(buf, 255, "%s route delete %s", IP_BINARY, route); ++ p = popen(buf, "r"); + pclose(p); ++#endif /* Solaris */ + } +Index: Makefile +=================================================================== +RCS file: /cvsroot/pptpclient/pptp-linux/Makefile,v +retrieving revision 1.47 +retrieving revision 1.49 +diff -u -r1.47 -r1.49 +--- a/Makefile 14 May 2008 06:32:52 -0000 1.47 ++++ b/Makefile 24 Jul 2008 05:37:47 -0000 1.49 +@@ -1,10 +1,13 @@ +-# $Id: Makefile,v 1.47 2008/05/14 06:32:52 quozl Exp $ ++# $Id: Makefile,v 1.49 2008/07/24 05:37:47 quozl Exp $ + VERSION=1.7.2 + RELEASE= + + ################################################################# +-# CHANGE THIS LINE to point to the location of your pppd binary. ++# CHANGE THIS LINE to point to the location of binaries + PPPD = /usr/sbin/pppd ++# Solaris ++# PPPD = /usr/bin/pppd ++IP = /bin/ip + ################################################################# + + BINDIR=$(DESTDIR)/usr/sbin +@@ -47,6 +52,7 @@ + echo "/* text added by Makefile target config.h */" > config.h + echo "#define PPTP_LINUX_VERSION "$(VERSION)$(RELEASE)"" >> config.h + echo "#define PPPD_BINARY "$(PPPD)"" >> config.h ++ echo "#define IP_BINARY "$(IP)"" >> config.h + + vector_test: vector_test.o vector.o + $(CC) -o vector_test vector_test.o vector.o diff --git a/pkgs/core/pptp/patches/pptp-1.7.2-makedeps.patch b/pkgs/core/pptp/patches/pptp-1.7.2-makedeps.patch new file mode 100644 index 0000000..02b36cf --- /dev/null +++ b/pkgs/core/pptp/patches/pptp-1.7.2-makedeps.patch @@ -0,0 +1,80 @@ +Index: Makefile +=================================================================== +RCS file: /cvsroot/pptpclient/pptp-linux/Makefile,v +retrieving revision 1.47 +retrieving revision 1.49 +diff -u -r1.47 -r1.49 +--- a/Makefile 14 May 2008 06:32:52 -0000 1.47 ++++ b/Makefile 24 Jul 2008 05:37:47 -0000 1.49 +@@ -96,3 +102,71 @@ + release: + cp pptp_$(VERSION)-0_i386.deb $(WEB) + cd $(WEB);make ++ ++# The following include file dependencies were generated using ++# "makedepend -w0 *.c", then manually removing out of tree entries. ++# DO NOT DELETE ++ ++dirutil.o: dirutil.h ++orckit_quirks.o: pptp_msg.h ++orckit_quirks.o: pptp_compat.h ++orckit_quirks.o: pptp_options.h ++orckit_quirks.o: pptp_ctrl.h ++orckit_quirks.o: util.h ++ppp_fcs.o: ppp_fcs.h ++ppp_fcs.o: pptp_compat.h ++pptp.o: config.h ++pptp.o: pptp_callmgr.h ++pptp.o: pptp_gre.h ++pptp.o: pptp_compat.h ++pptp.o: version.h ++pptp.o: inststr.h ++pptp.o: util.h ++pptp.o: pptp_quirks.h ++pptp.o: pptp_msg.h ++pptp.o: pptp_ctrl.h ++pptp.o: pqueue.h ++pptp.o: pptp_options.h ++pptp_callmgr.o: pptp_callmgr.h ++pptp_callmgr.o: pptp_ctrl.h ++pptp_callmgr.o: pptp_compat.h ++pptp_callmgr.o: pptp_msg.h ++pptp_callmgr.o: dirutil.h ++pptp_callmgr.o: vector.h ++pptp_callmgr.o: util.h ++pptp_callmgr.o: routing.h ++pptp_compat.o: pptp_compat.h ++pptp_compat.o: util.h ++pptp_ctrl.o: pptp_msg.h ++pptp_ctrl.o: pptp_compat.h ++pptp_ctrl.o: pptp_ctrl.h ++pptp_ctrl.o: pptp_options.h ++pptp_ctrl.o: vector.h ++pptp_ctrl.o: util.h ++pptp_ctrl.o: pptp_quirks.h ++pptp_gre.o: ppp_fcs.h ++pptp_gre.o: pptp_compat.h ++pptp_gre.o: pptp_msg.h ++pptp_gre.o: pptp_gre.h ++pptp_gre.o: util.h ++pptp_gre.o: pqueue.h ++pptp_gre.o: test.h ++pptp_quirks.o: orckit_quirks.h ++pptp_quirks.o: pptp_options.h ++pptp_quirks.o: pptp_ctrl.h ++pptp_quirks.o: pptp_compat.h ++pptp_quirks.o: pptp_msg.h ++pptp_quirks.o: pptp_quirks.h ++pqueue.o: util.h ++pqueue.o: pqueue.h ++routing.o: routing.h ++test.o: util.h ++test.o: test.h ++util.o: util.h ++vector.o: pptp_ctrl.h ++vector.o: pptp_compat.h ++vector.o: vector.h ++vector_test.o: vector.h ++vector_test.o: pptp_ctrl.h ++vector_test.o: pptp_compat.h ++version.o: config.h diff --git a/pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup-encrypt.patch b/pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup-encrypt.patch new file mode 100644 index 0000000..6f7bfa5 --- /dev/null +++ b/pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup-encrypt.patch @@ -0,0 +1,22 @@ +--- a/pptpsetup 2009-06-01 14:30:36.000000000 +0100 ++++ b/pptpsetup 2009-06-01 14:36:39.000000000 +0100 +@@ -43,12 +43,13 @@ + sub create { + my $TUNNEL = shift; + +- # system checking +- &Check_MPPE_in_kernel +- or die "$0: couldn't find MPPE support in kernel.\n"; +- +- &Check_MPPE_in_pppd +- or die "$0: couldn't find MPPE support in pppd.\n"; ++ # if encryption is requested, check for support in kernel and pppd ++ if ( $ENCRYPT ) { ++ &Check_MPPE_in_kernel ++ or die "$0: couldn't find MPPE support in kernel.\n"; ++ &Check_MPPE_in_pppd ++ or die "$0: couldn't find MPPE support in pppd.\n"; ++ } + + # input validation + ($TUNNEL) = $TUNNEL =~ m{^(\w+)$} diff --git a/pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup-mppe.patch b/pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup-mppe.patch new file mode 100644 index 0000000..c8668ea --- /dev/null +++ b/pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup-mppe.patch @@ -0,0 +1,47 @@ +--- pptp-1.7.2/pptpsetup 2009-06-01 15:18:25.000000000 +0100 ++++ pptp-1.7.2/pptpsetup 2009-06-01 15:19:25.000000000 +0100 +@@ -43,14 +43,6 @@ + sub create { + my $TUNNEL = shift; + +- # if encryption is requested, check for support in kernel and pppd +- if ( $ENCRYPT ) { +- &Check_MPPE_in_kernel +- or die "$0: couldn't find MPPE support in kernel.\n"; +- &Check_MPPE_in_pppd +- or die "$0: couldn't find MPPE support in pppd.\n"; +- } +- + # input validation + ($TUNNEL) = $TUNNEL =~ m{^(\w+)$} + or die "$0: invalid tunnel name.\nTry '$0 --help' for more information.\n"; +@@ -180,29 +172,6 @@ + exit; + } + +-### AUXILIAR SUBS ### +- +-sub Check_MPPE_in_kernel { +- my $command = q/modprobe ppp-compress-18/; +- if (system( $command ) == 0) { +- # no error! +- return 1; +- } else { +- return 0; +- } +-} +- +-sub Check_MPPE_in_pppd { +- my $command = q/strings `which pppd`|grep -i mppe|wc --lines/; +- my $answer = `$command`; +- if ($answer > 0) { +- # ok! +- return 1; +- } else { +- return 0; +- } +-} +- + __END__ + + =head1 NAME diff --git a/pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup.patch b/pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup.patch new file mode 100644 index 0000000..c1d0638 --- /dev/null +++ b/pkgs/core/pptp/patches/pptp-1.7.2-pptpsetup.patch @@ -0,0 +1,23 @@ +Index: pptpsetup +=================================================================== +RCS file: /cvsroot/pptpclient/pptp-linux/pptpsetup,v +retrieving revision 1.4 +diff -u -r1.4 pptpsetup +--- a/pptpsetup 2 Aug 2006 07:02:47 -0000 1.4 ++++ b/pptpsetup 25 Mar 2009 13:41:37 -0000 +@@ -154,6 +154,7 @@ + + # delete entry from chap-secrets + my $chap_file = '/etc/ppp/chap-secrets'; ++ my $mode = (stat($chap_file))[2] & 07777; + + open( FILE, $chap_file ) + or die "$0: can't read '$chap_file': $!\n"; +@@ -171,6 +172,7 @@ + # write new chap-secrets + open( FILE, ">$chap_file" ) + or die "$0: can't write '$chap_file': $!\n"; ++ chmod $mode, $chap_file; + print FILE $new_chap; + close FILE; + diff --git a/pkgs/core/pptp/patches/pptp-1.7.2-waitpid.patch b/pkgs/core/pptp/patches/pptp-1.7.2-waitpid.patch new file mode 100644 index 0000000..ef042f1 --- /dev/null +++ b/pkgs/core/pptp/patches/pptp-1.7.2-waitpid.patch @@ -0,0 +1,16 @@ +Tue Jun 15 15:02:28 2010 James Cameron quozl@us.netrek.org + + * pptp.c (open_callmgr): fix usage of status returned by waitpid; + it must be wrapped by WEXITSTATUS to shift bits as required. + +--- a/pptp.c 2010-06-15 14:35:20.265852021 +0100 ++++ b/pptp.c 2010-06-15 14:32:00.478100392 +0100 +@@ -475,7 +475,7 @@ + } + default: /* parent */ + waitpid(pid, &status, 0); +- if (status!= 0) ++ if (WEXITSTATUS(status) != 0) + fatal("Call manager exited with error %d", status); + break; + } diff --git a/pkgs/core/pptp/pptp.nm b/pkgs/core/pptp/pptp.nm index 8519dd0..6582c1d 100644 --- a/pkgs/core/pptp/pptp.nm +++ b/pkgs/core/pptp/pptp.nm @@ -47,7 +47,8 @@ PKG_TARBALL = $(THISAPP).tar.gz define STAGE_PREPARE_CMDS cd $(DIR_APP) && sed -i Makefile \ -e "s/install -o root -m 555 pptp/install -m 755 pptp/" \ - -e "s/^OPTIMIZE=.*/OPTIMIZE=$(CFLAGS)/" + -e "s/^OPTIMIZE=.*/OPTIMIZE=$(CFLAGS)/" \ + -e "s/^IP.*/IP=/sbin/ip/" endef
define STAGE_BUILD diff --git a/pkgs/core/tunctl/tunctl.nm b/pkgs/core/tunctl/tunctl.nm new file mode 100644 index 0000000..d487dc0 --- /dev/null +++ b/pkgs/core/tunctl/tunctl.nm @@ -0,0 +1,60 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# 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, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = tunctl +PKG_VER = 1.5 +PKG_REL = 0 + +PKG_MAINTAINER = +PKG_GROUP = Networking/Tools +PKG_URL = http://tunctl.sourceforge.net/ +PKG_LICENSE = GPL+ +PKG_SUMMARY = Create and remove virtual network interfaces. + +define PKG_DESCRIPTION + tunctl is a tool to set up and maintain persistent TUN/TAP network \ + interfaces, enabling user applications access to the wire side of a \ + virtual nework interface. Such interfaces is useful for connecting VPN \ + software, virtualization, emulation and a number of other similar \ + applications to the network stack. +endef + +PKG_TARBALL = $(THISAPP).tar.gz + +# XXX needs docbook for man page + +define STAGE_PREPARE_CMDS + cd $(DIR_APP) && sed -e "s/^CFLAGS.*/CFLAGS = $(CFLAGS)/" -i Makefile +endef + +define STAGE_BUILD + cd $(DIR_APP) && make tunctl CC=gcc +endef + +define STAGE_INSTALL + -mkdir -pv $(BUILDROOT)/usr/sbin + cd $(DIR_APP) && install -m 755 tunctl $(BUILDROOT)/usr/sbin +endef diff --git a/pkgs/core/udev/udev.nm b/pkgs/core/udev/udev.nm index c056a38..5e0e2d4 100644 --- a/pkgs/core/udev/udev.nm +++ b/pkgs/core/udev/udev.nm @@ -25,7 +25,7 @@ include $(PKGROOT)/Include
PKG_NAME = udev -PKG_VER = 157 +PKG_VER = 160 PKG_REL = 0
PKG_MAINTAINER = diff --git a/pkgs/toolchain/coreutils/coreutils.nm b/pkgs/toolchain/coreutils/coreutils.nm index d813b86..8d5e6c2 100644 --- a/pkgs/toolchain/coreutils/coreutils.nm +++ b/pkgs/toolchain/coreutils/coreutils.nm @@ -3,6 +3,8 @@ PKG_TOOLCHAIN_DEPS += acl attr gcc glibc ncurses
include ../../core/coreutils/coreutils.nm
+STAGE_PREPARE_CMDS = # We need to autoreconf here + define STAGE_BUILD cd $(DIR_APP) && \ gl_cv_func_printf_directive_n=no \
hooks/post-receive -- IPFire 3.x development tree