View | Details | Raw Unified | Return to bug 261849 | Differences between
and this patch

Collapse All | Expand All

(-)b/GIDs (-1 / +1 lines)
Lines 590-596 monkeysphere:*:641: Link Here
590
# free: 647
590
# free: 647
591
# free: 648
591
# free: 648
592
# free: 649
592
# free: 649
593
# free: 650
593
gmni:*:650:
594
# free: 651
594
# free: 651
595
# free: 652
595
# free: 652
596
# free: 653
596
# free: 653
(-)b/UIDs (-1 / +1 lines)
Lines 595-601 monkeysphere:*:641:641::0:0:Monkeysphere User:/var/monkeysphere:/usr/local/bin/b Link Here
595
# free: 647
595
# free: 647
596
# free: 648
596
# free: 648
597
# free: 649
597
# free: 649
598
# free: 650
598
gmni:*:650:650::0:0:Gemini Owner:/nonexistent:/usr/sbin/nologin
599
# free: 651
599
# free: 651
600
# free: 652
600
# free: 652
601
# free: 653
601
# free: 653
(-)b/net/gmnisrv/Makefile (+35 lines)
Added Link Here
1
PORTNAME=	gmnisrv
2
DISTVERSION=	1.0
3
CATEGORIES=	net
4
MASTER_SITES=	https://git.sr.ht/~sircmpwn/${PORTNAME}/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/
5
6
MAINTAINER=	corey@electrickite.org
7
COMMENT=	Simple Gemini protocol server
8
9
LICENSE=	GPLv3
10
LICENSE_FILE=	${WRKSRC}/COPYING
11
12
BUILD_DEPENDS+=	scdoc:textproc/scdoc
13
RUN_DEPENDS+=	${LOCALBASE}/etc/mime.types:misc/mime-support
14
15
USES=		ssl:build,run
16
USE_RC_SUBR=	${PORTNAME}
17
CFLAGS+=        -I${OPENSSLINC}
18
LDFLAGS+=       -L${OPENSSLLIB} -lssl -lcrypto
19
HAS_CONFIGURE=	yes
20
CONFIGURE_ARGS=	--sysconfdir=${PREFIX}/etc --mandir=${PREFIX}/man
21
22
GMNISRV_USER?=	gmni
23
GMNISRV_GROUP?=	gmni
24
USERS=		${GMNISRV_USER}
25
GROUPS=		${GMNISRV_GROUP}
26
27
PLIST_FILES=	bin/${PORTNAME} \
28
		share/${PORTNAME}/${PORTNAME}.ini \
29
		man/man1/${PORTNAME}.1.gz \
30
		man/man5/${PORTNAME}.ini.5.gz
