Created attachment 254971 [details] Patch to add net/mdns-bridge mDNS Bridge (mdns-bridge) is a daemon for forwarding mDNS data between network interfaces. It is intended for use by firewalls to provide service discovery across network segments, with and without filtering, for both IPv4 and IPv6.
Denny, Correct if I'm wrong but my understanding is this port would need an rc script to start/stop this daemon
(In reply to Renato Botelho from comment #1) Also, it would be nice to install a default configuration file, even it all lines are commented out, but at least to be a reference for users
Hi Renato, thank you for taking a look at this. There is an example config in the upstream distribution "mdns-bridge.conf.example" which could be installed. I don't believe that it should be installed without the ".example" extension, because it cannot be used without correctly setting the interfaces list. I looked at the doc, and a few other ports, and it was somewhat unclear where "mdns-bridge.conf.example" should be installed. Some suggested EXAMPLESDIR, some suggested DOCSDIR. I would be grateful if you would make a recommendation, or go ahead and add whatever you think appropriate to the Makefile that's been submitted. Regarding rc scripts, these are very system dependent so I have shied away from them. In pfSense, which is my target for the FreeBSD version, packages usually ignore any rc scripts in the distribution, and write their own on save. The package that I am working on for mdns-bridge does this as well. Since an rc script is unlikely to ever be used, I didn't put one it. If you think it critical, please let me know. Thanks, Denny
(In reply to Denny Page from comment #3) Usually on ports tree we install configuration files in the place they should be read by default when service is started. In this case I believe it could be /usr/local/etc/mdns-bridge.conf. I took a look at the example present at repository and you can use it if you don't want to make one specific for the ports. You can use the @sample facility on pkg-plist that will make config file to be installed with .sample suffix and will respect when user modifies the .conf file and it differs from .sample. Regarding the rc script, since you are adding the port on FreeBSD, you should think with the FreeBSD ports in mind and on FreeBSD ports, when you add a daemon, you add an rc script that helps user to enable/start/stop/restart the service. You can find more information about it at [1]. If you have further questions just let me know. [1] https://docs.freebsd.org/en/books/porters-handbook/special/#rc-scripts
Created attachment 255042 [details] Revised patch that adds init script and sample config
(In reply to Renato Botelho from comment #4) Hi Renato, I've added a new attachment that includes the init file and the same config file. Please review and let me know what you think. Thanks, Denny
(In reply to Denny Page from comment #6) Sorry, that should have been _sample_ config file.
(In reply to Renato Botelho from comment #4) Renato, with the init file and the sample config added, does it look acceptable? Is there anything else I need to do? Thanks, Denny
(In reply to Denny Page from comment #8) Hello Denny! I was out on vacation, returning today. I'll take a look at it later. Thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=bb1dea909cdd856bbb42c42cddf52fc751edec4c commit bb1dea909cdd856bbb42c42cddf52fc751edec4c Author: Denny Page <dennypage@me.com> AuthorDate: 2024-11-20 11:22:37 +0000 Commit: Renato Botelho <garga@FreeBSD.org> CommitDate: 2024-11-20 11:24:10 +0000 net/mdns-bridge: New port daemon for forwarding mDNS data between network interfaces. It is intended for use by firewalls to provide service discovery across network segments, with and without filtering, for both IPv4 and IPv6. PR: 282569 Sponsored by: Rubicon Communications, LLC ("Netgate") net/Makefile | 1 + net/mdns-bridge/Makefile (new) | 21 +++++++++++++++++++++ net/mdns-bridge/distinfo (new) | 3 +++ net/mdns-bridge/files/mdns_bridge.in (new) | 30 ++++++++++++++++++++++++++++++ net/mdns-bridge/pkg-descr (new) | 4 ++++ net/mdns-bridge/pkg-plist (new) | 2 ++ 6 files changed, 61 insertions(+)
Thank you Renato