This is a clean-room implementation of rsync with a BSD (ISC) license. It is designed to be compatible with a modern rsync (3.1.3 is used for testing). It runs only upon OpenBSD, although porting the system is trivial. reddit / BSD ---------------------------------------------------------------------- sigzero · 2019-01-19 15:08 Very cool. What was the motivation for doing this if I might ask? ---------------------------------------------------------------------- calrogman · 2019-01-19 16:05 rsync is unsuitable for inclusion in the base system due to its license (GPLv3), and somebody wanted something like rsync in the base system. ---------------------------------------------------------------------- daemonpenguin · 2019-01-19 17:38 I like the concept and it's nice to see a more liberally licensed rsync implementation. I tried it out on FreeBSD and found there are a lot of lower-level type defines that didn't translate well between platforms. Just about any part of the code that uses types like mode_t or uid_t or any type conversion in string formatting results in a compiler error or warning. Porting isn't going to be hard, but it will require going through and fixing some include path names and finding equivalent types, or making type conversions for alternative platforms. Update: Most of the compiler issues can be fixed with some includes, which is good. There are a lot of linker errors though due to missing functions. OpenBSD has some cool features like pledge, unveil and so on which don't translate over to other BSDs. I'm looking at making a patch for this. ---------------------------------------------------------------------- VOP_LOOKUP · 2019-01-19 22:23 It's also able to be pledge'd ---------------------------------------------------------------------- masta · 2019-01-19 22:28 Oh wow, I didn't realize it went gplv3, that is a huge pity. One aspect of rsync I wish would change, is multiple process. ---------------------------------------------------------------------- VOP_LOOKUP · 2019-01-19 22:34 mode_t and uid_t are required by posix, every unix-like should have those. ---------------------------------------------------------------------- poshpotdllr · 2019-01-19 22:34 FUCK YES HAHAHHAHHAHA KRYSTAPS STRIKES AGAIN! ---------------------------------------------------------------------- daemonpenguin · 2019-01-19 22:44 FreeBSD probaby does have these, but not in the same locations as OpenBSD meaning the code needs to be patched to provide those definitations. In fact, FreeBSD's compiler indicates mode_t is not recognized and recommends using __mode_t. ---------------------------------------------------------------------- kristapsdz · 2019-01-20 00:23 And unveil'd. ---------------------------------------------------------------------- dlangille · 2019-01-20 05:00 If you need this in the ports tree, I can help. ---------------------------------------------------------------------- daemonpenguin · 2019-01-20 14:59 It's not something I need exactly, but I think it would be nice to get openrsync working on FreeBSD. First to get it into Ports and later to maybe get it included in the base OS. Would save me the time of installing the rsync port on all my servers. ---------------------------------------------------------------------- quasive · 2019-01-20 15:06 That's just clang trying to find *something* that looks like what you typed (mode_t) when that exact name is unavailable. It's not specifically recommending that __mode_t be used instead. __mode_t is an internal name that you shouldn't be using in normal code. You just have to include a header which provides mode_t (e.g. sys/stat.h) and it'll work fine. ---------------------------------------------------------------------- daemonpenguin · 2019-01-21 01:05 I realize that. In fact my patch to openrsync does use the header under sys/. What I was doing in my previous post was not saying __mode_t should be used, just illustrating that FreeBSD and OpenBSD define these types in different places. ---------------------------------------------------------------------- ChuggintonSquarts · 2019-01-21 23:04 What does 'clean-room implementation' mean in this context? ---------------------------------------------------------------------- kristapsdz · 2019-01-22 11:44 Not using the GPL sources. ---------------------------------------------------------------------- kristapsdz · 2019-01-23 14:49 As mentioned a few times (and on the README), it's very easy to port using [oconfigure](https://github.com/kristapsdz/oconfigure). But also as mentioned, without having a strong Capsicumisation for at least the receiver, a port is incomplete. People will run the utility as root, and it will be blindly downloading file data. I make liberal use of pledge and unveil to protect against shenanigans---FreeBSD should have the same or similar protections. ---------------------------------------------------------------------- daemonpenguin · 2019-01-23 15:14 Why would people run the utility as root? That doesn't make sense. There is rarely any reason to use rsync as root on any platform. Whether FreeBSD (or Linux) should have similar protections as unveil and pledge isn't relevant. They do, but these platforms tend to use external sandboxing instead of internal. OpenBSD relies on applications sandboxing themselves, which is okay for stuff you put in the base OS and can audit, but doesn't scale. Other platforms use external sandboxing (SELinux, AppArmor, Firejail, etc). This has the benefit of sandboxing processes without relying on the program to self-police. And it scales much better because a generic external sandbox handles most cases without requiring the process's source code to be patched. So demanding that security be added to any cross-platform port makes no sense because other platforms use different models of security that don't require the code to be self-policing.