From owner-svn-ports-head@freebsd.org Sun Apr 12 20:26:33 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 540552C7EF3; Sun, 12 Apr 2020 20:26:33 +0000 (UTC) (envelope-from dmgk@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 490jvY1N4cz4c2W; Sun, 12 Apr 2020 20:26:33 +0000 (UTC) (envelope-from dmgk@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2614C760F; Sun, 12 Apr 2020 20:26:33 +0000 (UTC) (envelope-from dmgk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03CKQWTe036490; Sun, 12 Apr 2020 20:26:33 GMT (envelope-from dmgk@FreeBSD.org) Received: (from dmgk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03CKQWFq036485; Sun, 12 Apr 2020 20:26:32 GMT (envelope-from dmgk@FreeBSD.org) Message-Id: <202004122026.03CKQWFq036485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dmgk set sender to dmgk@FreeBSD.org using -f From: Dmitri Goutnik Date: Sun, 12 Apr 2020 20:26:32 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r531555 - in head/net: . hblock hblock/files X-SVN-Group: ports-head X-SVN-Commit-Author: dmgk X-SVN-Commit-Paths: in head/net: . hblock hblock/files X-SVN-Commit-Revision: 531555 X-SVN-Commit-Repository: ports 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.29 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: Sun, 12 Apr 2020 20:26:33 -0000 Author: dmgk Date: Sun Apr 12 20:26:31 2020 New Revision: 531555 URL: https://svnweb.freebsd.org/changeset/ports/531555 Log: New port: net/hblock POSIX-compliant shell script, designed for Unix-like systems, gets a list of domains that serve ads, tracking scripts and malware from multiple sources and creates a hosts file that prevents your system from connecting to them. WWW: https://github.com/hectorm/hblock PR: 242466 Submitted by: Lewis Cook Added: head/net/hblock/ head/net/hblock/Makefile (contents, props changed) head/net/hblock/distinfo (contents, props changed) head/net/hblock/files/ head/net/hblock/files/patch-hblock (contents, props changed) head/net/hblock/pkg-descr (contents, props changed) Modified: head/net/Makefile Modified: head/net/Makefile ============================================================================== --- head/net/Makefile Sun Apr 12 20:23:56 2020 (r531554) +++ head/net/Makefile Sun Apr 12 20:26:31 2020 (r531555) @@ -241,6 +241,7 @@ SUBDIR += haproxy18 SUBDIR += haproxy19 SUBDIR += haproxy21 + SUBDIR += hblock SUBDIR += hexinject SUBDIR += hinfo SUBDIR += hlmaster Added: head/net/hblock/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/hblock/Makefile Sun Apr 12 20:26:31 2020 (r531555) @@ -0,0 +1,37 @@ +# $FreeBSD$ + +PORTNAME= hblock +DISTVERSIONPREFIX= v +DISTVERSION= 2.1.5 +CATEGORIES= net + +MAINTAINER= vulcan@wired.sh +COMMENT= Adblocker using automatically generated hosts file + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +RUN_DEPENDS= ca_root_nss>0:security/ca_root_nss + +USE_GITHUB= yes +GH_ACCOUNT= hectorm + +NO_ARCH= yes +NO_BUILD= yes + +PLIST_FILES= bin/${PORTNAME} +PORTDOCS= README.md + +OPTIONS_DEFINE= DOCS + +post-patch: + @${REINPLACE_CMD} -e '/hosts/!s|/etc|${PREFIX}/etc|g' ${WRKSRC}/${PORTNAME} + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR} + +.include Added: head/net/hblock/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/hblock/distinfo Sun Apr 12 20:26:31 2020 (r531555) @@ -0,0 +1,3 @@ +TIMESTAMP = 1586119738 +SHA256 (hectorm-hblock-v2.1.5_GH0.tar.gz) = e06cca83d5f11565abdcde1924c294ef8c628833834be411531a5c4a893d1bfe +SIZE (hectorm-hblock-v2.1.5_GH0.tar.gz) = 400446 Added: head/net/hblock/files/patch-hblock ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/hblock/files/patch-hblock Sun Apr 12 20:26:31 2020 (r531555) @@ -0,0 +1,18 @@ +Remove curl/wget and use base system fetch instead. + +--- hblock.orig 2020-02-22 10:40:05 UTC ++++ hblock +@@ -138,12 +138,7 @@ fetchUrl() { + if [ "${1#file://}" != "${1:?}" ]; then cat -- "${1#file://}" + else + userAgent='Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0' +- if exists curl; then curl -fsSL -A "${userAgent:?}" -- "${1:?}"; +- elif exists wget; then wget -qO- -U "${userAgent:?}" -- "${1:?}"; +- else +- logError 'Either wget or curl are required for this script' +- exit 1 +- fi ++ fetch -qo - --user-agent="${userAgent:?}" -- "${1:?}"; + fi + } + Added: head/net/hblock/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/hblock/pkg-descr Sun Apr 12 20:26:31 2020 (r531555) @@ -0,0 +1,6 @@ +POSIX-compliant shell script, designed for Unix-like systems, +gets a list of domains that serve ads, tracking scripts and +malware from multiple sources and creates a hosts file that +prevents your system from connecting to them. + +WWW: https://github.com/hectorm/hblock