-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
syncthing: Update to 0.13.2. Update legacy version to 0.12.25 #15674
Conversation
You're missing a semicolon :P. I was just in the process of doing precisely this myself, but I'm a nix (and Go) newb so I couldn't figure out how to test it. Would anyone be kind enough to link to or explain how to go about that? A "nix-build -A goPackages.syncthing" was throwing me all kinds of build errors, e.g. "undefined: xdr.Marshaller". |
Also, syncthing-protocol has a syncthing-protocol011 counterpart, so perhaps that one also ought to have a syncthing-protocol012 added? |
rev = "v${version}"; | ||
owner = "syncthing"; | ||
repo = "syncthing"; | ||
sha256 = "0c0dcvxrvjc84dvrsv90790aawkmavsj9bwp8c6cd6wrwj3cp9lq"; | ||
sha256 = "108w7gvm3nbbsgp3h5p84fj4ba0siaz932i7yyryly486gzvpm43;" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The semicolon is in the wrong place here.
Sorry for not testing. An updated patch is on the way...
I asked on #syncthing, and it turns out that the protocol code is now included in syncthing. The protocol repository is maintained as a reference. |
This happens to me, too. The syncthing012 package also fails to build, as below. Any advice?
|
* pkgs/top-level/go-packages.nix (syncthing): Update to 0.13.2. (syncthing-011): Replace with ... (syncthing-012): ... this. * pkgs/top-level/all-packages.nix: Adjust accordingly.
I'm grasping at straws as much as you are here, but every error there relates to finding the go-metrics source and this one is what seems suspect to me:
That appears to be the path to the rcrowley/go-metrics package, so why would it not find the source in there? What do you see in that directory? Also thanks for the labels @joachifm :) |
On Wed, May 25, 2016 at 06:14:32AM -0700, Paul Hendry wrote:
I'm not sure how Nix does it, but in Guix, it would be very unusual to |
I've made some progress. On March 5th Syncthing switched to using the Go vendoring feature for dependency management (see syncthing/syncthing@65aaa60), which is on by default in 1.6 but by flag only in 1.5. We're still specifying its dependencies manually in go-packages.nix, so we're bound to end up with all sorts of incompatibilities. Try replacing the buildInputs line in the syncthing definition with this one:
This seems to solve everything for me, except that I'm getting the following errors now:
I had a look in that file and auto is a package defined in syncthing/syncthing and it's being properly imported into that source file, so I have no idea why it's showing up undefined. Still hoping a go-aware person can swoop in and help out. |
Holy shit, I got it to build. I had to add this abomination to my preBuild section I mentioned earlier:
Surely there's a variable somewhere which stores that "go/src/github.com/syncthing/syncthing" path which could be used instead. Anyway, this runs the script which generates the gui.files.go source file. Seems like a deeper problem though, in that we're not using the build.sh or build.go script that syncthing provides for building their application. Can't we just call that directly to save having to track any changes they make to how they build? I imagine we could do that by defining syncthing as a regular nix package as opposed to a goPackage? |
Go generate would probably deal with that. Or just using our build scripts. |
As mentioned on the #syncthing IRC channel, we should be trying to package 0.13.4 now. |
The asset thing isn't behind go generate, for raisins. However, the easiest starting point ought to be
which should do the right thing, assuming the build directory is in the correct place in $GOPATH or in a place that could be made to be the right place by guessing a $GOPATH. If you make that work, we'll guarantee it keeps working, as that is how we build all our stuff. |
@pshendry You seem to have a stronger grasp on Go than me. Do you want to take this over? |
I've put up a PR: #15730 |
Please refer to #15730 |
Motivation for this change
Version 0.13.x is the latest release series of Syncthing, including many improvements and bug fixes, including a security fix:
https://forum.syncthing.net/t/syncthing-v0-13-2-and-v0-12-25-released/7421
We keep the previous release series packaged because there are 3rd party implementations that may not have been updated to 0.13.x, which is incompatible with 0.12.x.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)(syncthing-011): Replace with ...
(syncthing-012): ... this.