While I’m asking about Syft in this post, it’s a general question about a few tools.
Today I learned that June 19th is “FreeBSD Day”. It got me wondering what the state of our tools was on BSD.
(yes, I know macos is ‘technically’ kinda BSD under the covers, this is about ‘pure’ BSD (which may trigger some people, sorry (also not sorry))) (I think that’s enough close braces).
So, I tried building syft on FreeBSD 14.01
I grabbed go 1.21, and ran make bootstrap
.
$ make bootstrap
make: "/home/alan/syft/Makefile" line 39: Unknown modifier "' | tr '\n' ' '" "
make: "/home/alan/syft/Makefile" line 39: Unknown modifier "' | cut -d '"
make: "/home/alan/syft/Makefile" line 39: Unknown modifier "' -f 3 | tr '\n' ' ' | tr -d ','""
make: "/home/alan/syft/Makefile" line 41: Unknown modifier "' | tr '\n' ' '" "
make: "/home/alan/syft/Makefile" line 41: Unknown modifier "' | cut -d '"
make: "/home/alan/syft/Makefile" line 41: Unknown modifier "' -f 3 | tr '\n' ' ' | tr -d ','""
make: "/home/alan/syft/Makefile" line 42: Unknown modifier "' | tr '\n' ' '" "
make: "/home/alan/syft/Makefile" line 42: Unknown modifier "' | cut -d '"
make: "/home/alan/syft/Makefile" line 42: Unknown modifier "' -f 3 | tr '\n' ' ' | tr -d ','""
make: Fatal errors encountered -- cannot continue
make: stopped in /home/alan/syft
Looks like this line is failing.
TASKS := $(shell bash -c "test -f $(TASK) && $(TASK) -l | grep '^\* ' | cut -d' ' -f2 | tr -d ':' | tr '\n' ' '" ) $(shell bash -c "test -f $(TASK) && $(TASK) -l | grep 'aliases:' | cut -d ':' -f 3 | tr '\n' ' ' | tr -d ','")
Which, after a small amount of digging, probably also means ./tool/task
doesn’t exist, which is true. Also, ./tool/binny
is missing.
So I dug a little deeper, and binny also isn’t available for BSD on amd64.
$ curl -sSfL https://raw.githubusercontent.com/anchore/binny/main/install.sh | sh -s -- -b /usr/local/bin
[info]\033[0m fetching release script for tag='v0.8.0' \033[0m
[info] using release tag='v0.8.0' version='0.8.0' os='freebsd' arch='amd64'
[error] could not find release asset for os='freebsd' arch='amd64' format='tar.gz'
[error] failed to install binny
So I thought, “I wonder if I can build binny from source for BSD for fun and frolics”
So I cloned GitHub - anchore/binny: Manage a directory of binaries without a package manager and tried:
alan@horns:~/binny $ make
make: "/home/alan/binny/Makefile" line 43: Unknown modifier "' | tr '\n' ' '" "
make: "/home/alan/binny/Makefile" line 43: Unknown modifier "' | cut -d '"
make: "/home/alan/binny/Makefile" line 43: Unknown modifier "' -f 3 | tr '\n' ' ' | tr -d ','""
make: "/home/alan/binny/Makefile" line 45: Unknown modifier "' | tr '\n' ' '" "
make: "/home/alan/binny/Makefile" line 45: Unknown modifier "' | cut -d '"
make: "/home/alan/binny/Makefile" line 45: Unknown modifier "' -f 3 | tr '\n' ' ' | tr -d ','""
make: "/home/alan/binny/Makefile" line 46: Unknown modifier "' | tr '\n' ' '" "
make: "/home/alan/binny/Makefile" line 46: Unknown modifier "' | cut -d '"
make: "/home/alan/binny/Makefile" line 46: Unknown modifier "' -f 3 | tr '\n' ' ' | tr -d ','""
make: Fatal errors encountered -- cannot continue
make: stopped in /home/alan/binny
And this feels recursive!
So this feels like a few issues:
- There’s no binary build of syft for BSD
- There’s no binary build of binny for BSD
- binny doesn’t build for BSD on BSD
make bootstrap
doesn’t politely error (in binny and syft) whenbinny
(and/or)task
aren’t available
I could file issues in the appropriate repos. But I thought I’d ask the real question.
Should we support BSD?