31
32
post-install:
33
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
34
35
.include <bsd.port.mk>
(-)b/net/gmnisrv/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1644164349
2
SHA256 (gmnisrv-1.0.tar.gz) = b1257d6835aff453d6a321a1c6e50c485703692530e4bcfe35455d7aac45f3d5
3
SIZE (gmnisrv-1.0.tar.gz) = 74031
(-)b/net/gmnisrv/files/gmnisrv.in (+46 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: gmnisrv
4
# REQUIRE: NETWORKING SERVERS
5
# BEFORE: DAEMON
6
# KEYWORD: shutdown
7
8
#
9
# Add some of the following variables to /etc/rc.conf to configure gmnisrv:
10
# gmnisrv_enable (bool):	Set to "NO" by default.
11
#				Set it to "YES" to enable gmnisrv.
12
# gmnisrv_config (str):		Default "%%PREFIX%%/etc/gmnisrv.ini"
13
#				Set it to the full path to the config file
14
# gmnisrv_user (str):		Default "gmni"
15
#				The gmnisrv process user
16
#
17
18
. /etc/rc.subr
19
20
name="gmnisrv"
21
desc="Gemini protocol server"
22
rcvar=gmnisrv_enable
23
24
load_rc_config $name
25
26
: ${gmnisrv_enable="NO"}
27
: ${gmnisrv_config="%%PREFIX%%/etc/${name}.ini"}
28
: ${gmnisrv_user="gmni"}
29
30
command="%%PREFIX%%/bin/${name}"
31
pidfile="/var/run/${name}.pid"
32
required_files="${gmnisrv_config}"
33
34
start_precmd="${name}_setflags"
35
start_cmd="${name}_start"
36
37
gmnisrv_setflags() {
38
    rc_flags="-C ${gmnisrv_config} ${rc_flags}"
39
}
40
41
gmnisrv_start() {
42
    check_startmsgs && echo "Starting ${name}."
43
    /usr/sbin/daemon -S -s info -l daemon -T $name -u "${gmnisrv_user}" -p "${pidfile}" $command $rc_flags $command_args
44
}
45
46
run_rc_command "$1"
(-)b/net/gmnisrv/files/patch-Makefile (+45 lines)
Added Link Here
1
--- Makefile.orig	2022-02-10 00:16:33 UTC
2
+++ Makefile
3
@@ -5,8 +5,7 @@ include $(OUTDIR)/config.mk
4
 include $(OUTDIR)/cppcache
5
 
6
 gmnisrv: $(gmnisrv_objects)
7
-	@printf 'CCLD\t$@\n'
8
-	@$(CC) $(LDFLAGS) -o $@ $(gmnisrv_objects) $(LIBS)
9
+	$(CC) $(LDFLAGS) -o $@ $(gmnisrv_objects) $(LIBS)
10
 
11
 doc/gmnisrv.1: doc/gmnisrv.scd
12
 doc/gmnisrvini.5: doc/gmnisrvini.scd
13
@@ -14,27 +13,24 @@ doc/gmnisrvini.5: doc/gmnisrvini.scd
14
 .SUFFIXES: .c .o .scd .1 .5
15
 
16
 .c.o:
17
-	@printf 'CC\t$@\n'
18
 	@touch $(OUTDIR)/cppcache
19
 	@grep $< $(OUTDIR)/cppcache >/dev/null || \
20
 		$(CPP) $(CFLAGS) -MM -MT $@ $< >> $(OUTDIR)/cppcache
21
-	@$(CC) -c $(CFLAGS) -o $@ $<
22
+	$(CC) -c $(CFLAGS) -o $@ $<
23
 
24
 .scd.1:
25
-	@printf 'SCDOC\t$@\n'
26
-	@$(SCDOC) < $< > $@
27
+	$(SCDOC) < $< > $@
28
 
29
 .scd.5:
30
-	@printf 'SCDOC\t$@\n'
31
-	@$(SCDOC) < $< > $@
32
+	$(SCDOC) < $< > $@
33
 
34
 docs: doc/gmnisrv.1 doc/gmnisrvini.5
35
 
36
 clean:
37
-	@rm -f gmnisrv $(gmnisrv_objects) doc/*.1 doc/*.5
38
+	rm -f gmnisrv $(gmnisrv_objects) doc/*.1 doc/*.5
39
 
40
 distclean: clean
41
-	@rm -rf "$(OUTDIR)"
42
+	rm -rf "$(OUTDIR)"
43
 
44
 install: all
45
 	mkdir -p \
(-)b/net/gmnisrv/files/patch-config.ini (+15 lines)
Added Link Here
1
--- config.ini.orig	2022-02-08 02:59:38 UTC
2
+++ config.ini
3
@@ -3,10 +3,10 @@ listen=0.0.0.0:1965 [::]:1965
4
 
5
 [:tls]
6
 # Path to store certificates on disk
7
-store=/var/lib/gemini/certs
8
+store=/var/db/gemini/certs
9
 
10
 # Optional details for new certificates
11
 organization=gmnisrv user
12
 
13
 [localhost]
14
-root=/srv/gemini
15
+root=/usr/local/gemini
(-)b/net/gmnisrv/files/patch-config.sh (+21 lines)
Added Link Here
1
--- config.sh.orig	2022-02-08 04:54:27 UTC
2
+++ config.sh
3
@@ -114,7 +114,7 @@ docs() { true; }
4
 run_configure() {
5
 	mkdir -p $outdir
6
 
7
-	for flag in -g -std=c11 -D_XOPEN_SOURCE=700 -Wall -Wextra -Werror -pedantic
8
+	for flag in -g -std=c11 -Wall -Wextra -Werror -pedantic
9
 	do
10
 		printf "Checking for %s... " "$flag"
11
 		if test_cflags "$flag"
12
@@ -124,9 +124,6 @@ run_configure() {
13
 			echo no
14
 		fi
15
 	done
16
-
17
-	find_library OpenSSL libssl
18
-	find_library OpenSSL libcrypto
19
 
20
 	printf "Checking for scdoc... "
21
 	if scdoc -v >/dev/null 2>&1
(-)b/net/gmnisrv/files/patch-doc_gmnisrv.scd (+11 lines)
Added Link Here
1
--- doc/gmnisrv.scd.orig	2022-02-08 03:05:00 UTC
2
+++ doc/gmnisrv.scd
3
@@ -11,7 +11,7 @@ gmnisrv - serve clients over the gemini protocol
4
 # DESCRIPTION
5
 
6
 *gmnisrv* is a daemon which serves network clients over the gemini protocol. It
7
-requires a config file; by default this shall be read from /etc/gmnisrv.ini
8
+requires a config file; by default this shall be read from /usr/local/etc/gmnisrv.ini
9
 unless the installation was configured with a different SYSCONFDIR or the user
10
 provides the -C flag.
11
 
(-)b/net/gmnisrv/files/patch-include_config.h (+11 lines)
Added Link Here
1
--- include/config.h.orig	2022-02-06 16:30:31 UTC
2
+++ include/config.h
3
@@ -1,6 +1,8 @@
4
 #ifndef GMNISRV_CONFIG
5
 #define GMNISRV_CONFIG
6
 #include <arpa/inet.h>
7
+#include <netinet/in.h>
8
+#include <sys/socket.h>
9
 #include <openssl/x509.h>
10
 #include <stdbool.h>
11
 #include "regexp.h"
(-)b/net/gmnisrv/files/patch-include_log.h (+10 lines)
Added Link Here
1
--- include/log.h.orig	2022-02-06 16:31:22 UTC
2
+++ include/log.h
3
@@ -1,6 +1,7 @@
4
 #ifndef GMNISRV_LOG
5
 #define GMNISRV_LOG
6
 #include <sys/socket.h>
7
+#include <netinet/in.h>
8
 
9
 void server_log(const char *fmt, ...);
10
 void client_log(struct sockaddr *addr, const char *fmt, ...);
(-)b/net/gmnisrv/files/patch-src_regexp.c (+10 lines)
Added Link Here
1
--- src/regexp.c.orig	2022-02-06 16:32:03 UTC
2
+++ src/regexp.c
3
@@ -23,7 +23,6 @@
4
  * THE SOFTWARE.
5
  */
6
 #include <assert.h>
7
-#include <alloca.h>
8
 #include <inttypes.h>
9
 #include <stdarg.h>
10
 #include <stdbool.h>
(-)b/net/gmnisrv/pkg-descr (+3 lines)
Added Link Here
1
gmnisrv is a simple Gemini protocol server.
2
3
WWW: https://git.sr.ht/~sircmpwn/gmnisrv/
(-)b/net/gmnisrv/pkg-message (-1 / +11 lines)
Added Link Here
0
- 
1
[
2
{ type: install
3
  message: <<EOM
4
	gmnisrv requires a configuration file to be created,
5
	by default at: /usr/local/etc/gmnisrv.ini
6
7
	An example configuration file can be found at:
8
	/usr/local/share/gmnisrv/gmnisrv.ini
9
EOM
10
}
11
]

Return to bug 261849