From nobody@FreeBSD.org  Thu Apr 30 18:57:29 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BD7CB1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Apr 2009 18:57:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id A17898FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Apr 2009 18:57:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n3UIvTV6063582
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Apr 2009 18:57:29 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n3UIvTQA063581;
	Thu, 30 Apr 2009 18:57:29 GMT
	(envelope-from nobody)
Message-Id: <200904301857.n3UIvTQA063581@www.freebsd.org>
Date: Thu, 30 Apr 2009 18:57:29 GMT
From: Murilo Opsfelder <mopsfelder@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [NEW PORT] www/videocache: A Squid URL rewriter for bandwidth optimization
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         134116
>Category:       ports
>Synopsis:       [NEW PORT] www/videocache: A Squid URL rewriter for bandwidth optimization
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 30 19:00:07 UTC 2009
>Closed-Date:    Sun May 10 22:25:30 UTC 2009
>Last-Modified:  Sun May 10 22:30:03 UTC 2009
>Originator:     Murilo Opsfelder
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
BluePex Security Solutions
>Environment:
FreeBSD opsfelderm.bplab.local 8.0-CURRENT FreeBSD 8.0-CURRENT #66 r191522: Sun Apr 26 15:39:54 BRT
>Description:
Videocache is a Squid URL rewriter plugin written in Python
for bandwidth optimization while browsing famous video
sharing portals/websites like Youtube, Metacafe etc.
It helps you save bandwidth when a particular video is
requested more than once from the same network/machine.

