Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-28 Thread Russ Allbery
Matthew Garrett writes: > On Mon, May 06, 2024 at 07:42:11AM -0700, Russ Allbery wrote: >> Historically, deleting anything in /var/tmp that hadn't been accessed >> in over seven days was a perfectly reasonable and typical >> configuration. These days, we have the complication that it's fairly

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-28 Thread Matthew Garrett
On Mon, May 06, 2024 at 07:42:11AM -0700, Russ Allbery wrote: > Historically, deleting anything in /var/tmp that hadn't been accessed in > over seven days was a perfectly reasonable and typical configuration. > These days, we have the complication that it's fairly common to turn off > atime

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-27 Thread Luca Boccassi
On Sun, 5 May 2024 at 21:04, Luca Boccassi wrote: > > On Tue, 5 Jul 2022 19:42:37 +0200 Michael Biebl > wrote: > > > > Hi Eric > > > > On Fri, 31 Jul 2020 15:12:48 + Eric Desrochers > > wrote: > > > Package: systemd > > > Version: 245.7-1 > > > Severity: normal > > > > > > Dear Maintainer,

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-13 Thread Michael Biebl
Am 13.05.24 um 11:42 schrieb Johannes Schauer Marin Rodrigues: If we want to try and weigh cost against benefit, do the benefits really outweigh the cost? How costly is it to carry a patch in Debian and deviate from upstream versus all the problems that participants of this thread now listed? My

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-13 Thread Barak A. Pearlmutter
Unless somebody's already put it there, I'm going to move these suggestions to a wishlist bug against systemd. Not sure if it should be one bug or a few, one for each suggestion. Currently discussion about reaping /var/tmp/ is in https://bugs.debian.org/966621 and

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-13 Thread Johannes Schauer Marin Rodrigues
Hi, Quoting Barak A. Pearlmutter (2024-05-13 10:47:43) > > I'd like to hear some arguments *in favour* of making this change. > > Alignment with systemd-upstream, reduced package maintenance burden > > are two that I can think of, but perhaps I've missed more. These two, > > IMHO, are

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-13 Thread Barak A. Pearlmutter
> I'd like to hear some arguments *in favour* of making this change. > Alignment with systemd-upstream, reduced package maintenance burden > are two that I can think of, but perhaps I've missed more. These two, > IMHO, are significantly outweighed by the risks. Let me see if I understand the

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-11 Thread Bill Allombert
Le Mon, May 06, 2024 at 11:15:35AM +0100, Barak A. Pearlmutter a écrit : > > We have two separate issues here: > > > a/ /tmp-on-tmpfs Note that /tmp-on-tmpfs and cleanup-tmp-at-boot are not equivalent. With cleanup-tmp-at-boot, if your system crashes, you can still backup /tmp before

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-09 Thread Stéphane Blondon
Le mar. 7 mai 2024, 20:18, a écrit : > Even after a reboot, I would be upset to lose the debug files that I've > been accumulating for several days while trying to track down an > intermittent problem with this stupid VPN... > At reboot, /tmp isautomatically flushed. It's the default behaviour

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-08 Thread Jonathan Dowland
On Mon May 6, 2024 at 5:01 PM BST, Luca Boccassi wrote: > On Mon, 6 May 2024 at 16:51, Barak A. Pearlmutter > wrote: > > For whatever reason, a lot of people who process large data use > > /var/tmp/FOO/ as a place to store information that should not be > > backed up, but also should not just

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-08 Thread Emanuele Rocca
Hi, On 2024-05-07 09:43, Russ Allbery wrote: > I understand your point, which is that this pattern is out there in the > wild and Debian is in danger of breaking existing usage patterns by > matching the defaults of other distributions. This is a valid point, and > I appreciate you making it.

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-08 Thread Marc Haber
On Tue, 07 May 2024 22:29:30 +0100, Richard Lewis wrote: >Holger Levsen writes: >> I'm a bit surprised how many people seem to really rely on data in /tmp >> to survive for weeks or even months. I wonder if they backup /tmp? > >I use /tmp for things that fall somewhere between "needs a backup"

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Russ Allbery
Simon Richter writes: > On 5/8/24 07:05, Russ Allbery wrote: >> It sounds like that is what kicked off this discussion, but moving /tmp >> to tmpfs also usually makes programs that use /tmp run faster. I >> believe that was the original motivation for tmpfs back in the day. > IIRC it started

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Simon Richter
Hi, On 5/8/24 07:05, Russ Allbery wrote: It sounds like that is what kicked off this discussion, but moving /tmp to tmpfs also usually makes programs that use /tmp run faster. I believe that was the original motivation for tmpfs back in the day. IIRC it started out as an implementation of

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Russ Allbery
Richard Lewis writes: > btw, i'm not trying to argue against the change, but i dont yet > understand the rationale (which id like to be put into the > release-notes): is there perhaps something more compelling than "other > distributions and upstream already do this"? It sounds like that is

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Richard Lewis
Holger Levsen writes: > I'm a bit surprised how many people seem to really rely on data in /tmp > to survive for weeks or even months. I wonder if they backup /tmp? I use /tmp for things that fall somewhere between "needs a backup" and "unimportant, can be deleted whenever". I think all of the

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Andrey Rakhmatullin
On Tue, May 07, 2024 at 09:49:17PM +0200, Johannes Schauer Marin Rodrigues wrote: > Quoting Andrey Rakhmatullin (2024-05-06 19:14:40) > > On Mon, May 06, 2024 at 04:50:50PM +0100, Barak A. Pearlmutter wrote: > > > > tmpfiles.d snippets can be defined to cleanup on a timer _anything_, > > > > > >

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Johannes Schauer Marin Rodrigues
Quoting Andrey Rakhmatullin (2024-05-06 19:14:40) > On Mon, May 06, 2024 at 04:50:50PM +0100, Barak A. Pearlmutter wrote: > > > tmpfiles.d snippets can be defined to cleanup on a timer _anything_, > > > > It's a question of what the *default* behaviour should be. > > > > For whatever reason, a

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Johannes Schauer Marin Rodrigues
Hi, Quoting Holger Levsen (2024-05-07 17:22:48) > On Tue, May 07, 2024 at 04:24:06PM +0300, Hakan Bayındır wrote: > > Consider a long running task, which will take days or weeks (which is the > > norm in simulation and science domains in general). System emitted a warning > > after three days,

