Re: FIX: net/mcast-proxy rc script
On Mon, Aug 07, 2017 at 10:52:13AM +0100, Stuart Henderson wrote: | 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): Agreed, that is better (and indeed quite simple). OK me :) Thanks Stuart! Paul -- >[<++>-]<+++.>+++[<-->-]<.>+++[<+ +++>-]<.>++[<>-]<+.--.[-] http://www.weirdnet.nl/
Re: FIX: net/mcast-proxy rc script
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 --- Makefile31 Jul 2017 09:38:56 - 1.3 +++ Makefile7 Aug 2017 09:50:06 - @@ -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 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 - 1.2 +++ pkg/PLIST 7 Aug 2017 09:50:06 - @@ -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
FIX: net/mcast-proxy rc script
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. Comments? OKs? Thanks, Paul 'WEiRD' de Weerd PS: I'm also working on changing this port to the proper upstream, but that's not immediately affecting the usability of the package, so I'll leave that for a later diff. [1]: http://marc.info/?l=openbsd-tech=149650042205168=2 Index: net/mcast-proxy/Makefile === RCS file: /cvs/ports/net/mcast-proxy/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- net/mcast-proxy/Makefile31 Jul 2017 09:38:56 - 1.3 +++ net/mcast-proxy/Makefile7 Aug 2017 09:27:22 - @@ -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/ Index: net/mcast-proxy/pkg/mcastproxy.rc === RCS file: /cvs/ports/net/mcast-proxy/pkg/mcastproxy.rc,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 mcastproxy.rc --- net/mcast-proxy/pkg/mcastproxy.rc 30 Jul 2017 21:12:36 - 1.1.1.1 +++ net/mcast-proxy/pkg/mcastproxy.rc 7 Aug 2017 09:27:28 - @@ -2,7 +2,7 @@ # # $OpenBSD: mcastproxy.rc,v 1.1.1.1 2017/07/30 21:12:36 jca Exp $ -daemon="${TRUEPREFIX}/sbin/mcast-proxy" +daemon="${TRUEPREFIX}/bin/mcast-proxy" . /etc/rc.d/rc.subr -- >[<++>-]<+++.>+++[<-->-]<.>+++[<+ +++>-]<.>++[<>-]<+.--.[-] http://www.weirdnet.nl/