ports/109407: [patch] update port net-mgmt/chillispot to 1.1.0

Babak Farrokhi farrokhi at FreeBSD.org
Wed Feb 21 20:40:08 UTC 2007


>Number:         109407
>Category:       ports
>Synopsis:       [patch] update port net-mgmt/chillispot to 1.1.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 21 20:40:07 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Babak Farrokhi
>Release:        6.2-STABLE
>Organization:
>Environment:
FreeBSD devbox.datak-telecom.net 6.2-STABLE FreeBSD 6.2-STABLE #2: Mon Jan 15 13:35:36 IRST 2007     root at devbox.datak-telecom.net:/usr/obj/usr/src/sys/SMP  i386
>Description:
- Update to 1.1.0 (using patches from maintainer's website)
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN chillispot.orig/Makefile chillispot/Makefile
--- chillispot.orig/Makefile	Wed Feb 21 22:57:58 2007
+++ chillispot/Makefile	Wed Feb 21 23:03:52 2007
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	chillispot
-PORTVERSION=	1.0
-PORTREVISION=	2
+PORTVERSION=	1.1.0
 CATEGORIES=	net-mgmt
 MASTER_SITES=	http://www.chillispot.org/download/ \
 		http://www.geeklan.co.uk/files/ \
diff -ruN chillispot.orig/distinfo chillispot/distinfo
--- chillispot.orig/distinfo	Wed Feb 21 22:57:58 2007
+++ chillispot/distinfo	Wed Feb 21 23:03:59 2007
@@ -1,3 +1,3 @@
-MD5 (chillispot-1.0.tar.gz) = 997827a9302a85920cfbc1334092ac0c
-SHA256 (chillispot-1.0.tar.gz) = ea00bf63d420f515b9ec034eff6ca04c517459232899b7582f8435b7c097eebf
-SIZE (chillispot-1.0.tar.gz) = 440103
+MD5 (chillispot-1.1.0.tar.gz) = 9d2597756af3fa14d7331b4a3651fc9b
+SHA256 (chillispot-1.1.0.tar.gz) = b505ab963af8423ef8ae844951ef05fe1554630b448f1174074e9881cb474a01
+SIZE (chillispot-1.1.0.tar.gz) = 452749
diff -ruN chillispot.orig/files/patch-chilli.c chillispot/files/patch-chilli.c
--- chillispot.orig/files/patch-chilli.c	Thu Jan  1 03:30:00 1970
+++ chillispot/files/patch-chilli.c	Wed Feb 21 23:38:54 2007
@@ -0,0 +1,24 @@
+--- src/chilli.c.orig	Sun Sep 24 21:18:25 2006
++++ src/chilli.c	Wed Feb 21 23:36:18 2007
+@@ -284,11 +284,21 @@
+     return 0; 
+   }
+ 
++#ifdef HAVE_CLEARENV
+   if (clearenv() != 0) {
+     sys_err(LOG_ERR, __FILE__, __LINE__, errno,
+ 	    "clearenv() did not return 0!");
+     exit(0);
+   }
++#else
++	extern char **environ;
++	environ[0] = NULL;
++	if (environ[0] != NULL) {
++    sys_err(LOG_ERR, __FILE__, __LINE__, errno,
++            "Venture37 doesn't know what he's doing!!!");
++    exit(0);
++  }
++#endif
+ 
+   set_env("DEV", tun->devname, 0, NULL, NULL, NULL);
+   set_env("NET", NULL, 0, &appconn->net, NULL, NULL);
diff -ruN chillispot.orig/files/patch-config.h.in chillispot/files/patch-config.h.in
--- chillispot.orig/files/patch-config.h.in	Thu Jan  1 03:30:00 1970
+++ chillispot/files/patch-config.h.in	Wed Feb 21 23:37:46 2007
@@ -0,0 +1,12 @@
+--- config.h.in.orig	Sun Sep 24 23:04:53 2006
++++ config.h.in	Wed Feb 21 23:36:18 2007
+@@ -52,6 +52,9 @@
+ /* Define to 1 if you have the <stdlib.h> header file. */
+ #undef HAVE_STDLIB_H
+ 
++/* Define to 1 if you have the `clearenv' function. */
++#undef HAVE_CLEARENV
++
+ /* Define to 1 if you have the `strdup' function. */
+ #undef HAVE_STRDUP
+ 
diff -ruN chillispot.orig/files/patch-src_chilli.c chillispot/files/patch-src_chilli.c
--- chillispot.orig/files/patch-src_chilli.c	Wed Feb 21 22:57:58 2007
+++ chillispot/files/patch-src_chilli.c	Thu Jan  1 03:30:00 1970
@@ -1,55 +0,0 @@
---- src/chilli.c.orig	Mon Dec 26 08:06:46 2005
-+++ src/chilli.c	Mon Dec 26 08:10:01 2005
-@@ -14,13 +14,14 @@
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
- #include <arpa/inet.h>
- #include <sys/stat.h>
- #include <unistd.h>
--#include <sys/socket.h>
- #include <net/if.h>
- #include <errno.h>
--#include <sys/types.h>
- 
- #if defined(__linux__)
- #include <asm/types.h>
-@@ -460,13 +461,13 @@
-   memset(options.uamokmask, 0, sizeof(options.uamokmask));
-   options.uamoknetlen = 0;
-   for (numargs = 0; numargs < args_info.uamallowed_given; ++numargs) {
-+    char *p1 = NULL;
-+    char *p2 = NULL;
-+    char *p3 = malloc(strlen(args_info.uamallowed_arg[numargs])+1);
-     if (options.debug & DEBUG_CONF) {
-       printf ("Uamallowed #%d: %s\n", 
- 	      numargs, args_info.uamallowed_arg[numargs]);
-     }
--    char *p1 = NULL;
--    char *p2 = NULL;
--    char *p3 = malloc(strlen(args_info.uamallowed_arg[numargs])+1);
-     strcpy(p3, args_info.uamallowed_arg[numargs]);
-     p1 = p3;
-     if ((p2 = strchr(p1, ','))) {
-@@ -766,14 +767,14 @@
-   memset(options.macok, 0, sizeof(options.macok));
-   options.macoklen = 0;
-   for (numargs = 0; numargs < args_info.macallowed_given; ++numargs) {
--    if (options.debug & DEBUG_CONF) {
--      printf ("Macallowed #%d: %s\n", numargs, 
--	      args_info.macallowed_arg[numargs]);
--    }
-     char *p1 = NULL;
-     char *p2 = NULL;
-     char *p3 = malloc(strlen(args_info.macallowed_arg[numargs])+1);
-     int i;
-+    if (options.debug & DEBUG_CONF) {
-+      printf ("Macallowed #%d: %s\n", numargs, 
-+	      args_info.macallowed_arg[numargs]);
-+    }
-     strcpy(p3, args_info.macallowed_arg[numargs]);
-     p1 = p3;
-     if ((p2 = strchr(p1, ','))) {
diff -ruN chillispot.orig/files/patch-src_dhcp.c chillispot/files/patch-src_dhcp.c
--- chillispot.orig/files/patch-src_dhcp.c	Wed Feb 21 22:57:58 2007
+++ chillispot/files/patch-src_dhcp.c	Thu Jan  1 03:30:00 1970
@@ -1,16 +0,0 @@
---- src/dhcp.c.orig	Mon Dec 26 08:22:52 2005
-+++ src/dhcp.c	Mon Dec 26 08:29:56 2005
-@@ -37,9 +37,12 @@
- #include <string.h>
- #include <errno.h>
- #include <fcntl.h>
-+#if __FreeBSD_version > 500000
- #include <stdint.h> /* ISO C99 types */
--#include <arpa/inet.h>
-+#endif
-+#include <sys/types.h>
- #include <sys/socket.h>
-+#include <netinet/in.h>
- 
- #if defined(__linux__)
- #include <linux/if.h>
diff -ruN chillispot.orig/files/patch-src_redir.c chillispot/files/patch-src_redir.c
--- chillispot.orig/files/patch-src_redir.c	Wed Feb 21 22:57:58 2007
+++ chillispot/files/patch-src_redir.c	Thu Jan  1 03:30:00 1970
@@ -1,21 +0,0 @@
---- src/redir.c.orig	Mon Dec 26 08:13:05 2005
-+++ src/redir.c	Mon Dec 26 08:22:35 2005
-@@ -9,15 +9,15 @@
-  *
-  */
- 
--#include <sys/socket.h>
--#include <netinet/in.h>
--
- #include <stdlib.h>
- #include <stdio.h>
- #include <syslog.h>
- #include <errno.h>
- #include <stdarg.h>
- 
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
- #include <arpa/inet.h>
- #include <string.h>
- #include <fcntl.h>
diff -ruN chillispot.orig/files/patch-src_syserr.c chillispot/files/patch-src_syserr.c
--- chillispot.orig/files/patch-src_syserr.c	Wed Feb 21 22:57:58 2007
+++ chillispot/files/patch-src_syserr.c	Thu Jan  1 03:30:00 1970
@@ -1,18 +0,0 @@
---- src/syserr.c.orig	Mon Dec 26 08:30:20 2005
-+++ src/syserr.c	Mon Dec 26 08:30:46 2005
-@@ -10,13 +10,13 @@
-  */
- 
- #include <stdarg.h>
-+#include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
-+#include <arpa/inet.h>
- #include <stdio.h>
- #include <syslog.h>
- #include <string.h>
--#include <netinet/in.h>
--#include <arpa/inet.h>
- 
- #include "syserr.h"
- 
diff -ruN chillispot.orig/files/patch-tun.c chillispot/files/patch-tun.c
--- chillispot.orig/files/patch-tun.c	Thu Jan  1 03:30:00 1970
+++ chillispot/files/patch-tun.c	Wed Feb 21 23:39:09 2007
@@ -0,0 +1,105 @@
+--- src/tun.c.orig	Sun Sep 24 21:18:25 2006
++++ src/tun.c	Wed Feb 21 23:36:18 2007
+@@ -366,7 +366,7 @@
+   this->addrs++;
+   return 0;
+ 
+-#elif defined (__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+ 
+   int fd;
+   struct ifaliasreq      areq;
+@@ -445,7 +445,7 @@
+ #if defined(__linux__)
+   ifr.ifr_netmask.sa_family = AF_INET;
+ 
+-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+   ((struct sockaddr_in *) &ifr.ifr_addr)->sin_len = 
+     sizeof (struct sockaddr_in);
+   ((struct sockaddr_in *) &ifr.ifr_dstaddr)->sin_len = 
+@@ -497,7 +497,7 @@
+     ((struct sockaddr_in *) &ifr.ifr_netmask)->sin_addr.s_addr = 
+       netmask->s_addr;
+ 
+-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+     ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr.s_addr = 
+       netmask->s_addr;
+ 
+@@ -526,7 +526,7 @@
+ 
+   tun_sifflags(this, IFF_UP | IFF_RUNNING);
+ 
+-#if defined(__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+   tun_addroute(this, dstaddr, addr, netmask);
+   this->routes = 1;
+ #endif
+@@ -585,7 +585,7 @@
+   close(fd);
+   return 0;
+   
+-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+ 
+ struct {
+   struct rt_msghdr rt;
+@@ -674,7 +674,7 @@
+ #if defined(__linux__)
+   struct ifreq ifr;
+ 
+-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+   char devname[IFNAMSIZ+5]; /* "/dev/" + ifname */
+   int devnum;
+   struct ifaliasreq areq;
+@@ -722,7 +722,7 @@
+   ioctl((*tun)->fd, TUNSETNOCSUM, 1); /* Disable checksums */
+   return 0;
+   
+-#elif defined(__FreeBSD__) defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+ 
+   /* Find suitable device */
+   for (devnum = 0; devnum < 255; devnum++) { /* TODO 255 */ 
+@@ -854,7 +854,7 @@
+ int tun_decaps(struct tun_t *this)
+ {
+ 
+-#if defined(__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#if defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
+ 
+   unsigned char buffer[PACKET_MAX];
+   int status;
+@@ -910,7 +910,7 @@
+ 
+   return write(tun->fd, buffer, len+4);
+ 
+-#elif defined(__linux__) || defined (__FreeBSD__)  || defined (__NetBSD__) || defined (__APPLE__)
++#elif defined (__linux__) || defined (__FreeBSD__)  || defined (__NetBSD__) || defined (__APPLE__)
+ 
+   return write(tun->fd, pack, len);
+ 
+@@ -951,11 +951,21 @@
+     return 0; 
+   }
+ 
++#ifdef HAVE_CLEARENV
+   if (clearenv() != 0) {
+     sys_err(LOG_ERR, __FILE__, __LINE__, errno,
+ 	    "clearenv() did not return 0!");
+     exit(0);
+   }
++#else
++        extern char **environ;
++	environ[0] = NULL;
++        if (environ[0] != NULL) {     
++    sys_err(LOG_ERR, __FILE__, __LINE__, errno,
++            "Venture37 doesn't know what he's doing!!!");
++    exit(0);
++  }
++#endif
+ 
+   if (setenv("DEV", tun->devname, 1) != 0) {
+     sys_err(LOG_ERR, __FILE__, __LINE__, errno,

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list