Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Nov 2017 16:27:30 +0000 (UTC)
From:      Stefan Esser <se@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r453413 - in head/www: . privatebin privatebin/files
Message-ID:  <201711031627.vA3GRU7i035871@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: se
Date: Fri Nov  3 16:27:30 2017
New Revision: 453413
URL: https://svnweb.freebsd.org/changeset/ports/453413

Log:
  New port of a simple paste-bin server. Files are AES encrypted on the
  originating web-browser using Javascript.
  
  Approved by:	antoine (mentor)

Added:
  head/www/privatebin/
  head/www/privatebin/Makefile   (contents, props changed)
  head/www/privatebin/distinfo   (contents, props changed)
  head/www/privatebin/files/
  head/www/privatebin/files/patch-cfg_conf.sample.php   (contents, props changed)
  head/www/privatebin/files/patch-index.php   (contents, props changed)
  head/www/privatebin/pkg-deinstall   (contents, props changed)
  head/www/privatebin/pkg-descr   (contents, props changed)
  head/www/privatebin/pkg-message   (contents, props changed)
  head/www/privatebin/pkg-plist   (contents, props changed)
Modified:
  head/www/Makefile

Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile	Fri Nov  3 16:15:08 2017	(r453412)
+++ head/www/Makefile	Fri Nov  3 16:27:30 2017	(r453413)
@@ -1499,6 +1499,7 @@
     SUBDIR += podcastamatic
     SUBDIR += polipo
     SUBDIR += pound
+    SUBDIR += privatebin
     SUBDIR += privoxy
     SUBDIR += protovis
     SUBDIR += pserv

