Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Feb 2017 18:00:21 +0000 (UTC)
From:      Kirill Ponomarew <krion@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r434011 - in head/www: . butterfly butterfly/files
Message-ID:  <201702131800.v1DI0L1S068670@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: krion
Date: Mon Feb 13 18:00:21 2017
New Revision: 434011
URL: https://svnweb.freebsd.org/changeset/ports/434011

Log:
  Butterfly is a xterm compatible terminal that runs in your browser.
  
  Features
  
  - xterm compatible (support for a lot of unused features)
  - Native browser scroll and search
  - Theming in css/sass (18 preset themes) endless possibilities
  - HTML in your terminal, cat images and use <table>
  - Multiple sessions support
  - Secure authentication with X509 certificates
  - 16,777,216 colors support
  - Keyboard text selection
  - Desktop notifications on terminal output
  - Geolocation from browser
  - May work on firefox too
  
  WWW: https://pypi.python.org/pypi/butterfly
  
  PR:		216957
  Submitted by:	yuri@rawbw.com
  Approved by:	mat (mentor)
  Differential Revision:	https://reviews.freebsd.org/D9533

Added:
  head/www/butterfly/
  head/www/butterfly/Makefile   (contents, props changed)
  head/www/butterfly/distinfo   (contents, props changed)
  head/www/butterfly/files/
  head/www/butterfly/files/butterfly.in   (contents, props changed)
  head/www/butterfly/files/patch-butterfly.server.py   (contents, props changed)
  head/www/butterfly/files/pkg-message.in   (contents, props changed)
  head/www/butterfly/pkg-descr   (contents, props changed)
  head/www/butterfly/pkg-plist   (contents, props changed)
Modified:
  head/www/Makefile

Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile	Mon Feb 13 17:42:58 2017	(r434010)
+++ head/www/Makefile	Mon Feb 13 18:00:21 2017	(r434011)
@@ -56,6 +56,7 @@
     SUBDIR += bolt
     SUBDIR += bookmarkbridge
     SUBDIR += bozohttpd
+    SUBDIR += butterfly
     SUBDIR += c-icap
     SUBDIR += c-icap-modules
     SUBDIR += cadaver

Added: head/www/butterfly/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/butterfly/Makefile	Mon Feb 13 18:00:21 2017	(r434011)
@@ -0,0 +1,31 @@
+# Created by: Yuri Victorovich <yuri@rawbw.com>
+# $FreeBSD$
+
+PORTNAME=	butterfly
+PORTVERSION=	2.0.1
+CATEGORIES=	www
+MASTER_SITES=	CHEESESHOP
+
+MAINTAINER=	yuri@rawbw.com
+COMMENT=	Web terminal based on websocket and tornado
+
+LICENSE=	GPLv3
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}openssl>0:security/py-openssl \
+		${PYTHON_PKGNAMEPREFIX}tornado>0:www/py-tornado \
+		${PYTHON_PKGNAMEPREFIX}libsass>0:www/py-libsass
+
+USES=		python
+USE_PYTHON=	autoplist distutils
+NO_ARCH=	yes
+USE_RC_SUBR=	butterfly
+SUB_FILES=	pkg-message
+SUB_LIST=	PYTHON_CMD=${PYTHON_CMD}
+
+post-install:
+	@${REINPLACE_CMD} -i '' -e "s|^butterfly_dir = os.path.join(ev, 'butterfly')|butterfly_dir = '${PREFIX}/etc/butterfly'|g" \
+		${STAGEDIR}${PREFIX}/bin/butterfly.server.py
+	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/butterfly/ssl
+	${INSTALL_DATA} ${WRKSRC}/butterfly/butterfly.conf.default ${STAGEDIR}${ETCDIR}/butterfly.conf.sample
+
+.include <bsd.port.mk>

Added: head/www/butterfly/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/butterfly/distinfo	Mon Feb 13 18:00:21 2017	(r434011)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1486684509
+SHA256 (butterfly-2.0.1.tar.gz) = 93ecdef71b62e1809a48a706ac2ae86fdbeea6d722970cda99969bccad8ba7ef
+SIZE (butterfly-2.0.1.tar.gz) = 1042304

