update net/gophernicus to 3.1.1

While here also rework the README:

 - suggest flags that produces the strictier pledge/unveil policy
 - other readability improvements by tracey@

build-tested and ok tracey@
This commit is contained in:
op 2022-01-23 15:00:37 +00:00
parent 594c71c0c4
commit d5e976a5fd
5 changed files with 34 additions and 46 deletions

View File

@ -1,11 +1,9 @@
# $OpenBSD: Makefile,v 1.20 2021/02/13 14:13:37 bcallah Exp $
# $OpenBSD: Makefile,v 1.21 2022/01/23 15:00:37 op Exp $
COMMENT= modern gopher server
REVISION = 0
GH_ACCOUNT= gophernicus
GH_PROJECT= gophernicus
GH_TAGNAME= v3.0.1
V= 3.1.1
DISTNAME= gophernicus-${V}
CATEGORIES= net
@ -14,19 +12,27 @@ HOMEPAGE= gopher://gophernicus.org/
# BSD
PERMIT_PACKAGE= Yes
# uses pledge
# uses unveil
WANTLIB += c
MASTER_SITES= https://github.com/gophernicus/gophernicus/releases/download/${V}/
FIX_EXTRACT_PERMISSIONS= yes
CONFIGURE_STYLE= simple
CONFIGURE_ARGS= --listener=inetd
MAKE_FLAGS= CC="${CC}" CFLAGS="${CFLAGS}"
NO_TEST= Yes
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/gophernicus ${PREFIX}/libexec/in.gophernicus
${INSTALL_PROGRAM} ${WRKSRC}/src/gophernicus ${PREFIX}/libexec/in.gophernicus
${INSTALL_MAN} ${WRKSRC}/gophernicus.8 ${PREFIX}/man/man8
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/gophernicus
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/gophernicus
cd ${WRKSRC} && ${INSTALL_DATA} LICENSE README INSTALL.md \
TODO README.Gophermap gophertag \
${PREFIX}/share/doc/gophernicus/
cd ${WRKSRC} && ${INSTALL_DATA} gophermap \
${PREFIX}/share/examples/gophernicus/
cd ${WRKSRC} && ${INSTALL_DATA} LICENSE README.md README.gophermap \
gophertag ${PREFIX}/share/doc/gophernicus/
${INSTALL_DATA} ${WRKSRC}/gophermap.sample \
${PREFIX}/share/examples/gophernicus/gophermap
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (gophernicus-3.0.1.tar.gz) = Fl/SrU+wY430FHFJa7rGgiA6FdBdX3RhiFhYFyE4vJY=
SIZE (gophernicus-3.0.1.tar.gz) = 52525
SHA256 (gophernicus-3.1.1.tar.gz) = p4ROSqLhry9C0Z5bM+vswcK0ehnUvVkeddKVdSVL97Q=
SIZE (gophernicus-3.1.1.tar.gz) = 55234

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-gophernicus_c,v 1.1 2021/02/13 14:13:37 bcallah Exp $
We don't have libwrap, and these cause issues with -fno-common
Index: gophernicus.c
--- gophernicus.c.orig
+++ gophernicus.c
@@ -30,8 +30,6 @@
* Libwrap needs these defined
*/
#ifdef HAVE_LIBWRAP
-int allow_severity = LOG_DEBUG;
-int deny_severity = LOG_ERR;
#endif

View File

@ -1,13 +1,12 @@
@comment $OpenBSD: PLIST,v 1.4 2020/02/06 18:06:10 edd Exp $
@comment $OpenBSD: PLIST,v 1.5 2022/01/23 15:00:37 op Exp $
@newgroup _gophernicus:704
@newuser _gophernicus:704:704:daemon:Gophernicus Gopher Server:/nonexistent:/sbin/nologin
@bin libexec/in.gophernicus
@man man/man8/gophernicus.8
share/doc/gophernicus/
share/doc/gophernicus/INSTALL.md
share/doc/gophernicus/LICENSE
share/doc/gophernicus/README
share/doc/gophernicus/README.Gophermap
share/doc/gophernicus/TODO
share/doc/gophernicus/README.gophermap
share/doc/gophernicus/README.md
share/doc/gophernicus/gophertag
@mode 755
@owner root

View File

@ -1,26 +1,25 @@
$OpenBSD: README,v 1.5 2018/09/04 12:46:17 espie Exp $
$OpenBSD: README,v 1.6 2022/01/23 15:00:37 op Exp $
+-----------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-----------------------------------------------------------------------
Setting up a gopher site
========================
After installing the gophernicus package, edit /etc/inetd.conf and add
the following, all on one line:
gopher stream tcp nowait _gophernicus ${TRUEPREFIX}/libexec/in.gophernicus in.gophernicus -h "hostname"
gopher stream tcp nowait _gophernicus ${TRUEPREFIX}/libexec/in.gophernicus in.gophernicus -h "hostname" -nm -nu -nx
Replace "hostname" with the system's hostname, this should be valid
and resolvable as it is used to construct links.
Replace "hostname" with the system's hostname. This should be valid
and resolvable, as it is used to construct links.
inetd(8) must be reloaded (or started). To enable it at boot, the
following line needs to be added to rc.conf.local(8):
inetd_flags=
inetd(8) must then be enabled and started:
By default Gophernicus serves documents from /var/gopher and will
# rcctl enable inetd
# rcctl start inetd
By default, Gophernicus serves documents from ${VARBASE}/gopher and will
only serve files which are world-readable; being readable by the
server process is not enough.
For more information, see ${TRUEPREFIX}/share/doc/gophernicus/README.
For more information, see gophernicus(8) and
${TRUEPREFIX}/share/doc/gophernicus/README.md.