there was an incident where OpenRC rm -rf'd an Alpine user's box, and upstream is more concerned about why Alpine is cooking up a replacement, than about why OpenRC rm -rf'd a user's box.
i mean, at this point, it's self explanatory, i guess
Conversation
what can i say, other than we prefer it when init systems don't rm -rf people's boxen
2
3
47
blah blah blah rm -rf /tmp/* is required by FHS, a spec that no distro has followed in earnest in the past 10 years. yes, cleaning /tmp is a reasonable idea to do at boot, but that should be a policy concern separate from the *init system*
2
30
also, rm -rf /tmp/* is not required by FHS, that's /var/tmp. please read latest LSB spec, thanks guys.
3
28
oh, right, nobody has followed the LSB in earnest in the past 6 years or so. i guess "whatever systemd does" is the new spec for GNU/Linux.
5
3
53
does systemd clean /tmp in a way that ensures the "cleaning" can't escape /tmp? who knows -- it probably just mounts a tmpfs there and calls it a day.
2
29
Replying to
It uses tmpfs for /tmp by default but systemd-tmpfiles includes generic cleaning functionality. This is the default configuration in /usr/lib/tmpfiles.d/tmp.conf:
q /tmp 1777 root root 10d
q /var/tmp 1777 root root 30d
If you feel like reading code:
1
It seems to try to avoid its best from touching anything crossing a mount point, yay!
1
2
I think github.com/OpenRC/opentmp is just incorrectly implemented. It's probably a really bad idea to try doing this with shell scripts because you need a lot of APIs that are only exposed via the kernel's C API. It's just not a good idea using the lossy GNU coreutils abstractions.
freedesktop.org/software/syste is increasingly heavily used so I can see why they want to have an implementation but it looks pretty sketchy.
Look at `systemd-analyze cat-config tmpfiles.d` on Arch or Fedora for an idea of how much distributions heavily using systemd are using it.
1
They use it to create non-existent files from distribution templates, write things to kernel API filesystems and a lot of other things you might not realize are done with it.
I haven't had to do much with it so I only know basic config options and not implementation details.
I just removed opentmpfiles from two days ago. It's dead and can't be fixed without a complete rewrite.
1
1
strange, that was our conclusion about openrc as a whole, several years ago, which ultimately has led to doing such a rewrite based on his s6 tools :P
1
1
Show replies



