News for hackers. Stuff that matters.
Re:Systemd: tmpfiles: R /dir/.* destroys root by sevensor on Monday April 17, 2017 @08:29AM (#14130454)
This almost seems like a generational clash. Anybody who's been around for a while knows that you never ever type rm -rf .* because it can blow up in your face. Lennart's response is tone-deaf because he can't understand how anybody could make that mistake. He's never noticed that rm has started refusing to let you shoot yourself in the foot because he would never think of typing rm -rf .* in the first place. Newer users have never had the opportunity to shoot themselves in the foot with rm and are now tripping over systemd. For all the criticism of systemd not being unixy, this bug reproduces classic unix behavior!

edit: unintentional italics

Re:Systemd: tmpfiles: R /dir/.* destroys root by digi_owl on Monday April 17, 2017 @09:01AM (#14130591)
Nah, it is more a clash in that not only do the systemd devs feel the need to make their own rm equivalent. But they fail to look into the evolution of defaults for said command before going "its unix, deal with it".

Yeah it is unix, it is the kind of unix that you only find running on some old DEC somewhere. Not on a modern x86 cluster.

This while presenting systemd as being about making Linux something more than a unix clone.

And when people complain about systemd not being unix, it is about how everything is blobbed together via interfaces that keep changing at the whim of the developers.

This in contrast to how someone can pipe the output of a GNU command to the input of a BSD command and get sane results, because the interfaces are known and fixed.

People would be much more accommodating of systemd if the logind part could be used independently of the init part etc.

Re:Systemd: tmpfiles: R /dir/.* destroys root by majewsky on Monday April 17, 2017 @12:02PM (#14131911)
FWIW, the bug was fixed before Lennart even started the whole discussion.

> it is more a clash in that not only do the systemd devs feel the need to make their own rm equivalent

I disagree. It's a failure of the C standard library to not provide a recursive unlink(), so every C program that wishes to do one has to reimplement the logic manually. Most standard libraries of other languages have a recursive unlink(), for example: https://golang.org/pkg/os/#RemoveAll

Re:Systemd: tmpfiles: R /dir/.* destroys root by prbly_banned on Monday April 17, 2017 @08:38AM (#14130500)
I don't think Lennart is from a generation that would have experienced this.

http://pubs.opengroup.org/onlinepubs/007904975/utilities/rm....

"The rm utility is forbidden to remove the names dot and dot-dot in order to avoid the consequences of inadvertently doing ..."

Re:Systemd: tmpfiles: R /dir/.* destroys root by sevensor on Tuesday April 18, 2017 @11:13AM (#14139480)
Please bear in mind that (1) the existence of a standard does not imply immediate global compliance of new software and (2) the existence of compliant software does not imply that people are actually using it. In the 1990s, when Lennart would have been at university, he would have been exposed to Unix servers that had been installed 5-10 years previously, at least. So the timeframe we're looking at isn't 2001, but the late 1980s / early 1990s.
Re:Systemd: tmpfiles: R /dir/.* destroys root by digi_owl on Tuesday April 18, 2017 @02:12PM (#14141328)
If he is programming for _nix, but has not kept himself current with developments within the _nix ecosystem, that is even more worrying.
Re:Systemd: tmpfiles: R /dir/.* destroys root by sevensor on Tuesday April 18, 2017 @02:46PM (#14141663)
My sympathy is clearly with Lennart here -- we're around the same age, and I like using systemd. I came of age using systems that would absolutely burn you if you tried to remove .* and it's pretty unreasonable to ask me to remember that most users wouldn't have a reason to reflexively avoid it.

You're on much firmer ground arguing that Lennart shouldn't be reimplementing rm. I disagree -- I don't have a problem with him reimplementing rm in systemd -- but there's a legitimate argument to be made there.

Re:Systemd: tmpfiles: R /dir/.* destroys root by onli on Monday April 17, 2017 @08:30AM (#14130468)
That bug is like the quintessence of why systemd is bad. Breaking the system when getting user input that previously worked, not even knowing that the existing tools they replaced had safe-guards against this problem, and when confronted with the issue having a first reaction of "that's not a problem".

The one good thing about this is that they did not close it as 'won't fix'.

Re:Systemd: tmpfiles: R /dir/.* destroys root by kasabali on Tuesday April 18, 2017 @06:25AM (#14137600)
> The one good thing about this is that they did not close it as 'won't fix'.

My educated guess based on reading several previous bug reports is that Poettering would've drag his feet and maybe first close it as wontfix before fixing the issue some time later. Thankfully Martin Pitt fixed it quickly before Poettering came over to badmouth UNIX and point out how everybody else is wrong.

Re:Systemd: tmpfiles: R /dir/.* destroys root by majewsky on Monday April 17, 2017 @12:03PM (#14131920)
The first reaction was to fix the bug. The discussion started after that.
Re:Systemd: tmpfiles: R /dir/.* destroys root by mynegation on Monday April 17, 2017 @08:30AM (#14130462)
For people jumping straight to comments: it is not so much about issue itself (which IS pretty bad), but more about sloppy off-hand comment from a systemd maintainer, and systemd opposition that did not miss a chance to pile up.
Re:Systemd: tmpfiles: R /dir/.* destroys root by kasabali on Tuesday April 18, 2017 @06:22AM (#14137588)
This is what happens when you try to reinvent what could be achieved by shell scripts and basic command line utilities.
Re:Systemd: tmpfiles: R /dir/.* destroys root by mjgtall on Wednesday April 19, 2017 @01:07PM (#14149422)
Because no one would every do rm -rf / in shell?
Re:Systemd: tmpfiles: R /dir/.* destroys root by kasabali on Thursday April 20, 2017 @07:55AM (#14155838)
irrelevant
Re:Systemd: tmpfiles: R /dir/.* destroys root by gkya on Monday April 17, 2017 @08:32AM (#14130472)
> I am not sure I'd consider this much of a problem. Yeah, it's a UNIX pitfall, but "rm -rf /foo/.*" will work the exact same way, no?

says Poettering.

Re:Systemd: tmpfiles: R /dir/.* destroys root by digi_owl on Monday April 17, 2017 @09:02AM (#14130595)
Really interesting how quickly this vanished off the front page...
Re:Systemd: tmpfiles: R /dir/.* destroys root by Mic92 on Monday April 17, 2017 @12:55PM (#14132455)
hackernews has heuristics for controversial topics and down rate them automatically.
Re:Systemd: tmpfiles: R /dir/.* destroys root by gjvc on Monday April 17, 2017 @05:59AM (#14130057)
"@poettering locked and limited conversation to collaborators 34 minutes ago."
Re:Systemd: tmpfiles: R /dir/.* destroys root by dohqu8Zi on Monday April 17, 2017 @08:22AM (#14130428)
The bug is already fixed and they have better things to do than messing with our trolling. :-)
Re:Systemd: tmpfiles: R /dir/.* destroys root by the_mitsuhiko on Monday April 17, 2017 @06:04AM (#14130066)
That's why I submitted it only now.