tmpfiles: make --purge more restrictive, and various other tweaks#33383
tmpfiles: make --purge more restrictive, and various other tweaks#33383bluca merged 10 commits intosystemd:mainfrom
Conversation
|
Thanks, this looks right the right fix to me |
|
I'll prep a stable update after this is merged |
Please also wait for #33258 if possible. I think the accounting really should be fixed |
|
Smalll typo: s/combinatin/combination/ |
…n --purge Also, extend the man page explanation substantially, matching more closely what --create says. Fixes: systemd#33349
…ongs Also, make contrast between --remove and --purge clearer: one deletes files marked for deletion, the other deletes files marked for creation.
6eabc61 to
c142a8f
Compare
|
Pushed the trivial fixes to move the check and fix the typo. Once the fast CI is done I'll merge. |
That needs Lennart's review I think - we do stable releases regularly, it can go in the next one if it's not done in time |
|
The helper is in https://salsa.debian.org/debian/debhelper/-/blob/main/dh_installtmpfiles?ref_type=heads… In some way, I think this is a Debian problem, because other systems don't have the concept of "purge". Rpm certainly doesn't. This means that users would have to invoke |
Yes, that is all correct, as mentioned it's opt-out - in the new compat mode of course as it's an incompatible change, and it is documented. So one has to first switch from debhelper-compat 13 to 14 to get the new behaviour. Purging everything that is left behind is the reason this exists in the first place.
Yeah but just invoking it does nothing now, which is the point - the belt and braces. You have to explicitly call |
That still seems to be a very bad idea. I'm pretty sure not all packagers read all debhelper-compat changelogs attentively, and even if they did, somebody might add a new tmpfiles line at some later point, either upstream or downstream.
I really don't have a problem with |
I mean, a package also might add a unit that does dd if=/dev/zero of=/dev/sda on boot - being a packager means auditing what you package, and means reading the documentation of the tools that you use, this is not really anything new, nor it is a convincing reason for not integrating it. If the possibility of some unknown hypothetical person opting in to some functionality without reading what it does would be an issue, then nothing could be done, ever.
But I'm not asking you to add this to RPM - as you already said, RPM doesn't really have the concept of 'purging', so it doesn't really apply anyway. So what's the problem? You are not convinced that it's good to have, so you won't use it. I am, so I will. Everybody wins? |
|
We'll just have to agree to disagree. I'll just say that I think In Fedora, I pushed the following two commits:
|
|
We could also drop it from the manpage if you like, I'm ok with that - as mentioned, I think this is for scripted use anyway |
|
The man page now has an explanation and warnings, so I think it's better to keep it. |
Oh man, this really sucks. I build mkosi images regularly that only contain a /usr/ and that augment the root fs via tmpfiles.d/. If you drop this then you are actively breaking my setup. Uncool. And why even? I don't get it. Please put that back, there's a reason this exists and I use it regularly. It's also what makes |
|
You know, I am happy to just kill the --purge thing entirely again, if this means you are breaking systemd that come up with /usr/ only. I find the purge usecase much weaker than the usecase of systems with /usr/ only. Kinda sucks that the /usr/ merge is kinda pointless in Fedora now, if you cannot actually deploy a system anymore with just /usr/... |
|
Hmm, so the rpm doesn't ship sysusers.d/ stuff either anymore? Man this is so disappointing. I wasn't aware Fedora is going backwards so badly. |
|
Join the Debian dark side. We have cookies :-P |
I actually agree. I don't think there was any need to hurry this in like this, not even giving me the chance to address @YHNdnzj review points myself. |
|
btw, one way out for this would be to add yet another line type modifier to things. For example, we could say that if you combine some line type with Example: or so. |
We could just add it to the local mkosi config in the repo? If that's how you use it, it wouldn't make a difference whether it came from the package or from mkosi.extra, no? |
Reading through the current tmpfiles.d(5) manual page, the following jumps out at me as a case where # Modify sysfs but don't fail if we are in a container with a read-only /proc
w- /proc/sys/vm/swappiness - - - - 10
As a developer, I would appreciate the As a distribution maintainer, I could see this being useful for split packages. For example: # /usr/lib/tmpfiles.d/hello.conf
o /var/spool/hello
# /usr/lib/tmpfiles.d/hello-foo.conf
d /var/spool/hello 0755 root root
# /usr/lib/tmpfiles.d/hello-bar.conf
d /var/spool/hello 0755 root rootThe package |
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
Follow-up for systemd/systemd#33383. rhel-only: bugfix Related: RHEL-40924
My fix for #33349, alternative for #33353 that tries to properly address things.
This attacks the problem on three fronts:
<emphasis>andWarning!.I am pretty sure with these changes it's quite hard to still fuck up your system with this, i.e. any chance to learn about --purge should already make clear to you that this is not what you want, and even if you ignore that, you have to go out your way to specify the wrong tmpfiles.d/ snippet on the command line.
Plus a multitude of other fixes, some quite important, such as one that fixes a case where --dry-run wasn't dry at all.
Fixes: #33349
Closes: #33353