From: Nazarenko Mykyta Subject: Re: [ NEW ] security/blake3 and unbundling from devel/ccache To: Stuart Henderson Cc: ports@openbsd.org Date: Fri, 26 Jun 2026 22:17:58 +0200 On Fri, 26 Jun 2026 09:36:33 +0100 Stuart Henderson wrote: > On 2026/06/25 23:45, Nazarenko Mykyta wrote: > > Buenas noches ports@! > > > > I'd like to propose adding a BLAKE3 port, an > > implementation of this cryptographic function in C. > > I've attached a tweaked version: > > - lowercase PKGNAME as is usual style > - use WRKDIST in WRKSRC definition > - drop WANTLIB; openbsd doesn't record linkage to libc in libraries, > and it doesn't seem to use libcrypto (certainly doesn't record a > NEEDED in the library anyway) > - tweak license marker > - more useful DESCR Big thanks stu@! > > I've noticed that ccache uses a bundled version of BLAKE3 that's > > behind the upstream version. I think we should use shared library > > instead, since ccache has long supported more than just the bundled > > version. > > I can look at that after it's in. > > I tried to get tests working with the lines below, but ran into > problems with undefined symbols. Since there is no executable in this > package (and especially because it seems to use dispatch functions > for cpu-specific code) it would really be nice to have some way to > test whether it works inside the port itself. > > TEST_DEPENDS= devel/gmake \ > lang/python/3 > > do-test: > gmake -C ${WRKSRC} -f Makefile.testing CC="${CC}" I found out what caused the tests to fail. For the CPU detection functions to be visible to the runner, the code must be compiled with the special flag -DBLAKE3_TESTING. The custom target called gmake, but did not specify the final build target - test... Tarball attached. > It builds on -current i386 and aarch64 as well as amd64, but I can't > say if it actually works without a better way to test (the only method > that comes to mind is "build ccache with it and see if it crashes" > and that's not really good enough for a cryptographic hash). Before sending all of this over, I tested ccache in conjunction with my port. It built successfully, and I checked how ccache behaved when compiling different code. I didn't encounter any troubles.