git: cb445908967a - main - irc/unreal: Unreal - the next generation ircd

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Sun, 24 Sep 2023 18:58:54 UTC
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cb445908967aa10f3e7b36d681eb0f5e49650c4c

commit cb445908967aa10f3e7b36d681eb0f5e49650c4c
Author:     JR Aquino <root@PortBuilder.gcrxwe3ol2huxec0eompel4rsh.cx.internal.cloudapp.net>
AuthorDate: 2023-09-22 20:40:10 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-09-24 18:57:14 +0000

    irc/unreal: Unreal - the next generation ircd
    
    A highly advanced IRCd with a strong focus on modularity and security.
    Other key features include: full IRCv3 support, SSL/TLS, cloaking,
    advanced anti-flood and anti-spam systems, GeoIP, remote includes,
    and lots of other features.
    
    WWW: https://www.unrealircd.org/
    
    PR:             273461
---
 MOVED                                              |   1 -
 irc/Makefile                                       |   1 +
 irc/unreal/Makefile                                | 100 ++++++++
 irc/unreal/distinfo                                |   3 +
 .../files/patch-doc_conf_modules.default.conf      |  16 ++
 irc/unreal/files/unrealircd.in                     |  38 +++
 irc/unreal/pkg-descr                               |   6 +
 irc/unreal/pkg-plist                               | 281 +++++++++++++++++++++
 8 files changed, 445 insertions(+), 1 deletion(-)

diff --git a/MOVED b/MOVED
index b425875f54dc..97933f10f524 100644
--- a/MOVED
+++ b/MOVED
@@ -7023,7 +7023,6 @@ x11/i3status|deskutils/i3status|2022-07-01|move desktop utility to its right cat
 x11/xcbautolock|deskutils/xcbautolock|2022-07-01|move desktop utility to its right category
 x11/havoc|deskutils/havoc|2022-07-01|move desktop utility to its right category
 devel/go-glide||2022-07-01|Has expired: use go mod instead of glide
