Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171108396
D54616.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D54616.id.diff
View Options
diff --git a/filesystems/Makefile b/filesystems/Makefile
--- a/filesystems/Makefile
+++ b/filesystems/Makefile
@@ -125,6 +125,7 @@
SUBDIR += ufs_copy
SUBDIR += unionfs
SUBDIR += unreliablefs
+ SUBDIR += versitygw
SUBDIR += webdavfs
SUBDIR += wimlib
SUBDIR += xfsm
diff --git a/filesystems/versitygw/Makefile b/filesystems/versitygw/Makefile
new file mode 100644
--- /dev/null
+++ b/filesystems/versitygw/Makefile
@@ -0,0 +1,24 @@
+PORTNAME= versitygw
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.1.0
+CATEGORIES= filesystems www
+
+MAINTAINER= dch@FreeBSD.org
+COMMENT= High-Performance S3 Gateway and Translation Service
+WWW= https://github.com/versity/versitygw/blob/main/go.mod
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= go:modules
+USE_RC_SUBR= versitygw
+GO_MODULE= github.com/versity/versitygw
+GO_TARGET= ./cmd/versitygw
+
+PLIST_DIRS= /var/log/versitygw
+PLIST_FILES= bin/versitygw
+
+post-install:
+ ${MKDIR} ${STAGEDIR}/var/log/versitygw
+
+.include <bsd.port.mk>
diff --git a/filesystems/versitygw/distinfo b/filesystems/versitygw/distinfo
new file mode 100644
--- /dev/null
+++ b/filesystems/versitygw/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1768659439
+SHA256 (go/filesystems_versitygw/versitygw-v1.1.0/v1.1.0.mod) = 5783deed6dcb3c3ea9c2c3e83cfe4ee7dcba84827f00929a8103c2d3bfe8709a
+SIZE (go/filesystems_versitygw/versitygw-v1.1.0/v1.1.0.mod) = 4125
+SHA256 (go/filesystems_versitygw/versitygw-v1.1.0/v1.1.0.zip) = 3a97294c889bd39f83d0e2fe33ba259d594ce74cd8a65a492b549363c4969290
+SIZE (go/filesystems_versitygw/versitygw-v1.1.0/v1.1.0.zip) = 1014217
diff --git a/filesystems/versitygw/files/versitygw.in b/filesystems/versitygw/files/versitygw.in
new file mode 100644
--- /dev/null
+++ b/filesystems/versitygw/files/versitygw.in
@@ -0,0 +1,94 @@
+#!/bin/sh
+
+# PROVIDE: versitygw
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# versitygw_enable (bool): Set it to YES to enable versitygw.
+# Default is "NO".
+# versitygw_user (user): Set user to run versitygw.
+# Default is "versitygw".
+# versitygw_group (group): Set group to run versitygw.
+# Default is "versitygw".
+# versitygw_options (string): Provide additional runtime options.
+# Default is "".
+# versitygw_readonly (file): Disallow writes.
+# Default is "yes".
+# versitygw_access_log (file): Path for access logs.
+# Default is "/var/log/versitgw/access.log".
+# versitygw_admin_log (file): Path for admin logs.
+# Default is "/var/log/versitgw/admin.log".
+# versitygw_listen (file): IP:port to listen on.
+# Default is "localhost:7070".
+
+. /etc/rc.subr
+
+name=versitygw
+rcvar=versitygw_enable
+
+load_rc_config $name
+
+: ${versitygw_enable:="NO"}
+: ${versitygw_user:="www"}
+: ${versitygw_group:="www"}
+: ${versitygw_access_log:="/var/log/versitygw/access.log"}
+: ${versitygw_admin_log:="/var/log/versitygw/admin.log"}
+: ${versitygw_access_key:=""}
+: ${versitygw_secret_key:=""}
+: ${versitygw_directory:=""}
+: ${versitygw_listen:="localhost:7070"}
+: ${versitygw_options:=""}
+: ${versitygw_readonly:="yes"}
+
+if checkyesno versitygw_readonly; then
+ versitygw_is_readonly="--readonly"
+else
+ versitygw_is_readonly=""
+fi
+
+pidfile=/var/run/versitygw.pid
+procname="%%PREFIX%%/bin/versitygw"
+command="/usr/sbin/daemon"
+command_args="-f -p ${pidfile} \
+ /usr/bin/env ${versitygw_env} ${procname} \
+ --access ${versitygw_access_key} \
+ --secret ${versitygw_secret_key} \
+ --access-log ${versitygw_access_log} \
+ --admin-access-log ${versitygw_admin_log} \
+ ${versitygw_is_readonly} \
+ --port ${versitygw_listen} \
+ posix ${versitygw_directory}"
+
+monitor_cmd=versitygw_monitor
+start_precmd=versitygw_startprecmd
+required_dirs="$versitygw_directory"
+
+versitygw_monitor()
+{
+ sig_reload=USR1
+ run_rc_command "reload"
+}
+
+versitygw_startprecmd()
+{
+ if [ ! -e ${versitygw_access_log} ]; then
+ install -m 0640 -o ${versitygw_user} -g ${versitygw_group} /dev/null ${versitygw_access_log};
+ fi
+
+ if [ ! -e ${versitygw_admin_log} ]; then
+ install -m 0640 -o ${versitygw_user} -g ${versitygw_group} /dev/null ${versitygw_admin_log};
+ fi
+
+ if [ ! -e ${pidfile} ]; then
+ install -o ${versitygw_user} -g ${versitygw_group} /dev/null ${pidfile};
+ fi
+
+ if [ ! -d ${versitygw_dir} ]; then
+ install -d -o ${versitygw_user} -g ${versitygw_group} ${versitygw_dir}
+ fi
+}
+
+run_rc_command "$1"
diff --git a/filesystems/versitygw/pkg-descr b/filesystems/versitygw/pkg-descr
new file mode 100644
--- /dev/null
+++ b/filesystems/versitygw/pkg-descr
@@ -0,0 +1,7 @@
+Versity S3 Gateway is a simple to use tool for seamless inline translation
+between AWS S3 object commands and storage systems. It supports:
+
+- Serving your local filesystem into an S3 server with a single command
+- Proxying local S3 requests to S3 storage with caching
+
+See https://github.com/versity/versitygw/wiki/Quickstart for usage.
diff --git a/filesystems/versitygw/pkg-message b/filesystems/versitygw/pkg-message
new file mode 100644
--- /dev/null
+++ b/filesystems/versitygw/pkg-message
@@ -0,0 +1,20 @@
+[
+{ type: install
+ message: <<EOM
+Versitygw requires at minimum a secret key and an access key to be specified,
+either on the command line to run in the foreground, or as rc variables:
+
+/usr/local/bin/versitygw \
+ --access easy \
+ --secret squirrel \
+ --readonly \
+ --port localhost:7070 \
+ posix /var/empty
+
+There are many additional parameters that can be specified, see the wiki at
+https://github.com/versity/versitygw/wiki/ and --help output for details,
+and add them to versitygw-options in your rc.conf.
+
+EOM
+}
+]
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 9, 6:17 PM (12 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38603727
Default Alt Text
D54616.id.diff (5 KB)
Attached To
Mode
D54616: new port: filesystems/versitygw: high performance S3 service and proxy
Attached
Detach File
Event Timeline
Log In to Comment