WWW:    http://www.cachevideos.com/
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	./videocache
#
echo c - ./videocache
mkdir -p ./videocache > /dev/null 2>&1
exit

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	./videocache/pkg-descr
#
echo x - ./videocache/pkg-descr
sed 's/^X//' >./videocache/pkg-descr << 'b10168bbaa810b35594b8066fd5c9d5b'
XVideocache is a Squid URL rewriter plugin written in Python
Xfor bandwidth optimization while browsing famous video
Xsharing portals/websites like Youtube, Metacafe etc.
XIt helps you save bandwidth when a particular video is
Xrequested more than once from the same network/machine.
X
XWWW:	http://www.cachevideos.com/
b10168bbaa810b35594b8066fd5c9d5b
exit

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	./videocache/Makefile
#
echo x - ./videocache/Makefile
sed 's/^X//' >./videocache/Makefile << '356a38309371076105429d6f6e8e5c59'
X# New ports collection makefile for:	videocache
X# Date created:		2009-04-30
X# Whom:			Murilo Opsfelder <mopsfelder@gmail.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	videocache
XPORTVERSION=	1.9.1
XCATEGORIES=	www
XMASTER_SITES=	http://cachevideos.com/sites/default/files/pub/videocache/
X
XMAINTAINER=	mopsfelder@gmail.com
XCOMMENT=	A Squid URL rewriter for bandwidth optimization
X
XRUN_DEPENDS=	${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid \
X		${PYTHON_SITELIBDIR}/urlgrabber/grabber.py:${PORTSDIR}/www/py-urlgrabber \
X		${PYTHON_SITELIBDIR}/iniparse/ini.py:${PORTSDIR}/devel/py-iniparse
X
XNO_BUILD=	yes
XUSE_PYTHON=	yes
X
XMAN8=		videocache.8.gz
XPORTDOCS=	CHANGELOG COPYING Readme
XPORTEXAMPLES=	squid.conf
XSUB_FILES=	pkg-message
X
X.include <bsd.port.pre.mk>
X
Xdo-install:
X	${INSTALL_SCRIPT} ${WRKSRC}/update-vc ${PREFIX}/bin
X	${INSTALL_MAN} ${WRKSRC}/videocache.8.gz ${MAN1PREFIX}/man/man8
X	${INSTALL_DATA} ${WRKSRC}/videocache-sysconfig.conf ${PREFIX}/etc/videocache.conf.default
X	@[ -f ${PREFIX}/etc/videocache.conf ] || \
X		${CP} -v ${PREFIX}/etc/videocache.conf.default ${PREFIX}/etc/videocache.conf
X	${MKDIR} ${DATADIR}
X	${INSTALL_DATA} ${WRKSRC}/videocache/*.py ${DATADIR}
X.if !defined(NOPORTEXAMPLES)
X	${MKDIR} ${EXAMPLESDIR}
X	${INSTALL_DATA} ${FILESDIR}/squid.conf.example ${EXAMPLESDIR}/squid.conf
X.endif
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X. for doc in ${PORTDOCS}
X	${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
X. endfor
X.endif
X
Xpost-install:
X.if !defined(NOPORTEXAMPLES)
X	${CAT} ${PKGMESSAGE}
X.endif
X
X.include <bsd.port.post.mk>
356a38309371076105429d6f6e8e5c59
exit

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	./videocache/pkg-plist
#
echo x - ./videocache/pkg-plist
sed 's/^X//' >./videocache/pkg-plist << '59e91fe5983ab7acb041c36bc4b7a429'
X@comment $FreeBSD$
Xbin/update-vc
X@unexec if cmp -s %D/etc/videocache.conf %D/etc/videocache.conf.default; then rm -f %D/etc/videocache.conf; fi
Xetc/videocache.conf.default
X@exec [ -f %B/videocache.conf ] || cp %B/%f %B/videocache.conf
X%%DATADIR%%/Errors.py
X%%DATADIR%%/__init__.py
X%%DATADIR%%/config.py
X%%DATADIR%%/parser.py
X%%DATADIR%%/videocache.py
X@dirrm %%DATADIR%%
59e91fe5983ab7acb041c36bc4b7a429
exit

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	./videocache/distinfo
#
echo x - ./videocache/distinfo
sed 's/^X//' >./videocache/distinfo << '830aaaf6e4ba4da697deb1686c704ec0'
XMD5 (videocache-1.9.1.tar.gz) = 0dac8dd20d67c252e1da13e1e9ad5cd5
XSHA256 (videocache-1.9.1.tar.gz) = b814c6dec236c842dda1258be142556874ca4c33247a83e11609bfa6bb10cf8b
XSIZE (videocache-1.9.1.tar.gz) = 52631
830aaaf6e4ba4da697deb1686c704ec0
exit

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	./videocache/files
#
echo c - ./videocache/files
mkdir -p ./videocache/files > /dev/null 2>&1
exit

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	./videocache/files/squid.conf.example
#
echo x - ./videocache/files/squid.conf.example
sed 's/^X//' >./videocache/files/squid.conf.example << '50d6089612b58b05041e010a6d8777cc'
X==============================================================================
X
XAdd the following sample lines to your squid.conf:
X
X# --BEGIN-- videocache config for squid
Xurl_rewrite_program %%PREFIX%%/bin/python %%DATADIR%%/videocache/videocache.py
Xurl_rewrite_children 7
Xacl videocache_allow_url url_regex -i \.youtube\.com\/get_video\?
Xacl videocache_allow_url url_regex -i \.googlevideo\.com\/videoplayback \.googlevideo\.com\/videoplay \.googlevideo\.com\/get_video\?
Xacl videocache_allow_url url_regex -i \.google\.com\/videoplayback \.google\.com\/videoplay \.google\.com\/get_video\?
Xacl videocache_allow_url url_regex -i \.google\.[a-z][a-z]\/videoplayback \.google\.[a-z][a-z]\/videoplay \.google\.[a-z][a-z]\/get_video\?
Xacl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/videoplayback\?
Xacl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/videoplay\?
Xacl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/get_video\?
Xacl videocache_allow_url url_regex -i proxy[a-z0-9\-][a-z0-9][a-z0-9][a-z0-9]?\.dailymotion\.com\/
Xacl videocache_allow_url url_regex -i vid\.akm\.dailymotion\.com\/
Xacl videocache_allow_url url_regex -i [a-z0-9][0-9a-z][0-9a-z]?[0-9a-z]?[0-9a-z]?\.xtube\.com\/(.*)flv
Xacl videocache_allow_url url_regex -i bitcast\.vimeo\.com\/vimeo\/videos\/
Xacl videocache_allow_url url_regex -i va\.wrzuta\.pl\/wa[0-9][0-9][0-9][0-9]?
Xacl videocache_allow_url url_regex -i \.files\.youporn\.com\/(.*)\/flv\/
Xacl videocache_allow_url url_regex -i \.msn\.com\.edgesuite\.net\/(.*)\.flv
Xacl videocache_allow_url url_regex -i media[a-z0-9]?[a-z0-9]?[a-z0-9]?\.tube8\.com\/ mobile[a-z0-9]?[a-z0-9]?[a-z0-9]?\.ta-z0-9]?[a-z0-9]?\.blip\.tv\/(.*)\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram)
Xacl videocache_allow_url url_regex -i video\.break\.com\/(.*)\.(flv|mp4)
Xacl videocache_allow_dom dstdomain .mccont.com dl.redtube.com .cdn.dailymotion.com
Xacl videocache_deny_url url_regex -i http:\/\/[a-z][a-z]\.youtube\.com http:\/\/www\.youtube\.com
Xurl_rewrite_access deny videocache_deny_url
Xurl_rewrite_access allow videocache_allow_url
Xurl_rewrite_access allow videocache_allow_dom
Xredirector_bypass on
X# --END-- videocache config for squid
X
X==============================================================================
50d6089612b58b05041e010a6d8777cc
exit

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	./videocache/files/pkg-message.in
#
echo x - ./videocache/files/pkg-message.in
sed 's/^X//' >./videocache/files/pkg-message.in << '53696bb2c719aeb9943061b390e212a7'
XSee the following sample file to configure your ACL's on squid.conf:
X
X	%%EXAMPLESDIR%%/squid.conf
53696bb2c719aeb9943061b390e212a7
exit



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Thu Apr 30 21:05:54 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=134116 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Sun May 10 22:25:29 UTC 2009 
State-Changed-Why:  
Good works, New port added. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=134116 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/134116: commit references a PR
Date: Sun, 10 May 2009 22:25:46 +0000 (UTC)

 miwi        2009-05-10 22:25:34 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www                  Makefile 
   Added files:
     www/videocache       Makefile distinfo pkg-descr pkg-plist 
     www/videocache/files pkg-message.in squid.conf.example 
   Log:
   Videocache is a Squid URL rewriter plugin written in Python
   for bandwidth optimization while browsing famous video
   sharing portals/websites like Youtube, Metacafe etc.
   It helps you save bandwidth when a particular video is
   requested more than once from the same network/machine.
   
   WWW:    http://www.cachevideos.com/
   
   PR:             ports/134116
   Submitted by:   Murilo Opsfelder <mopsfelder at gmail.com>
   
   Revision  Changes    Path
   1.2345    +1 -0      ports/www/Makefile
   1.1       +54 -0     ports/www/videocache/Makefile (new)
   1.1       +3 -0      ports/www/videocache/distinfo (new)
   1.1       +3 -0      ports/www/videocache/files/pkg-message.in (new)
   1.1       +32 -0     ports/www/videocache/files/squid.conf.example (new)
   1.1       +7 -0      ports/www/videocache/pkg-descr (new)
   1.1       +11 -0     ports/www/videocache/pkg-plist (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"
 
>Unformatted:
