Thanks for the input, Stewart.

I have knocked around the idea of chroot'ing in the future. It is at least
currently pledged. ... well, according to my current understanding of the
pledge system.

Thanks again,

T

On Fri, Jun 15, 2018 at 10:12 AM, Stuart Henderson <[email protected]>
wrote:

> On 2018/06/15 08:52, Base Pr1me wrote:
> > On Wed, Jun 6, 2018 at 8:31 AM, Base Pr1me <[email protected]>
> wrote:
> >
> > > Thanks. New version of the port attached.
> > >
> > > Changed:
> > > - added pkg/busybeed.rc
> > > - PLIST changed to use @rcscript instead of @sample for busybeed.rc
> > >
> > > Ok?
> > >
> > > Tracey
> > >
> > > On 6/6/18 1:43 AM, Stuart Henderson wrote:
> > >
> > >> On 2018/06/05 19:41, Base Pr1me wrote:
> > >>
> > >>> Hello,
> > >>>
> > >>> Attached is a new port, net/busybeed. The utility daemon is written
> > >>> specifically for OpenBSD by me. The port was created with tweaks from
> > >>> Brian
> > >>> Callahan (thanks!). The release source is available at
> > >>> https://github.com/spoollord/busybeed, with control updates to come
> > >>> later, when
> > >>> I have time to extend the development.
> > >>>
> > >>> The daemon attaches to configured devices, i.e. serial devices, IoT
> > >>> devices,
> > >>> IP addresses, etc. Think of it as an IoT packet router of sorts. I
> use
> > >>> it for
> > >>> my XBee, ESP8266, and NRF24 devices. Clients connect to route and
> parse
> > >>> packets
> > >>> for database ingestion, etc.
> > >>>
> > >>> --
> > >>> pkg/DESCR:
> > >>> The busybeed OpenBSD daemon provides a mechanism for clients and
> client
> > >>> processes to communicate with an array of serial and IoT devices. At
> > >>> its core, busybeed is primarily a packet repeater in that it polls
> for
> > >>> packets to swap between subscriber clients and devices. However,
> > >>> busybeed also provides password control over those connections,
> > >>> including client limits.
> > >>> --
> > >>>
> > >>> I've only been able to compile and test on amd64.
> > >>>
> > >>> Ok?
> > >>>
> > >>> Tracey
> > >>>
> > >>> You're installing the rc script by @sample'ing from an installed
> file,
> > >> that should be switched to files/busybeed.rc in the port instead,
> using
> > >> the @rcscript annotation.
> > >>
> > >>
> > > Just an update to previous emails:
> >
> > I found a couple of errors in the previous port. New port attached with
> > fixes to properly install the example config file and work for i386.
> >
> > Currently testing on i386, and it appears to be running properly.
> >
> > If anyone would like to test it out with their own IoT/serial devices,
> I've
> > packaged for 6.3 and snapshots, amd64 and i386.
> >
> > Pub key: https://packages.traceyemery.net/emery-pkg.pub
> > doas env PKG_PATH=https://packages.traceyemery.net/%m/ pkg_add busybeed
> >
> > Thanks for your consideration.
>
>
>
> Diff on top cleans up a few things ports-wise, it does seem like the
> sort of thing that wants to run as a different uid than root though ..
>
>
> diff --git Makefile Makefile
> index 824d001..55c4ee4 100644
> --- Makefile
> +++ Makefile
> @@ -4,7 +4,6 @@ V =             1.03
>  COMMENT =      device packet subscription and routing for OpenBSD
>  DISTNAME =     busybeed-${V}
>  CATEGORIES =   net
> -REVISION =     5
>
>  HOMEPAGE =     https://github.com/spoollord/busybeed/
>  MAINTAINER =   Tracey Emery <[email protected]>
> @@ -16,15 +15,17 @@ WANTLIB += c pthread util event
>
>  MASTER_SITES = https://github.com/spoollord/
> busybeed/releases/download/v${V}/
>
> +MAKE_FLAGS =   CC="${CC}"
> +
>  NO_TEST =      Yes
>
> -EXAMPLESSRC =  /src/examples/etc
> +do-configure:
> +       sed -i 's,/etc/busybeed.conf,${SYSCONFDIR}/busybeed.conf,' \
> +               ${WRKSRC}/src/busybeed.{h,8,conf.5}
>
>  post-install:
>         ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/busybeed
> -       cd ${WRKSRC}${EXAMPLESSRC} && ${INSTALL_DATA} busybeed.conf \
> -               ${PREFIX}/share/examples/busybeed
> -       cd ${WRKSRC}${EXAMPLESSRC}/rc.d && ${INSTALL_DATA} busybeed \
> +       ${INSTALL_DATA} ${WRKSRC}/src/examples/etc/busybeed.conf \
>                 ${PREFIX}/share/examples/busybeed
>
>  .include <bsd.port.mk>
> diff --git pkg/PLIST pkg/PLIST
> index 6772011..a34b6a6 100644
> --- pkg/PLIST
> +++ pkg/PLIST
> @@ -1,12 +1,9 @@
>  @comment $OpenBSD: PLIST,v$
> -@mode
> +@rcscript ${RCDIR}/busybeed
>  @man man/man5/busybeed.conf.5
>  @man man/man8/busybeed.8
>  @bin sbin/busybeed
>  share/examples/busybeed/
> -share/examples/busybeed/busybeed
> -@mode 644
>  share/examples/busybeed/busybeed.conf
> -@sample ${SYSCONFDIR}/examples/busybeed.conf
> -@mode 755
> -@rcscript ${RCDIR}/busybeed
> +@mode 640
> +@sample ${SYSCONFDIR}/busybeed.conf
> diff --git pkg/busybeed.rc pkg/busybeed.rc
> index 8021d8d..a7ee036 100755
> --- pkg/busybeed.rc
> +++ pkg/busybeed.rc
> @@ -1,6 +1,7 @@
>  #!/bin/sh
>  #
> -# $OpenBSD: busybeed,v 1.02 2018/06/06 07:49:12 basepr1me Exp $
> +# $OpenBSD$
> +
>  daemon="${TRUEPREFIX}/sbin/busybeed"
>
>  . /etc/rc.d/rc.subr
>

Reply via email to