Bug 257952

Summary: net-im/prosody: fix failure when using libevent
Product: Ports & Packages Reporter: Thomas Morper <thomas>
Component: Individual Port(s)Assignee: Kevin Bowling <kbowling>
Status: Closed FIXED    
Severity: Affects Many People CC: kbowling, laszlo
Priority: --- Flags: kbowling: merge-quarterly+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
remove preproc defines that break libevent usage thomas: maintainer-approval+

Description Thomas Morper 2021-08-19 19:39:55 UTC
Created attachment 227330 [details]
remove preproc defines that break libevent usage

net-im/prosody: fix failure when using libevent

* Restore libevent support by removing _POSIX_C_SOURCE defines.
* Remove redundant compiler requirements, defaults are fine.

QA:

  * portlint: OK (1 warning regarding the use of /var/db)
  * testport: OK (poudriere: 11.4-i386, 11.4-amd64, 12.2-i386,
                  12.2-amd64, 13.0-amd64, 13.0-arm64)

Prosody supports libevent for better performance on busy servers, but
setting "use_libevent = true" makes Prosody fail immediately on startup.

On FreeBSD Prosody needs a workaround for daemonizing with libevent
enabled. This workaround is rendered useless by the _POSIX_C_SOURCE
defines which disable __BSD_VISIBLE and the required rfork() flag.

Actually there's no need for the _POSIX_C_SOURCE defines on FreeBSD
and by simply removing them the libevent feature is working again.
Comment 1 commit-hook freebsd_committer freebsd_triage 2021-09-11 01:12:05 UTC
A commit in branch main references this bug:

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

commit c336760ec153c194f0b5193e9d901b7598c48297
Author:     Thomas Morper <thomas@beingboiled.info>
AuthorDate: 2021-09-11 01:10:42 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-09-11 01:10:42 +0000

    net-im/prosody: fix failure when using libevent

    PR:             257952

 net-im/prosody/Makefile                            |  5 +++--
 net-im/prosody/files/patch-util-src_pposix.c (new) | 12 ++++++++++++
 net-im/prosody/files/patch-util-src_time.c         | 13 +++++++------
 3 files changed, 22 insertions(+), 8 deletions(-)
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-09-11 01:13:06 UTC
A commit in branch 2021Q3 references this bug:

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

commit 332842e326714c36ba995ad4a9f1e59868c004c6
Author:     Thomas Morper <thomas@beingboiled.info>
AuthorDate: 2021-09-11 01:10:42 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-09-11 01:12:39 +0000

    net-im/prosody: fix failure when using libevent

    PR:             257952
    (cherry picked from commit c336760ec153c194f0b5193e9d901b7598c48297)

 net-im/prosody/Makefile                            |  5 +++--
 net-im/prosody/files/patch-util-src_pposix.c (new) | 12 ++++++++++++
 net-im/prosody/files/patch-util-src_time.c         | 13 +++++++------
 3 files changed, 22 insertions(+), 8 deletions(-)
Comment 3 Kevin Bowling freebsd_committer freebsd_triage 2021-09-11 01:15:47 UTC
Thanks for your contribution!