Bug 261035 - audio/re audio/rem audio/baresip change MASTER_SITES to github and version updates
Summary: audio/re audio/rem audio/baresip change MASTER_SITES to github and version up...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports (Nobody)
URL:
Keywords:
: 264788 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-08 15:26 UTC by Denis Polygalov
Modified: 2023-03-25 11:57 UTC (History)
3 users (show)

See Also:
crees: maintainer-feedback+
p5B2EA84B3: maintainer-feedback? (koobs)


Attachments
patch to port tree to update audio/re audio/rem and audio/baresip ports (10.12 KB, application/mbox)
2022-01-08 15:26 UTC, Denis Polygalov
no flags Details
cleaned up version of previous patch, according to portlint (11.36 KB, patch)
2022-01-10 07:49 UTC, Denis Polygalov
no flags Details | Diff
patch to upgrade re, rem, baresip to version 2.3.0 (2.46 KB, patch)
2022-07-10 13:46 UTC, Denis Polygalov
no flags Details | Diff
(1 of 2) upgrade re/rem/baresip to 2.3.0 (2.46 KB, patch)
2022-07-10 14:05 UTC, Denis Polygalov
no flags Details | Diff
(2 of 2) upgrade re/rem/baresip to 2.3.0 (17.64 KB, patch)
2022-07-10 14:06 UTC, Denis Polygalov
no flags Details | Diff
audio/re audio/rem audio/baresip upgraded to 2.3.0 (19.82 KB, patch)
2022-07-11 13:05 UTC, Denis Polygalov
no flags Details | Diff
update re,rem to 2.8.0; baresip to 2.8.1 (21.50 KB, patch)
2022-10-10 01:36 UTC, Denis Polygalov
no flags Details | Diff
update re,rem,baresip to 2.9.0 (22.05 KB, patch)
2022-11-03 02:58 UTC, Denis Polygalov
no flags Details | Diff
patch to update re/rem/baresip to 2.12.0 (11.26 KB, patch)
2023-03-24 09:19 UTC, Denis Polygalov
dpolyg: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Polygalov 2022-01-08 15:26:35 UTC
Created attachment 230820 [details]
patch to port tree to update audio/re audio/rem and audio/baresip ports

Hi All,
These 3 port in the current port tree:

audio/re
audio/rem
audio/baresip

have it's MASTER_SITE ( http://www.creytiv.com/ ) unreachable because I guess because the development is switched to here: https://github.com/baresip/

All 3 pieces of software are developed by the same people and tightly interdependent:

rem depend on re
baresip depend on rem and re

I made a patch (see file attached) to fix these issues and update all 3 ports to the most recent github.com/baresip/ releases.

Also I tested this issue of baresip:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256971

and I think I fixed it, at least the gst module can now be compiled and loaded.

Please consider integration with the port tree.

Regards,
Denis.
Comment 1 Chris Rees freebsd_committer freebsd_triage 2022-01-08 15:30:08 UTC
Thanks very much for doing this!  I was literally seconds away from pushing a commit after six months for bug 247194 when I got the email but you've fixed it here as well-- imagine the timing!

Would you like to be maintainer if I commit this?
Comment 2 Denis Polygalov 2022-01-08 16:18:37 UTC
Hi Chris,

Thank you.
I am not sure I qualified enough to be a port maintainer...
I will keep an eye on these 3 ports certainly for a while because I need them and can reply to bug reports, but doing something like pushing commits to the port tree... is scary =)
I've never done this before.
Can you maybe assign me as a secondary maintainer if such role exist?

Regards,
Denis.
Comment 3 Denis Polygalov 2022-01-09 00:32:13 UTC
Hi Chris,

actually I just discovered portlint and the fact that it is not happy at all with my changes... The code is working, but seems like there are some Makefile formatting issues. So please feel free to ignore this patch or use it as the hint for yours. I will make new one, check it with portlint more carefully and place it here.

Regards,
Denis.
Comment 4 Denis Polygalov 2022-01-10 07:49:30 UTC
Created attachment 230859 [details]
cleaned up version of previous patch, according to portlint

Hi Chris,

here is new version of my patch. According to portlint
audio/re - looks fine.
audio/rem - looks fine.
audio/baresip produces few warning messages like:
WARN: Makefile: xxx is listed in OPTIONS_DEFINE, but no PORT_OPTIONS:Mxxx appears.
and also:
WARN: Makefile: Consider adding support for a NLS knob to conditionally disable gettext support.
WARN: Makefile: "BROKEN" has to appear earlier.
WARN: Makefile: wrong dependency value for BUILD_DEPENDS. BUILD_DEPENDS requires 2 or 3 colon-separated tuples.
WARN: Makefile: wrong dependency value for RUN_DEPENDS. RUN_DEPENDS requires 2 or 3 colon-separated tuples.

