-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Update link in web interface does not work on OpenBSD. #1272
Comments
|
Targets OpenBSD specifically, so I am a bit puzzled why it's not there. |
I agree though that os.Args[0] should be sufficient. |
Unlike Linux, ObenBSD supports procfs only as optional feature and only on some architectures. //edit: rephrased |
I'll have to wait for @calmh to answer this. |
Right. So this only works on the OpenBSDs that have a /proc. We need /proc to find the location of the binary so we can upgrade it. We should probably just do this check earlier and disable auto upgrades if we can't determine the binary location. (os.Args[0] is what the user called the binary as, which may not contain the path) |
Isn't |
If I just type |
Ah yes, I am just used to not having anything in my path. |
Without /proc we can't determine our binary location and can't auto upgrade. Closing. |
Maybe adding an optional binary location config path would help solving the issue? People who prefer auto updates could set their location this way making it independent off /proc. |
Maybe one of the three OpenBSD users feel strongly enough about this to propose a patch. :D |
If you look at the github download stats, there are at least 160 of them... |
No problem then. |
@calmh I'll provide a patch with the proposed config option solution. Stay tuned ;) |
@mulander Maybe just fall back to argv[0] and if that's not an absolute path explain the problem to the user? |
@calmh sounds reasonable to me. I just finished work for today so will spent some time trying out options - will avoid adding new config for it and will report back with a patch or more info. |
Or check $PATH/srgv[0] |
@calmh @AudriusButkevicius I was on my way to do a best effort implementation and finally found out how syncthing locates the current executable. It seems that you guys depend on a frozen version of kardianos/osext using Godeps. Seems that this whole issue is already fixed upstream and all you need is to pull this commit provided by ajacoutot who is an OpenBSD developer. |
Right, we only need to upgrade that then. |
On a related note, could you also pull in the changes from kardianos/osext@431e263 ? I tried to do it myself, but I can't figure out godep :( |
There you go. Shutting down this issue to avoid piling more things on it. ;) |
If you click the update link on the web interface on OpenBSD, you will get an error:
upgrading: readlink /proc/curproc/file: no such file or directory
OpenBSD (and probably some other UNIXs) does not have
/proc
.Presumably you are trying to get the server's PID? It is typical to write a PID file into
/var/run
.Thanks
The text was updated successfully, but these errors were encountered: