Skip to content

Build Restic on DragonFlyBSD #5131

@vmlemon

Description

@vmlemon

Output of restic version

root@:~/restic # ./restic version
restic 0.17.2-dev (v0.17.2-257-g408ec41a1) compiled with go1.23.2 on dragonfly/amd64

uname -a reports:

root@:~/restic # uname -a
DragonFly  6.4-RELEASE DragonFly v6.4.0-RELEASE #54: Fri Dec 30 09:06:50 PST 2022     root@pkgbox64.dragonflybsd.org:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64

What should restic do differently? Which functionality do you think we should add?

Whilst I realise that DragonFlyBSD is an incredibly niche platform, it was fairly easy, to add very generic support for it, as a derivative of FreeBSD, with official GoLang support, so it could help Restic become accessible, to an additional user base, if we also supported it.

What are you trying to do? What problem would this solve?

Out of curiosity, I decided to try building the latest checkout of Restic, on DragonFlyBSD, after noticing that the GoLang toolchain supports it, and seeing that no-one else has mentioned it, in the issue tracker.

On the first attempt, I received the following error:

root@:~/restic # ./buildr.sh ^M^M
go run build.go^M
warning: GOPATH set to GOROOT (/root/go) has no effect^M
warning: GOPATH set to GOROOT (/root/go) has no effect^M
# github.com/restic/restic/internal/fs^M
internal/fs/node.go:25:24: undefined: nodeFillGenericAttributes^M
internal/fs/node.go:28:26: undefined: nodeFillExtendedAttributes^M
internal/fs/node.go:259:12: undefined: nodeRestoreExtendedAttributes^M
internal/fs/node.go:266:12: undefined: nodeRestoreGenericAttributes^M
build failed: exit status 1^M
exit status 1^M
*** Error code 1^M
^M
Stop.^M
make: stopped in /root/restic^M  

After copying internal/fs/node_aix.go, to internal/fs/node_dragonfly.go, and tweaking it, I was able to produce a working binary, that runs on DragonFlyBSD/x86-64, albeit without support for extended attributes.

If there's any interest, I can supply this change, as a pull request?

Did restic help you today? Did it make you happy in any way?

I'm surprised by how easy to work with, the Restic codebase is, despite having very limited knowledge of GoLang.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions