Summary: | net-p2p/syncthing - decentralised remote file synchronisation/sharing? | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Frank Krömmelbein <kroemmelbein> |
Component: | New packages | Assignee: | Default Assignee for New Packages <maintainer-wanted> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | andrius, anthonyryan1, axiator, bert, dschridde+gentoobugs, flow, henrik.wennergren+gentoo, jauhien, jgeboski, leho, marco.dr, me, orzel, pacho, s7mon, sbraz, Sergiy.Borodych |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://syncthing.net/ | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
syncthing-0.9.13.ebuild
syncthing-0.11.26-r3.ebuild syncthing-0.12.10.ebuild |
Description
Frank Krömmelbein
2014-05-13 17:46:31 UTC
Created attachment 384274 [details]
syncthing-0.9.13.ebuild
I fix ebuild from mva to build syncthing releases without git. But it require app-misc/godep::mva
You will take a more advanced ebuild with init.d script: https://github.com/bor/gentoo-overlay/tree/master/net-p2p/syncthing I'm trying keep up-to-date it. Could you please also add systemd support (mva ebuild includes it) (In reply to Andrius Štikonas from comment #3) > Could you please also add systemd support (mva ebuild includes it) Sorry, I meant nektoo overlay ebuild has systemd support. Dependencies seem rather light. Any chance for syncthing to get to the portage tree? Created attachment 413774 [details] syncthing-0.11.26-r3.ebuild Updated ebuild with: - add godep dependency (from gentoo portage) - more compatible with golang-* eclasses - systemd support - add install man Full history: https://github.com/bor/gentoo-overlay/commits/master/net-p2p/syncthing It would be really nice to have syncthing in the portage tree. (In reply to Sergiy Borodych from comment #6) > Created attachment 413774 [details] > syncthing-0.11.26-r3.ebuild > > Updated ebuild with: > - add godep dependency (from gentoo portage) > - more compatible with golang-* eclasses > - systemd support > - add install man > > Full history: > https://github.com/bor/gentoo-overlay/commits/master/net-p2p/syncthing Latest is v0.12.2. bor, how do you evaluate your current ebuild? Perhaps could file a pull request against main portage tree and go through high-level QA? I've added the latest one to my repository. Just waited for some "stabilization" in new release and for android version. Please enjoy. Would be nice if someone review the ebuild and give a feedback. Also if someone might test systemd flag enabled (I don't have it). After that I will create a pull request. (In reply to Sergiy Borodych from comment #9) > I've added the latest one to my repository. > Just waited for some "stabilization" in new release and for android version. > Please enjoy. > > Would be nice if someone review the ebuild and give a feedback. > Also if someone might test systemd flag enabled (I don't have it). > After that I will create a pull request. I've tested syncthing 0.12.4 with systemd flag enabled on ARMv7 (Odroid-U2). Both arm and systemd don't seem to cause any problems. (I am running syncthing as my normal user, so creating special syncthing user was not necessary but I guess it doesn't hurt.) What is the purpose of having a "syncthing" user? As far as I am aware every user should run their own syncthing instance. (In reply to Wilke Schwiedop from comment #11) > What is the purpose of having a "syncthing" user? > As far as I am aware every user should run their own syncthing instance. This is a valid question. System level user doesn't seem to be necessary. Any insights from the active people? (In reply to Leho Kraav (:macmaN @lkraav) from comment #12) > (In reply to Wilke Schwiedop from comment #11) > > What is the purpose of having a "syncthing" user? > > As far as I am aware every user should run their own syncthing instance. > > This is a valid question. System level user doesn't seem to be necessary. > Any insights from the active people? http://docs.syncthing.net/users/autostart.html#using-systemd this actually describes the options in great detail. I've removed the enewuser() call, and also later the creation of /var subdirectories with the fowners() call. Syncthing installs and launches without any issues. Strange thing is https://github.com/syncthing/syncthing/tree/master/etc/linux-systemd/system lists syncthing-inotify@ as a Wants optional dependency but I'm not sure where or how this file exists. I'm not sure it makes sense to default to USE=logrotate together with USE=systemd. logrotate isn't necessarily needed with the journal. 1. about logrotate > net-p2p/syncthing: version bump, remove 'logrotate' flag > > seems like a proper way to remove 'logrotate' flag due to bug #198901 > and install logrotate stuff unconditionally 2. about default user I'd prefer to have a some default configuration which can work from start without any additional setup. This is a main reason to keep it. Please advise me if a default user need for systemd configuration (system-wide or user)? Or I can skip it? (In reply to Sergiy Borodych from comment #16) > Please advise me if a default user need for systemd configuration > (system-wide or user)? > Or I can skip it? It is not needed. See https://github.com/syncthing/syncthing/blob/master/etc/linux-systemd/system/syncthing%40.service#L8 syncthing@.service the @ character means that the service cannot be launched by itself at all. You always have to specify a parameter like syncthing@user.service. If you specify a non-existent user, the startup will fail, because User=%i (variable substituted by everything after @) will not succeed. This type of multi-instance service configuration is something I really like about systemd. (In reply to Leho Kraav (:macmaN @lkraav) from comment #17) > This type of multi-instance service configuration is something I really like > about systemd. Thankfully this functionality isn't systemd-exclusive. The openrc scripts should probably set up the same way. It seems that this ebuild does not work if sys-kernel/gcc:5[go] is installed. godep go build -ldflags "${ldflags}" -tags noupgrade "./cmd/${PN}" just runs forever (I waited for 20 minutes and it was just using 100% CPU). I tested some other syncthing ebuild from bliss-overlay and that one actually built (that ebuild uses build.go file to compile syncthing) Not sure what is the best way to deal with this but otherwise it might break a lot of machines with GCC 5. (In reply to Andrius Štikonas from comment #19) > It seems that this ebuild does not work if sys-kernel/gcc:5[go] is installed. > > godep go build -ldflags "${ldflags}" -tags noupgrade "./cmd/${PN}" > just runs forever (I waited for 20 minutes and it was just using 100% CPU). > > I tested some other syncthing ebuild from bliss-overlay and that one > actually built (that ebuild uses build.go file to compile syncthing) > > Not sure what is the best way to deal with this but otherwise it might break > a lot of machines with GCC 5. Sorry, it seems this only happens on my ARM machine. /usr/armv7a-hardfloat-linux-gnueabi/gcc-bin/5.3.0/go command with any argument just gets stuck and uses 100% CPU Everything is fine on amd64 (except that if gcc:5[go] is installed then it is used to compile syncthing and hence dev-lang/go dependency is pulled but not used at all) I've reported that go clobbering bug to gcc toolchain maintainers and they fixed it (#567806), so syncthing will still work with newer version of gcc. (In reply to Leho Kraav (:macmaN @lkraav) from comment #17) > You always have to specify a parameter like syncthing@user.service. If you > specify a non-existent user, the startup will fail, because User=%i > (variable substituted by everything after @) will not succeed. Thank you for the point. I've fixed that. > net-p2p/syncthing: version bump, fix systemd setup > > change systemd setup to use 'syncthing' user by default, > add elog message about custom setup (In reply to Wilke Schwiedop from comment #18) > Thankfully this functionality isn't systemd-exclusive. > The openrc scripts should probably set up the same way. I will do it later. I want it also :) (In reply to Andrius Štikonas from comment #20) Sorry but haven't tested it on arm at all. That's why only ~amd64 keyword present. For other keywords I think QA team will help later (before add into portage). > (In reply to Andrius Štikonas from comment #20) > > Sorry but haven't tested it on arm at all. > That's why only ~amd64 keyword present. > For other keywords I think QA team will help later (before add into portage). Ok, no worries. Unfortunately new ebuild seems to have regressed on systemd support. It is no longer possible to run it as a custom user: systemctl restart syncthing@username: Failed to restart syncthing@username.service: Unit syncthing@username.service failed to load: No such file or directory. I looked into /usr/lib/systemd/system/ folder and syncthing@.service file does not exists anymore, only syncthing@syncthing.service FYI, I made a PR with some systemd related changes: https://github.com/bor/gentoo-overlay/pull/2 Had a few more changes in mind, but currently can't remember them. I also have an ebuild for syncthing-inotify, see https://github.com/bor/gentoo-overlay/pull/2 (In reply to Stijn Tintel from comment #24) > I also have an ebuild for syncthing-inotify, see > https://github.com/bor/gentoo-overlay/pull/2 Copy-paste error, https://github.com/stintel/gentoo-overlay/tree/master/net-p2p/syncthing-inotify Created attachment 421852 [details]
syncthing-0.12.10.ebuild
Thanks guys.
Fixed in the last version. Please test it.
(In reply to Sergiy Borodych from comment #26) > Created attachment 421852 [details] > syncthing-0.12.10.ebuild > > > Thanks guys. > Fixed in the last version. Please test it. systemd support seems to work. Thanks! I'd like to point out that there a good quality, working and up-to-date ebuilds for syncthing, syncthing-inotify and syncthing-cli in the (unofficial) go overlay [1]. You can add the overlay with "layman -a go-overlay" 1: https://github.com/Dr-Terrible/go-overlay Happy to see this land in the tree today! https://packages.gentoo.org/packages/net-p2p/syncthing https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=964575f8faa45a7feed074617d26461c5bb7e015 That's nice. Although still without any systemd support. (In reply to Anthony Ryan from comment #29) > Happy to see this land in the tree today! > > https://packages.gentoo.org/packages/net-p2p/syncthing > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=964575f8faa45a7feed074617d26461c5bb7e015 There appears to be some bug in there. It reports its own version as "unknown-dev" and suggests to upgrade to 0.12.17 (which is the version it should be at, according to the ebuild). Heh, apparently this was available from a zillion overlays before I landed it in the tree yesterday. Please file separate bugs about all the stuff that could be better. Any willing proxy maintainers are also quite welcome! IMHO quality of ebuild in portage is not good enough :( Why you didn't pick my ebuild? (In reply to Sergiy Borodych from comment #33) > IMHO quality of ebuild in portage is not good enough :( > Why you didn't pick my ebuild? Due to the large volume of new package requests, unfortunately packages sometimes get added without noticing the existing work on a bug like this. Your contribution is definitely appreciated, and to ensure it doesn't get lost I suggest filing a new bug with your improvements attached as a patch. |