From owner-svn-ports-head@freebsd.org Wed Nov 16 00:43:32 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EA91C44D5D; Wed, 16 Nov 2016 00:43:32 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B66E14B1; Wed, 16 Nov 2016 00:43:31 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAG0hVoZ049011; Wed, 16 Nov 2016 00:43:31 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAG0hU1Q049000; Wed, 16 Nov 2016 00:43:30 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201611160043.uAG0hU1Q049000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Wed, 16 Nov 2016 00:43:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r426204 - in head/japanese: . navi2ch navi2ch/files p5-2chproxy p5-2chproxy/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2016 00:43:32 -0000 Author: hrs Date: Wed Nov 16 00:43:30 2016 New Revision: 426204 URL: https://svnweb.freebsd.org/changeset/ports/426204 Log: - Add japanese/p5-2chproxy, an HTTP proxy converting contents of 2ch.net into the old .dat format. - Update japanese/navi2ch to use japanese/p5-2chproxy as an HTTP server by default. Added: head/japanese/navi2ch/files/patch-navi2ch-vars.el (contents, props changed) head/japanese/navi2ch/pkg-message (contents, props changed) head/japanese/p5-2chproxy/ head/japanese/p5-2chproxy/Makefile (contents, props changed) head/japanese/p5-2chproxy/distinfo (contents, props changed) head/japanese/p5-2chproxy/files/ head/japanese/p5-2chproxy/files/patch-2chproxy.pl (contents, props changed) head/japanese/p5-2chproxy/files/twochproxy.in (contents, props changed) head/japanese/p5-2chproxy/pkg-descr (contents, props changed) Deleted: head/japanese/navi2ch/files/patch-elisp-comp Modified: head/japanese/Makefile head/japanese/navi2ch/Makefile head/japanese/navi2ch/distinfo Modified: head/japanese/Makefile ============================================================================== --- head/japanese/Makefile Wed Nov 16 00:36:20 2016 (r426203) +++ head/japanese/Makefile Wed Nov 16 00:43:30 2016 (r426204) @@ -195,6 +195,7 @@ SUBDIR += nhocr SUBDIR += nkf SUBDIR += onew + SUBDIR += p5-2chproxy SUBDIR += p5-Date-Japanese-Era SUBDIR += p5-Date-Japanese-Holiday SUBDIR += p5-DateTime-Calendar-Japanese-Era Modified: head/japanese/navi2ch/Makefile ============================================================================== --- head/japanese/navi2ch/Makefile Wed Nov 16 00:36:20 2016 (r426203) +++ head/japanese/navi2ch/Makefile Wed Nov 16 00:43:30 2016 (r426204) @@ -3,11 +3,9 @@ PORTNAME= navi2ch PORTVERSION= 2.0.0.d -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= japanese www elisp -MASTER_SITES= http://people.allbsd.org/~hrs/FreeBSD/ LOCAL/hrs -DISTNAME= navi2ch-git-75ceac8e93d8d7cc02cc8fa44f14cd44ce0b9d0a PKGNAMESUFFIX= -${EMACS_PORT_NAME} MAINTAINER= hrs@FreeBSD.org @@ -15,8 +13,12 @@ COMMENT= 2ch.net and 2ch-like BBS naviga LICENSE= GPLv2 -USES= zip +RUN_DEPENDS= ${LOCALBASE}/sbin/2chproxy.pl:japanese/p5-2chproxy + USE_EMACS= yes +USE_GITHUB= yes +GH_ACCOUNT= naota +GH_TAGNAME= faebfd1 GNU_CONFIGURE= yes CONFIGURE_ENV= EMACS="${EMACS_CMD}" CONFIGURE_ARGS= --with-lispdir=${PREFIX}/${LISPDIR}/${PORTNAME} @@ -30,10 +32,10 @@ PORTDOC_LISPS= gikope.el navi2ch-logo.el LISPDIR= ${EMACS_VERSION_SITE_LISPDIR} OPTIONS_DEFINE= DOCS X11 -OPTIONS_DEFAULT=X11 +OPTIONS_DEFAULT=DOCS X11 X11_RUN_DEPENDS=${LOCALBASE}/share/mona/monak12.pcf.gz:japanese/font-mona -post-install: +post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && \ ${INSTALL_DATA} ${PORTDOC_FILES} ${STAGEDIR}${DOCSDIR} Modified: head/japanese/navi2ch/distinfo ============================================================================== --- head/japanese/navi2ch/distinfo Wed Nov 16 00:36:20 2016 (r426203) +++ head/japanese/navi2ch/distinfo Wed Nov 16 00:43:30 2016 (r426204) @@ -1,2 +1,3 @@ -SHA256 (navi2ch-git-75ceac8e93d8d7cc02cc8fa44f14cd44ce0b9d0a.zip) = c87f6a463ab96f2e736d16a61f58b78de503188040b35ef16a7dc268de20ef27 -SIZE (navi2ch-git-75ceac8e93d8d7cc02cc8fa44f14cd44ce0b9d0a.zip) = 575780 +TIMESTAMP = 1479256991 +SHA256 (naota-navi2ch-2.0.0.d-faebfd1_GH0.tar.gz) = e5da75c6aee6005349a4c8e830a0737cc58536c4c526aba7843e9f990da62966 +SIZE (naota-navi2ch-2.0.0.d-faebfd1_GH0.tar.gz) = 512558 Added: head/japanese/navi2ch/files/patch-navi2ch-vars.el ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/navi2ch/files/patch-navi2ch-vars.el Wed Nov 16 00:43:30 2016 (r426204) @@ -0,0 +1,13 @@ +--- navi2ch-vars.el.orig 2015-03-30 02:16:24 UTC ++++ navi2ch-vars.el +@@ -2009,8 +2009,8 @@ Navi2ch$B%+%F%4%j$K!VAw?.95$(!WHD$,<+F0 + + ;; net variables + (defcustom navi2ch-net-http-proxy +- (if (string= (getenv "HTTP_PROXY") "") +- nil ++ (if (string= (or (getenv "HTTP_PROXY") "") "") ++ "127.0.0.1:8080" + (getenv "HTTP_PROXY")) + "*HTTP $B%W%m%-%7$N(B URL$B!#(B" + :type '(choice (string :tag "$B%W%m%-%7$r;XDj(B") Added: head/japanese/navi2ch/pkg-message ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/navi2ch/pkg-message Wed Nov 16 00:43:30 2016 (r426204) @@ -0,0 +1,8 @@ +navi2ch now requires ja-p5-2chproxy(japanese/p5-2chproxy) to access 2ch.net. +Before using navi2ch, put the following line into /etc/rc.conf: + + twochproxy_enable="YES" + +and start twochproxy service: + + # service twochproxy start Added: head/japanese/p5-2chproxy/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/p5-2chproxy/Makefile Wed Nov 16 00:43:30 2016 (r426204) @@ -0,0 +1,34 @@ +# $FreeBSD$ + +PORTNAME= 2chproxy +PORTVERSION= 1.0.1 +DISTVERSIONPREFIX= v +CATEGORIES= japanese perl5 www +PKGNAMEPREFIX= ja-p5- + +MAINTAINER= hrs@FreeBSD.org +COMMENT= Proxy server for 2ch.net + +LICENSE= MIT + +RUN_DEPENDS= p5-HTTP-Daemon>0:www/p5-HTTP-Daemon \ + p5-IO-Compress>0:archivers/p5-IO-Compress \ + p5-URI>0:net/p5-URI \ + p5-libwww>0:www/p5-libwww + +USES= perl5 shebangfix +SHEBANG_FILES= ${WRKSRC}/${PORTNAME}.pl +USE_GITHUB= yes +GH_ACCOUNT= yama-natuki +GH_PROJECT= ${PORTNAME}.pl +NO_BUILD= yes +RC_SUBR= ${WRKDIR}/twochproxy +SUB_FILES= ${FILESDIR_REL}/twochproxy +PLIST_FILES= sbin/${PORTNAME}.pl \ + etc/rc.d/twochproxy + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.pl ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKDIR}/twochproxy ${STAGEDIR}${PREFIX}/etc/rc.d + +.include Added: head/japanese/p5-2chproxy/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/p5-2chproxy/distinfo Wed Nov 16 00:43:30 2016 (r426204) @@ -0,0 +1,3 @@ +TIMESTAMP = 1479210675 +SHA256 (yama-natuki-2chproxy.pl-v1.0.1_GH0.tar.gz) = 481eaffb0daaf2f9406b43b9342298537173e4453fa49497492f080107ac7b5a +SIZE (yama-natuki-2chproxy.pl-v1.0.1_GH0.tar.gz) = 21895 Added: head/japanese/p5-2chproxy/files/patch-2chproxy.pl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/p5-2chproxy/files/patch-2chproxy.pl Wed Nov 16 00:43:30 2016 (r426204) @@ -0,0 +1,27 @@ +--- 2chproxy.pl.orig 2016-11-16 00:35:06 UTC ++++ 2chproxy.pl +@@ -90,8 +90,8 @@ my $PROXY_CONFIG = { + HANDLED_COOKIES => [qw(__cfduid yuki PREN)], #KEEP_COOKIEが有効な時にプロクシで保持するクッキー + DAT_URL => '^http://([\w]+)(\.2ch\.net|\.bbspink\.com)(:[\d]+)?/([\w]+)/(?:dat|kako/\d+(?:/\d+)?)/([\d]+(?:-[\d]+)?)\.dat(\.gz)?$', #datへのアクセスかを判定する正規表現 + NULL_DEVICE => '/dev/null', #nullデバイスの場所 +- PID_FILE_NAME => "/tmp/2chproxy.pid", #pidが書かれたファイル、2重起動禁止にも用いている +- LOG_FILE_NAME => "/tmp/2chproxy.log", #ログファイル ++ PID_FILE_NAME => "/var/run/2chproxy.pid", #pidが書かれたファイル、2重起動禁止にも用いている ++ LOG_FILE_NAME => "/var/log/2chproxy.log", #ログファイル + NULL_DEVICE_WIN32 => 'nul', #nullデバイスの場所(Windows) + PID_FILE_NAME_WIN32 => dirname($0)."/2chproxy.pid", #pidが書かれたファイル、2重起動禁止にも用いている(Windows) + LOG_FILE_NAME_WIN32 => dirname($0)."/2chproxy.log", #ログファイル(Windows) +@@ -325,11 +325,12 @@ sub daemonize() { + fork() and exit(0); + POSIX::setsid(); + fork() and exit(0); +- umask(0); ++ umask(022); + chdir('/'); + open(STDIN, '<', $null_device_name) or die; + open(STDOUT, '>', $log_file_name) or die; + open(STDERR, '>', $log_file_name) or die; ++ chmod(0600, $log_file_name) or die; + + return 0; + } Added: head/japanese/p5-2chproxy/files/twochproxy.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/p5-2chproxy/files/twochproxy.in Wed Nov 16 00:43:30 2016 (r426204) @@ -0,0 +1,32 @@ +#!/bin/sh +# +# PROVIDE: twochproxy +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# $FreeBSD$ + +. /etc/rc.subr + +name=twochproxy +rcvar=${name}_enable + +command=%%PREFIX%%/sbin/2chproxy.pl +start_cmd=${name}_start +stop_cmd=${name}_stop +load_rc_config $name +pidfile=/var/run/2chproxy.pid +: ${twochproxy_enable:=NO} + +twochproxy_start() +{ + + $command --daemon +} +twochproxy_stop() +{ + + $command --kill && rm -f $pidfile +} + +run_rc_command "$1" Added: head/japanese/p5-2chproxy/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/japanese/p5-2chproxy/pkg-descr Wed Nov 16 00:43:30 2016 (r426204) @@ -0,0 +1,4 @@ +2chproxy.pl, an HTTP proxy for 2ch.net to convert the contents into +old .dat format. + +WWW: https://github.com/yama-natuki/2chproxy.pl