FS#53848 - [r] tmpfiles.d to prevent deletion of files in /tmp
Attached to Project:
Arch Linux
Opened by Frederick Eaton (Herodotus) - Thursday, 27 April 2017, 04:45 GMT
Last edited by Antonio Rojas (arojas) - Monday, 31 January 2022, 22:44 GMT
Opened by Frederick Eaton (Herodotus) - Thursday, 27 April 2017, 04:45 GMT
Last edited by Antonio Rojas (arojas) - Monday, 31 January 2022, 22:44 GMT
|
Details
Description:
Since Arch uses Systemd, the "r" package should install a file in /usr/lib/tmpfiles.d/ which prevents Systemd from deleting directories matching "/tmp/Rtmp*". R puts all of its per-session temporary files in such directories and cleans them itself upon exit. The file should probably be named /usr/lib/tmpfiles.d/R.conf and it should probably contain a single line "x /tmp/Rtmp*". Here's a link to the R-devel discussion: https://stat.ethz.ch/pipermail/r-devel/2017-April/074142.html Steps to reproduce: $ mkdir /tmp/Rtmpaoeu $ touch -d "12 days ago" /tmp/Rtmpaoeu $ sudo systemd-tmpfiles --clean $ ls /tmp/Rtmpaoeu ls: cannot access '/tmp/Rtmpaoeu': No such file or directory $ sudo sh -c "echo 'x /tmp/Rtmp*' > /etc/tmpfiles.d/Rtmp.conf" $ mkdir /tmp/Rtmpaoeu $ touch -d "12 days ago" /tmp/Rtmpaoeu $ sudo systemd-tmpfiles --clean $ ls /tmp/Rtmpaoeu (still there) Additional info: * R version 3.3.3-1 |
This task depends upon
Closed by Antonio Rojas (arojas)
Monday, 31 January 2022, 22:44 GMT
Reason for closing: Won't implement
Additional comments about closing: See comments
Monday, 31 January 2022, 22:44 GMT
Reason for closing: Won't implement
Additional comments about closing: See comments
tmpfiles.d snippets are only provided in Arch packages when upstreams fail to provide their own, BTW. :) Which is probably a lot more common than we'd like. And the screen one only (re)creates a directory with given ownership/permissions, it doesn't do or unset any age-based cleanup at all, so that's not really a fair comparison.
I think what arojas means is that perhaps R should be responsible for periodically (once every couple days at least) updating the timestamp on temporary files it is still using during very long-running processes.