On Mon, Jul 05, 2021 at 03:38:24PM +0800, Delan Azabani wrote:
> G’day ports@,
>
> I’ve attached my first port: net/bore. Any feedback would be welcome!
>
> Makefile was based on the one for textproc/ripgrep at first, but I’ve
> since cleaned it up against the porting guide and Makefile.template.
>
> Builds and runs well on amd64, but I would especially appreciate any
> testing on one of the other platforms with a Rust compiler.
Some simple runtime testing indicates that it works fine on sparc64.
'make test' succeeds on both amd64 and sparc64.
> One thing I’m unsure of is the portcheck(1) lint “{Makefile,pkg/PLIST}
> does not have $OpenBSD$ RCS tag at the top”. Does this only apply once
> the port is imported by someone with CVS access?
The first line of the Makefile should be '# $OpenBSD$', followed by an
empty line. This tag will be expanded by cvs on commit (see keyword
substitution in rcs(1) for details).
For pkg/PLIST, generate it using 'make update-plist'. It will add
'@comment $OpenBSD: PLIST,v$' as a first line to what you did manually.
With these two tweaks, portcheck will be happy (except for the overlong
line).
Regarding unveil: with pledge dns, a number of files are made available
by the BYPASSUNVEIL mechanism (see /usr/src/sys/kern/kern_pledge.c):
/* DNS needs /etc/{resolv.conf,hosts,services,protocols}. */
so I think it would be sufficient if you removed all filesystem access
via 'expect_unveil("", "");' (I haven't tested this).
I'm unsure if 'MODCARGO_RUSTFLAGS = -C debuginfo=0' is desirable, but
I don't know if/how cargo.port.mk handles debug packages.
>
> Cheers,
> Delan
>
> Homepage:
> https://crates.io/crates/bore
>
> DESCR:
> DNS query tool. Provides highlighting by default and some useful protocol
> debugging features, and uses pledge(2) and unveil(2) on OpenBSD.