492 points · by sph · 6mo ago · 185 comments
The one place in my usage where it doesn't match Samba rsync is with the following:
openrsync --rsync-path=openrsync -av -e ssh /etc/services example.com:/tmp/services
I would expect openrsync to create a remote file /tmp/services, but instead it creates /tmp/services/services.
Normal directory mirroring as in -av -e ssh /path/to/src/ example.com:/path/to/dst/ works as it does with Samba rsync.
> openrsync --rsync-path=openrsync -av -e ssh /etc/services example.com:/tmp/services
This appears to match "normal" `rsync` behavior as well. I think you need a trailing slash after `services` to sync only the contents.
EDIT: actually my "normal" rsync is openrsync on macOS...
I think some people may not be reading closely. On Unix, "/etc/services" is a file, not a directory:
$ file /etc/services
/etc/services: ASCII text
Here are two OpenBSD 7.9 endpoints running Samba rsync:rsync -av -e ssh /etc/services example.com:/tmp/services
The above command creates a mirror of the local file /etc/services in a remote file called /tmp/services. The outcome is exactly the same as if I had run "scp /etc/services example.com:/tmp/services"
client$ sha256 -q /etc/services
469d28e72ed0e0994d31b555cc1bed7bc95a23fd1beeb30062affb64db0dd44a
server$ sha256 -q /tmp/services
469d28e72ed0e0994d31b555cc1bed7bc95a23fd1beeb30062affb64db0dd44a
openrsync --rsync-path=openrsync -av -e ssh /etc/services example.com:/tmp/servicesThe above command creates a mirror of the local file /etc/services in a remote file called /tmp/services/services. The outcome is NOT the same as if I had run "scp /etc/services example.com:/tmp/services"
Please note that "/tmp/services" and "/tmp/services/services" are different.
client$ sha256 -q /etc/services
469d28e72ed0e0994d31b555cc1bed7bc95a23fd1beeb30062affb64db0dd44a
server$ sha256 -q /tmp/services
sha256: /tmp/services: read error: Is a directory
server$ sha256 -q /tmp/services/services
469d28e72ed0e0994d31b555cc1bed7bc95a23fd1beeb30062affb64db0dd44a
Here's an OpenBSD 7.9 client and Ubuntu server both running Samba rsync:rsync -av -e ssh /etc/services example.com:/tmp/services
The above command creates a mirror of the local file /etc/services in a remote file called /tmp/services. The outcome is exactly the same as if I had run "scp /etc/services example.com:/tmp/services"
If you disagree, please state what operating systems you're using and copy/paste the output of the following commands on each side:
uname -a
rsync -V
openrsync -V
I get $ rsync -V
rsync version 3.4.3 protocol version 32
(snipped)
$ openrsync -V
openrsync 0.1 (protocol version 27)
Then please run the commands I ran above, in particularopenrsync --rsync-path=openrsync -av -e ssh /etc/services example.com:/tmp/services
And then type "file /tmp/services" on the remote server.
One of the biggest points of confusion with rsync is how directories and trailing slashes are handled.
Source ending in “/“: You want what’s inside. Source not ending in “/“: You want the thing (i.e. directory itself). For the destination, it does not matter whether it ends in “/“ or not, but for consistency I like adding a “/“ anyway (I want to put thing inside the directory).
No. And just to make sure, I ran a quick 'rm -rf /tmp/services' on the remote host, then re-ran openrsync on the client. Same result. This is OpenBSD 7.9 on both sides.
And I 100% agree about trailing slashes.
the trailing slash is pretty convenient.
As someone who has also suffered uncountable years of abuse from rsync, I understand the impulse, but I think it makes a lot more sense (and is a safer default) to create a second ”services”.
If we have a chance to change rsync defaults to something less insane and save future generations from this mess I think we should.
Of the two possible worlds where in one this reimplementation matches what some see as annoyances in the interface or in another they mostly match the interface except for a few cases where the purposefully diverge (for no good technical reason), IMO the latter is far worse and causes more enexpected behavior.
At most, add a special flag to opt into different default behavior so nobody is surprised by running the same command on different systems and getting different behavior.
LLMs make writing code faster/easier, but the thinking was always the important bit. I’ve no idea why you’d muck up such a long-standing, reliable piece of software.
I find it quite strange that people do not seem to be aware of that...I think many started worshipping the tool as if it was some kind of divinity and lost all objctivity. This doesn't bode well for the future if people aren't able to review code anymore.
So rsync should be pinned to an older version and just get security updates.
> [...]"I have often worked on the boundary of free and proprietary software, right from when I was dosemu maintainer for a while, to Samba and many other projects. I make all my projects open, usually GPLv3, but I don't mind using closed tools to help me work more efficiently, even though I am creating free software myself. I know some people take a stronger stance and refuse to use any closed tools at all. That is a great choice if that is what you want to do. It isn't how I work, and it never has been."
https://lwn.net/Articles/968732/ "Tridge returns to rsync [Posted April 6, 2024 by jzb]"
stapelberg: 329 commits
jonas-fi: 15 commits
others: 1 commit each
The bus factor is 1.I am not seeing pledge on Alpine Linux in edge. Have people been testing Pledge on Linux? Did I perhaps misunderstand the risk of using Openrsync without pledge? Or is this article just for OpenBSD users?
there might be newer stuff in linux land now i see comments about landlock but i assume those will build on the linux primitives rather than whole new ones. - total assumption there but it would seem logical to reuse rather than make new.
part of likely what they mean by 'mess' is that its all over the place. many different ways to try and lock things down. hard to pick what is best etc. without thoroughly diving into the different subsystems entirely. (as opposed to just have 1 or 2 relatively simple system calls)
> Without them, your system accepts arbitrary data from the public network.
Neither of these features change if you are accepting arbitrary data from the public network. They limit what an exploited process can do. It's explained properly in the 'Security' section, so I'm not sure where this came from.
Under Portability [1] I don't have access to update that repo. I deleted my accounts when Microsoft took over.
> The only officially-supported operating system is OpenBSD, as this has considerable security features.
And below your quote:
> This is possible (I think?) with FreeBSD's Capsicum, but Linux's security facilities are a mess, and will take an expert hand to properly secure.
It is portable in the sense that it compiles and runs, not in the sense that it has the same security features.
I'd love to see pledge/unveil on (upstream) Linux - but I'm not holding my breath.
There is Landlock now, I believe it would be possible to implement unveil and pledge on top of that.
https://clehaxze.tw/gemlog/2022/04-02-landlock-unveil-experi...
There was a discussion here about it a few years ago: https://news.ycombinator.com/item?id=32096801
https://medium.com/@jobsnijders/a-proposal-for-a-new-rpki-va...
EDIT: ah, fun: they did include it in 15.0, but they decided to save the breaking change that removed backwards compatibility for 15.4. https://apple.stackexchange.com/a/479297
How is that supposed to work? I guess they mean something like, the forked child forwards the connection to the parent using a socket pair, or just connects its stdout/stdin to the socketpair "pipe" (socket) and execs ssh.
But that's like saying you're going to Australia by car when you mean you're driving to the airport.
As an aside I really love the stuff openBSD puts out. If they ever succeed in making a modern journalling filesystem I will probably switch over.
Thanks for the various vibecoding posts, I wasn't aware of the extent of it. Some prior HN discussion: https://news.ycombinator.com/item?id=48334021
(EDIT: --exclude is now supported on 7.9. Not sure when that was added, nice!)
But seems avoiding "slop" is getting very hard. I saw postfix now has a bit of AI code in it.
https://mastodon.sdf.org/@mrmasterkeyboard@mastodon.social/1...
That is from the original post in the thread. Is that really due to LLM ? I do not know since I avoid AI as much as I can.
But the person also posted this link too:
https://github.com/NetBSD/src/commit/f764ddf4062e855f73fe2e3...
I have not tried using exclude in openrsync in a while, but I can see it now works on OpenBSD 7.9!
Code is like a math proof: sketched first on a napkin, then on a blackboard, and then finally typeset in a paper. Each step tidies up the ideas to improve the communication of intent, and the final version should be self evidently stable and/or correct.
In the old days you’d see code stability emerge as the “v2” edition of some piece of software. Mozilla to Phoenix to Firebird/fox. Linux 2.2 to 2.4. Python 2.6 to 3.x. The design patterns are carried over but the implementations are revamped for more stable, more legible, and more maintainable code.
I don’t mind that vibe coding is the latest form of this phenomenon. We have all been “vibe coding” for decades really. Code like this crap:
T = “hello world”
def foo_2():
FONT = “Perpetua.ttf”
w = text(T, Font)
w2 = w.translate((50,0,0))
w3 = w.translate((0,0,20))
show(w3)
…gets eventually rewritten, once it works, into: def render(phrase: str, font: Font) -> Shape:
return w.text(phrase, font)
font = Fonts.load(“Perpetua”)
text = render(“hello world”, font).translate((50, 0, 20))
show(text)
Before, we’d hack a v0, tidy it up sufficiently for it to be worth of review as v1, then, come back much later and rearrange the innards (in a far more sensible way) as v2.With LLMs — especially in the hands of those who can’t read or won’t read the actual code — we are seeing a lot more version zeroes in the world. Thank you OpenBSD for giving us, albeit surprisingly for rsync, a nice v2.
Two different ways of thinking about it I guess... it's nice to have choices and I don't think one is more or less "correct", more a matter of opinion/taste I guess.
GNU folks would say that the GPL does more to protect the freedom of end users by guaranteeing their right to access the source code, whereas permissive licenses allow users to receive binaries, the source code corresponding to which is unavailable to them.
I'm not trying to be idly pedantic here, but to emphasize one of things I genuinely admire about the FSF, SFC, etc.: while they do have words, concepts, and terms of art they're attached to, they're actually pretty good at always explicitly tying their positions back to a specific and well-articulated vision of software freedom. They don't usually get caught up in pure terminology ("what is maximally open?", "what is really free?"). They tend to be clear about whose rights they aim to promote and protect and why, and the bigger picture that fits into.
Whether you agree with them or not, I think it's a more defensible position than a shallow terminological squabble.
As someone that is somewhat aligned with those groups, I also want to say this: licenses are just tools for promoting freedom. It's a question of strategy and tactics. All permissively licensed free software is still free software, and the vast majority of it undeniably contributes positively to software freedom on the whole. (The only concrete exceptions I can think of are uses of permissively licensed free software code to implement things like Intel's Management Engine, DRM, maybe some Trusted Computing stuff.) OpenBSD is free software and it's good shit. We should think of licensing questions like this as a friendly dispute among people who have all given generously to support software freedom.
I don't think so; it's two different goals, not two different ways of thinking about it.
The goal of GPL is the interests of users (they can never be locked out of improvements no matter who makes changes).
The goal of BSD is the interests of the developers (A developer can take it, add mods and close of the entire result).
In practice, GPL is pro-user, BSD/MIT is pro-business.
A true morality must be based on consent, not coercion. Humanity may not be there yet, and therein lies the argument for force (and thus copyleft); but the ultimate goal should always be to reduce its necessity.
> OpenSSH originated in 1999 as a fork of Björn Grönvall's OSSH, which derived from Tatu Ylönen's original SSH 1.2.12 release, the last version distributed under a license permitting open-source redistribution before Ylönen's subsequent software became proprietary under SSH Communications Security.[4]
* https://en.wikipedia.org/wiki/OpenSSH
It was probably the second thing with the Open— prefix by this group of developers, OpenBSD itself being the first. They simply ran with the naming convention. OpenBGP/OSPF were developed as alternatives to Quagga (GPL).
> This system has been merged into OpenBSD base. If you'd like to contribute to openrsync, please mail your patches to tech@openbsd.org. This repository is simply the OpenBSD version plus some glue for portability.
Seems more cathedral than Bazaar to me.
The problem with this fragmentation of rsync is that Apple and Android will prefer it, but the Linux and greater GPL world will adhere to the original implantation due to inertia. Power users will just have to know the quirks of each version.
The only way to stop this is for the original author(s) to release this under a BSD license.
Edit: For those assuming equivalent/identical behavior, study these words carefully: "accepts only a subset of rsync's command-line arguments."
Would that stop it? My understanding was that at least OpenBSD tended do redo things for technical reasons, not just licensing
The correct way to stop this is to file bugs against the software for not matching the de-facto standard of the copied software.
Edit: I see that they switched from ustar to pax as the default format in OpenBSD 7.6, so I guess this isn't true any longer.
That is likely not possible even if they wanted to - unless all contributors have signed over rights to their contributions.
Even then if the new project is specifically wanting to simplify things, and/or a change in language is important, reimplementation might still be preferable for them.
My thought upon reading this is why would Apple or Android bother including rsync? I've noticed that I've needed to install it manually on fresh installs of Debian, FreeBSD...
But then, I just checked a recent Mac that I don't use much and haven't put much on, and it's installed.
No, then you get proprietary forks of the BSD codebase.
Apple doesn't like GPLv3, but this is by choice.
Sometimes, inventions by OpenBSD team (often using Open as prefix) become standard, such as OpenSSH and PF.
No, but that's why almost nobody runs it outside of strict trust boundaries. This security section would make more sense if rsync was like curl, which routinely deals with hostile counterparties. If the other side of your rsync is hostile, you probably have bigger problems!
(I'm not an rpki person so I don't know if there's some part of that problem domain that changes this equation. I'm not dunking on the project, just saying this snagged me in the README).
I disagree. While rsync is most often used to transfer data between "friendly" systems, it's inherently crossing a security boundary. It's important to make sure that an attacker can't leverage it to transform the breach of one system into the breach of multiple systems.
I guess you can define "strict" however you want, but from what I saw ~10 years ago, most linux distros handled mirroring with rsync. That's a lot of usage in a pretty core part of the foundational open source ecosystem.
They’re layering on checksums and signing such that they mostly don’t think about the trustworthiness of mirrors or the networks between them.
If you are considering migrating away from github, don't just consider gitlab and gitea, consider just git, and so on..
If you are considering migrating away from rsync, consider dd. You need to configure the folders you want to backup as mountable partitions or disks, but it does byte for byte copies instead of 100kloc fuckery.
What the hell? That’s the job.
That said, every language on earth will adapt foreign words into its phonology. The alternative would be to adopt the phonology of every language that loaned a word into your language.
- people avoiding systemd like it's the plague
- people avoiding wayland because it is devil's work
- people avoiding rsync because someone used AI on the testcases
- ...
AI is only going to get better and better. Eventually manually writing software by hand with programming languages will be thought of as the punch-card phase of software development.
Do these people think we'll be writing software in 200 years time? That anybody will be maintaining rsync, let alone this "moral human hands only" version of it?
The anti-AI lot are trying to make all AI content wear a Scarlett letter. I wish they would wear one themselves so that we could filter them from our timeline.
This "effort" is entirely wasted.
what twitter account proved that?
Ubuntu's packaged rsync, is it Samba rsync? Why reimplement it?
I like open bsd but this just seems like burning cash
Or to put it more concretely, people working on the rpki standard(who happened to also be openbsd devs) wanted to use rsync to transfer bulk data. The standards body was hesitant, while rsync is ostensibly a documented protocol, there was only one implementation. So in true openbsd fashion they rolled up their sleeves and wrote that second implementation.
On use, there is nothing wrong with openrsync, however it may never hit feature parity with rsync, that is not a goal of the project, they want a specific subset of rsync features to support their rpki needs. If anyone else finds this useful that is great. So I suspect users will be those who want a bsd licensed rsync(apple) or them who are willing to give up features for openbsd quality code(myself).
They don't necessarily think they are better for getting reciprocal contributions from evil corporations even though many do argue that today, especially after GPLv3.
See the redis licensing debacle and why and how it was resolved. If I understand it correctly, the FSF could technically sell all of GNU tools to Microsoft which could in turn keep them closed source including all contributions over the past 40 years. Not without losing all of their remaining credibility, but still.
There's some discussion here that might help answer your question: https://en.wikipedia.org/wiki/Open_source#Economics