Bug 285527 - net/openbgpd8: update to 8.8
Summary: net/openbgpd8: update to 8.8
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: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-19 15:39 UTC by Sebastian Oswald
Modified: 2025-05-25 19:24 UTC (History)
2 users (show)

See Also:
pi: maintainer-feedback+


Attachments
diff to update net/openbgpd8 from version 8.6 to 8.8 (822 bytes, text/plain)
2025-03-19 15:39 UTC, Sebastian Oswald
no flags Details
update 8.6 -> 8.8; fix socket path, add rc.d script and fix manpage for bgplgd (3.10 KB, patch)
2025-04-28 15:39 UTC, Sebastian Oswald
no flags Details | Diff
update 8.6 -> 8.8; add BGPLGD option; fixed socket path+manpage for bgplgd, rc.d script for bgplgd (3.67 KB, patch)
2025-04-28 16:14 UTC, Sebastian Oswald
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Oswald 2025-03-19 15:39:10 UTC
Created attachment 258813 [details]
diff to update net/openbgpd8 from version 8.6 to 8.8

OpenBGPd 8.8 has been released a while ago (sorry, I missed 8.7):
https://marc.info/?l=openbsd-announce&m=173887198302373&w=2

The attached diff updates the port to the new version. We've been building and running 8.8 for 2 weeks now and couldn't spot any issues.

Especially this changelog entry might be of interest for some:
    * Fix FIB handling on FreeBSD when an interface is destroyed.
Comment 1 Sebastian Oswald 2025-03-19 15:48:47 UTC
For the sake of completeness, the announcement/changelog for the skipped version 8.7 can be found here:
https://marc.info/?l=openbsd-announce&m=173444528418097&w=2
Comment 2 Tim Hogard 2025-04-27 05:58:17 UTC
I've tested this fix.  It appears to work as it should.  My tests against 8.6 show it is working the same with improvements to the associated commands.

For future work, the pkg is missing an rc.d/bgplgd startup script as the looking glass daemon is also included in the openbgp distro.  Its manual could use a s/httpd/obhttpd/ for its example and its -s should default to /var/www/run/bgplgd.sock rather than /bgplgd.sock. A _bgplgd user should also be added if the looking glass is active.
Comment 3 Sebastian Oswald 2025-04-28 15:37:20 UTC
(In reply to Tim Hogard from comment #2)

I just had a look at your suggestions.

The rc.d-script for openbgplgd was trivial, however I don't know what's up with the sockfile directory, because it should already be /var/www/run/ if I understand this correctly:

in src/bgplgd/slowcgi.c:
#define WWWRUNSTATEDIR                "/var/www/run"
char                  *fcgi_socket = WWWRUNSTATEDIR "/bgplgd.sock";

not sure where the wwwrunstatedir goes missing and it feels wrong to just hard-code the FreeBSD-specific path for the fcgi_socket...
However, the configuration allows passing the wwwrunstatedir via "--with-wwwrunstatedir", so I added CONFIGURE_ARGS to the Makefile.


We could also introduce an OPTION to disable bgplgd; the "--disable-bgplgd" configure option can be used for this. I managed to add the port option and build it without bgplgd, but I'm not that familiar with ports Makefiles (yet) to get the handling of the files right that are not present if bgplgd isn't built...


For now I attached a new patch that contains everything except making bgplgd a port option.
Comment 4 Sebastian Oswald 2025-04-28 15:39:06 UTC
Created attachment 259952 [details]
update 8.6 -> 8.8; fix socket path, add rc.d script and fix manpage for bgplgd
Comment 5 Sebastian Oswald 2025-04-28 16:14:07 UTC
Created attachment 259955 [details]
update 8.6 -> 8.8; add BGPLGD option; fixed socket path+manpage for bgplgd, rc.d script for bgplgd

Sorry for posting again.
I just figured out the last pieces to make bgplgd a port option (turned out it was much easier than I expected and how I first tried to do it...)

To summarize the changes for this diff:

- Port updated from 8.6 -> 8.8
- bgplgd is now a build option
- added rc.d script for bgplgd
- fixed socket path for bgplgd
- fixed 'httpd' -> 'obhttpd' in bgplgd manpage


Patch tested on 14.2-RELEASE with latest ports tree; builds fine with poudriere with and without BGPLGD option set. Also tested installation of the package and starting/stopping the bgplgd service (bgpd was already confirmed working and running fine for ~3 weeks on multiple hosts)
Comment 6 Sebastian Oswald 2025-05-22 09:57:32 UTC
*bump*

Just wanted to check in on this.
Please let me know if there's still things missing or the patch needs any other improvements.

Thanks,
Sebastian
Comment 7 Kurt Jaeger freebsd_committer freebsd_triage 2025-05-25 11:40:38 UTC
(In reply to Sebastian Oswald from comment #6)
I tested the patch with:

git apply --check --verbose /tmp/newpatch

and it failed to apply. I'll have a look.
Comment 8 Kurt Jaeger freebsd_committer freebsd_triage 2025-05-25 11:59:48 UTC
(In reply to Kurt Jaeger from comment #7)
It has ctrl-m characters, that's why it fails.
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-05-25 19:23:33 UTC
A commit in branch main references this bug:

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

commit 6f83e83be94d7e5f2a2d23144f23060715f32dba
Author:     Sebastian Oswald <sko@rostwald.de>
AuthorDate: 2025-05-25 19:17:20 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2025-05-25 19:21:43 +0000

    net/openbgpd8: update 8.6 -> 8.8

    - add BGPLGD option for the looking glass daemon

    PR:             285527
    Changes:        https://marc.info/?l=openbsd-announce&m=173444528418097&w=2
                    https://marc.info/?l=openbsd-announce&m=173887198302373&w=2
    Reviewed-by:    Tim Hogard <thogard@abnormal.com>

 GIDs                                        |  2 +-
 UIDs                                        |  2 +-
 net/openbgpd8/Makefile                      | 16 +++++++++++++--
 net/openbgpd8/distinfo                      |  6 +++---
 net/openbgpd8/files/openbgplgd.in (new)     | 31 +++++++++++++++++++++++++++++
 net/openbgpd8/files/patch-bgplgd.8.in (new) | 21 +++++++++++++++++++
 net/openbgpd8/pkg-plist                     |  4 ++--
 7 files changed, 73 insertions(+), 9 deletions(-)
Comment 10 Kurt Jaeger freebsd_committer freebsd_triage 2025-05-25 19:24:51 UTC
Committed, thanks for the patch and your patience 8}