FreeBSD Bugzilla – Attachment 231727 Details for
Bug 261849
[NEW PORT] net/gmnisrv: Simple Gemini protocol server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
gmnisrv-2.patch
gmnisrv-2.patch (text/plain), 10.21 KB, created by
Corey Hinshaw
on 2022-02-10 17:38:36 UTC
(
hide
)
Description:
gmnisrv-2.patch
Filename:
MIME Type:
Creator:
Corey Hinshaw
Created:
2022-02-10 17:38:36 UTC
Size:
10.21 KB
patch
obsolete
>From 5b3b3a7434b8a7447ef9531345dad9e2482c4b14 Mon Sep 17 00:00:00 2001 >From: Corey Hinshaw <corey@electrickite.org> >Date: Thu, 10 Feb 2022 12:35:48 -0500 >Subject: [PATCH] Adds new port net/gmnisrv > >--- > GIDs | 2 +- > UIDs | 2 +- > net/gmnisrv/Makefile | 35 ++++++++++++++++++ > net/gmnisrv/distinfo | 3 ++ > net/gmnisrv/files/gmnisrv.in | 45 ++++++++++++++++++++++++ > net/gmnisrv/files/patch-Makefile | 45 ++++++++++++++++++++++++ > net/gmnisrv/files/patch-config.ini | 15 ++++++++ > net/gmnisrv/files/patch-config.sh | 21 +++++++++++ > net/gmnisrv/files/patch-doc_gmnisrv.scd | 11 ++++++ > net/gmnisrv/files/patch-include_config.h | 11 ++++++ > net/gmnisrv/files/patch-include_log.h | 10 ++++++ > net/gmnisrv/files/patch-src_regexp.c | 10 ++++++ > net/gmnisrv/pkg-descr | 3 ++ > net/gmnisrv/pkg-message | 11 ++++++ > 14 files changed, 222 insertions(+), 2 deletions(-) > create mode 100644 net/gmnisrv/Makefile > create mode 100644 net/gmnisrv/distinfo > create mode 100644 net/gmnisrv/files/gmnisrv.in > create mode 100644 net/gmnisrv/files/patch-Makefile > create mode 100644 net/gmnisrv/files/patch-config.ini > create mode 100644 net/gmnisrv/files/patch-config.sh > create mode 100644 net/gmnisrv/files/patch-doc_gmnisrv.scd > create mode 100644 net/gmnisrv/files/patch-include_config.h > create mode 100644 net/gmnisrv/files/patch-include_log.h > create mode 100644 net/gmnisrv/files/patch-src_regexp.c > create mode 100644 net/gmnisrv/pkg-descr > create mode 100644 net/gmnisrv/pkg-message > >diff --git a/GIDs b/GIDs >index b4c3935f352a..a529cbefbe3c 100644 >--- a/GIDs >+++ b/GIDs >@@ -590,7 +590,7 @@ monkeysphere:*:641: > # free: 647 > # free: 648 > # free: 649 >-# free: 650 >+gmni:*:650: > # free: 651 > # free: 652 > # free: 653 >diff --git a/UIDs b/UIDs >index 30e6b1063517..b95f3157ab47 100644 >--- a/UIDs >+++ b/UIDs >@@ -595,7 +595,7 @@ monkeysphere:*:641:641::0:0:Monkeysphere User:/var/monkeysphere:/usr/local/bin/b > # free: 647 > # free: 648 > # free: 649 >-# free: 650 >+gmni:*:650:650::0:0:Gemini Owner:/nonexistent:/usr/sbin/nologin > # free: 651 > # free: 652 > # free: 653 >diff --git a/net/gmnisrv/Makefile b/net/gmnisrv/Makefile >new file mode 100644 >index 000000000000..266fb44bd2c7 >--- /dev/null >+++ b/net/gmnisrv/Makefile >@@ -0,0 +1,35 @@ >+PORTNAME= gmnisrv >+DISTVERSION= 1.0 >+CATEGORIES= net >+MASTER_SITES= https://git.sr.ht/~sircmpwn/${PORTNAME}/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/ >+ >+MAINTAINER= corey@electrickite.org >+COMMENT= Simple Gemini protocol server >+ >+LICENSE= GPLv3 >+LICENSE_FILE= ${WRKSRC}/COPYING >+ >+BUILD_DEPENDS+= scdoc:textproc/scdoc >+RUN_DEPENDS+= ${LOCALBASE}/etc/mime.types:misc/mime-support >+ >+USES= ssl:build,run >+USE_RC_SUBR= ${PORTNAME} >+CFLAGS+= -I${OPENSSLINC} >+LDFLAGS+= -L${OPENSSLLIB} -lssl -lcrypto >+HAS_CONFIGURE= yes >+CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc --mandir=${PREFIX}/man >+ >+GMNISRV_USER?= gmni >+GMNISRV_GROUP?= gmni >+USERS= ${GMNISRV_USER} >+GROUPS= ${GMNISRV_GROUP} >+ >+PLIST_FILES= bin/${PORTNAME} \ >+ share/${PORTNAME}/${PORTNAME}.ini \ >+ man/man1/${PORTNAME}.1.gz \ >+ man/man5/${PORTNAME}.ini.5.gz >+ >+post-install: >+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} >+ >+.include <bsd.port.mk> >diff --git a/net/gmnisrv/distinfo b/net/gmnisrv/distinfo >new file mode 100644 >index 000000000000..671034e85a75 >--- /dev/null >+++ b/net/gmnisrv/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1644164349 >+SHA256 (gmnisrv-1.0.tar.gz) = b1257d6835aff453d6a321a1c6e50c485703692530e4bcfe35455d7aac45f3d5 >+SIZE (gmnisrv-1.0.tar.gz) = 74031 >diff --git a/net/gmnisrv/files/gmnisrv.in b/net/gmnisrv/files/gmnisrv.in >new file mode 100644 >index 000000000000..b670e24d4e35 >--- /dev/null >+++ b/net/gmnisrv/files/gmnisrv.in >@@ -0,0 +1,45 @@ >+#!/bin/sh >+ >+# $FreeBSD$ >+# >+# PROVIDE: gmnisrv >+# REQUIRE: LOGIN >+# KEYWORD: shutdown >+# >+# Add these lines to /etc/rc.conf.local or /etc/rc.conf >+# to enable this service: >+# >+# gmnisrv_enable (bool): Set to "NO" by default. >+# Set it to "YES" to enable gmnisrv. >+# gmnisrv_config (str): Default "%%PREFIX%%/etc/gmnisrv.ini" >+# Set it to the full path to the config file >+# gmnisrv_user (str): Default "gmni" >+# The gmnisrv process user >+# >+ >+. /etc/rc.subr >+ >+name=gmnisrv >+desc="Gemini protocol server" >+rcvar=gmnisrv_enable >+ >+load_rc_config $name >+ >+: ${gmnisrv_enable:=NO} >+: ${gmnisrv_config:="%%PREFIX%%/etc/${name}.ini"} >+: ${gmnisrv_user:=gmni} >+ >+command="%%PREFIX%%/bin/${name}" >+command_args="-C ${gmnisrv_config}" >+pidfile="/var/run/${name}.pid" >+required_files="${gmnisrv_config}" >+ >+start_cmd="${name}_start" >+ >+gmnisrv_start() >+{ >+ check_startmsgs && echo "Starting ${name}." >+ /usr/sbin/daemon -S -s info -l daemon -T $name -u "${gmnisrv_user}" -p "${pidfile}" $command $rc_flags $command_args >+} >+ >+run_rc_command "$1" >diff --git a/net/gmnisrv/files/patch-Makefile b/net/gmnisrv/files/patch-Makefile >new file mode 100644 >index 000000000000..04e2d9e45781 >--- /dev/null >+++ b/net/gmnisrv/files/patch-Makefile >@@ -0,0 +1,45 @@ >+--- Makefile.orig 2022-02-10 00:16:33 UTC >++++ Makefile >+@@ -5,8 +5,7 @@ include $(OUTDIR)/config.mk >+ include $(OUTDIR)/cppcache >+ >+ gmnisrv: $(gmnisrv_objects) >+- @printf 'CCLD\t$@\n' >+- @$(CC) $(LDFLAGS) -o $@ $(gmnisrv_objects) $(LIBS) >++ $(CC) $(LDFLAGS) -o $@ $(gmnisrv_objects) $(LIBS) >+ >+ doc/gmnisrv.1: doc/gmnisrv.scd >+ doc/gmnisrvini.5: doc/gmnisrvini.scd >+@@ -14,27 +13,24 @@ doc/gmnisrvini.5: doc/gmnisrvini.scd >+ .SUFFIXES: .c .o .scd .1 .5 >+ >+ .c.o: >+- @printf 'CC\t$@\n' >+ @touch $(OUTDIR)/cppcache >+ @grep $< $(OUTDIR)/cppcache >/dev/null || \ >+ $(CPP) $(CFLAGS) -MM -MT $@ $< >> $(OUTDIR)/cppcache >+- @$(CC) -c $(CFLAGS) -o $@ $< >++ $(CC) -c $(CFLAGS) -o $@ $< >+ >+ .scd.1: >+- @printf 'SCDOC\t$@\n' >+- @$(SCDOC) < $< > $@ >++ $(SCDOC) < $< > $@ >+ >+ .scd.5: >+- @printf 'SCDOC\t$@\n' >+- @$(SCDOC) < $< > $@ >++ $(SCDOC) < $< > $@ >+ >+ docs: doc/gmnisrv.1 doc/gmnisrvini.5 >+ >+ clean: >+- @rm -f gmnisrv $(gmnisrv_objects) doc/*.1 doc/*.5 >++ rm -f gmnisrv $(gmnisrv_objects) doc/*.1 doc/*.5 >+ >+ distclean: clean >+- @rm -rf "$(OUTDIR)" >++ rm -rf "$(OUTDIR)" >+ >+ install: all >+ mkdir -p \ >diff --git a/net/gmnisrv/files/patch-config.ini b/net/gmnisrv/files/patch-config.ini >new file mode 100644 >index 000000000000..4f4487dee866 >--- /dev/null >+++ b/net/gmnisrv/files/patch-config.ini >@@ -0,0 +1,15 @@ >+--- config.ini.orig 2022-02-08 02:59:38 UTC >++++ config.ini >+@@ -3,10 +3,10 @@ listen=0.0.0.0:1965 [::]:1965 >+ >+ [:tls] >+ # Path to store certificates on disk >+-store=/var/lib/gemini/certs >++store=/var/db/gemini/certs >+ >+ # Optional details for new certificates >+ organization=gmnisrv user >+ >+ [localhost] >+-root=/srv/gemini >++root=/usr/local/gemini >diff --git a/net/gmnisrv/files/patch-config.sh b/net/gmnisrv/files/patch-config.sh >new file mode 100644 >index 000000000000..aa83860ea9b2 >--- /dev/null >+++ b/net/gmnisrv/files/patch-config.sh >@@ -0,0 +1,21 @@ >+--- config.sh.orig 2022-02-08 04:54:27 UTC >++++ config.sh >+@@ -114,7 +114,7 @@ docs() { true; } >+ run_configure() { >+ mkdir -p $outdir >+ >+- for flag in -g -std=c11 -D_XOPEN_SOURCE=700 -Wall -Wextra -Werror -pedantic >++ for flag in -g -std=c11 -Wall -Wextra -Werror -pedantic >+ do >+ printf "Checking for %s... " "$flag" >+ if test_cflags "$flag" >+@@ -124,9 +124,6 @@ run_configure() { >+ echo no >+ fi >+ done >+- >+- find_library OpenSSL libssl >+- find_library OpenSSL libcrypto >+ >+ printf "Checking for scdoc... " >+ if scdoc -v >/dev/null 2>&1 >diff --git a/net/gmnisrv/files/patch-doc_gmnisrv.scd b/net/gmnisrv/files/patch-doc_gmnisrv.scd >new file mode 100644 >index 000000000000..32efbac19f91 >--- /dev/null >+++ b/net/gmnisrv/files/patch-doc_gmnisrv.scd >@@ -0,0 +1,11 @@ >+--- doc/gmnisrv.scd.orig 2022-02-08 03:05:00 UTC >++++ doc/gmnisrv.scd >+@@ -11,7 +11,7 @@ gmnisrv - serve clients over the gemini protocol >+ # DESCRIPTION >+ >+ *gmnisrv* is a daemon which serves network clients over the gemini protocol. It >+-requires a config file; by default this shall be read from /etc/gmnisrv.ini >++requires a config file; by default this shall be read from /usr/local/etc/gmnisrv.ini >+ unless the installation was configured with a different SYSCONFDIR or the user >+ provides the -C flag. >+ >diff --git a/net/gmnisrv/files/patch-include_config.h b/net/gmnisrv/files/patch-include_config.h >new file mode 100644 >index 000000000000..db66daa55792 >--- /dev/null >+++ b/net/gmnisrv/files/patch-include_config.h >@@ -0,0 +1,11 @@ >+--- include/config.h.orig 2022-02-06 16:30:31 UTC >++++ include/config.h >+@@ -1,6 +1,8 @@ >+ #ifndef GMNISRV_CONFIG >+ #define GMNISRV_CONFIG >+ #include <arpa/inet.h> >++#include <netinet/in.h> >++#include <sys/socket.h> >+ #include <openssl/x509.h> >+ #include <stdbool.h> >+ #include "regexp.h" >diff --git a/net/gmnisrv/files/patch-include_log.h b/net/gmnisrv/files/patch-include_log.h >new file mode 100644 >index 000000000000..087ad563e378 >--- /dev/null >+++ b/net/gmnisrv/files/patch-include_log.h >@@ -0,0 +1,10 @@ >+--- include/log.h.orig 2022-02-06 16:31:22 UTC >++++ include/log.h >+@@ -1,6 +1,7 @@ >+ #ifndef GMNISRV_LOG >+ #define GMNISRV_LOG >+ #include <sys/socket.h> >++#include <netinet/in.h> >+ >+ void server_log(const char *fmt, ...); >+ void client_log(struct sockaddr *addr, const char *fmt, ...); >diff --git a/net/gmnisrv/files/patch-src_regexp.c b/net/gmnisrv/files/patch-src_regexp.c >new file mode 100644 >index 000000000000..f7a13340c756 >--- /dev/null >+++ b/net/gmnisrv/files/patch-src_regexp.c >@@ -0,0 +1,10 @@ >+--- src/regexp.c.orig 2022-02-06 16:32:03 UTC >++++ src/regexp.c >+@@ -23,7 +23,6 @@ >+ * THE SOFTWARE. >+ */ >+ #include <assert.h> >+-#include <alloca.h> >+ #include <inttypes.h> >+ #include <stdarg.h> >+ #include <stdbool.h> >diff --git a/net/gmnisrv/pkg-descr b/net/gmnisrv/pkg-descr >new file mode 100644 >index 000000000000..9cae4aa96c91 >--- /dev/null >+++ b/net/gmnisrv/pkg-descr >@@ -0,0 +1,3 @@ >+gmnisrv is a simple Gemini protocol server. >+ >+WWW: https://git.sr.ht/~sircmpwn/gmnisrv/ >diff --git a/net/gmnisrv/pkg-message b/net/gmnisrv/pkg-message >new file mode 100644 >index 000000000000..6dde774d8870 >--- /dev/null >+++ b/net/gmnisrv/pkg-message >@@ -0,0 +1,11 @@ >+[ >+{ type: install >+ message: <<EOM >+ gmnisrv requires a configuration file to be created, >+ by default at: /usr/local/etc/gmnisrv.ini >+ >+ An example configuration file can be found at: >+ /usr/local/share/gmnisrv/gmnisrv.ini >+EOM >+} >+] >-- >2.34.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 261849
:
231697
| 231727