mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
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
This commit is contained in:
parent
6e9d860c2c
commit
2645043bdf
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=458452
@ -46,6 +46,7 @@
|
||||
SUBDIR += belier
|
||||
SUBDIR += bfbtester
|
||||
SUBDIR += binwalk
|
||||
SUBDIR += bitwarden-ruby
|
||||
SUBDIR += blindelephant
|
||||
SUBDIR += boringssl
|
||||
SUBDIR += botan110
|
||||
|
40
security/bitwarden-ruby/Makefile
Normal file
40
security/bitwarden-ruby/Makefile
Normal file
@ -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>
|
3
security/bitwarden-ruby/distinfo
Normal file
3
security/bitwarden-ruby/distinfo
Normal file
@ -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
|
48
security/bitwarden-ruby/files/bitwarden-api.in
Normal file
48
security/bitwarden-ruby/files/bitwarden-api.in
Normal file
@ -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"
|
4
security/bitwarden-ruby/pkg-descr
Normal file
4
security/bitwarden-ruby/pkg-descr
Normal file
@ -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
|
33
security/bitwarden-ruby/pkg-plist
Normal file
33
security/bitwarden-ruby/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user