Bug 274331 - net/rinetd: update to new upstream and 0.73
Summary: net/rinetd: update to new upstream and 0.73
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Renato Botelho
URL: https://github.com/samhocevar/rinetd/...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-07 14:18 UTC by Marcin Gryszkalis
Modified: 2023-11-22 06:49 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (garga)


Attachments
patch to 0.73 + d4e0a60 (1.73 KB, patch)
2023-10-07 14:18 UTC, Marcin Gryszkalis
no flags Details | Diff
revised patch to 0.73 + d4e0a60 (9.22 KB, patch)
2023-10-07 16:37 UTC, Marcin Gryszkalis
no flags Details | Diff
revised (v3) patch to 0.73 + d4e0a60 (10.38 KB, patch)
2023-10-07 17:00 UTC, Marcin Gryszkalis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Gryszkalis 2023-10-07 14:18:23 UTC
Created attachment 245482 [details]
patch to 0.73 + d4e0a60

This is update to latest version of rinetd, currently maintained at https://github.com/samhocevar/rinetd by Sam Hocevar.

It supports new features such as specifying source ip binding and timeouts.

The patch uses GH commit id as there's one bug fixed in master branch, although not released yet.

Note: I didn't include select2poll patch because large portions of rinetd 0.62 were rewritten and it's not possible to apply original patch. There's a bit of discussion about switching upstream to modern event interface https://github.com/samhocevar/rinetd/issues/16 
I will look at it and either re-patch for poll() or try to switch to libevent.
Comment 2 Marcin Gryszkalis 2023-10-07 16:37:48 UTC
Created attachment 245487 [details]
revised patch to 0.73 + d4e0a60

I forgot to add added/deleted files to patch.
Also this contains fix for linux'ism added for pid file handling.
Comment 3 Marcin Gryszkalis 2023-10-07 17:00:36 UTC
Created attachment 245489 [details]
revised (v3) patch to 0.73 + d4e0a60

re-revised patch, prepared properly as specified in porter's handbook and portlint cleanups
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-10-27 12:40:58 UTC
A commit in branch main references this bug:

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

commit 3c7b8fd3318ee88a93bc5561c9322558403d737e
Author:     Marcin Gryszkalis <mg@fork.pl>
AuthorDate: 2023-10-07 16:57:30 +0000
Commit:     Renato Botelho <garga@FreeBSD.org>
CommitDate: 2023-10-27 12:40:11 +0000

    net/rinetd: update to new upstream and 0.73

    While here, pet portlint and portclippy.

    PR:             274331

 net/rinetd/Makefile                          |  38 +++---
 net/rinetd/distinfo                          |   5 +-
 net/rinetd/files/patch-Makefile (gone)       |  22 ---
 net/rinetd/files/patch-rinetd.c (gone)       |  18 ---
 net/rinetd/files/patch-select2poll (gone)    | 194 ---------------------------
 net/rinetd/files/patch-src_Makefile.am (new) |  11 ++
 net/rinetd/files/patch-src_rinetd.c (new)    |  11 ++
 net/rinetd/pkg-plist (new)                   |   3 +
 8 files changed, 47 insertions(+), 255 deletions(-)
Comment 5 Renato Botelho freebsd_committer freebsd_triage 2023-10-27 12:42:01 UTC
I've fixed small issues on Makefile like using TABs after = and other ones reported by `portlint -C` and `portclippy Makefile`

Thanks!
Comment 6 Morgan Davis 2023-11-14 07:24:56 UTC
This new 0.73 build has severely degraded performance in my application compared to the previous 0.62_4.

I'm running rinetd as a simple port 80/443 redirector over a Wireguard tunnel between two FreeBSD 13 servers.

Under the previous .62_4 version, loading a web page over the connection results in these respectable browser stats (about a second):

46 requests
759.24 kB / 413.67 kB transferred
Finish: 1.08 s
DOMContentLoaded: 468 ms
load: 603 ms

With the new 0.73 version, the same page has these stats (nearly 30 seconds):

45 requests
758.91 kB / 435.01 kB transferred
Finish: 28.06 s
DOMContentLoaded: 2.66 s
load: 28.06 s

You can literally watch the images on the page draw out in bands as the bytes stream over slowly and render like PPP connection from 1998.

I initially suspected my problem was due to other factors, so I troubleshooted everything else until I finally narrowed it down to rinetd. I found the older package and installed it and all was well again.

I really don't know if the issue is due to something in the revised code or this port of it, but it's not ready for prime time, regardless. Happy to help test new releases.
Comment 7 Renato Botelho freebsd_committer freebsd_triage 2023-11-14 11:12:41 UTC
(In reply to Morgan Davis from comment #6)
Morgan,

Do you mind to report this problem upstream?  I'm not using rinetd at the moment and I don't know much about its source code so it would be easier to get some help from them.
Comment 8 Morgan Davis 2023-11-14 22:35:41 UTC
Sure. I'll add an issue on the github project for you.

However, your suggestion is surprising. I always assumed the people doing the porting had a vested interest in the software itself for their use.  As a consumer of the package ecosystem I would expect that any revised application that is getting a new port/package would be thoroughly tested, especially something critical to network services like this.

Is it normal practice to just take whatever new updates are available, get the port to compile, and then add it to the pkg repos?
Comment 9 Morgan Davis 2023-11-14 22:56:24 UTC
I just filed the issue on github (https://github.com/samhocevar/rinetd/issues/42). The sources have not been updated in over 2 years. It has 20 open issues currently, going back to 2017.  It's not looking optimistic that the original developer(s) are actively working on this or would be interested in debugging why this new port for FreeBSD is suboptimal.

I think this .73 release needs to be pulled from release packages if others are similarly affected. Consider it for CURRENT for testing purposes, but stick to .62_4 for RELEASE.
Comment 10 Renato Botelho freebsd_committer freebsd_triage 2023-11-15 11:35:26 UTC
(In reply to Morgan Davis from comment #8)
I used to use rinetd a lot in the past and that was the reason I became its maintainer.  Nowadays unfortunately I'm not using it anymore but I kept trying to maintain it instead of just drop the maintainership without having a new person to take it.

If you are interested in maintain it, just let me know and I will be glad to transfer the maintainership to you.
Comment 11 Morgan Davis 2023-11-15 20:37:37 UTC
Ah! I understand, Renato. Even if this were an area of expertise for me, I'd likely find myself in the same situation, so I'd best not take that on. Like you, I'm a user of rinetd, but not the right person to maintain it. That's tantamount to saying I'm a user of Firefox but not the right person to maintain it. I do hope one day to have nothing else to do but be a FreeBSD contributor.
Comment 12 Marcin Gryszkalis 2023-11-21 09:24:43 UTC
I'm taking care of the issue as I'm also active user and I'll be able to find few hours to spend on this. I guess I can also take over maintainership with the next update.
Comment 13 Renato Botelho freebsd_committer freebsd_triage 2023-11-21 11:48:45 UTC
(In reply to Marcin Gryszkalis from comment #12)
Thank you!
Comment 14 Morgan Davis 2023-11-22 06:49:43 UTC
(In reply to Marcin Gryszkalis from comment #12)
Thank you, Marcin.  For now I have locked the 0.62_4 package but am happy to test any new updates and let you know how they fare in my application. Feel free to reach out when you need feedback.