Re: Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Barak A. Pearlmutter
I guess sometimes when people discuss technical matters, good ideas pop up. (Although I still think that its problematic interactions with lengthy suspends makes the whole idea of auto-deletion based purely on timestamps problematic. I can imagine more coherent mechanisms, which doesn't count

Re: Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Josh Triplett
Barak A. Pearlmutter wrote: > You know, that's a pretty good idea! > > Put a 00README-TMP.txt in /tmp/ and /var/tmp/ which briefly states the > default deletion policy, the policy in place if it's not the default, > and a pointer to info about altering it. "/tmp's contents are deleted > at boot

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread rhys
/tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default] Then it will be high time you learn not to abuse /tmp that way  I'm a bit surprised how many people seem to really rely on data in /tmp to survive for weeks or even months

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Marvin Renich
Early in this meta-thread it was suggested to separate /tmp-is-tmpfs from cleanup-of-{,/var}/tmp. I am really surprised that nobody has suggested the obvious separation of new installs from upgrades. Changing the local configuration for either feature is trivial either way. I think the proposed

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Russ Allbery
Hakan Bayındır writes: > The applications users use create these temporary files without users' > knowledge. They work in their own directories, but applications create > another job dependent state files in both /tmp and /var/tmp. These are > different programs and I assure you they’re not

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Hakan Bayındır
Sent from my iPhone > On 7 May 2024, at 18:39, Holger Levsen wrote: > > On Tue, May 07, 2024 at 04:24:06PM +0300, Hakan Bayındır wrote: >> Consider a long running task, which will take days or weeks (which is the >> norm in simulation and science domains in general). System emitted a

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Hakan Bayındır
> On 7 May 2024, at 18:57, Russ Allbery wrote: > > Hakan Bayındır writes: >> Dear Russ, > >>> If you are running a long-running task that produces data that you >>> care about, make a directory for it to use, whether in your home >>> directory, /opt, /srv, whatever. > >> Sorry but,

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Russ Allbery
Hakan Bayındır writes: > Dear Russ, >> If you are running a long-running task that produces data that you >> care about, make a directory for it to use, whether in your home >> directory, /opt, /srv, whatever. > Sorry but, clusters, batch systems and other automated systems doesn't > work that

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Holger Levsen
On Tue, May 07, 2024 at 04:24:06PM +0300, Hakan Bayındır wrote: > Consider a long running task, which will take days or weeks (which is the > norm in simulation and science domains in general). System emitted a warning > after three days, that it'll delete my files in three days. My job won't be >

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Hakan Bayındır
Dear Russ, It's not *me* using /var/tmp for my own temporary files, it's the applications other people use. I just logged in one of the nodes we have and there were job-dependent files created by a particular, high end scientific application (which is developed by another prominent company).

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Luca Boccassi
On Tue, 7 May 2024 at 15:53, Sam Hartman wrote: > > > "Johannes" == Johannes Schauer Marin Rodrigues > > writes: > >> > > If [files can be deleted automatically while mmdebstrap is using > them], > >> > > how should applications guard against that from > >> > > happening? >

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Sam Hartman
> "Johannes" == Johannes Schauer Marin Rodrigues writes: >> > > If [files can be deleted automatically while mmdebstrap is using them], >> > > how should applications guard against that from >> > > happening? >> > >> > As documented in tmpfiles.d(5), if mmdebstrap takes

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Andrey Rakhmatullin
On Tue, May 07, 2024 at 04:24:06PM +0300, Hakan Bayındır wrote: > On the other hand, if we need to change the configuration 99% of the time, [citation needed] -- WBR, wRAR signature.asc Description: PGP signature

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Russ Allbery
Hakan Bayındır writes: > Consider a long running task, which will take days or weeks (which is > the norm in simulation and science domains in general). System emitted a > warning after three days, that it'll delete my files in three days. My > job won't be finished, and I'll be losing three

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Barak A. Pearlmutter
> ...3) I would put a file in any auto-cleaned space named "1-AUTOCLEAN.txt" > that contains some verbage explaining that things in this directory will be > wiped based on rules set in (wherever). You know, that's a pretty good idea! Put a 00README-TMP.txt in /tmp/ and /var/tmp/ which briefly

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Alexandru Mihail
> Consider a long running task, which will take days or weeks (which is > the norm in simulation and science domains in general). System > emitted a > warning after three days, that it'll delete my files in three days. > My > job won't be finished, and I'll be losing three days of work unless I

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread rhys
Boccassi; Peter Pentchev Subject: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default] Similarly, I’m following the thread for a couple of days now, and wondering about its implications. When I consider server scenarios

