Opened 11 years ago
Last modified 9 years ago
#42129 new submission
[NEW] lsyncd
Reported by: | jul_bsd@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | Cc: | cooljeanius (Eric Gallager), mfeiri, layer@… | |
Port: | lsyncd |
Description
Live syncing/mirror daemon
build/install correctly but as it uses fsevents and need headers, I had to manually download xnu kernel. don't know how it's handled inside macports.
Attachments (1)
Change History (15)
comment:1 follow-up: 2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Port: | lsyncd added |
---|
comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign@…:
- We have an xnu-headers port in MacPorts. Perhaps you want to declare a dependency on and use the contents of that.
Or perhaps not, since the presence of that port has caused problems and it has been requested that we remove that port: #39605
So maybe instead you need to just download the headers in the port and use them.
comment:3 Changed 11 years ago by jul_bsd@…
I modify the Portfile with corresponding remarks. One note after discussing with the author, the port has a few restrictions which will make it stalled unless Apple change positions on fsevents. See See https://github.com/axkibe/lsyncd/issues/257
Not really sure how to include xnu-headers manually in Portfile (I keep at is). extract kernel release, mirror tree from apple.
comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Regarding xnu-headers, since apparently it needs a different version for each version of OS X, that kind of complicated logic probably belongs in its own port. I've suggested the xnu-headers port be modified to do this.
You've listed asciidoc as a library dependency. It's probably only a build dependency.
Is there a reason why you're using the lua static library? If possible, use the lua dynamic library instead.
comment:5 Changed 11 years ago by jul_bsd@…
For xnu-headers, it seems not good from port. The needed header (bsd/sys/fsevents.h) is not present...
As for lua, if I use: 'configure.env LUA_CFLAGS="-I ${prefix}/include" LUA_LIBS="${prefix}/lib"' I got:
checking for lua... /opt/local/bin/lua checking for luac... /opt/local/bin/luac checking whether Lua library was compiled with compat support... no configure: error: Lua library needs to be compiled with compat support Command failed: cd "/opt/local/var/macports/build/_Volumes_Data_myports_net_lsyncd/lsyncd/work/lsyncd-2.1.5" && ./configure --prefix=/opt/local --without-inotify --with-fsevents
comment:6 Changed 11 years ago by cooljeanius (Eric Gallager)
You should probably get in touch with mfeiri if you need help with using the headers from the xnu-headers port, as he is the maintainer for it.
comment:8 Changed 11 years ago by mfeiri
Well, the xnu project does not include the relevant file in the regular installation of header files. As a mere packager I am very hesitant to deviate from the intention of the upstream project. Presumably this interface is intentionally kept private because improper use might cause events to get lost. The warnings in lsyncd seem to indicate that this is a known issue, e.g. causing interferences with Spotlight and Time Machine.
I think there are several alternative ways to achieve what lsyncd needs on Mac OS X. I see that the developer of lsycnd already dismissed FSEvents (did he consider kFSEventStreamCreateFlagFileEvents?) and kqueue, so let me suggest two other options:
- Use scoped Spotlight queries through the MDQuery API (requires a CoreFoundation runloop, e.g. in a thread)
- Use dtrace to monitor I/O syscalls for operations in target paths, for example as seen in opensnoop.
Frankly, if the developer of lsyncd still insists to use private APIs, then IMHO he has to take the burden of including and maintaining the definitions of these interfaces in his application. If upstream doesn't agree then you could manually fetch the missing header file from http://www.opensource.apple.com/source/xnu/xnu-2422.1.72/bsd/sys/fsevents.h as an additional distfile, see http://guide.macports.org/#reference.phases.fetch for examples. Or we patch xnu-headers just for lsyncd.
comment:10 Changed 11 years ago by jul_bsd@…
There was a recent thread on this and author could make a porting to the FSEvents Framework https://github.com/axkibe/lsyncd/issues/257
but it's not a near future evolution.
In the meantime, we need to decide on what to do with the port.: stay in trac, commit w building manual action, commit w the header file in the port (and check if there is anny big differences between osx release), commit w xnu-headers port, or whatever. A big restriction for now, it requires root to run (chmoding 666 /dev/fsevents doesn't seem enough)
Changed 11 years ago by jul_bsd@…
comment:12 Changed 11 years ago by mfeiri
Cc: | mfeiri@… removed |
---|
Thanks for pointing out the upstream discussion. It seems to take a while though to get a proper fix implemented in upstream. Meanwhile IMHO the only sane (though ugly) solution is to extend the port to download its own copy of xnu and use this during the build phase. See the aforementioned http://guide.macports.org/#reference.phases.fetch for instructions ... or use "watchman" instead of "lsyncd".
Thanks. Some observations: