New port: net/gmid: Simple and secure Gemini server
PR: 255413 Submitted by: Omar Polo <freebsd@omarpolo.com>
This commit is contained in:
parent
f0514a6946
commit
4ed1dafde0
2
GIDs
2
GIDs
|
@ -229,7 +229,7 @@ rancid:*:286:
|
|||
webdis:*:287:
|
||||
ntopng:*:288:
|
||||
victoria-metrics:*:289:
|
||||
# free: 290
|
||||
_gmid:*:290:
|
||||
# free: 291
|
||||
# free: 292
|
||||
# free: 293
|
||||
|
|
2
UIDs
2
UIDs
|
@ -234,7 +234,7 @@ rancid:*:286:286::0:0:RANCID daemon user:/usr/local/var/rancid:/bin/sh
|
|||
webdis:*:287:287::0:0:webdis daemon user:/nonexistent:/usr/sbin/nologin
|
||||
ntopng:*:288:288::0:0:ntopng daemon user:/nonexistent:/usr/sbin/nologin
|
||||
victoria-metrics:*:289:289::0:0:VictoriaMetrics user:/nonexistent:/usr/sbin/nologin
|
||||
# free: 290
|
||||
_gmid:*:290:290::0:0:gmid daemon user:/var/empty:/usr/sbin/nologin
|
||||
# free: 291
|
||||
# free: 292
|
||||
# free: 293
|
||||
|
|
33
net/gmid/Makefile
Normal file
33
net/gmid/Makefile
Normal file
|
@ -0,0 +1,33 @@
|
|||
PORTNAME= gmid
|
||||
DISTVERSION= v1.6.1
|
||||
CATEGORIES= net
|
||||
|
||||
MAINTAINER= freebsd@omarpolo.com
|
||||
COMMENT= Simple and secure Gemini server
|
||||
|
||||
LICENSE= ISCL
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
LIB_DEPENDS= libevent.so:devel/libevent \
|
||||
libtls.so:security/libressl
|
||||
|
||||
USES= localbase ssl
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= omar-polo
|
||||
USE_RC_SUBR= gmid
|
||||
|
||||
HAS_CONFIGURE= yes
|
||||
|
||||
TEST_TARGET= regress
|
||||
|
||||
USERS= _gmid
|
||||
GROUPS= _gmid
|
||||
|
||||
post-build:
|
||||
${STRIP_CMD} ${WRKSRC}/gmid
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${FILESDIR}/gmid.conf.sample \
|
||||
${STAGEDIR}${PREFIX}/etc/
|
||||
|
||||
.include <bsd.port.mk>
|
3
net/gmid/distinfo
Normal file
3
net/gmid/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1619421708
|
||||
SHA256 (omar-polo-gmid-v1.6.1_GH0.tar.gz) = bdbc8f184812554f3574791dfe43e435fa6c4cafcbd70b4e1e7a48b2407a54a2
|
||||
SIZE (omar-polo-gmid-v1.6.1_GH0.tar.gz) = 59388
|
15
net/gmid/files/gmid.conf.sample
Normal file
15
net/gmid/files/gmid.conf.sample
Normal file
|
@ -0,0 +1,15 @@
|
|||
# drop privileges
|
||||
user "_gmid"
|
||||
|
||||
# it's a good idea to enable chroot, but
|
||||
# beware that can make CGI scripting harder
|
||||
#
|
||||
#chroot "/var/gemini"
|
||||
|
||||
# An example of a server block:
|
||||
#
|
||||
#server "localhost" {
|
||||
# root "/var/gemini/localhost"
|
||||
# cert "/usr/local/etc/ssl/gmid/gmid.crt"
|
||||
# key "/usr/local/etc/ssl/gmid/gmid.key"
|
||||
#}
|
42
net/gmid/files/gmid.in
Normal file
42
net/gmid/files/gmid.in
Normal file
|
@ -0,0 +1,42 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
|
||||
# PROVIDE: gmid
|
||||
# REQUIRE: SERVERS
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable gmid:
|
||||
# gmid_enable (bool): Set it to "YES" to enable gmid
|
||||
# Default is "NO".
|
||||
# gmid_config (string): Path to gmid configuration file.
|
||||
# Default is "%%PREFIX%%/etc/gmid.conf"
|
||||
#
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="gmid"
|
||||
rcvar="gmid_enable"
|
||||
|
||||
start_precmd="gmid_checkconfig"
|
||||
configtest_cmd="gmid_checkconfig"
|
||||
extra_commands="configtest"
|
||||
|
||||
: ${gmid_enable:="NO"}
|
||||
: ${gmid_config:="%%PREFIX%%/etc/gmid.conf"}
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
command="%%PREFIX%%/bin/${name}"
|
||||
command_flags="-c ${gmid_config}"
|
||||
|
||||
required_files="${gmid_config}"
|
||||
|
||||
gmid_checkconfig()
|
||||
{
|
||||
echo "Performing sanity check on gmid configuration:"
|
||||
eval ${command} -n ${command_flags}
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
6
net/gmid/pkg-descr
Normal file
6
net/gmid/pkg-descr
Normal file
|
@ -0,0 +1,6 @@
|
|||
gmid is a server for the Gemini protocol. It has various
|
||||
features, among which Capsicum support and a "config-less"
|
||||
mode akin to "python -m http.server" to quickly serve local
|
||||
directories from the shell.
|
||||
|
||||
WWW: https://github.com/omar-polo/gmid
|
3
net/gmid/pkg-plist
Normal file
3
net/gmid/pkg-plist
Normal file
|
@ -0,0 +1,3 @@
|
|||
@sample etc/gmid.conf.sample
|
||||
bin/gmid
|
||||
man/man1/gmid.1.gz
|
Loading…
Reference in New Issue
Block a user