From owner-svn-ports-head@freebsd.org Sun Aug 18 10:34:08 2019 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 6E16FC36B5; Sun, 18 Aug 2019 10:34:08 +0000 (UTC) (envelope-from rodrigo@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 46BD1r22wMz4PCN; Sun, 18 Aug 2019 10:34:08 +0000 (UTC) (envelope-from rodrigo@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 27BA2AB4; Sun, 18 Aug 2019 10:34:08 +0000 (UTC) (envelope-from rodrigo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7IAY8kj069495; Sun, 18 Aug 2019 10:34:08 GMT (envelope-from rodrigo@FreeBSD.org) Received: (from rodrigo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7IAY7bq069487; Sun, 18 Aug 2019 10:34:07 GMT (envelope-from rodrigo@FreeBSD.org) Message-Id: <201908181034.x7IAY7bq069487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigo set sender to rodrigo@FreeBSD.org using -f From: Rodrigo Osorio Date: Sun, 18 Aug 2019 10:34:07 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r509198 - in head/sysutils: . frand X-SVN-Group: ports-head X-SVN-Commit-Author: rodrigo X-SVN-Commit-Paths: in head/sysutils: . frand X-SVN-Commit-Revision: 509198 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, 18 Aug 2019 10:34:08 -0000 Author: rodrigo Date: Sun Aug 18 10:34:06 2019 New Revision: 509198 URL: https://svnweb.freebsd.org/changeset/ports/509198 Log: Add new port sysutils/frand frand is a command line tool who returns a random file from a given directory using the reservoir sampling algorithm. With reservoir sampling algorithm, directory contents doesn't need to be read in memory then sorted and so will perform much better than find+sort for directories with a large amount of files. PR: 239467 Submitted by: serpent7776@gmail.com Added: head/sysutils/frand/ head/sysutils/frand/Makefile (contents, props changed) head/sysutils/frand/distinfo (contents, props changed) head/sysutils/frand/pkg-descr (contents, props changed) head/sysutils/frand/pkg-plist (contents, props changed) Modified: head/sysutils/Makefile Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Sun Aug 18 10:34:04 2019 (r509197) +++ head/sysutils/Makefile Sun Aug 18 10:34:06 2019 (r509198) @@ -348,6 +348,7 @@ SUBDIR += fpc-users SUBDIR += fpc-utmp SUBDIR += fpc-uuid + SUBDIR += frand SUBDIR += freebsd-snapshot SUBDIR += freecolor SUBDIR += freedt Added: head/sysutils/frand/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/frand/Makefile Sun Aug 18 10:34:06 2019 (r509198) @@ -0,0 +1,25 @@ +# $FreeBSD$ + +PORTNAME= frand +PORTVERSION= 0.1 +DISTVERSIONPREFIX= v +CATEGORIES= sysutils + +MAINTAINER= serpent7776@gmail.com +COMMENT= Selects a random file using reservoir sampling algorithm + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs + +USES= cmake + +USE_GITHUB= yes +GH_ACCOUNT= serpent7776 +GH_PROJECT= frand StreamSampler:StreamSampler +GH_TAGNAME= 919a0f1ba6bb3ae63b4708722e9a7d49164ca92d:StreamSampler +GH_ACCOUNT_StreamSampler= LiorKogan +GH_SUBDIR_StreamSampler= lib/StreamSampler + +.include Added: head/sysutils/frand/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/frand/distinfo Sun Aug 18 10:34:06 2019 (r509198) @@ -0,0 +1,5 @@ +TIMESTAMP = 1564056505 +SHA256 (serpent7776-frand-v0.1_GH0.tar.gz) = 62a114ad80443b8e3fffa56ca3182e4e7294d1a3ba4b92cdb4e1cbe625794389 +SIZE (serpent7776-frand-v0.1_GH0.tar.gz) = 2225 +SHA256 (LiorKogan-StreamSampler-919a0f1ba6bb3ae63b4708722e9a7d49164ca92d_GH0.tar.gz) = 654ac0c0c0f161ef40c4d3fd4632d71cdf59c9cbe1108b47ba44b7f9f10f1d73 +SIZE (LiorKogan-StreamSampler-919a0f1ba6bb3ae63b4708722e9a7d49164ca92d_GH0.tar.gz) = 36890 Added: head/sysutils/frand/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/frand/pkg-descr Sun Aug 18 10:34:06 2019 (r509198) @@ -0,0 +1,5 @@ +Selects a random file from given directory using reservoir sampling algorithm. +This means directory contents doesn't need to be read in memory and then sorted +and so will perform much better than find+sort for big directories. + +WWW: https://github.com/serpent7776/frand Added: head/sysutils/frand/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/frand/pkg-plist Sun Aug 18 10:34:06 2019 (r509198) @@ -0,0 +1,2 @@ +@comment $FreeBSD$ +bin/frand