Bug 275987 - irc/unreal: Update to 6.1.4
Summary: irc/unreal: Update to 6.1.4
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Daniel Engberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-28 20:38 UTC by tanawts
Modified: 2024-05-15 02:42 UTC (History)
2 users (show)

See Also:
devnull: maintainer-feedback?


Attachments
Patch for updating UnrealIRCD 6.1.4 (6.22 KB, patch)
2023-12-28 20:38 UTC, tanawts
no flags Details | Diff
Patch for updating UnrealIRCD 6.1.5 (6.16 KB, patch)
2024-05-15 00:54 UTC, tanawts
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tanawts 2023-12-28 20:38:32 UTC
Created attachment 247323 [details]
Patch for updating UnrealIRCD 6.1.4

Port Maintainer Update of UnrealIRCD to 6.1.4

Also noting upstream ChangeLog:

UnrealIRCd 6.1.0 through 6.1.3 contain a bug which makes it possible for a websocket user to crash the IRC server. For the issue to trigger you need to have a listen block with websockets enabled.
UnrealIRCd 6.1.4 has been released to fix this issue. 
https://forums.unrealircd.org/viewtopic.php?t=9340
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2024-01-20 16:56:40 UTC
Hi,

Are patches upstreamed and/or merged?

Best regards,
Daniel
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2024-02-18 17:03:39 UTC
Friendly ping
Comment 3 tanawts 2024-02-18 19:52:39 UTC
Sorry for the delay, The patch is to take an upstream update.
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2024-02-25 10:04:02 UTC
Hi,

Needs more work as the build tries to connect during build and then gets stuck.

...
gmake[5]: Leaving directory '/wrkdirs/usr/ports/irc/unreal/work/unrealircd-6.1.4/src/modules/rpc'
cd third; gmake all
gmake[5]: Entering directory '/wrkdirs/usr/ports/irc/unreal/work/unrealircd-6.1.4/src/modules/third'
../../buildmod gmake

Checking for updates for third party modules...
[error] https://modules.unrealircd.org/modules.list: Unable to resolve hostname 'modules.unrealircd.org'
....

Please also upstream your patch as it doesnt seem to be in upstreams repo?
https://github.com/unrealircd/unrealircd/blob/unreal60_dev/configure#L8163
Comment 5 tanawts 2024-03-04 16:56:37 UTC
Hello, I just tried a brand new install of FreeBSD 14 with the unmodified patch and I am unable to reproduce your name resolution problem.  I'm happy to troubleshoot further. Is there a DNS related restriction on your build system?

Regarding the question of Upstream, the mods in question are specific for compatibility with FreeBSDs ports... So far as I am aware the line in question is a compatibility difference between pkg-config and FreeBSD's preferred pkgconf.

pkgconf does not like "0~20161029" vs "20161029" as a valid match.

-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libargon2 >= 0~20161029\""; } >&5

+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libargon2 >= 20161029\""; } >&5
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2024-03-08 20:18:39 UTC
Hi,

I'm testing using Poudriere which is used to generate packages.

Best regards,
Daniel
Comment 7 Rafael Grether 2024-05-14 21:08:53 UTC
Hello tanawts,

I did tests with this port.
I'm not a port expert (I'm still learning), but I've been working with UnrealIrcd for a decade.

So I have some considerations.

UnrealIrcd comes with a few shipped libraries. (https://www.unrealircd.org/docs/Libraries_used_by_UnrealIRCd)

Therefore, there is no need to install these libraries if they are missing from the system. In this case, if the system does not have these libraries, UnrealIrcd will build these libraries with the libraries shipped with them (extras/[library].tar.gz)

Only if the host already has these libraries installed will UnrealIrcd consider them instead of its own shipped libraries.

In the past (some decade ago), pcre upstream there was a problem that it wouldn't compile with unrealircd. But pcre shipped with unrealircd worked.

So I consider its fair to use and compile the libraries shipped with unrealircd instead of installing these libraries as port dependencies in LIB_DEPENDS.
UnrealIrcd constantly updates these shipped libraries. The upstream (SyzOp) is very security conscious and keep these libraries updated, tested and functional.

BTW, 
I can't got the error indicated by commiter, but you can check my poudriere logs for testport: https://poudriere.apt322.org:444/build.html?mastername=jpoudriere-development&build=2024-05-14_19h30m29s

Best Regards,
Rafael Grether
Comment 8 tanawts 2024-05-14 23:59:18 UTC
Hi Rafael, 
FreeBSD expects dependencies to be carried in via other "Ports" where their versioning, installation, and updating can be coordinated.

The UnrealIRCD bundled libraries present a challenge to the FreeBSD Ports framework in that the libraries are compiled and attempted to be installed directly into system directories as dependencies during the compilation process during "./configure" and not created in a staging directory for installation during "make install".

This behavior presents a particularly challenging workflow in that the ports system is expecting all installation of files to take place during the "make install" where the package plist can account for inventory, so there would effectively be no way to make a 'binary package' for FreeBSD.

From a strict security perspective, slipping files into system directories during the ./configure process opens an opportunity for untrusted code/content to piggy back into these directories as well. -- This behavior is a curious one and is /not/ what I would consider a security conscious workflow even in Linux systems that UnrealIRCD is optimized for; I have been tempted to file an upstream bug to Syzop to address this behavior with a more appropriate "make install" driven process.
Comment 9 tanawts 2024-05-15 00:54:36 UTC
Created attachment 250663 [details]
Patch for updating UnrealIRCD 6.1.5

Updates UnrealIRCD to 6.1.5
Comment 10 tanawts 2024-05-15 00:55:21 UTC
Daniel, please try to build the newest patch as it now bumps to 6.1.5.
Comment 11 Rafael Grether 2024-05-15 02:42:39 UTC
Hi tanawts,

Yes, I understood the challenge. Last year I was planning to create this port, but facing some "complicated problems" you mentioned, I ended up leaving it aside.
So I just have to congratulate you for doing it.

However, as I told you, I'm not an experienced porter, so I don't think I'll be of much help.

But whatever I can be of help with, let me know.