Bug 151974

Summary: Maintainer update: net/opentracker fix whitelist bug
Product: Ports & Packages Reporter: Chris Rees <utisoft>
Component: Individual Port(s)Assignee: Olli Hauer <ohauer>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Chris Rees 2010-11-05 22:40:09 UTC
	Opentracker used to need 40 extra characters at the end of your whitelist/blacklist file otherwise the last info_hash won't be loaded.

Fix: Added file: files/patch-ot_accesslist.c (various whitespace fixes added)



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--tUHVs1FnNSyRGXx41OIgoYCoKWTeS2wtpgPrwKUKlZmOP7V0
Content-Type: text/plain; name="opentracker.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="opentracker.patch"

diff -ruN opentracker.orig/Makefile opentracker/Makefile
--- opentracker.orig/Makefile	2010-11-05 21:51:22.000000000 +0000
+++ opentracker/Makefile	2010-11-05 21:57:31.000000000 +0000
@@ -16,7 +16,7 @@
 
 BUILD_DEPENDS=	${LOCALBASE}/lib/libowfat.a:${PORTSDIR}/devel/libowfat
 
-USE_BZIP2=		yes
+USE_BZIP2=	yes
 USE_RC_SUBR=	${PORTNAME}
 
 OPTIONS=	WANT_ACCESSLIST_BLACK "Enable client blacklisting" Off \
@@ -53,11 +53,14 @@
 
 MAKE_ENV+=FEATURES="${FEATURES}"
 
+post-patch:
+	@${FIND} ${WRKSRC} -name "*.orig" -a -exec ${RM} -f {} \;
+
 do-install:
-		${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-		${MKDIR} ${PREFIX}/etc/${PORTNAME}
-		${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample \
-			${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf.sample
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+	${MKDIR} ${PREFIX}/etc/${PORTNAME}
+	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample \
+		${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf.sample
 
 post-install:
 	@if [ ! -f ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf ]; then \
diff -ruN opentracker.orig/files/patch-ot_accesslist.c opentracker/files/patch-ot_accesslist.c
--- opentracker.orig/files/patch-ot_accesslist.c	1970-01-01 01:00:00.000000000 +0100
+++ opentracker/files/patch-ot_accesslist.c	2010-11-05 21:52:45.000000000 +0000
@@ -0,0 +1,12 @@
+--- ot_accesslist.c.orig	2010-11-04 17:34:00.000000000 -0700
++++ ot_accesslist.c	2010-11-04 17:51:33.000000000 -0700
+@@ -54,8 +54,7 @@
+     return;
+   }
+ 
+-  /* No use to scan if there's not enough room for another full info_hash */
+-  map_end = map + maplen - 40;
++  map_end = map + maplen;
+   read_offs = map;
+ 
+   /* We do ignore anything that is not of the form "^[:xdigit:]{40}[^:xdigit:].*" */
Comment 1 Chris Rees 2010-11-06 09:59:15 UTC
Forgot to mention, thanks to Nerius Landys for the patch.

Chris
Comment 2 Olli Hauer freebsd_committer freebsd_triage 2010-11-07 01:42:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ohauer

I'll take it
Comment 3 dfilter service freebsd_committer freebsd_triage 2010-11-07 01:58:27 UTC
ohauer      2010-11-07 01:58:23 UTC

  FreeBSD ports repository

  Modified files:
    net/opentracker      Makefile distinfo 
  Added files:
    net/opentracker/files patch-ot_accesslist.c 
  Log:
   - fix whitelist bug
  
   Opentracker used to need 40 extra characters at the end of your
   whitelist/blacklist file otherwise the last info_hash won't be loaded.
  
   Thanks to Nerius Landys for the patch!
  
  PR:             151974
  Submitted by:   Chris Rees <utisoft _at_ gmail.com> (maintainer)
  Approved by:    glarkin (mentor, implicit)
  
  Revision  Changes    Path
  1.5       +9 -5      ports/net/opentracker/Makefile
  1.3       +0 -1      ports/net/opentracker/distinfo
  1.1       +12 -0     ports/net/opentracker/files/patch-ot_accesslist.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Olli Hauer freebsd_committer freebsd_triage 2010-11-07 01:59:19 UTC
State Changed
From-To: open->closed

committed, 
Thanks!