-irc/unreal||2022-07-01|Has expired: Very outdated, listed as end of life in 2016 and has known security issues
 sysutils/go-btfs||2022-07-01|Has expired: Requires go 1.15
 sysutils/pesign||2022-07-01|Has expired: Unmaintaned since 2016, very much out of date, does not build with GCC 11 (PR #263544)
 sysutils/cfengine316||2022-07-06|Has expired: Expire one year after cfengine 3.18.0 released
diff --git a/irc/Makefile b/irc/Makefile
index 779accf75336..4f2f2cd32da3 100644
--- a/irc/Makefile
+++ b/irc/Makefile
@@ -105,6 +105,7 @@
     SUBDIR += thales
     SUBDIR += tircproxy
     SUBDIR += undernet-ircu
+    SUBDIR += unreal
     SUBDIR += weechat
     SUBDIR += weechat-otr
     SUBDIR += znc
diff --git a/irc/unreal/Makefile b/irc/unreal/Makefile
new file mode 100644
index 000000000000..267f47b47bfb
--- /dev/null
+++ b/irc/unreal/Makefile
@@ -0,0 +1,100 @@
+PORTNAME=	unreal
+DISTVERSION=	6.1.1.1
+CATEGORIES=	irc
+MASTER_SITES=	https://www.unrealircd.org/downloads/
+DISTNAME=	${PORTNAME}ircd-${PORTVERSION}
+
+MAINTAINER=	tanawts@gmail.com
+COMMENT=	Unreal - the next generation ircd
+WWW=		https://www.unrealircd.org/
+
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libcares.so:dns/c-ares \
+		libpcre2-8.so:devel/pcre2 \
+		libargon2.so:security/libargon2 \
+		libsodium.so:security/libsodium \
+		libjansson.so:devel/jansson \
+		libmaxminddb.so:net/libmaxminddb
+RUN_DEPENDS=	${LOCALBASE}/bin/geoipupdate:net/geoipupdate
+
+USES=		pkgconfig cpe gmake localbase ssl
+MODULESDIR=	${PREFIX}/lib/${PORTNAME}
+MODULESSUBDIR=	chanmodes extbans rpc usermodes
+CONFIGDIR=	${PREFIX}/etc/${PORTNAME}
+RUNDIR=		/var/run/ircd
+LOGDIR=		/var/log/ircd
+CACHEDIR=	/var/cache/ircd
+_TMPDIR=	/tmp
+
+HAS_CONFIGURE=	yes
+USE_RC_SUBR=	unrealircd
+
+USERS=		ircd
+GROUPS=		ircd
+CPE_VENDOR=	unrealircd
+CPE_PRODUCT=	unrealircd
+
+SUB_LIST+=	RUNDIR=${RUNDIR}
+SUB_LIST+=	USERS=${USERS}
+SUB_LIST+=	GROUPS=${GROUPS}
+
+CONFIGURE_ARGS=	--with-nick-history=2000 \
+		--with-bindir=${LOCALBASE}/bin \
+		--with-scriptdir=${DATADIR} \
+		--with-confdir=${CONFIGDIR} \
+		--with-builddir=${WRKSRC} \
+		--with-modulesdir=${MODULESDIR} \
+		--with-logdir=${LOGDIR} \
+		--with-cachedir=${CACHEDIR} \
+		--with-tmpdir=${_TMPDIR} \
+		--with-datadir=${DATADIR}/data \
+		--with-docdir=${DATADIR}/doc \
+		--with-pidfile=${RUNDIR}/ircd.pid \
+		--with-controlfile=${RUNDIR}/ircd.ctl \
+		--with-permissions=0600 \
+		--with-system-cares \
+		--enable-dynamic-linking \
+		--enable-libmaxminddb=yes \
+		--enable-ssl
+
+OPTIONS_DEFINE=	DOCS
+
+PORTDOCS=	${DOCS:T}
+DOCS=		Donation Authors coding-guidelines \
+		tao.of.irc translations.txt \
+		technical/005.txt technical/base64.txt \
+		technical/serverprotocol.txt
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/src/ircd ${STAGEDIR}${PREFIX}/libexec/ircd
+	${MKDIR} ${STAGEDIR}${CACHEDIR}
+	${MKDIR} ${STAGEDIR}${CONFIGDIR}
+	${MKDIR} ${STAGEDIR}${CONFIGDIR}/aliases
+	${MKDIR} ${STAGEDIR}${CONFIGDIR}/examples
+	${MKDIR} ${STAGEDIR}${CONFIGDIR}/help
+	${MKDIR} ${STAGEDIR}${CONFIGDIR}/tls
+	${MKDIR} ${STAGEDIR}${LOGDIR}
+	${MKDIR} ${STAGEDIR}${MODULESDIR}
+	${MKDIR} ${STAGEDIR}${MODULESDIR}/chanmodes
+	${MKDIR} ${STAGEDIR}${MODULESDIR}/extbans
+	${MKDIR} ${STAGEDIR}${MODULESDIR}/rpc
+	${MKDIR} ${STAGEDIR}${MODULESDIR}/usermodes
+	${MKDIR} ${STAGEDIR}${RUNDIR}
+	${TOUCH} ${STAGEDIR}${CONFIGDIR}/ircd.motd.sample
+	${TOUCH} ${STAGEDIR}${CONFIGDIR}/ircd.rules.sample
+	(cd ${WRKSRC}/doc/conf && ${COPYTREE_SHARE} . ${STAGEDIR}${CONFIGDIR})
+	${INSTALL_DATA} ${WRKSRC}/doc/conf/examples/example.conf ${STAGEDIR}${CONFIGDIR}/unrealircd.conf.sample
+	${INSTALL_LIB} ${WRKSRC}/src/modules/*.so ${STAGEDIR}${MODULESDIR}
+.for subdir in ${MODULESSUBDIR}
+	${INSTALL_LIB} ${WRKSRC}/src/modules/${subdir}/*.so ${STAGEDIR}${MODULESDIR}/${subdir}/
+.endfor
+
+do-install-DOCS-on:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for file in ${DOCS}
+	${INSTALL_DATA} ${WRKSRC}/doc/${file} ${STAGEDIR}${DOCSDIR}
+.endfor
+
+.include <bsd.port.mk>
diff --git a/irc/unreal/distinfo b/irc/unreal/distinfo
new file mode 100644
index 000000000000..ea31959465d2
--- /dev/null
+++ b/irc/unreal/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1473082474
+SHA256 (unrealircd-6.1.1.1.tar.gz) = 0c8e4164f499f0f6a72ed6032acb034bd7e9bd10308f556a0d919a00c2eeb334
+SIZE (unrealircd-6.1.1.1.tar.gz) = 10341432
diff --git a/irc/unreal/files/patch-doc_conf_modules.default.conf b/irc/unreal/files/patch-doc_conf_modules.default.conf
new file mode 100644
index 000000000000..86cef49700f2
--- /dev/null
+++ b/irc/unreal/files/patch-doc_conf_modules.default.conf
@@ -0,0 +1,16 @@
+--- doc/conf/modules.default.conf.orig	2023-09-21 00:26:43 UTC
++++ doc/conf/modules.default.conf
+@@ -293,13 +293,3 @@ loadmodule "targetfloodprot"; /* set::anti-flood::targ
+ loadmodule "watch-backend"; /* used by watch and other modules */
+ loadmodule "geoip_base"; /* needed for ALL geoip functions */
+ loadmodule "websocket_common"; /* helper functions for websocket (internal) */
+-
+-loadmodule "geoip_classic";
+-@if module-loaded("geoip_classic")
+-set {
+-	geoip-classic {
+-		ipv4-database "https://www.unrealircd.org/files/geo/classic/GeoIP.dat" { url-refresh 14d; }
+-		ipv6-database "https://www.unrealircd.org/files/geo/classic/GeoIPv6.dat" { url-refresh 14d; }
+-	}
+-}
+-@endif
diff --git a/irc/unreal/files/unrealircd.in b/irc/unreal/files/unrealircd.in
new file mode 100644
index 000000000000..a89a6c3c81ee
--- /dev/null
+++ b/irc/unreal/files/unrealircd.in
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# PROVIDE: unrealircd
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable Unreal IRCd:
+# unrealircd_enable (bool):	Set to "NO" by default.
+#				Set it to "YES" to enable Unreal IRCd
+#
+
+. /etc/rc.subr
+
+name=unrealircd
+rcvar=unrealircd_enable
+load_rc_config $name
+
+: ${unrealircd_enable=NO}
+: ${unrealircd_pidfile="/var/run/ircd/ircd.pid"}
+: ${unrealircd_user="ircd"}
+
+command=%%PREFIX%%/libexec/ircd
+pidfile=%%RUNDIR%%/ircd.pid
+start_precmd=unreal_prestart
+
+required_files="%%PREFIX%%/etc/unreal/unrealircd.conf"
+
+unreal_prestart()
+{
+	if [ ! -d ${pidfile%/*} ]; then
+		install -d -o %%USERS%% -g %%GROUPS%% ${pidfile%/*}
+		install -d -o %%USERS%% -g %%GROUPS%% ${pidfile%/*}/tmp
+	fi
+}
+
+run_rc_command "$1"
diff --git a/irc/unreal/pkg-descr b/irc/unreal/pkg-descr
new file mode 100644
index 000000000000..1e80970e1a95
--- /dev/null
+++ b/irc/unreal/pkg-descr
@@ -0,0 +1,6 @@
+Unreal IRCd - the next generation ircd
+
+A highly advanced IRCd with a strong focus on modularity and security.
+Other key features include: full IRCv3 support, SSL/TLS, cloaking,
+advanced anti-flood and anti-spam systems, GeoIP, remote includes,
+and lots of other features.
diff --git a/irc/unreal/pkg-plist b/irc/unreal/pkg-plist
new file mode 100644
index 000000000000..dc9cd2d50550
--- /dev/null
+++ b/irc/unreal/pkg-plist
@@ -0,0 +1,281 @@
+@owner ircd
+@group ircd
+%%ETCDIR%%/aliases/aliases.conf
+%%ETCDIR%%/aliases/anope.conf
+%%ETCDIR%%/aliases/atheme.conf
+%%ETCDIR%%/aliases/auspice.conf
+%%ETCDIR%%/aliases/cygnus.conf
+%%ETCDIR%%/aliases/epona.conf
+%%ETCDIR%%/aliases/generic.conf
+%%ETCDIR%%/aliases/genericstats.conf
+%%ETCDIR%%/aliases/ircservices.conf
+%%ETCDIR%%/aliases/operstats.conf
+%%ETCDIR%%/badwords.conf
+@sample %%ETCDIR%%/unrealircd.conf.sample
+%%ETCDIR%%/dccallow.conf
+%%ETCDIR%%/examples/example.conf
+%%ETCDIR%%/examples/example.es.conf
+%%ETCDIR%%/examples/example.fr.conf
+%%ETCDIR%%/examples/example.tr.conf
+%%ETCDIR%%/help/help.conf
+%%ETCDIR%%/help/help.de.conf
+%%ETCDIR%%/help/help.es.conf
+%%ETCDIR%%/help/help.fr.conf
+%%ETCDIR%%/help/help.it.conf
+%%ETCDIR%%/help/help.nl.conf
+%%ETCDIR%%/help/help.pl.conf
+%%ETCDIR%%/help/help.ru.conf
+%%ETCDIR%%/help/help.tr.conf
+@sample %%ETCDIR%%/ircd.motd.sample
+@sample %%ETCDIR%%/ircd.rules.sample
+%%ETCDIR%%/modules.default.conf
+%%ETCDIR%%/modules.optional.conf
+%%ETCDIR%%/modules.sources.list
+%%ETCDIR%%/operclass.default.conf
+%%ETCDIR%%/rpc.modules.default.conf
+%%ETCDIR%%/snomasks.default.conf
+%%ETCDIR%%/spamfilter.conf
+%%ETCDIR%%/tls/curl-ca-bundle.crt
+lib/unreal/account-notify.so
+lib/unreal/account-tag.so
+lib/unreal/addmotd.so
+lib/unreal/addomotd.so
+lib/unreal/admin.so
+lib/unreal/antimixedutf8.so
+lib/unreal/antirandom.so
+lib/unreal/authprompt.so
+lib/unreal/away.so
+lib/unreal/batch.so
+lib/unreal/blacklist.so
+lib/unreal/bot-tag.so
+lib/unreal/botmotd.so
+lib/unreal/cap.so
+lib/unreal/certfp.so
+lib/unreal/chanmodes/censor.so
+lib/unreal/chanmodes/chanadmin.so
+lib/unreal/chanmodes/chanop.so
+lib/unreal/chanmodes/chanowner.so
+lib/unreal/chanmodes/delayjoin.so
+lib/unreal/chanmodes/floodprot.so
+lib/unreal/chanmodes/halfop.so
+lib/unreal/chanmodes/history.so
+lib/unreal/chanmodes/inviteonly.so
+lib/unreal/chanmodes/isregistered.so
+lib/unreal/chanmodes/issecure.so
+lib/unreal/chanmodes/key.so
+lib/unreal/chanmodes/limit.so
+lib/unreal/chanmodes/link.so
+lib/unreal/chanmodes/moderated.so
+lib/unreal/chanmodes/nocolor.so
+lib/unreal/chanmodes/noctcp.so
+lib/unreal/chanmodes/noexternalmsgs.so
+lib/unreal/chanmodes/noinvite.so
+lib/unreal/chanmodes/nokick.so
+lib/unreal/chanmodes/noknock.so
+lib/unreal/chanmodes/nonickchange.so
+lib/unreal/chanmodes/nonotice.so
+lib/unreal/chanmodes/operonly.so
+lib/unreal/chanmodes/permanent.so
+lib/unreal/chanmodes/private.so
+lib/unreal/chanmodes/regonly.so
+lib/unreal/chanmodes/regonlyspeak.so
+lib/unreal/chanmodes/secret.so
+lib/unreal/chanmodes/secureonly.so
+lib/unreal/chanmodes/stripcolor.so
+lib/unreal/chanmodes/topiclimit.so
+lib/unreal/chanmodes/voice.so
+lib/unreal/channel-context.so
+lib/unreal/channeldb.so
+lib/unreal/charsys.so
+lib/unreal/chathistory.so
+lib/unreal/chghost.so
+lib/unreal/chgident.so
+lib/unreal/chgname.so
+lib/unreal/clienttagdeny.so
+lib/unreal/cloak_md5.so
+lib/unreal/cloak_none.so
+lib/unreal/cloak_sha256.so
+lib/unreal/close.so
+lib/unreal/connect-flood.so
+lib/unreal/connect.so
+lib/unreal/connthrottle.so
+lib/unreal/creationtime.so
+lib/unreal/cycle.so
+lib/unreal/dccallow.so
+lib/unreal/dccdeny.so
+lib/unreal/echo-message.so
+lib/unreal/eos.so
+lib/unreal/extbans/account.so
+lib/unreal/extbans/certfp.so
+lib/unreal/extbans/country.so
+lib/unreal/extbans/flood.so
+lib/unreal/extbans/inchannel.so
+lib/unreal/extbans/join.so
+lib/unreal/extbans/msgbypass.so
+lib/unreal/extbans/nickchange.so
+lib/unreal/extbans/operclass.so
+lib/unreal/extbans/partmsg.so
+lib/unreal/extbans/quiet.so
+lib/unreal/extbans/realname.so
+lib/unreal/extbans/securitygroup.so
+lib/unreal/extbans/textban.so
+lib/unreal/extbans/timedban.so
+lib/unreal/extended-monitor.so
+lib/unreal/extjwt.so
+lib/unreal/geoip-tag.so
+lib/unreal/geoip_base.so
+lib/unreal/geoip_csv.so
+lib/unreal/geoip_maxmind.so
+lib/unreal/globops.so
+lib/unreal/help.so
+lib/unreal/hideserver.so
+lib/unreal/history.so
+lib/unreal/history_backend_mem.so
+lib/unreal/history_backend_null.so
+lib/unreal/ident_lookup.so
+lib/unreal/invite.so
+lib/unreal/ircops.so
+lib/unreal/ison.so
+lib/unreal/issued-by-tag.so
+lib/unreal/join.so
+lib/unreal/jointhrottle.so
+lib/unreal/json-log-tag.so
+lib/unreal/jumpserver.so
+lib/unreal/kick.so
+lib/unreal/kill.so
+lib/unreal/knock.so
+lib/unreal/labeled-response.so
+lib/unreal/lag.so
+lib/unreal/link-security.so
+lib/unreal/links.so
+lib/unreal/list.so
+lib/unreal/locops.so
+lib/unreal/lusers.so
+lib/unreal/map.so
+lib/unreal/max-unknown-connections-per-ip.so
+lib/unreal/md.so
+lib/unreal/message-ids.so
+lib/unreal/message-tags.so
+lib/unreal/message.so
+lib/unreal/mkpasswd.so
+lib/unreal/mode.so
+lib/unreal/monitor.so
+lib/unreal/motd.so
+lib/unreal/names.so
+lib/unreal/netinfo.so
+lib/unreal/nick.so
+lib/unreal/nocodes.so
+lib/unreal/oper.so
+lib/unreal/operinfo.so
+lib/unreal/opermotd.so
+lib/unreal/part.so
+lib/unreal/pass.so
+lib/unreal/pingpong.so
+lib/unreal/plaintext-policy.so
+lib/unreal/protoctl.so
+lib/unreal/quit.so
+lib/unreal/real-quit-reason.so
+lib/unreal/reply-tag.so
+lib/unreal/reputation.so
+lib/unreal/require-module.so
+lib/unreal/restrict-commands.so
+lib/unreal/rmtkl.so
+lib/unreal/rpc/channel.so
+lib/unreal/rpc/log.so
+lib/unreal/rpc/name_ban.so
+lib/unreal/rpc/rpc.so
+lib/unreal/rpc/server.so
+lib/unreal/rpc/server_ban.so
+lib/unreal/rpc/server_ban_exception.so
+lib/unreal/rpc/spamfilter.so
+lib/unreal/rpc/stats.so
+lib/unreal/rpc/user.so
+lib/unreal/rpc/whowas.so
+lib/unreal/rules.so
+lib/unreal/sajoin.so
+lib/unreal/samode.so
+lib/unreal/sapart.so
+lib/unreal/sasl.so
+lib/unreal/sdesc.so
+lib/unreal/sendsno.so
+lib/unreal/sendumode.so
+lib/unreal/server-time.so
+lib/unreal/server.so
+lib/unreal/sethost.so
+lib/unreal/setident.so
+lib/unreal/setname.so
+lib/unreal/silence.so
+lib/unreal/sinfo.so
+lib/unreal/sjoin.so
+lib/unreal/slog.so
+lib/unreal/sqline.so
+lib/unreal/squit.so
+lib/unreal/sreply.so
+lib/unreal/staff.so
+lib/unreal/standard-replies.so
+lib/unreal/starttls.so
+lib/unreal/stats.so
+lib/unreal/sts.so
+lib/unreal/svsjoin.so
+lib/unreal/svskill.so
+lib/unreal/svslogin.so
+lib/unreal/svslusers.so
+lib/unreal/svsmode.so
+lib/unreal/svsmotd.so
+lib/unreal/svsnick.so
+lib/unreal/svsnline.so
+lib/unreal/svsnolag.so
+lib/unreal/svsnoop.so
+lib/unreal/svso.so
+lib/unreal/svspart.so
+lib/unreal/svssilence.so
+lib/unreal/svssno.so
+lib/unreal/svswatch.so
+lib/unreal/swhois.so
+lib/unreal/targetfloodprot.so
+lib/unreal/time.so
+lib/unreal/tkl.so
+lib/unreal/tkldb.so
+lib/unreal/tline.so
+lib/unreal/tls_antidos.so
+lib/unreal/tls_cipher.so
+lib/unreal/topic.so
+lib/unreal/trace.so
+lib/unreal/tsctl.so
+lib/unreal/typing-indicator.so
+lib/unreal/umode2.so
+lib/unreal/unreal_server_compat.so
+lib/unreal/unsqline.so
+lib/unreal/user.so
+lib/unreal/userhost-tag.so
+lib/unreal/userhost.so
+lib/unreal/userip-tag.so
+lib/unreal/userip.so
+lib/unreal/usermodes/bot.so
+lib/unreal/usermodes/censor.so
+lib/unreal/usermodes/noctcp.so
+lib/unreal/usermodes/nokick.so
+lib/unreal/usermodes/privacy.so
+lib/unreal/usermodes/privdeaf.so
+lib/unreal/usermodes/regonlymsg.so
+lib/unreal/usermodes/secureonlymsg.so
+lib/unreal/usermodes/servicebot.so
+lib/unreal/usermodes/showwhois.so
+lib/unreal/usermodes/wallops.so
+lib/unreal/vhost.so
+lib/unreal/watch-backend.so
+lib/unreal/watch.so
+lib/unreal/webirc.so
+lib/unreal/webredir.so
+lib/unreal/webserver.so
+lib/unreal/websocket.so
+lib/unreal/websocket_common.so
+lib/unreal/who_old.so
+lib/unreal/whois.so
+lib/unreal/whowas.so
+lib/unreal/whowasdb.so
+lib/unreal/whox.so
+libexec/ircd
+@dir /var/cache/ircd
+@dir /var/log/ircd
+@dir /var/run/ircd