tmpfiles footgun, apply directly to the forehead
tmpfiles footgun, apply directly to the forehead
Posted Jun 16, 2024 21:26 UTC (Sun) by bluca (subscriber, #118303)In reply to: tmpfiles footgun, apply directly to the forehead by mb
Parent article: systemd 256 released
None of this has anything to do with "tmpfiles" - it is just an unfortunate legacy name (that cannot be changed without breaking scripts), but sd-tmpfiles has not been about temporary files for years and years. Just check the entries in the tmpfiles.d directory, you'll see plenty of stuff under /etc/ and /var/.
Its purpose today, and since quite some time, is providing declarative configuration for creating/removing/purging files and directories that are not shipped directly inside packages, which translates to pretty much anything outside of the vendor tree (/usr/).
The reason there's a config entry for the /home and /srv top level directories is to allow seamlessly making those into subvolumes for the BTRFS use case.
Posted Jun 16, 2024 21:38 UTC (Sun)
by mb (subscriber, #50428)
[Link] (4 responses)
That doesn't make a lot of sense to me.
In fact, I use btrfs and I do _not_ want these to be subvolumes.
Posted Jun 16, 2024 21:40 UTC (Sun)
by bluca (subscriber, #118303)
[Link] (2 responses)
Then mask it/override it. It's a default configuration drop-in, shipped in /usr/ exactly to allow modifying to one's liking, this is 100% supported
Posted Jun 16, 2024 21:48 UTC (Sun)
by mb (subscriber, #50428)
[Link] (1 responses)
Yeah, thanks for letting me know on LWN.
What about: Do not change defaults. Ok?
Posted Jun 16, 2024 22:44 UTC (Sun)
by bluca (subscriber, #118303)
[Link]
It's not important information at all, and no defaults are changed. If you manually run some tools you don't know anything about, then you should read its documentation and the configuration files that come with it beforehand, that's just common sense. Nothing happens if you don't run it, so you don't have anything to worry about. As clearly explained in the documentation, these subvolumes are only created if the directories are missing, which happens only on firstboot with a read-only rootfs subvolume.
Posted Jun 17, 2024 1:54 UTC (Mon)
by Kamilion (subscriber, #42576)
[Link]
Posted Jun 17, 2024 4:34 UTC (Mon)
by jccleaver (guest, #127418)
[Link] (1 responses)
What? Scope creep in systemd leading to bombs left for sysadmins years after the fact to discover the hard way? Surely not! That's impossible.
This ranks up there with the "Bricking laptops via an errant 'rm' command is a Good Thing" rationalization.
Posted Jun 17, 2024 5:45 UTC (Mon)
by mjg59 (subscriber, #23239)
[Link]
Posted Jun 17, 2024 14:34 UTC (Mon)
by Wol (subscriber, #4433)
[Link] (1 responses)
Can't you rename it with a link to the previous name, and a note in the docu saying "these two are the same, but the old name is misleading and deprecated"?
I'm sure they do that elsewhere ...
Cheers,
Posted Jun 17, 2024 15:20 UTC (Mon)
by bluca (subscriber, #118303)
[Link]
tmpfiles footgun, apply directly to the forehead
If I wanted these directories to be subvolumes, I would have created them as such. No magic "help" from systemd required.
tmpfiles footgun, apply directly to the forehead
tmpfiles footgun, apply directly to the forehead
Much appreaciated, that I have to be on LWN to get that important information about what defaults you changed on my system.
tmpfiles footgun, apply directly to the forehead
Ubuntu's defaults for btrfs root have been subvolumes for @home and @ for over a decade
The apt-btrfs-snapshot package will add a hook that takes a snapshot of @ while excluding @home during most package management activities. I've found it to be quite helpful in the past *decade* since it's introduction somewhere around 2011-2013.
tmpfiles footgun, apply directly to the forehead
tmpfiles footgun, apply directly to the forehead
tmpfiles footgun, apply directly to the forehead
Wol
tmpfiles footgun, apply directly to the forehead