aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiva Mahadevan <me@svmhdvn.name>2024-08-21 16:57:50 +0000
committerVladimir Druzenko <vvd@FreeBSD.org>2024-08-21 17:07:49 +0000
commit5c11246a4716e4f841b348917f3be544ba22817f (patch)
tree6aa50056b4bd11ea2d97e33bed9f0e76603d041b
parentcac5bdd7332b0c5a49e45edb87d2a10ccd2799a2 (diff)
irc/ngircd: Update 26.1 → 27, change maintainership
Changelog: https://github.com/ngircd/ngircd/releases/tag/rel-27 Change maintainership: * all commits from 2017 are "maintainer timeout" or "portmgr blanket": https://cgit.freebsd.org/ports/log/irc/ngircd https://www.freshports.org/irc/ngircd/ * fgsch@lodoss.net - no user in bugzilla with this email Port changes: * Add a dedicated system user/group pair for better daemon permissions * Move PLIST files into pkg-plist for better conditional installation of files * Fix installation of documentation files to %%DOCSDIR%% * Put configuration file (and sample) into %%ETCDIR%% * Run a --configtest before starting daemon for sanity check * Replace PORTVERSION with DISTVERSION * Remove GNU_CONFIGURE_MANPREFIX * Sort options to make happy portclippy PR: 278919
-rw-r--r--GIDs2
-rw-r--r--UIDs2
-rw-r--r--irc/ngircd/Makefile42
-rw-r--r--irc/ngircd/distinfo6
-rw-r--r--irc/ngircd/files/ngircd.in16
-rw-r--r--irc/ngircd/pkg-plist27
6 files changed, 66 insertions, 29 deletions
diff --git a/GIDs b/GIDs
index eaf5b1588e14..aa63249122f3 100644
--- a/GIDs
+++ b/GIDs
@@ -286,7 +286,7 @@ openfire:*:342:
gunicorn:*:343:
snmpd:*:344:
_metronome:*:345:
-# free: 346
+ngircd:*:346:
eturnal:*:347:
# free: 348
# free: 349
diff --git a/UIDs b/UIDs
index 6c0b1db9a828..ebc717fa6fdb 100644
--- a/UIDs
+++ b/UIDs
@@ -291,7 +291,7 @@ openfire:*:342:342::0:0:Openfire IM Daemon:/nonexistent:/usr/sbin/nologin
gunicorn:*:343:343::0:0:Gunicorn Daemon:/nonexistent:/usr/sbin/nologin
snmpd:*:344:344::0:0:Net-SNMP Daemon:/nonexistent:/usr/sbin/nologin
_metronome:*:345:345::0:0:Metronome Daemon:/nonexistent:/usr/sbin/nologin
-# free: 346
+ngircd:*:346:346::0:0:ngIRCd Daemon:/var/empty:/usr/sbin/nologin
eturnal:*:347:347::0:0:eturnal User:/var/spool/eturnal:/bin/sh
# free: 348
# free: 349
diff --git a/irc/ngircd/Makefile b/irc/ngircd/Makefile
index f91ddba82b95..66144eef320d 100644
--- a/irc/ngircd/Makefile
+++ b/irc/ngircd/Makefile
@@ -1,12 +1,12 @@
PORTNAME= ngircd
-PORTVERSION= 26.1
-PORTREVISION= 1
+DISTVERSION= 27
PORTEPOCH= 1
CATEGORIES= irc
MASTER_SITES= https://ngircd.barton.de/pub/ngircd/ \
- https://ngircd.mirror.3rz.de/pub/ngircd/
+ https://ngircd.mirror.3rz.de/pub/ngircd/ \
+ https://ngircd.sourceforge.io/pub/ngircd/
-MAINTAINER= fgsch@lodoss.net
+MAINTAINER= me@svmhdvn.name
COMMENT= Free open source daemon for Internet Relay Chat (IRC)
WWW= https://ngircd.barton.de/
@@ -14,50 +14,50 @@ LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
USES= cpe localbase:ldflags tar:xz
+CPE_VENDOR= barton
+CPE_VERSION= ${DISTVERSION:C/^([0-9]+)$/\1.0/}
+USE_RC_SUBR= ${PORTNAME}
GNU_CONFIGURE= yes
-GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
-USE_RC_SUBR= ngircd
+CONFIGURE_ARGS= --sysconfdir=${ETCDIR}
-CPE_VENDOR= barton
-CPE_VERSION= ${PORTVERSION:C/^([0-9]+)$/\1.0/}
+USERS= ${PORTNAME}
+GROUPS= ${PORTNAME}
-PORTDOCS= *
-PLIST_FILES= etc/ngircd.conf.sample \
- share/man/man5/ngircd.conf.5.gz \
- share/man/man8/ngircd.8.gz \
- sbin/ngircd
+PORTDOCS= doc/*
OPTIONS_DEFINE= DEBUG DOCS ICONV IDENT IPV6 IRCPLUS LIBWRAP PAM \
SNIFFER SYSLOG ZLIB
+OPTIONS_DEFAULT= ICONV IRCPLUS LIBWRAP OPENSSL PAM SYSLOG ZLIB
OPTIONS_RADIO= TLS
OPTIONS_RADIO_TLS= GNUTLS OPENSSL
-OPTIONS_DEFAULT= ICONV IRCPLUS LIBWRAP OPENSSL PAM SYSLOG ZLIB
+IDENT_DESC= IDENT (AUTH) protocol support
+IRCPLUS_DESC= IRC+ protocol
+SNIFFER_DESC= IRC traffic sniffer
DEBUG_CONFIGURE_ENABLE= debug
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
GNUTLS_CONFIGURE_WITH= gnutls
ICONV_USES= iconv
ICONV_CONFIGURE_WITH= iconv
-IDENT_DESC= IDENT (AUTH) protocol support
IDENT_LIB_DEPENDS= libident.so:security/libident
IDENT_CONFIGURE_WITH= ident
IPV6_CONFIGURE_ENABLE= ipv6
-IRCPLUS_DESC= IRC+ protocol
IRCPLUS_CONFIGURE_ENABLE= ircplus
LIBWRAP_CONFIGURE_WITH= tcp-wrappers
OPENSSL_USES= ssl
OPENSSL_CONFIGURE_WITH= openssl
PAM_CONFIGURE_WITH= pam
-SNIFFER_DESC= IRC traffic sniffer
SNIFFER_CONFIGURE_ENABLE= sniffer
SYSLOG_CONFIGURE_WITH= syslog
ZLIB_CONFIGURE_WITH= zlib
post-patch:
- @${REINPLACE_CMD} -e \
- '/LIBS/s|-liconv|${ICONV_LIB}|' ${WRKSRC}/configure
- @${REINPLACE_CMD} -e \
- '/toplevel/s| \.\./COPYING|| ; \
+ @${REINPLACE_CMD} -e '/LIBS/s|-liconv|${ICONV_LIB}|' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e '/toplevel/s| \.\./COPYING|| ; \
/INSTALL/s|.conf$$|.conf.sample|' ${WRKSRC}/doc/Makefile.in
+ @${REINPLACE_CMD} -e \
+ 's|;ServerGID = 65534$$|ServerGID = ${USERS:[0]}| ; \
+ s|;ServerUID = 65534$$|ServerUID = ${GROUPS:[0]}|' \
+ ${WRKSRC}/doc/sample-ngircd.conf.tmpl
.include <bsd.port.mk>
diff --git a/irc/ngircd/distinfo b/irc/ngircd/distinfo
index 0066fc72fff1..5871c2930ebf 100644
--- a/irc/ngircd/distinfo
+++ b/irc/ngircd/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1611437541
-SHA256 (ngircd-26.1.tar.xz) = 55c16fd26009f6fc6a007df4efac87a02e122f680612cda1ce26e17a18d86254
-SIZE (ngircd-26.1.tar.xz) = 375812
+TIMESTAMP = 1715382223
+SHA256 (ngircd-27.tar.xz) = 6897880319dd5e2e73c1c9019613509f88eb5b8daa5821a36fbca3d785c247b8
+SIZE (ngircd-27.tar.xz) = 377484
diff --git a/irc/ngircd/files/ngircd.in b/irc/ngircd/files/ngircd.in
index 8c125e84f445..a1b1f25f652f 100644
--- a/irc/ngircd/files/ngircd.in
+++ b/irc/ngircd/files/ngircd.in
@@ -2,13 +2,14 @@
# PROVIDE: ngircd
# REQUIRE: DAEMON
+# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to run ngircd:
#
# ngircd_enable (bool): Set it to "YES" to enable ngircd.
# Default is "NO".
# ngircd_conf (file): Set local of config file.
-# Default is "%%PREFIX%%/etc/ngircd.conf".
+# Default is "%%ETCDIR%%/ngircd.conf".
# ngircd_flags (flags): Set extra flags here. More options in ngircd(1)
# Default is empty "".
#
@@ -21,10 +22,19 @@ rcvar="ngircd_enable"
load_rc_config $name
: ${ngircd_enable="NO"}
-: ${ngircd_conf="%%PREFIX%%/etc/ngircd.conf"}
+: ${ngircd_conf="%%ETCDIR%%/ngircd.conf"}
required_files="${ngircd_conf}"
command=%%PREFIX%%/sbin/ngircd
-command_args="-f ${ngircd_conf}"
+command_args="--config ${ngircd_conf}"
+start_precmd=do_precmd
+
+do_precmd()
+{
+ if ! ${command} ${command_args} --configtest > /dev/null; then
+ echo "ERROR: '${ngircd_conf}' incorrectly configured" >&2
+ exit 78 # EX_CONFIG
+ fi
+}
run_rc_command "$1"
diff --git a/irc/ngircd/pkg-plist b/irc/ngircd/pkg-plist
new file mode 100644
index 000000000000..0a9820d0420b
--- /dev/null
+++ b/irc/ngircd/pkg-plist
@@ -0,0 +1,27 @@
+@sample %%ETCDIR%%/ngircd.conf.sample
+sbin/ngircd
+%%PORTDOCS%%%%DOCSDIR%%/AUTHORS.md
+%%PORTDOCS%%%%DOCSDIR%%/Bopm.txt
+%%PORTDOCS%%%%DOCSDIR%%/Capabilities.txt
+%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%%%DOCSDIR%%/Commands.txt
+%%PORTDOCS%%%%DOCSDIR%%/Container.md
+%%PORTDOCS%%%%DOCSDIR%%/Contributing.txt
+%%PORTDOCS%%%%DOCSDIR%%/FAQ.md
+%%PORTDOCS%%%%DOCSDIR%%/HowToRelease.txt
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL.md
+%%PORTDOCS%%%%DOCSDIR%%/Modes.txt
+%%PORTDOCS%%%%DOCSDIR%%/NEWS
+%%PORTDOCS%%%%DOCSDIR%%/PAM.txt
+%%PORTDOCS%%%%DOCSDIR%%/Platforms.txt
+%%PORTDOCS%%%%DOCSDIR%%/Protocol.txt
+%%PORTDOCS%%%%DOCSDIR%%/README-AUX.txt
+%%PORTDOCS%%%%DOCSDIR%%/README-BeOS.txt
+%%PORTDOCS%%%%DOCSDIR%%/README-Interix.txt
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%PORTDOCS%%%%DOCSDIR%%/RFC.txt
+%%PORTDOCS%%%%DOCSDIR%%/SSL.md
+%%PORTDOCS%%%%DOCSDIR%%/Services.txt
+%%PORTDOCS%%%%DOCSDIR%%/sample-ngircd.conf
+share/man/man5/ngircd.conf.5.gz
+share/man/man8/ngircd.8.gz