mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
Add rubywarden (formerly known as bitwarden-ruby)
a small, self-contained API server written in Ruby and Sinatra to provide a private backend for the open-source Bitwarden apps. This port follows the bitwarden-ruby port which was created and maintained by feld@ but doesnt try to manage all ruby dependencies.
This commit is contained in:
parent
50d9834808
commit
61f46537a3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=495292
35
security/ruby-bitwarden/Makefile
Normal file
35
security/ruby-bitwarden/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
# Created by: Mark Felder <feld@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= rubywarden
|
||||
DISTVERSION= 0.0.0.20190207
|
||||
CATEGORIES= security www
|
||||
|
||||
MAINTAINER= mr@FreeBSD.org
|
||||
COMMENT= Ruby implementation of the BitWarden API
|
||||
|
||||
LICENSE= ISCL
|
||||
|
||||
RUN_DEPENDS= rubygem-bundler>=1.16:sysutils/rubygem-bundler
|
||||
|
||||
USES= sqlite
|
||||
USE_RUBY= yes
|
||||
RUBY_NO_BUILD_DEPENDS= yes
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= jcs
|
||||
GH_TAGNAME= 5ba9f9821971942d082e327edcf7f02e8ad4c4a7
|
||||
|
||||
NO_ARCH= yes
|
||||
NO_BUILD= yes
|
||||
|
||||
USE_RC_SUBR= rubywarden-api
|
||||
SUB_FILES= pkg-message
|
||||
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/ruby-bitwarden/distinfo
Normal file
3
security/ruby-bitwarden/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1552216607
|
||||
SHA256 (jcs-rubywarden-0.0.0.20190207-5ba9f9821971942d082e327edcf7f02e8ad4c4a7_GH0.tar.gz) = 6dce8c391480726200d1f7a9d2f1fad4fe435f25a0c96427b3782ba96a8adbc2
|
||||
SIZE (jcs-rubywarden-0.0.0.20190207-5ba9f9821971942d082e327edcf7f02e8ad4c4a7_GH0.tar.gz) = 38046
|
9
security/ruby-bitwarden/files/pkg-message.in
Normal file
9
security/ruby-bitwarden/files/pkg-message.in
Normal file
@ -0,0 +1,9 @@
|
||||
*************************************************************************
|
||||
|
||||
After installation of this port you have to install the necessary
|
||||
rubygem dependencies.
|
||||
|
||||
Follow the instructions in %%WWWDIR%%/README.md
|
||||
|
||||
*************************************************************************
|
||||
|
48
security/ruby-bitwarden/files/rubywarden-api.in
Normal file
48
security/ruby-bitwarden/files/rubywarden-api.in
Normal file
@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Created by: Mark Felder <feld@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: rubywarden-api
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable `rubywarden-api':
|
||||
#
|
||||
# rubywarden_api_enable="YES"
|
||||
|
||||
. /etc/rc.subr
|
||||
name=rubywarden_api
|
||||
|
||||
rcvar=rubywarden_api_enable
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${rubywarden_api_enable:=NO}
|
||||
: ${rubywarden_api_port:=4567}
|
||||
: ${rubywarden_api_signups:=NO}
|
||||
: ${rubywarden_api_user:=www}
|
||||
: ${rubywarden_api_group:=www}
|
||||
: ${rubywarden_api_chdir=/usr/local/www/rubywarden}
|
||||
|
||||
pidfile="/var/run/rubywarden/${name}.pid"
|
||||
procname=%%RUBY_WITH_SUFFIX%%
|
||||
command="%%PREFIX%%/bin/rackup"
|
||||
command_args="-P ${pidfile} -p ${rubywarden_api_port} -E production config.ru 2>&1 | logger -t rubywarden &"
|
||||
start_precmd="start_precmd"
|
||||
|
||||
start_precmd()
|
||||
{
|
||||
if [ ! -e /var/run/rubywarden ] ; then
|
||||
install -d -o ${rubywarden_api_user} -g ${rubywarden_api_group} /var/run/rubywarden;
|
||||
fi
|
||||
|
||||
checkyesno rubywarden_api_signups
|
||||
if [ "$?" -eq 0 ]; then
|
||||
export ALLOW_SIGNUPS=1
|
||||
echo "Bitwarden Signups Enabled"
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
4
security/ruby-bitwarden/pkg-descr
Normal file
4
security/ruby-bitwarden/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/rubywarden
|
56
security/ruby-bitwarden/pkg-plist
Normal file
56
security/ruby-bitwarden/pkg-plist
Normal file
@ -0,0 +1,56 @@
|
||||
%%WWWDIR%%/.gitignore
|
||||
%%WWWDIR%%/API.md
|
||||
%%WWWDIR%%/AR-MIGRATE.md
|
||||
%%WWWDIR%%/Gemfile
|
||||
%%WWWDIR%%/Gemfile.lock
|
||||
%%WWWDIR%%/LICENSE
|
||||
%%WWWDIR%%/README.md
|
||||
%%WWWDIR%%/Rakefile
|
||||
%%WWWDIR%%/config.ru
|
||||
%%WWWDIR%%/db/.gitkeep
|
||||
%%WWWDIR%%/db/config.yml
|
||||
%%WWWDIR%%/db/migrate/201803%%RUBY_SUFFIX%%145941_create_users.rb
|
||||
%%WWWDIR%%/db/migrate/201803%%RUBY_SUFFIX%%151103_create_devices.rb
|
||||
%%WWWDIR%%/db/migrate/201803%%RUBY_SUFFIX%%151113_create_folders.rb
|
||||
%%WWWDIR%%/db/migrate/201803%%RUBY_SUFFIX%%151117_create_ciphers.rb
|
||||
%%WWWDIR%%/db/migrate/20180518070354_set_default_value_for_favorite.rb
|
||||
%%WWWDIR%%/db/migrate/20180818095054_create_attachments.rb
|
||||
%%WWWDIR%%/db/migrate/20180818201731_user_kdf_iterations.rb
|
||||
%%WWWDIR%%/db/migrate/20180818212323_add_user_kdf_type.rb
|
||||
%%WWWDIR%%/lib/app.rb
|
||||
%%WWWDIR%%/lib/attachment.rb
|
||||
%%WWWDIR%%/lib/bitwarden.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/helpers/attachment_helpers.rb
|
||||
%%WWWDIR%%/lib/helpers/request_helpers.rb
|
||||
%%WWWDIR%%/lib/routes/api.rb
|
||||
%%WWWDIR%%/lib/routes/attachments.rb
|
||||
%%WWWDIR%%/lib/routes/icons.rb
|
||||
%%WWWDIR%%/lib/routes/identity.rb
|
||||
%%WWWDIR%%/lib/rubywarden.rb
|
||||
%%WWWDIR%%/lib/user.rb
|
||||
%%WWWDIR%%/spec/attachment_spec.rb
|
||||
%%WWWDIR%%/spec/bitwarden_importer_spec.rb
|
||||
%%WWWDIR%%/spec/cipher_spec.rb
|
||||
%%WWWDIR%%/spec/cipherstring_spec.rb
|
||||
%%WWWDIR%%/spec/db_spec.rb
|
||||
%%WWWDIR%%/spec/fixtures/bitwarden_export.csv
|
||||
%%WWWDIR%%/spec/folder_spec.rb
|
||||
%%WWWDIR%%/spec/icon_spec.rb
|
||||
%%WWWDIR%%/spec/identity_spec.rb
|
||||
%%WWWDIR%%/spec/spec_helper.rb
|
||||
%%WWWDIR%%/spec/user_spec.rb
|
||||
%%WWWDIR%%/tools/1password_import.rb
|
||||
%%WWWDIR%%/tools/activate_totp.rb
|
||||
%%WWWDIR%%/tools/bitwarden_import.rb
|
||||
%%WWWDIR%%/tools/change_master_password.rb
|
||||
%%WWWDIR%%/tools/keepass_import.rb
|
||||
%%WWWDIR%%/tools/lastpass_import.rb
|
||||
%%WWWDIR%%/tools/migrate_to_ar.rb
|
||||
%%WWWDIR%%/tools/mitm.rb
|
||||
@dir(www,www,0750) %%WWWDIR%%/db
|
Loading…
Reference in New Issue
Block a user