Created attachment 251882 [details] rename start script to comply to rc recommendations + service jails readiness Hi, The attached patch fixes some issues with the rc script. A generic discussion about the rc scripts in the ports collection which contains a lot more background information about the "why" of this patch is at https://lists.freebsd.org/archives/freebsd-ports/2024-July/006342.html Short: - the filename shall be the same as the content of the name variable inside the script - (already OK) PROVIDE shall be the same as the content of the name variable inside the script - this fixes the use of the script with service jails (new feature in -current) Additionally to what is discussed there and fixed in the patch, I made the following additional changes: - add an UPATING entry (date needs to be adapted, this may conflict at the time when you apply/commit) - add service jails options to the scripts to enable the use in service jails (new feature in -current) the svcj_options allow the use of the host-network, if you want to allow sysvipc you need to replace "net_basic" with "net_basic sysvipc" (inherits/shares the sysv stuff, "sysipcnew" if the sysvipc parts shall be uniq to the specific service) if no network access is required for a service, you can set it hard to empty (amavisX_YYY_svcj_options="") The service jails part will not cause issues when service jails are not enabled. If amavis works inside a jail, it will work inside service jails too, the only question is which kind of jail permissions need to be enabled for the services. The handbook has more info about service jails: https://docs.freebsd.org/en/books/handbook/jails/#service-jails https://docs.freebsd.org/en/articles/rc-scripting/#rcng-service-jails You may want to run the following before applying the patch: git mv security/amavisd-new/files/amavisd-snmp.in $security/amavisd-new/files/amavisd-snmp.in git mv security/amavisd-new/files/amavis-p0fanalyzer.in security/amavisd-new/files/amavis_p0fanalyzer.in Bye, Alexander.
Hi Alexander, thanks for your submission. I finally have some time to test this. Any reason why you didn't rename amavis-milter to amavis_milter? I see that it's also listed in your post to ports@, so I guess it was just an oversight, I'll fix that too. Thanks Florian
(In reply to Florian Smeets from comment #1) Did some archeology, answering my own question. The amavis-milter script in security/amavisd-new should have been removed with 4c8100486c3bed73e4024bab00ce74c3c2d14367 18 years ago. As far as I can tell, the script hasn't been part of the package ever since.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=577ee27d110a26cc4140b4b86e0db68b1a273f9f commit 577ee27d110a26cc4140b4b86e0db68b1a273f9f Author: Alexander Leidinger <netchild@FreeBSD.org> AuthorDate: 2024-08-08 22:08:35 +0000 Commit: Florian Smeets <flo@FreeBSD.org> CommitDate: 2024-08-09 18:31:03 +0000 security/amavisd-new: service jails readiness + fixes Rename rc script to comply to the rc scripting recommendations (netchild) Make script service jail aware (netchild) Remove amavis-milter.in that should most likely have been removed with 4c8100486c3b ~18 years ago, the script hasn't been part of the package for a long time (flo) PR: 280139 UPDATING | 15 ++++++++++++ security/amavisd-new/Makefile | 6 ++--- security/amavisd-new/files/amavis-milter.in (gone) | 27 ---------------------- ...amavis-p0fanalyzer.in => amavis_p0fanalyzer.in} | 1 + security/amavisd-new/files/amavisd.in | 1 + .../files/{amavisd-snmp.in => amavisd_snmp.in} | 1 + 6 files changed, 21 insertions(+), 30 deletions(-)
Committed. Thanks.