Re: Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Alexandru Mihail
Maybe putting the cleanup task for /var/tmp on a longer timer and warning users ahead of time of impending deletion (maybe 3 days before, 2 days, etc) would help with files of unsuspecting users getting deleted. A log entry could also be emitted. I could see a gentle warning on ssh login (minimal,

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread rhys
nt from my mobile device. From: Alexandru Mihail Sent: Tuesday, May 7, 2024 07:59 To: debian-devel@lists.debian.org Subject: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default] May

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Hakan Bayındır
Consider a long running task, which will take days or weeks (which is the norm in simulation and science domains in general). System emitted a warning after three days, that it'll delete my files in three days. My job won't be finished, and I'll be losing three days of work unless I catch that

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread rhys
obile device. From: "Barak A. Pearlmutter" Sent: Tuesday, May 7, 2024 07:18 To: r...@neoquasar.org Cc: Luca Boccassi; debian-devel@lists.debian.org Subject: Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d no

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Hakan Bayındır
Similarly, I’m following the thread for a couple of days now, and wondering about its implications. When I consider server scenarios, pushing /tmp to RAM looks highly undesirable from my perspective. All the servers I manage use their whole RAMs and using the unused space as a disk cache is

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Simon McVittie
On Tue, 07 May 2024 at 07:34:54 -0500, r...@neoquasar.org wrote: > possibly convince those applications to use their own > scratch space such as /tmp// that is more easily identifiable This would be a denial of service at best, and a privilege escalation vulnerability at worst. To be safe, it

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Alexandru Mihail
Maybe putting the cleanup task for /var/tmp on a longer timer and warning users ahead of time of impending deletion (maybe 3 days before, 2 days, etc) would help with files of unsuspecting users getting deleted. A log entry could also be emitted. I could see a gentle warning on ssh login

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread rhys
This, in my opinion, is the correct view.  If the users/admins of a system are putting files somewhere, those are their files and therefore their responsibility. It is not up to anyone else to claim they know better and clean up after them.  If the files are abandoned by applications that

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Barak A. Pearlmutter
Rhys, I think you're being unfair. We have a *technical* disagreement here. But our hearts are all in the same place: Luca, myself, and all the other DDs discussing this, all want what's best for our users, we all want to build the best OS possible, and are all discussing the issue in good faith.

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Philip Hands
Luca Boccassi writes: > On Mon, 6 May 2024 at 11:33, Barak A. Pearlmutter wrote: >> >> > We have two separate issues here: >> >> > a/ /tmp-on-tmpfs >> > b/ time based clean-up of /tmp and /var/tmp >> >> > I think it makes sense to discuss/handle those separately. >> >> Agreed. >> >> I also

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Peter Pentchev
On Tue, May 07, 2024 at 10:38:14AM +0200, Carsten Leonhardt wrote: > Luca Boccassi writes: > > > Defaults are defaults, they are trivially and fully overridable where > > needed if needed. Especially container and VM managers these days can > > super trivially override them via SMBIOS Type11

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-07 Thread Carsten Leonhardt
Luca Boccassi writes: > Defaults are defaults, they are trivially and fully overridable where > needed if needed. Especially container and VM managers these days can > super trivially override them via SMBIOS Type11 strings or > Credentials, ephemerally and without changing the guest image at

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread rhys
. From: Luca Boccassi Sent: Monday, May 6, 2024 08:20 To: Barak A. Pearlmutter Cc: debian-devel@lists.debian.org Subject: Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default] On Mon, 6

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Johannes Schauer Marin Rodrigues
Hi, Quoting Luca Boccassi (2024-05-07 00:09:51) > To be more specific, as per documentation: > > https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html > > 'x' lines can be used to override cleanup rules, and support globbing, > so something like: > > x /tmp/mmdebstrap.*

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 23:00, Johannes Schauer Marin Rodrigues wrote: > > Quoting Luca Boccassi (2024-05-06 23:28:59) > > On Mon, 6 May 2024 at 22:27, Simon McVittie wrote: > > > > > > On Mon, 06 May 2024 at 22:08:56 +0200, Johannes Schauer Marin Rodrigues > > > wrote: > > > > If [files can be

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Johannes Schauer Marin Rodrigues
Quoting Luca Boccassi (2024-05-06 23:28:59) > On Mon, 6 May 2024 at 22:27, Simon McVittie wrote: > > > > On Mon, 06 May 2024 at 22:08:56 +0200, Johannes Schauer Marin Rodrigues > > wrote: > > > If [files can be deleted automatically while mmdebstrap is using them], > > > how should applications

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 22:27, Simon McVittie wrote: > > On Mon, 06 May 2024 at 22:08:56 +0200, Johannes Schauer Marin Rodrigues wrote: > > If [files can be deleted automatically while mmdebstrap is using them], > > how should applications guard against that from > > happening? > > As documented in

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 21:08, Johannes Schauer Marin Rodrigues wrote: > > Hi, > > Quoting Luca Boccassi (2024-05-06 15:20:08) > > While personal anecdotes and stories can be interesting and amusing in many > > circumstances, I am not really looking for those at this very moment. What I > > am

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Simon McVittie
On Mon, 06 May 2024 at 22:08:56 +0200, Johannes Schauer Marin Rodrigues wrote: > If [files can be deleted automatically while mmdebstrap is using them], > how should applications guard against that from > happening? As documented in tmpfiles.d(5), if mmdebstrap takes out an exclusive flock(2)

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 21:30, Salvo Tomaselli wrote: > > On a fresh installed fedora system I downloaded a .iso in /tmp, then the > OOMkiller killed wayland, so everything died. > > If you know you won't ever fill it up, I guess it's fine. But I'd go for the > safer (and sadly slower) option. You

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Johannes Schauer Marin Rodrigues
Hi, Quoting Luca Boccassi (2024-05-06 15:20:08) > While personal anecdotes and stories can be interesting and amusing in many > circumstances, I am not really looking for those at this very moment. What I > am looking for right now is packages or internal infrastructure that need an > update to

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Andrey Rakhmatullin
On Mon, May 06, 2024 at 04:50:50PM +0100, Barak A. Pearlmutter wrote: > > tmpfiles.d snippets can be defined to cleanup on a timer _anything_, > > It's a question of what the *default* behaviour should be. > > For whatever reason, a lot of people who process large data use > /var/tmp/FOO/ as a

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 16:51, Barak A. Pearlmutter wrote: > > > tmpfiles.d snippets can be defined to cleanup on a timer _anything_, > > It's a question of what the *default* behaviour should be. No, it is not, at least not for the strawman you conjured. So I gather that git doesn't warn when

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Barak A. Pearlmutter
> tmpfiles.d snippets can be defined to cleanup on a timer _anything_, It's a question of what the *default* behaviour should be. For whatever reason, a lot of people who process large data use /var/tmp/FOO/ as a place to store information that should not be backed up, but also should not just

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 16:42, Simon Richter wrote: > > Hi, > > On 5/6/24 19:57, Michael Biebl wrote: > > > Afaik, /var/tmp has never been cleaned up on /boot. > > So I'm not sure what you mean with "no longer"? > > Oof, you're right, it was /tmp, /var/run, /var/lock: > > [ "$VERBOSE" !=

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 16:30, Simon Richter wrote: > > Hi, > > On 5/6/24 20:19, Luca Boccassi wrote: > > > Is that the default layout, or a selectable option? > > When you create a partition manually, it asks for the mount point, and > makes a number of suggestions in a dropdown, and /tmp is one

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Simon Richter
Hi, On 5/6/24 19:57, Michael Biebl wrote: Afaik, /var/tmp has never been cleaned up on /boot. So I'm not sure what you mean with "no longer"? Oof, you're right, it was /tmp, /var/run, /var/lock: [ "$VERBOSE" != no ] && echo -n "Cleaning" [ -d /tmp ] && cleantmp [ -d

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Simon Richter
Hi, On 5/6/24 20:19, Luca Boccassi wrote: Is that the default layout, or a selectable option? When you create a partition manually, it asks for the mount point, and makes a number of suggestions in a dropdown, and /tmp is one of these. There is also a "enter manually" option. If the

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 16:03, Barak A. Pearlmutter wrote: > > If it clones into /tmp the *entire* tree will either be reaped (upon > reboot) or not. > > But having just some files deleted from a git dir or git working dir > is much more dangerous, because various git commands can treat files >

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Andrey Rakhmatullin
On Mon, May 06, 2024 at 07:42:11AM -0700, Russ Allbery wrote: > >> I'm not sure if we have software on long running servers which place > >> files in /tmp and /var/tmp and expect files to not be deleted during > >> runtime, even if not accessed for a long time. This is certainly an > >> issue to

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Barak A. Pearlmutter
If it clones into /tmp the *entire* tree will either be reaped (upon reboot) or not. But having just some files deleted from a git dir or git working dir is much more dangerous, because various git commands can treat files deleted from the working tree as deliberate changes to be committed, and

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Russ Allbery
Andrey Rakhmatullin writes: > On Mon, May 06, 2024 at 10:40:00AM +0200, Michael Biebl wrote: >> I'm not sure if we have software on long running servers which place >> files in /tmp and /var/tmp and expect files to not be deleted during >> runtime, even if not accessed for a long time. This is

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 15:31, Barak A. Pearlmutter wrote: > > > What I am looking for right now is packages or internal > > infrastructure that need > > an update to cope with these two changes before I upload them, so if > > you know of any please do let me know and I'll happily look into it > >

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Barak A. Pearlmutter
> What I am looking for right now is packages or internal > infrastructure that need > an update to cope with these two changes before I upload them, so if > you know of any please do let me know and I'll happily look into it > and at least file a bug, if not a MR. Thanks. Okay. git and other

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Simon McVittie
On Mon, 06 May 2024 at 13:41:58 +0100, Barak A. Pearlmutter wrote: > As someone who regularly deals with large datasets, and keeps them in > the "approved" don't-back-these-up location /var/tmp Independent of whether we make the change Luca is suggesting or not, I don't think /var/tmp is a good

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 13:42, Barak A. Pearlmutter wrote: > > > Then upon reading the release notes, on such a machine, one can simply do: > > > > touch /etc/tmpfiles.d/tmp.conf > > > > And they get no automated cleanups. > > This also disables on-boot cleaning of /tmp/. Yes, as it's going to be

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Barak A. Pearlmutter
> Then upon reading the release notes, on such a machine, one can simply do: > > touch /etc/tmpfiles.d/tmp.conf > > And they get no automated cleanups. This also disables on-boot cleaning of /tmp/. The root issue here is that deleting not-read-in-a-while

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Marvin Renich
* Michael Biebl [240506 07:15]: > Am 06.05.24 um 12:35 schrieb Simon Richter: > > Hi, > > > > On 5/6/24 17:40, Michael Biebl wrote: > > > > > If we go with a/, then I think d-i should be updated to no longer > > > create /tmp as a separate partition. > > > > I think if the admin explicitly

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 12:15, Michael Biebl wrote: > > Am 06.05.24 um 12:35 schrieb Simon Richter: > > Hi, > > > > On 5/6/24 17:40, Michael Biebl wrote: > > > >> If we go with a/, then I think d-i should be updated to no longer > >> create /tmp as a separate partition. > > > > I think if the admin

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Marvin Renich
* Simon Richter [240506 06:51]: > Hi, > > On 5/6/24 17:40, Michael Biebl wrote: > > > If we go with a/, then I think d-i should be updated to no longer create > > /tmp as a separate partition. > > I think if the admin explicitly configures tmpfs as a separate file system, > then that should be

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 11:33, Barak A. Pearlmutter wrote: > > > We have two separate issues here: > > > a/ /tmp-on-tmpfs > > b/ time based clean-up of /tmp and /var/tmp > > > I think it makes sense to discuss/handle those separately. > > Agreed. > > I also don't see any issue with a/, at worst

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 11:48, Michael Biebl wrote: > > Am 06.05.24 um 12:18 schrieb Luca Boccassi: > > Defaults are defaults, they are trivially and fully overridable where > > needed if needed. Especially container and VM managers these days can > > super trivially override them via SMBIOS Type11

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Andrey Rakhmatullin
On Mon, May 06, 2024 at 10:40:00AM +0200, Michael Biebl wrote: > I'm not sure if we have software on long running servers which place files > in /tmp and /var/tmp and expect files to not be deleted during runtime, even > if not accessed for a long time. This is certainly an issue to be aware of >

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Michael Biebl
Am 06.05.24 um 12:35 schrieb Simon Richter: Hi, On 5/6/24 17:40, Michael Biebl wrote: If we go with a/, then I think d-i should be updated to no longer create /tmp as a separate partition. I think if the admin explicitly configures tmpfs as a separate file system, then that should be

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Michael Biebl
Am 06.05.24 um 12:18 schrieb Luca Boccassi: Defaults are defaults, they are trivially and fully overridable where needed if needed. Especially container and VM managers these days can super trivially override them via SMBIOS Type11 strings or Credentials, ephemerally and without changing the

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Samuel Thibault
Barak A. Pearlmutter, le lun. 06 mai 2024 11:15:35 +0100, a ecrit: > To me, the purpose of /var/tmp/ when I have my "user" hat on is: a > place to put files I don't want backed up, particularly large ones, > and which if I run out of disk space is a place to look for stuff to > delete. it's not "a

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Michael Biebl
Am 06.05.24 um 12:15 schrieb Barak A. Pearlmutter: We have two separate issues here: a/ /tmp-on-tmpfs b/ time based clean-up of /tmp and /var/tmp I think it makes sense to discuss/handle those separately. Agreed. I also don't see any issue with a/, at worst people will be annoyed with

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Simon Richter
Hi, On 5/6/24 17:40, Michael Biebl wrote: If we go with a/, then I think d-i should be updated to no longer create /tmp as a separate partition. I think if the admin explicitly configures tmpfs as a separate file system, then that should be honored -- if there is memory pressure,

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 09:40, Michael Biebl wrote: > > We have two separate issues here: > > a/ /tmp-on-tmpfs > b/ time based clean-up of /tmp and /var/tmp > > I think it makes sense to discuss/handle those separately. > > Regarding a/: > tmp.mount as shipped by systemd uses the following mount

Re: Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Barak A. Pearlmutter
> We have two separate issues here: > a/ /tmp-on-tmpfs > b/ time based clean-up of /tmp and /var/tmp > I think it makes sense to discuss/handle those separately. Agreed. I also don't see any issue with a/, at worst people will be annoyed with it for some reason and can then change it back. >

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Luca Boccassi
On Mon, 6 May 2024 at 06:36, Paul Gevers wrote: > > Hi Luca, > > On 05-05-2024 10:04 p.m., Luca Boccassi wrote: > > > Hence, I intend to apply these changes in the next src:systemd upload > > to unstable, probably next week. > > > In case anybody is aware of packages/programs needing an update

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Michael Biebl
Am 05.05.24 um 22:04 schrieb Luca Boccassi: This will be mentioned in NEWS (and I guess in the release notes when the time comes), together with the instructions to override for anybody wanting to keep the old behaviour, which is as trivial as: .. touch /etc/tmpfiles.d/tmp.conf This

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Holger Levsen
clone 966621 -1 reassign -1 release-notes thanks On Mon, May 06, 2024 at 10:40:00AM +0200, Michael Biebl wrote: > We have two separate issues here: > > a/ /tmp-on-tmpfs > b/ time based clean-up of /tmp and /var/tmp > > I think it makes sense to discuss/handle those separately. very much

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-06 Thread Michael Biebl
We have two separate issues here: a/ /tmp-on-tmpfs b/ time based clean-up of /tmp and /var/tmp I think it makes sense to discuss/handle those separately. Regarding a/: tmp.mount as shipped by systemd uses the following mount options: "mode=1777,strictatime,nosuid,nodev,size=50%" In the past

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-05 Thread Paul Gevers
Hi Luca, On 05-05-2024 10:04 p.m., Luca Boccassi wrote: > Hence, I intend to apply these changes in the next src:systemd upload > to unstable, probably next week. In case anybody is aware of packages/programs needing an update to cope with these changes, or any other issue, please let me know

Re: Make /tmp/ a tmpfs and cleanup /var/tmp/ on a timer by default [was: Re: systemd: tmpfiles.d not cleaning /var/tmp by default]

2024-05-05 Thread Luca Boccassi
On Sun, 5 May 2024 at 22:22, Salvo Tomaselli wrote: > > > In case anybody is aware of packages/programs needing an update to cope > > with these changes, or any other issue, please let me know and I will > > file bugs. > > in localslackirc@.service > > ReadWritePaths=/var/tmp > > It uses /var/tmp