On Wed, Aug 21, 2024 at 11:30:52PM +0200, David Uhden Collado wrote: > Dear all, > > As mentioned in a previous email I sent to this mailing list [1], I am > currently working on porting SimpleXMQ and SimpleX Chat CLI to OpenBSD. > Unfortunately, I have encountered several challenges. In addition to the > issue I previously discussed [1], two more complications have arisen: > > 1. OpenSSL Requirement: It is necessary to use OpenSSL because, > unfortunately, LibreSSL does not support the encryption algorithms used by > this software.
README.md seems to say OpenSSL is needed for the server part. I suspect it's about the lack of Ed448. Do you know what else would be missing? > This issue seems to have a relatively straightforward > solution by installing OpenSSL from the ports tree and specifying the > location of these libraries in a cabal.project.local file located in the > root directory before compiling the software. The LibreSSL developers try to keep the list of OpenSSL consumers in ports short, but yes, it is a possible approach. > 2. Linux TCP Socket Options: SimpleXMQ, on which the SimpleX Chat CLI client > depends, uses Linux-specific TCP socket options [2] that are not available > in OpenBSD [3], namely TCP_KEEPIDLE, TCP_KEEPINTVL, and TCP_KEEPCNT. My > questions regarding this issue are: > > - Why are these options not present in OpenBSD's TCP stack? Both FreeBSD > [4] and NetBSD [5] include them in their TCP stacks. Is there a specific > reason for their absence in OpenBSD? I suspect nobody bothered to implement those options. I think adding them would make sense. > - Is there an equivalent to these TCP socket options in OpenBSD? Are > there other ports facing similar issues? If so, how have they been patched > to function correctly in OpenBSD? By patching out the relevant setsockopt(2) calls, or by hiding them behind #ifndef TCP_KEEPSOMETHING. Just use grep on the ports tree to see examples. > For your reference, here is the source code file I am attempting to patch to > build SimpleXMQ on OpenBSD: > > https://github.com/simplex-chat/simplexmq/blob/stable/src/Simplex/Messaging/Transport/KeepAlive.hs I guess you could just kill lines 65-67. > References: > 1. https://marc.info/?l=openbsd-ports&m=172387102027342&w=2 > 2. https://www.man7.org/linux/man-pages/man7/tcp.7.html > 3. https://man.openbsd.org/tcp > 4. https://man.freebsd.org/cgi/man.cgi?query=tcp&sektion=4 > 5. https://man.netbsd.org/tcp.4 > > Thank you for your time and assistance. > > Best regards, > David. > -- jca