Added: head/www/privatebin/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/privatebin/Makefile	Fri Nov  3 16:27:30 2017	(r453413)
@@ -0,0 +1,33 @@
+# Created by: Stefan Esser <se@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	privatebin
+PORTVERSION=	1.1.1
+CATEGORIES=	www security
+
+MAINTAINER=	se@FreeBSD.org
+COMMENT=	Simple end-to-end encrypting zero-knowledge paste-bin server
+
+LICENSE=	ZLIB
+LICENSE_FILE=	${WRKSRC}/LICENSE.md
+
+NO_BUILD=	yes
+NO_ARCH=	yes
+
+USES=		php
+USE_PHP=	gd hash json wddx zlib
+USE_GITHUB=	yes
+GH_PROJECT=	PrivateBin
+
+post-patch:
+	@${REINPLACE_CMD} -e 's:%%DATADBDIR%%:/var/db/${PORTNAME}:' \
+		${WRKSRC}/index.php
+
+do-install:
+	@${MKDIR} ${STAGEDIR}${WWWDIR}
+	@cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	@${MV} ${STAGEDIR}/${WWWDIR}/*.md ${STAGEDIR}/${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}
+
+.include <bsd.port.mk>

Added: head/www/privatebin/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/privatebin/distinfo	Fri Nov  3 16:27:30 2017	(r453413)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1509726100
+SHA256 (privatebin-PrivateBin-1.1.1_GH0.tar.gz) = ff2f5699712e6bf70ae1335ad51228855e21c0180029343e26b2e97dd0d542b8
+SIZE (privatebin-PrivateBin-1.1.1_GH0.tar.gz) = 433564

Added: head/www/privatebin/files/patch-cfg_conf.sample.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/privatebin/files/patch-cfg_conf.sample.php	Fri Nov  3 16:27:30 2017	(r453413)
@@ -0,0 +1,37 @@
+--- cfg/conf.sample.php.orig	2017-10-08 10:27:37 UTC
++++ cfg/conf.sample.php
+@@ -106,7 +106,7 @@ limit = 10
+ ; header = "X_FORWARDED_FOR"
+ 
+ ; directory to store the traffic limits in
+-dir = PATH "data"
++dir = DATADBDIR
+ 
+ [purge]
+ ; minimum time limit between two purgings of expired pastes, it is only
+@@ -120,14 +120,14 @@ limit = 300
+ batchsize = 10
+ 
+ ; directory to store the purge limit in
+-dir = PATH "data"
++dir = DATADBDIR
+ 
+ [model]
+ ; name of data model class to load and directory for storage
+ ; the default model "Filesystem" stores everything in the filesystem
+ class = Filesystem
+ [model_options]
+-dir = PATH "data"
++dir = DATADBDIR
+ 
+ ;[model]
+ ; example of DB configuration for MySQL
+@@ -143,7 +143,7 @@ dir = PATH "data"
+ ; example of DB configuration for SQLite
+ ;class = Database
+ ;[model_options]
+-;dsn = "sqlite:" PATH "data/db.sq3"
++;dsn = "sqlite:" DATADBDIR "/db.sq3"
+ ;usr = null
+ ;pwd = null
+ ;opt[12] = true	; PDO::ATTR_PERSISTENT

Added: head/www/privatebin/files/patch-index.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/privatebin/files/patch-index.php	Fri Nov  3 16:27:30 2017	(r453413)
@@ -0,0 +1,10 @@
+--- index.php.orig	2017-10-08 10:27:37 UTC
++++ index.php
+@@ -12,6 +12,7 @@
+ 
+ // change this, if your php files and data is outside of your webservers document root
+ define('PATH', '');
++define('DATADBDIR', '%%DATADBDIR%%');
+ 
+ define('PUBLIC_PATH', __DIR__);
+ require PATH . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

Added: head/www/privatebin/pkg-deinstall
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/privatebin/pkg-deinstall	Fri Nov  3 16:27:30 2017	(r453413)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+PORTNAME=${1%-*}
+
+[ "$2" = DEINSTALL ] && cat <<***EOM
+------------------------------------------------------------------------------
+
+If you are no longer using the $PORTNAME port, then manually delete
+the following directory and all its contents:
+
+	/var/db/$PORTNAME
+
+------------------------------------------------------------------------------
+***EOM
+exit 0

Added: head/www/privatebin/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/privatebin/pkg-descr	Fri Nov  3 16:27:30 2017	(r453413)
@@ -0,0 +1,20 @@
+PrivateBin is a minimalist, open source online pastebin where the server 
+has zero knowledge of pasted data.
+
+Data is encrypted/decrypted in the browser using 256bit AES in Galois 
+Counter mode.
+
+This is a fork of ZeroBin, originally developed by Sebastien Sauvage. 
+It was refactored to allow easier and cleaner extensions and has now much 
+more features than the original. It is however still fully compatible to 
+the original ZeroBin 0.19 data storage scheme. Therefore such installations 
+can be upgraded to this fork without losing any data.
+
+Since the Javascript code that performs the encryption must be protected
+during transmission, access to PrivateBin must only be possible over
+HTTPS (e.g. enforced by use of HSTS and/or HPKP).
+
+See https://github.com/PrivateBin/PrivateBin/wiki/Configuration for 
+configuration options available in "cfg/conf.php".
+
+WWW: https://privatebin.info/

Added: head/www/privatebin/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/privatebin/pkg-message	Fri Nov  3 16:27:30 2017	(r453413)
@@ -0,0 +1,5 @@
+Please check https://github.com/PrivateBin/PrivateBin/wiki/Configuration 
+for information regarding the secure configuration of PrivateBin.
+
+If used with the apache web-server, mod_php must be installed and enabled
+in httpd.conf.

Added: head/www/privatebin/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/privatebin/pkg-plist	Fri Nov  3 16:27:30 2017	(r453413)
@@ -0,0 +1,125 @@
+%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.md
+%%PORTDOCS%%%%DOCSDIR%%/CREDITS.md
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL.md
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE.md
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%WWWDIR%%/.htaccess.disabled
+%%WWWDIR%%/android-chrome-192x192.png
+%%WWWDIR%%/android-chrome-512x512.png
+%%WWWDIR%%/apple-touch-icon.png
+%%WWWDIR%%/browserconfig.xml
+%%WWWDIR%%/cfg/.htaccess
+@sample %%WWWDIR%%/cfg/conf.sample.php %%WWWDIR%%/cfg/conf.php
+%%WWWDIR%%/composer.json
+%%WWWDIR%%/css/bootstrap/bootstrap-3.3.5.css
+%%WWWDIR%%/css/bootstrap/bootstrap-theme-3.3.5.css
+%%WWWDIR%%/css/bootstrap/darkstrap-0.9.3.css
+%%WWWDIR%%/css/bootstrap/fonts/glyphicons-halflings-regular.eot
+%%WWWDIR%%/css/bootstrap/fonts/glyphicons-halflings-regular.svg
+%%WWWDIR%%/css/bootstrap/fonts/glyphicons-halflings-regular.ttf
+%%WWWDIR%%/css/bootstrap/fonts/glyphicons-halflings-regular.woff
+%%WWWDIR%%/css/bootstrap/fonts/glyphicons-halflings-regular.woff2
+%%WWWDIR%%/css/bootstrap/privatebin.css
+%%WWWDIR%%/css/noscript.css
+%%WWWDIR%%/css/prettify/desert.css
+%%WWWDIR%%/css/prettify/doxy.css
+%%WWWDIR%%/css/prettify/prettify.css
+%%WWWDIR%%/css/prettify/sons-of-obsidian.css
+%%WWWDIR%%/css/prettify/sunburst.css
+%%WWWDIR%%/css/privatebin.css
+%%WWWDIR%%/favicon-16x16.png
+%%WWWDIR%%/favicon-32x32.png
+%%WWWDIR%%/favicon.ico
+%%WWWDIR%%/i18n/de.json
+%%WWWDIR%%/i18n/fr.json
+%%WWWDIR%%/i18n/it.json
+%%WWWDIR%%/i18n/languages.json
+%%WWWDIR%%/i18n/pl.json
+%%WWWDIR%%/i18n/ru.json
+%%WWWDIR%%/i18n/sl.json
+%%WWWDIR%%/i18n/zh.json
+%%WWWDIR%%/img/busy.gif
+%%WWWDIR%%/img/icon.svg
+%%WWWDIR%%/img/icon_clone.png
+%%WWWDIR%%/img/icon_new.png
+%%WWWDIR%%/img/icon_raw.png
+%%WWWDIR%%/img/icon_send.png
+%%WWWDIR%%/img/icon_shorten.png
+%%WWWDIR%%/img/logo.svg
+%%WWWDIR%%/index.php
+%%WWWDIR%%/js/base64-1.7.js
+%%WWWDIR%%/js/base64-2.1.9.js
+%%WWWDIR%%/js/bootstrap-3.3.5.js
+%%WWWDIR%%/js/comment.jsonld
+%%WWWDIR%%/js/commentmeta.jsonld
+%%WWWDIR%%/js/jquery-3.1.1.js
+%%WWWDIR%%/js/paste.jsonld
+%%WWWDIR%%/js/pastemeta.jsonld
+%%WWWDIR%%/js/prettify.js
+%%WWWDIR%%/js/privatebin.js
+%%WWWDIR%%/js/rawdeflate-0.5.js
+%%WWWDIR%%/js/rawinflate-0.3.js
+%%WWWDIR%%/js/showdown-1.4.1.js
+%%WWWDIR%%/js/sjcl-1.0.4.js
+%%WWWDIR%%/lib/.htaccess
+%%WWWDIR%%/lib/Configuration.php
+%%WWWDIR%%/lib/Data/AbstractData.php
+%%WWWDIR%%/lib/Data/Database.php
+%%WWWDIR%%/lib/Data/Filesystem.php
+%%WWWDIR%%/lib/Filter.php
+%%WWWDIR%%/lib/I18n.php
+%%WWWDIR%%/lib/Json.php
+%%WWWDIR%%/lib/Model.php
+%%WWWDIR%%/lib/Model/AbstractModel.php
+%%WWWDIR%%/lib/Model/Comment.php
+%%WWWDIR%%/lib/Model/Paste.php
+%%WWWDIR%%/lib/Persistence/AbstractPersistence.php
+%%WWWDIR%%/lib/Persistence/PurgeLimiter.php
+%%WWWDIR%%/lib/Persistence/ServerSalt.php
+%%WWWDIR%%/lib/Persistence/TrafficLimiter.php
+%%WWWDIR%%/lib/PrivateBin.php
+%%WWWDIR%%/lib/Request.php
+%%WWWDIR%%/lib/Sjcl.php
+%%WWWDIR%%/lib/View.php
+%%WWWDIR%%/lib/Vizhash16x16.php
+%%WWWDIR%%/manifest.json
+%%WWWDIR%%/mstile-144x144.png
+%%WWWDIR%%/mstile-150x150.png
+%%WWWDIR%%/mstile-310x150.png
+%%WWWDIR%%/mstile-310x310.png
+%%WWWDIR%%/mstile-70x70.png
+%%WWWDIR%%/robots.txt
+%%WWWDIR%%/safari-pinned-tab.svg
+%%WWWDIR%%/tpl/bootstrap-compact.php
+%%WWWDIR%%/tpl/bootstrap-dark-page.php
+%%WWWDIR%%/tpl/bootstrap-dark.php
+%%WWWDIR%%/tpl/bootstrap-page.php
+%%WWWDIR%%/tpl/bootstrap.php
+%%WWWDIR%%/tpl/page.php
+%%WWWDIR%%/vendor/autoload.php
+%%WWWDIR%%/vendor/composer/ClassLoader.php
+%%WWWDIR%%/vendor/composer/autoload_classmap.php
+%%WWWDIR%%/vendor/composer/autoload_files.php
+%%WWWDIR%%/vendor/composer/autoload_namespaces.php
+%%WWWDIR%%/vendor/composer/autoload_psr4.php
+%%WWWDIR%%/vendor/composer/autoload_real.php
+%%WWWDIR%%/vendor/composer/autoload_static.php
+%%WWWDIR%%/vendor/paragonie/random_compat/lib/byte_safe_strings.php
+%%WWWDIR%%/vendor/paragonie/random_compat/lib/cast_to_int.php
+%%WWWDIR%%/vendor/paragonie/random_compat/lib/error_polyfill.php
+%%WWWDIR%%/vendor/paragonie/random_compat/lib/random.php
+%%WWWDIR%%/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php
+%%WWWDIR%%/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php
+%%WWWDIR%%/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php
+%%WWWDIR%%/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php
+%%WWWDIR%%/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php
+%%WWWDIR%%/vendor/paragonie/random_compat/lib/random_int.php
+%%WWWDIR%%/vendor/paragonie/random_compat/other/build_phar.php
+%%WWWDIR%%/vendor/yzalis/identicon/src/Identicon/Generator/BaseGenerator.php
+%%WWWDIR%%/vendor/yzalis/identicon/src/Identicon/Generator/GdGenerator.php
+%%WWWDIR%%/vendor/yzalis/identicon/src/Identicon/Generator/GeneratorInterface.php
+%%WWWDIR%%/vendor/yzalis/identicon/src/Identicon/Generator/ImageMagickGenerator.php
+%%WWWDIR%%/vendor/yzalis/identicon/src/Identicon/Identicon.php
+%%WWWDIR%%/vendor/yzalis/identicon/src/autoload.php
+@owner www
+@dir(www,www,700) /var/db/privatebin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711031627.vA3GRU7i035871>