Added: head/www/butterfly/files/butterfly.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/butterfly/files/butterfly.in	Mon Feb 13 18:00:21 2017	(r434011)
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: butterfly
+# REQUIRE: LOGIN
+#
+# Add the following line to /etc/rc.conf to enable butterfly:
+#
+# butterfly_enable="YES"
+#
+
+: ${butterfly_enable="NO"}
+: ${butterfly_user="root"}
+: ${butterfly_args="--unsecure"}
+
+. /etc/rc.subr
+
+name=butterfly
+rcvar=butterfly_enable
+pidfile=/var/run/${name}.pid
+start_cmd="start_butterfly"
+
+load_rc_config $name
+
+start_butterfly() {
+  echo "Starting ${name}."
+  if ! [ -r %%ETCDIR%%/ssl/butterfly_localhost.crt -a %%ETCDIR%%/ssl/butterfly_localhost.key -a %%ETCDIR%%/ssl/butterfly_ca.crt ]; then
+    %%PREFIX%%/bin/butterfly.server.py --generate-certs --host=localhost &&
+    echo "${name}: generated the ssl certificate in %%ETCDIR%%/ssl"
+  fi
+  daemon -p $pidfile -u ${butterfly_user} %%PREFIX%%/bin/butterfly.server.py ${butterfly_args} >/var/log/${name}.log 2>&1
+}
+
+command="%%PYTHON_CMD%%"
+run_rc_command "$1"

Added: head/www/butterfly/files/patch-butterfly.server.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/butterfly/files/patch-butterfly.server.py	Mon Feb 13 18:00:21 2017	(r434011)
@@ -0,0 +1,29 @@
+--- butterfly.server.py.orig	2017-02-10 00:08:34 UTC
++++ butterfly.server.py
+@@ -20,7 +20,7 @@
+ import tornado.options
+ import tornado.ioloop
+ import tornado.httpserver
+-import tornado_systemd
++#import tornado_systemd
+ import logging
+ import webbrowser
+ import uuid
+@@ -295,13 +295,13 @@ else:
+ from butterfly import application
+ application.butterfly_dir = butterfly_dir
+ log.info('Starting server')
+-http_server = tornado_systemd.SystemdHTTPServer(
++http_server = tornado.httpserver.HTTPServer(
+     application, ssl_options=ssl_opts)
+ http_server.listen(port, address=host)
+ 
+-if http_server.systemd:
+-    os.environ.pop('LISTEN_PID')
+-    os.environ.pop('LISTEN_FDS')
++#if http_server.systemd:
++#    os.environ.pop('LISTEN_PID')
++#    os.environ.pop('LISTEN_FDS')
+ 
+ log.info('Starting loop')
+ 

Added: head/www/butterfly/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/butterfly/files/pkg-message.in	Mon Feb 13 18:00:21 2017	(r434011)
@@ -0,0 +1,14 @@
+======================================================================
+You installed butterfly, the web terminal that works through your
+browser.
+
+It is recommended to run butterfly as a service:
+# sysrc butterfly_enable="YES"
+# service butterfly start
+
+To access butterfly please navigate to:
+http://localhost:57575
+
+The port and other parameters can be configured in
+%%ETCDIR%%/butterfly.conf
+======================================================================

Added: head/www/butterfly/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/butterfly/pkg-descr	Mon Feb 13 18:00:21 2017	(r434011)
@@ -0,0 +1,17 @@
+Butterfly is a xterm compatible terminal that runs in your browser.
+
+Features
+
+* xterm compatible (support for a lot of unused features)
+* Native browser scroll and search
+* Theming in css/sass (18 preset themes) endless possibilities
+* HTML in your terminal, cat images and use <table>
+* Multiple sessions support
+* Secure authentication with X509 certificates
+* 16,777,216 colors support
+* Keyboard text selection
+* Desktop notifications on terminal output
+* Geolocation from browser
+* May work on firefox too
+
+WWW: https://pypi.python.org/pypi/butterfly

Added: head/www/butterfly/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/butterfly/pkg-plist	Mon Feb 13 18:00:21 2017	(r434011)
@@ -0,0 +1,2 @@
+@sample %%ETCDIR%%/butterfly.conf.sample
+@dir %%ETCDIR%%/ssl



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