Created attachment 244491 [details] Initial Patch for adding UnrealIRCD 6.1.1.1 to Ports Submitting new port for UnrealIRCD There was a previous port which was aged out, the current submission is a significant cleanup and brings the very newest version of the UnrealIRCD project. UnrealIRCd is an Open Source IRC Server, serving thousands of networks since 1999. It runs on Linux, OS X and Windows and is currently the most widely deployed IRCd with a market share of 38%. UnrealIRCd is a highly advanced IRCd with a strong focus on modularity and security. It uses an advanced and highly configurable configuration file. 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. We are also particularly proud on our extensive online documentation.
Created attachment 244524 [details] Initial Patch for adding UnrealIRCD 6.1.1.1 to Ports Re-attaching as unrealircd.diff per Porters Handbook
Thank you for your submission. TPlease remember to tick the "patch" box when attaching patches so they can be viewed on bugzilla. This port looks very good already. Here are some notes on your port: - we got rid of "Created by" lines a while ago. New such lines will not be accepted. Please remove the line from the Makefile. - check if you can use USES=localbase instead of manually adding localbase to LDFLAGS and CPPFLAGS - ${DATADIR} should not be used for writable data or temp files. Please place such data in accordance with hier(7). For example, using /var/cache for caching and /tmp or /var/tmp (or a subdirectory of these) for temporary files may be a good idea. - why do you install source files with shared objects into the lib/unreal? Is this intentional? - for config files, please check if you can use the @sample mechanism (cf. §8.3 Porter's Handbook). If you don't use it, package updates may kill the user's configuration changes. - upstream is no longer dead, is it? Is -fcommon still required? - ${MKDIR} should not fail if the directory already exists as it expands to mkdir -p. So || true is not required and could mask important errors. - please move the installation commands for docs into do-install-DOCS-on, so they are only executed when DOCS is enabled - there's no reason to put doc subdirectory into DOCSDIR. It is already clear that DOCSDIR holds documentation. Please check these issues and resubmit if appropriate.
Created attachment 244742 [details] Initial Patch for adding UnrealIRCD 6.1.1.1 to Ports Addressed comments from fuz@FreeBSD.org: - Got rid of "Created by" line - Corrected USES=localbase instead of localbase with LDFLAGS and CPPFLAGS - ${CACHEDIR} is now used instead of ${DATADIR} - No longer installing source files with shared objects into the lib/unreal. It was not intentional, thanks fuz! - Config files now using the @sample mechanism - Removed unnecessary -fcommon - Corrected ${MKDIR} unnecessary usage of || true - Moved the installation commands for docs into do-install-DOCS-on - Verified there is no installation of doc subdirectory into DOCSDIR.
Created attachment 244744 [details] Initial Patch for adding UnrealIRCD 6.1.1.1 to Ports ReUpload with corrected diff file
Thank you for the update. This looks better! Unfortunately I overlooked some issues in my previous round that neverthless need to be addressed: - REINPLACE_CMD is not for static replacements; only use it for replacements where the text you want to insert is variable. For static replacements, use patch files. For configure scripts, it is usually best to add a patch for configure.ac and then to add USES=autoreconf to regenerate configure. - use the macros from § 5.17.1 Porter's Handbook (i.e. INSTALL_PROGRAM/SCRIPT/LIB/KLD/DATA/MAN) instead of plain INSTALL to install files. These macros differ in the permissions used and in whether to strip the file. - why do you install conf/examples/example.conf twice? Once into the documentation and once into etc? - only config files the user is supposed to modify need @sample. Please check which files these are and only use @sample for files the user is supposed to alter. - you could remove doc/ from the items in DOCS to make the list a bit shorter. - you can use .for ... .endfor loops to make the install target a bit shorter. - please place a blank line between the do-install and do-install-DOCS-on target. - the variable TMPDIR is used by various other bits of the build system. Please chose a different name (e.g. _TMPDIR) to avoid a collision. Alternatively, assign to it with ?= so the user's value is respected. On another note, the port fails a build test (on arm64 FreeBSD 13.2) due to a missing libargon2. Perhaps you forgot to declare a dependency on it? cc -I/wrkdirs/usr/ports/irc/unreal/work/unrealircd-6.1.1.1/include -D_THREAD_SAFE -pthread -I/usr/local/include -I/wrkdirs/usr/ports/irc/unreal/work/unrealircd-6.1.1.1/extras/argon2/include -I/usr/local/include -I/wrkdirs/usr/ports/irc/unreal/work/unrealircd-6.1.1.1/extras/sodium/include -I/wrkdirs/usr/ports/irc/unreal/work/unrealircd-6.1.1.1/extras/jansson/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fno-strict-aliasing -fno-common -funsigned-char -Wall -Wextra -Waggregate-return -Wformat-nonliteral -Wparentheses -Wno-pointer-sign -Wno-invalid-source-encoding -Wno-format-zero-length -Wno-unused -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-char-subscripts -Wno-sign-compare -Wno-empty-body -Wno-unknown-warning-option -fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector --param ssp-buffer-size=1 -isystem /usr/local/include -fPIE -lssl -lcrypto -ldl -o unrealircdctl unrealircdctl.o proc_io_client.o ircd_vars.o dns.o auth.o channel.o crule.o dbuf.o fdlist.o hash.o ircsprintf.o list.o match.o modules.o parse.o mempool.o operclass.o conf_preprocessor.o conf.o proc_io_server.o debug.o dispatch.o securitygroup.o misc.o serv.o aliases.o socket.o tls.o user.o scache.o send.o support.o version.o whowas.o random.o api-usermode.o api-channelmode.o api-moddata.o api-extban.o api-isupport.o api-command.o api-clicap.o api-messagetag.o api-history-backend.o api-efunctions.o api-event.o api-rpc.o crypt_blowfish.o unrealdb.o crashreport.o modulemanager.o utf8.o json.o log.o openssl_hostname_validation.o url_unreal.o -Wl,-rpath,/usr/local/share/unreal/lib -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -Wl,-rpath,/usr/local/share/unreal/lib -Wl,-export-dynamic -pie -lcrypt -L/usr/local/lib -lpcre2-8 -L/usr/local/share/unreal/lib -largon2 -L/usr/local/lib -lcares -L/usr/local/share/unreal/lib -lsodium -L/usr/local/share/unreal/lib -ljansson -lssl -lcrypto -ldl ld: error: unable to find library -largon2 ld: error: unable to find library -largon2 cc: error: linker command failed with exit code 1 (use -v to see invocation) cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake[3]: *** [Makefile:72: ircd] Error 1 gmake[3]: *** Waiting for unfinished jobs.... gmake[3]: *** [Makefile:75: unrealircdctl] Error 1 gmake[3]: Leaving directory '/wrkdirs/usr/ports/irc/unreal/work/unrealircd-6.1.1.1/src' gmake[2]: *** [Makefile:65: build] Error 2 gmake[2]: Leaving directory '/wrkdirs/usr/ports/irc/unreal/work/unrealircd-6.1.1.1/src' gmake[1]: *** [Makefile:141: build] Error 2 gmake[1]: Leaving directory '/wrkdirs/usr/ports/irc/unreal/work/unrealircd-6.1.1.1' ===> Compilation failed unexpectedly.
Created attachment 244759 [details] Initial Patch for adding UnrealIRCD 6.1.1.1 to Ports Corrections added: - REINPLACE_CMD was unnecessary and is removed - Corrected use macros as per § 5.17.1 Porter's Handbook - Removed unnecessary install of duplicate example.conf - It was supposed to make proper use of the @sample methodology which is now corrected. Thanks for the catch! - Corrected usage of @sample for only the config files the user is supposed to modify. - Removed doc/ from the items in DOCS to make the list a bit shorter. - Using .for ... .endfor loops to make the install target a bit shorter. - Added blank line between the do-install and do-install-DOCS-on target. - Switched to using _TMPDIR to avoid collision. - Corrected missing lib dependency declarations.
Thank you for the update. This looks a bit suspicious: +do-install-DOCS-on: +${MKDIR} ${STAGEDIR}${DOCSDIR} +.for file in ${DOCS}/docs/ + ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR} +.endfor Looks like you meant to write +do-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} +.for file in ${DOCS} + ${INSTALL_DATA} ${WRKSRC}/docs/${file} ${STAGEDIR}${DOCSDIR} +.endfor The build now fails during configure when the configure script tries to create /usr/local/share/unreal/lib, which it is not allowed to: gmake[4]: Entering directory '/usr/home/ports/fuz.ports/irc/unreal/work/unrealircd-6.1.1.1/extras/GeoIP-1.6.12/libGeoIP' /usr/local/bin/gmkdir -p '/usr/local/share/unreal/lib' gmkdir: cannot create directory '/usr/local/share/unreal': Permission denied gmake[4]: *** [Makefile:371: install-libLTLIBRARIES] Error 1 gmake[4]: Leaving directory '/usr/home/ports/fuz.ports/irc/unreal/work/unrealircd-6.1.1.1/extras/GeoIP-1.6.12/libGeoIP' gmake[3]: *** [Makefile:571: install-am] Error 2 gmake[3]: Leaving directory '/usr/home/ports/fuz.ports/irc/unreal/work/unrealircd-6.1.1.1/extras/GeoIP-1.6.12/libGeoIP' gmake[2]: *** [Makefile:444: install-recursive] Error 1 gmake[2]: Leaving directory '/usr/home/ports/fuz.ports/irc/unreal/work/unrealircd-6.1.1.1/extras/GeoIP-1.6.12' I'm not sure what you changed, but please check and resubmit as appropriate.
Created attachment 244760 [details] Initial Patch for adding UnrealIRCD 6.1.1.1 to Ports OK. Addressed the typos and reverified. Burned the ports tree on my build machine and restarted from scratch, also stood up a separate brand new arm64 FreeBSD 13.2 system. Both the build machine and separate test system are able to build and install cleanly. Hopefully your tests clear as well now.
(In reply to tanawts from comment #8) Same error as before. Are you building as root by chance? Try to build with Poudriere or as a normal user. Building as root masks the error.
Created attachment 245125 [details] Initial Patch for adding UnrealIRCD 6.1.1.1 to Ports Corrected the bad dependency on the old-deprecated GeoIP lib, and added the proper dependency for the newer libmaxminddb. This should address the final issue with the patch.
Looks better. On commit, I plan to do the following changes: - PORTVERSION will be changed to DISTVERSION as per policy - I'll remove the IPV6 option since it doesn't do anything - I'll add a post-install target to strip the various .so files you install - I'll fix some issues with the formatting Is this okay for you? Note that the port fails the build if option SSL is disabled: cc -I/wrkdirs/usr/ports/irc/unreal/work/unrealircd-6.1.1.1/include -D_THREAD_SAFE -pthread -I/usr/local/include -I/usr/ local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -O2 -pipe -fstack-protector-strong -isyst em /usr/local/include -fno-strict-aliasing -fno-strict-aliasing -fno-common -funsigned-char -Wall -Wextra -Waggregate- return -Wformat-nonliteral -Wparentheses -Wno-pointer-sign -Wno-invalid-source-encoding -Wno-format-zero-length -Wno-un used -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-char-subscripts -Wno-sign-compare -Wno-empty-body -Wno-un known-warning-option -fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector --param ssp-buff er-size=1 -isystem /usr/local/include -fPIE -o unrealircdctl unrealircdctl.o proc_io_client.o ircd_vars.o dns.o auth.o channel.o crule.o dbuf.o fdlist.o hash.o ircsprintf.o list.o match.o modules.o parse.o mempool.o operclass.o conf_prep rocessor.o conf.o proc_io_server.o debug.o dispatch.o securitygroup.o misc.o serv.o aliases.o socket.o tls.o user.o sca che.o send.o support.o version.o whowas.o random.o api-usermode.o api-channelmode.o api-moddata.o api-extban.o api-isup port.o api-command.o api-clicap.o api-messagetag.o api-history-backend.o api-efunctions.o api-event.o api-rpc.o crypt_b lowfish.o unrealdb.o crashreport.o modulemanager.o utf8.o json.o log.o openssl_hostname_validation.o url_unreal.o -Wl,- rpath,/wrkdirs/usr/ports/irc/unreal/work/unrealircd/lib -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -Wl,-rpath, /wrkdirs/usr/ports/irc/unreal/work/unrealircd/lib -Wl,-export-dynamic -pie -lcrypt -L/usr/local/lib -lpcre2-8 -L/usr/l ocal/lib -largon2 -L/usr/local/lib -lcares -L/usr/local/lib -lsodium -L/usr/local/lib -ljansson ld: error: undefined symbol: OpenSSL_version >>> referenced by ircd.c >>> ircd.o:(main) >>> referenced by proc_io_server.c >>> proc_io_server.o:(procio_status) >>> referenced by serv.c >>> serv.o:(cmd_version) ld: error: undefined symbol: TLS_server_method >>> referenced by unrealircdctl.c >>> unrealircdctl.o:(unrealircdctl_spkifp) >>> referenced by tls.c >>> tls.o:(init_ctx) ld: error: undefined symbol: PEM_read_X509 >>> referenced by auth.c >>> auth.o:(Auth_CheckError) >>> referenced by auth.c >>> auth.o:(Auth_Check) ... It looks like the option is not propagated correctly. I can remove the option on commit if you like or you could submit a new patch to fix the behaviour of the SSL option.
Created attachment 245127 [details] Initial Patch for adding UnrealIRCD 6.1.1.1 to Ports Applied fixes and submitted updated replacement diff - PORTVERSION changed to DISTVERSION as per policy - Removed the IPV6 option since it doesn't do anything - Updated post-install target to strip the various .so files - Fixed a few issues with the formatting - Verified upstream src Config behavior and included SSL by default as opposed to an Option - this is consistent with the upstream code
Looks good! I think I will be able to commit this one with my next batch. Thank you for your patience with all the revisions.
Thanks for your patience and support! Appreciate the feedback and suggestions throughout.
A commit in branch main references this bug: 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 (new) | 100 ++++++++ irc/unreal/distinfo (new) | 3 + .../patch-doc_conf_modules.default.conf (new) | 16 ++ irc/unreal/files/unrealircd.in (new) | 38 +++ irc/unreal/pkg-descr (new) | 6 + irc/unreal/pkg-plist (new) | 281 +++++++++++++++++++++ 8 files changed, 445 insertions(+), 1 deletion(-)
Thank you for your contribution.