Comments (13)
It does work when you compile directly, but I'm cross-compiling as I'm using GoReleaser to build chezmoi's release binaries. The GoReleaser job runs on Linux (on GitHub Actions) and cross-compiles binaries for other operating systems and doesn't support cgo.
In practice I think zalando/go-keyring has done all that it's possible to reasonably do here. In chezmoi, I've used build tags to activate the GNOME Keyring functionality when it is available. twpayne/chezmoi#1919 contains the gory details if you're interested.
from go-keyring.
@torculus can you test it?
Do you think we just need to create a build target?
from go-keyring.
Yeah, I'm willing to test it. I'm not much of a go programmer, but I think the Linux target should work well as a template
from go-keyring.
@torculus can you try to build #68 on your system?
I just checked https://github.com/vmactions/freebsd-vm and it's a bit weird to run a VM inside macos and then I have to figure what ports I need to install (maybe you want to create a PR for the GH actions?).
from go-keyring.
@torculus we merged the change and it should built also on *BSD.
from go-keyring.
So, I attempted to build on my machine and it's complaining about u_int
and uintptr_t
being invalid types
Long story short, upsteam godbus
had an issue with compiling on FreeBSD that was fixed back in 2020 (godbus
version 5.0.4). Unfortunately, go-keyring
is pulling godbus
version 5.0.3, which is unpatched
I don't know if the requirement could be updated, but that would fix this issue
from go-keyring.
@torculus Could you try with this PR? #70
from go-keyring.
@mikkeloscar yes! It compiles perfectly without error!
I tried building the example module (on the README), but unfortunately my proficiency with Go is too limited to get it working as a local module. If it gets merged into master and released (go-keyring v0.1.2
), I will re-test it
from go-keyring.
Note that github.com/godbus/dbus currently does not compile on freebsd/386
. See godbus/dbus#315.
from go-keyring.
Ah, so the problem is in fact that godbus/gobus relies on cgo and cgo is not easily available when cross-compiling. This may be tricky.
from go-keyring.
@torculus We have released version v0.2.0
with the update you can try!
from go-keyring.
@twpayne From where do you cross-compile? Does it not work to compile directly on the target?
We were able to add a CI step running in freebsd VM which works: #71 (I don't know too many details about *BSD so maybe it's different from what you mean?)
from go-keyring.
Thanks for the information.
I will close this issue as it seems like we have done what we could from go-keyring side and support FreeBSD under the right conditions
from go-keyring.
Related Issues (20)
- Cannot get/set keys with account
- [Windows] naive (incorrect) conversion of byte slice to Go string HOT 3
- [Windows] Get, Set and Delete have unexpected and limiting behaviours HOT 2
- Support for keyutils
- use errors.New("not found") instead of fmt.Errorf(...)
- Umlaut passwords fail to decode correctly on MacOS HOT 3
- [Linux/Ubuntu]When running compiled binary with sudo an error shows up HOT 4
- Comparison with 99designs/keyring HOT 6
- Build issue in 0.2.0 HOT 4
- Missing gitignore file
- err: encoding/hex: odd length hex string HOT 3
- Support secret transfer via dh-ietf1024-sha256-aes128-cbc-pkcs7 HOT 2
- writing large passwords in darwin leads to truncated password HOT 8
- KeepassXC: freezes and org.freedesktop.Secret.IsLocked HOT 7
- Allow injecting errors in mock provider
- Support Pass with GPG as a backend for Linux HOT 1
- -
- Feature request: Allow secrets to be stored in encrypted file
- how
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-keyring.