I'm sure these warning messages were present long time before and not related to my changes.
I also do not know how to fix these.
This is as far as I can go with this patch without extra help.
Please feel free to push this one or use it as a hint to your patch.
I am just trying to avoid situation where all 3 ports will be removed from the port tree because it is currently impossible to build them due to MASTER_SITE server shutdown.

Regards,
Denis.
Comment 5 Chris Rees freebsd_committer freebsd_triage 2022-06-30 11:58:24 UTC
*** Bug 264788 has been marked as a duplicate of this bug. ***
Comment 6 p5B2EA84B3 2022-07-01 12:06:21 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264788 has been closed as a duplicate, while it is not completely identical. Therefore I like to carry over this:

1. Suggest moving port to net/baresip. In the net category live all other SIP tools.

2. Herbert suggested: I guess the three ports (re,rem & baresip) should be returned to the pool. Maybe someone else can maintain them. I still have to check if I am able to update them.

As crees said "I'll sort it as soon as I can." After 6 months of absence "asap" has no value. It can mean even never. So I reinforce returning the port to the pool or give a reasonable timeline that holds.
Comment 7 Chris Rees freebsd_committer freebsd_triage 2022-07-01 12:42:40 UTC
More than happy to return these to the pool-- I have far too much going on right now, I'm sorry.
Comment 8 Denis Polygalov 2022-07-01 13:06:14 UTC
I have revamped all 3 ports to 2.x version few months ago and use it privately.
I'll try to post the updated patch to here in a few days, don't know though how useful it will be.

Regards,
Denis.
Comment 9 Denis Polygalov 2022-07-10 13:46:29 UTC
Created attachment 235169 [details]
patch to upgrade re, rem, baresip to version 2.3.0

Here is the patch to switch MASTER_SITE to the new location and upgrade
re, rem and baresip to version 2.3.0. A lot of things changed so please
do not assume any kind of backward compatibility. This version works,
at least on my machines. Portlint is also seems to be happy.

The latest version currently is 2.5.0 the problem however that starting
from 2.4.0 upstream switched to C11 threads. As result it is possible to
compile baresip binary 2.5.0 using this patch but attempt to execute it
lead to:
main: tss_create failed: 4
Digging down this problem is beyond my abilities.
It seems like C11 threads does not work in FreeBSD in general...
Hope this helps.

Regards,
Denis.
Comment 10 Denis Polygalov 2022-07-10 14:05:50 UTC
Created attachment 235170 [details]
(1 of 2) upgrade re/rem/baresip to 2.3.0

I made the previous patch following instructions from FreeBSD porters hand book and it does not look correct. The second attempt lead to 2 patch files but it is impossible to attach more than one file here...
I like FreeBSD but sometimes it just gets insane.
Like stone age...
Comment 11 Denis Polygalov 2022-07-10 14:06:33 UTC
Created attachment 235171 [details]
(2 of 2) upgrade re/rem/baresip to 2.3.0

The second part
Comment 12 Denis Polygalov 2022-07-11 13:05:37 UTC
Created attachment 235190 [details]
audio/re audio/rem audio/baresip upgraded to 2.3.0

OK, sorry for all this mess with the patch files.
I hope I did it right this time.
This patch gives you working re/rem/baresip version 2.3.0

Also, I found the reason of problems with further upgrade (up to 2.5.0).
The problem is in the difference between upstream and OS-side FreeBSD threads.h, specifically here:

https://github.com/baresip/re/blob/4dfae418d7bd3a973ec4fba8f3eb65469758844a/src/main/main.c#L182

The authors assume success code to be zero, which is not the case in FreeBSD:

https://github.com/freebsd/freebsd-src/blob/3c9ad9398fcdf5f49114fde978b7c837b7ebbc8d/lib/libstdthreads/threads.h#L68

Last but not the least, here is list of modules of interest included
into baresip but not yet present in FreeeBSD port, for reference:

acc
amr
aptx
av1
avcodec
avfilter
avformat
codec2
ctrl_dbus
gzrtp
mpa
opensles
pcp
sndio
swscale
webrtc_aec
webrtc_aecm
zrtp

I might try to discuss the "bug" with upstream and include more modules,
when I have more time. For now I kindly request to include at least 2.3.0
into the port tree, I think it is better than non-existed MASTER_SITE.

Regards,
Denis.
Comment 13 p5B2EA84B3 2022-07-16 07:28:16 UTC
@Denis

if you can confirm that you have version 2.3.0 running and tested, I suggest bringing this version to ports as a first step. 

I invited koobs for further coordination as we have maintainer timeout here.
Comment 14 Chris Rees freebsd_committer freebsd_triage 2022-07-16 07:33:13 UTC
You have blanket approval, not timeout!
Comment 15 Denis Polygalov 2022-08-14 00:32:06 UTC
FYI, some news related to this.
The bug I discovered was confirmed by the upstream,
fixed, but seems like not 100% fixed.
Because of that release 2.6 is still not work on FreeBSD.
Details available here:

https://github.com/baresip/re/issues/429


Regards,
Denis.
Comment 16 Herbert J. Skuhra 2022-10-06 09:15:54 UTC
(In reply to Denis Polygalov from comment #15)
The fix landed in 2.7.0. Is this still an issue? Latest versions are now: 2.8.1 (baresip) and 2.8.0 (re/rem). Thanks.
Comment 17 Herbert J. Skuhra 2022-10-08 11:57:06 UTC
I can build re (2.8.0) and rem (2.8.0) with cmake, but baresip (2.8.1) fails with:

In file included from /usr/home/herbert/source/baresip/baresip/src/audio.c:16:
In file included from /usr/home/herbert/source/baresip/re/include/re.h:20:
/usr/home/herbert/source/baresip/re/include/re_sa.h:31:23: error: field has incomplete type 'struct sockaddr_in6'
                struct sockaddr_in6 in6;
                                    ^
/usr/home/herbert/source/baresip/re/include/re_sa.h:31:10: note: forward declaration of 'struct sockaddr_in6'
                struct sockaddr_in6 in6;
                       ^
1 error generated.

There was bug report: https://github.com/baresip/baresip/issues/2088
But it was closed with a weird comment: "On FreeBSD you need gmake instead of make and your libre looks outdated."
Comment 18 Denis Polygalov 2022-10-10 01:36:42 UTC
Created attachment 237173 [details]
update re,rem to 2.8.0; baresip to 2.8.1

the crash upon startup related bugs were fixed in the upstream.

Here is the patch to update to the most recent versions.
Note that it works for me, but "works" here means I can launch the
baresip binary with all the modules enabled and perform very simple test.
Testing baresip extensively require server infrastructure I currently do
not have access to.

Regards,
Denis.
Comment 19 Herbert J. Skuhra 2022-10-11 13:38:56 UTC
(In reply to Denis Polygalov from comment #18)
Thanks for the patch! I can now run baresip (updated to v2.8.2) on my Raspberry Pi 4. Unfortunately I have no headset/microphone, but calls work and I hear the caller/callee.
Comment 20 Herbert J. Skuhra 2022-10-12 10:10:49 UTC
I guess option GSM is obsolete:

commit b4a487150f463ff3cc932a8696db5441eeda8f43
Author: Alfred E. Heggestad
Date:   Sun Jul 31 10:34:25 2022 +0200

    gsm: remve deprecated module (#2034)
Comment 21 Herbert J. Skuhra 2022-11-01 20:29:18 UTC
Meanwhile re/rem/baresip 2.9.0 is out.
Comment 22 Denis Polygalov 2022-11-03 02:58:23 UTC
Created attachment 237832 [details]
update re,rem,baresip to 2.9.0

In addition to the version update 
module removed: gsm (deprecated by upstream)
modules added: avcodec avfilter avformat sndio
Comment 23 Herbert J. Skuhra 2023-03-23 09:54:12 UTC
re and baresip 3.0.0 are out!

- rem is now part of re
- Build requires cmake now

@maintainer: please return re/rem/baresip to the pool!

Unfortunately re/baresip 3.0.0 fails to build. Does anyone have a fix? Thanks.
Comment 24 Denis Polygalov 2023-03-24 09:19:13 UTC
Created attachment 241082 [details]
patch to update re/rem/baresip to 2.12.0

Here is the patch to 2.12.0, which is the last version before 3.0.0.
The 3.0.0 contain at least one bug that has to be fixed by upstream folks:

https://github.com/baresip/re/issues/743

so if you need 3.0.0 please wait until next release.

Regards,
Denis.
Comment 25 Chris Rees freebsd_committer freebsd_triage 2023-03-24 23:02:01 UTC
Hey,

I'm really sorry about how long it's taken me to get around to this.

I can't build rem- how did you get it to do it?

https://www.bayofrum.net/pkg/124amd64-system/2023-03-24_22h58m15s/logs/errors/rem-2.12.0.log

Chris
Comment 26 Chris Rees freebsd_committer freebsd_triage 2023-03-24 23:03:19 UTC
Incidentally, I'm going to drop maintainership, but Denis, you can have it if you like?
Comment 27 commit-hook freebsd_committer freebsd_triage 2023-03-25 09:10:51 UTC
A commit in branch main references this bug:

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

commit 8f9dc55d486e5c4e1df7f0c02c646ae5bfc632a0
Author:     Chris Rees <crees@FreeBSD.org>
AuthorDate: 2023-03-24 14:55:21 +0000
Commit:     Chris Rees <crees@FreeBSD.org>
CommitDate: 2023-03-25 09:10:07 +0000

    Return baresip and libraries to the pool

    PR:     ports/261035

 audio/baresip/Makefile | 2 +-
 audio/re/Makefile      | 2 +-
 audio/rem/Makefile     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Comment 28 commit-hook freebsd_committer freebsd_triage 2023-03-25 09:10:53 UTC
A commit in branch main references this bug:

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

commit 8abf6d2fb4f4223e367e6d88fe1351cc65d7cbf9
Author:     Denis Polygalov <dpolyg@gmail.com>
AuthorDate: 2023-03-24 14:44:22 +0000
Commit:     Chris Rees <crees@FreeBSD.org>
CommitDate: 2023-03-25 09:10:06 +0000

    audio/rem: Update to 2.12.0

    Many changes since the previous version, please see:

    https://github.com/baresip/rem/blob/main/CHANGELOG.md

    PR: ports/261035

 audio/rem/Makefile  | 30 ++++++++++++++++--------------
 audio/rem/distinfo  |  6 +++---
 audio/rem/pkg-plist |  8 ++++++++
 3 files changed, 27 insertions(+), 17 deletions(-)
Comment 29 commit-hook freebsd_committer freebsd_triage 2023-03-25 09:10:54 UTC
A commit in branch main references this bug:

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

commit ce31373e1b3d50513eea3b0c20042887a6e11de8
Author:     Denis Polygalov <dpolyg@gmail.com>
AuthorDate: 2023-03-24 14:51:34 +0000
Commit:     Chris Rees <crees@FreeBSD.org>
CommitDate: 2023-03-25 09:10:06 +0000

    audio/re: Update to 2.12.0

    Many changes since the last version, so please see:

    https://github.com/baresip/re/blob/main/CHANGELOG.md

    PR:     ports/261035

 audio/re/Makefile                         | 29 ++++++++++++++---------------
 audio/re/distinfo                         |  6 +++---
 audio/re/files/patch-mk_re.mk (gone)      | 12 ------------
 audio/re/files/patch-src_sip_auth.c (new) | 12 ++++++++++++
 audio/re/pkg-plist                        | 22 +++++++++++++++++++---
 5 files changed, 48 insertions(+), 33 deletions(-)
Comment 30 commit-hook freebsd_committer freebsd_triage 2023-03-25 09:10:55 UTC
A commit in branch main references this bug:

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

commit a529a3414a75442b8ed6fb456b3b807785a77e68
Author:     Denis Polygalov <dpolyg@gmail.com>
AuthorDate: 2023-03-24 14:52:17 +0000
Commit:     Chris Rees <crees@FreeBSD.org>
CommitDate: 2023-03-25 09:10:07 +0000

    audio/baresip: Update to 2.12.0

    Many changes since the last version, so please see:

    https://github.com/baresip/baresip/blob/main/CHANGELOG.md

    PR:     ports/261035

 audio/baresip/Makefile                             | 247 ++++++++++++++-------
 audio/baresip/Makefile.depends (gone)              |  26 ---
 audio/baresip/distinfo                             |   6 +-
 .../baresip/files/patch-modules_alsa_alsa.c (new)  |  11 +
 .../files/patch-modules_alsa_alsa__play.c (new)    |  11 +
 .../files/patch-modules_alsa_alsa__src.c (new)     |  11 +
 audio/baresip/files/patch-modules_gst_gst.c (new)  |  11 +
 audio/baresip/files/patch-src_audio.c (new)        |  11 +
 audio/baresip/pkg-plist (new)                      |  99 +++++++++
 9 files changed, 322 insertions(+), 111 deletions(-)
Comment 31 Chris Rees freebsd_committer freebsd_triage 2023-03-25 09:11:17 UTC
Committed.  Thanks so much for doing this and being so patient!

I've dropped maintainership so won't be a barrier to future updates but feel free to CC me in updates.

For future reference, Makefile operators should be variable then operator then tab before arguments; don't do VAR := VALUE, it should be VAR:=   VALUE.  Please also install ports-mgmt/poudriere and use it to check dependencies as well, because there were a couple of bits missed (pkgconfig, some CMake arguments), but on the whole you've done a fantastic job here.  Finally, compare package names to PORTVERSION rather than DISTVERSION in dependency lines, because that's what the package system views the version as.
Comment 32 Denis Polygalov 2023-03-25 11:57:41 UTC
Oh, thank you for the commit!
Actually one of the reasons why I am hesitant to become a maintainer is because... I am not familiar with poudriere. I am using in-house scripts and this worked very well for in-house software support for many years, but I was afraid that this won't work when applied for the large scale. As you can see - this is exactly the case, I am still missing important bits of information. Maybe a bit later, after more RTFM.

Regards,
Denis