Date: Mon, 8 Jan 2018 17:00:31 +0000 (UTC) From: Mark Felder <feld@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458452 - in head/security: . bitwarden-ruby bitwarden-ruby/files Message-ID: <201801081700.w08H0VFf086316@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: feld Date: Mon Jan 8 17:00:31 2018 New Revision: 458452 URL: https://svnweb.freebsd.org/changeset/ports/458452 Log: A small, self-contained API server written in Ruby and Sinatra to provide a private backend for the open-source Bitwarden apps. WWW: https://github.com/jcs/bitwarden-ruby Added: head/security/bitwarden-ruby/ head/security/bitwarden-ruby/Makefile (contents, props changed) head/security/bitwarden-ruby/distinfo (contents, props changed) head/security/bitwarden-ruby/files/ head/security/bitwarden-ruby/files/bitwarden-api.in (contents, props changed) head/security/bitwarden-ruby/pkg-descr (contents, props changed) head/security/bitwarden-ruby/pkg-plist (contents, props changed) Modified: head/security/Makefile Modified: head/security/Makefile ============================================================================== --- head/security/Makefile Mon Jan 8 16:59:35 2018 (r458451) +++ head/security/Makefile Mon Jan 8 17:00:31 2018 (r458452) @@ -46,6 +46,7 @@ SUBDIR += belier SUBDIR += bfbtester SUBDIR += binwalk + SUBDIR += bitwarden-ruby SUBDIR += blindelephant SUBDIR += boringssl SUBDIR += botan110 Added: head/security/bitwarden-ruby/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/bitwarden-ruby/Makefile Mon Jan 8 17:00:31 2018 (r458452) @@ -0,0 +1,40 @@ +# Created by: Mark Felder <feld@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= bitwarden-ruby +DISTVERSION= 0.0.0.20180103 +CATEGORIES= security www + +MAINTAINER= feld@FreeBSD.org +COMMENT= Ruby implementation of the BitWarden API + +LICENSE= ISCL + +RUN_DEPENDS= rubygem-sinatra>=2.0:www/rubygem-sinatra \ + rubygem-sinatra-contrib>=2.0:www/rubygem-sinatra-contrib \ + rubygem-unicorn>0:www/rubygem-unicorn \ + rubygem-json>0:devel/rubygem-json \ + rubygem-pbkdf2-ruby>0:security/rubygem-pbkdf2-ruby \ + rubygem-rotp>0:devel/rubygem-rotp \ + rubygem-jwt>0:www/rubygem-jwt \ + rubygem-sqlite3>0:databases/rubygem-sqlite3 \ + rubygem-rqrcode>0:www/rubygem-rqrcode + +USE_RUBY= yes +RUBY_NO_BUILD_DEPENDS= yes + +USE_GITHUB= yes +GH_ACCOUNT= jcs +GH_TAGNAME= 9628d8a + +NO_ARCH= yes +NO_BUILD= yes + +USE_RC_SUBR= bitwarden-api +SUB_LIST+= RUBY_WITH_SUFFIX="${RUBY_WITH_SUFFIX}" + +do-install: + ${MKDIR} ${STAGEDIR}/${WWWDIR} + (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}) + +.include <bsd.port.mk> Added: head/security/bitwarden-ruby/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/bitwarden-ruby/distinfo Mon Jan 8 17:00:31 2018 (r458452) @@ -0,0 +1,3 @@ +TIMESTAMP = 1515424065 +SHA256 (jcs-bitwarden-ruby-0.0.0.20180103-9628d8a_GH0.tar.gz) = 178852ce86086f6b927cc1f41ed75ef0f3e3f8343dac5922452e91972adcfb0f +SIZE (jcs-bitwarden-ruby-0.0.0.20180103-9628d8a_GH0.tar.gz) = 27560 Added: head/security/bitwarden-ruby/files/bitwarden-api.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/bitwarden-ruby/files/bitwarden-api.in Mon Jan 8 17:00:31 2018 (r458452) @@ -0,0 +1,48 @@ +#!/bin/sh +# +# Created by: Mark Felder <feld@FreeBSD.org> +# $FreeBSD$ +# + +# PROVIDE: bitwarden-api +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable `bitwarden-api': +# +# bitwarden_api_enable="YES" + +. /etc/rc.subr +name=bitwarden_api + +rcvar=bitwarden_api_enable +load_rc_config ${name} + +: ${bitwarden_api_enable:=NO} +: ${bitwarden_api_port:=4567} +: ${bitwarden_api_signups:=NO} +: ${bitwarden_api_user:=www} +: ${bitwarden_api_group:=www} +: ${bitwarden_api_chdir=/usr/local/www/bitwarden-ruby} + +pidfile="/var/run/bitwarden/${name}.pid" +procname=%%RUBY_WITH_SUFFIX%% +command="%%PREFIX%%/bin/rackup" +command_args="-P ${pidfile} -p ${bitwarden_api_port} -E production config.ru 2>&1 | logger -t bitwarden &" +start_precmd="start_precmd" + +start_precmd() +{ + if [ ! -e /var/run/bitwarden ] ; then + install -d -o ${bitwarden_api_user} -g ${bitwarden_api_group} /var/run/bitwarden; + fi + + checkyesno bitwarden_api_signups + if [ "$?" -eq 0 ]; then + export ALLOW_SIGNUPS=1 + echo "Bitwarden Signups Enabled" + fi +} + +run_rc_command "$1" Added: head/security/bitwarden-ruby/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/bitwarden-ruby/pkg-descr Mon Jan 8 17:00:31 2018 (r458452) @@ -0,0 +1,4 @@ +A small, self-contained API server written in Ruby and Sinatra to +provide a private backend for the open-source Bitwarden apps. + +WWW: https://github.com/jcs/bitwarden-ruby Added: head/security/bitwarden-ruby/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/bitwarden-ruby/pkg-plist Mon Jan 8 17:00:31 2018 (r458452) @@ -0,0 +1,33 @@ +%%WWWDIR%%/API.md +%%WWWDIR%%/Gemfile +%%WWWDIR%%/Gemfile.lock +%%WWWDIR%%/LICENSE +%%WWWDIR%%/README.md +%%WWWDIR%%/Rakefile +%%WWWDIR%%/config.ru +@owner www +%%WWWDIR%%/db/.gitkeep +@owner +%%WWWDIR%%/lib/api.rb +%%WWWDIR%%/lib/bitwarden.rb +%%WWWDIR%%/lib/bitwarden_ruby.rb +%%WWWDIR%%/lib/cipher.rb +%%WWWDIR%%/lib/db.rb +%%WWWDIR%%/lib/dbmodel.rb +%%WWWDIR%%/lib/device.rb +%%WWWDIR%%/lib/folder.rb +%%WWWDIR%%/lib/helper.rb +%%WWWDIR%%/lib/user.rb +%%WWWDIR%%/spec/cipher_spec.rb +%%WWWDIR%%/spec/cipherstring_spec.rb +%%WWWDIR%%/spec/db_spec.rb +%%WWWDIR%%/spec/folder_spec.rb +%%WWWDIR%%/spec/icon_spec.rb +%%WWWDIR%%/spec/identity_spec.rb +%%WWWDIR%%/spec/spec_helper.rb +%%WWWDIR%%/tools/1password_import.rb +%%WWWDIR%%/tools/activate_totp.rb +%%WWWDIR%%/tools/bitwarden_import.rb +%%WWWDIR%%/tools/lastpass_import.rb +%%WWWDIR%%/tools/mitm.rb +@dir(www,www,0750) %%WWWDIR%%/db
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801081700.w08H0VFf086316>