On 2017/08/07 11:45, Paul de Weerd wrote:
> It was pointed out to me off-list (thanks Mattieu) that I never tested
> the rc script that comes with net/mcast-proxy with the actual port
> itself. Problem is that I used the rc script from my mail to tech@
> from 3 June[1], which was for an mcast-proxy in base (with the binary
> in /usr/sbin/). However, the port installs into /usr/local/bin/.
>
> Two ways to fix this: install the binary in ${TRUEPREFIX}/sbin/ or fix
> the rc script to use the binary from ${TRUEPREFIX}/bin/. This diff
> uses the latter approach. Should the binary live in sbin/? At least
> hier(7) suggests it, but that diff is a bit more involved.
/sbin feels better to me, the diff is still pretty simple (this is
similar to how it would work in base; see src/usr.sbin/Makefile.inc):
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/mcast-proxy/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile 31 Jul 2017 09:38:56 -0000 1.3
+++ Makefile 7 Aug 2017 09:50:06 -0000
@@ -4,7 +4,7 @@ COMMENT = multicast proxy daemon
DISTNAME = mcast-proxy-1.0
CATEGORIES = net
-REVISION = 1
+REVISION = 2
MASTER_SITES = http://www.weirdnet.nl/openbsd/code/mcast-proxy/
@@ -18,6 +18,6 @@ WANTLIB = c event
NO_TEST = Yes
-FAKE_FLAGS = BINDIR="${PREFIX}/bin" MANDIR="${PREFIX}/man/man"
+FAKE_FLAGS = BINDIR="${PREFIX}/sbin" MANDIR="${PREFIX}/man/man"
.include <bsd.port.mk>
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/mcast-proxy/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 31 Jul 2017 08:03:40 -0000 1.2
+++ pkg/PLIST 7 Aug 2017 09:50:06 -0000
@@ -1,7 +1,7 @@
@comment $OpenBSD: PLIST,v 1.2 2017/07/31 08:03:40 ajacoutot Exp $
@newgroup _mcastproxy:792
@newuser _mcastproxy:792:792:daemon:Multicast Proxy:/var/empty:/sbin/nologin
-@bin bin/mcast-proxy
@man man/man5/mcast-proxy.conf.5
@man man/man8/mcast-proxy.8
+@bin sbin/mcast-proxy
@rcscript ${RCDIR}/mcastproxy