On Mon, 3 Aug 2020 10:15:17 -0400, Cristian Rodríguez <crrodriguez@opensuse.org> wrote:
On Mon, Aug 3, 2020 at 6:08 AM H.Merijn Brand <linux@tux.freedom.nl> wrote:
Is it plausible to have /tmp = tmpfs with a service that depends on /tmp that mounts /tmp/whatever to /opt/product/workspace on boot?
Just use bind mounts if this a regular user app or systemd unit setting TemporaryFileSystem= if this is a service.
If I can setup such a scheme in a reliable way, I think that I can workaround the problems I mentioned with legacy products wanting to write files to /tmp (and persist there)
I assume that this legacy products cannot be fixed...because it they could be..you better do that and operate under the expected constraints: "programs should not assume that files in /tmp persist between invocations" (currently the system is forgiving and will persist until next reboot (unless it is a system service with privatetmp on) but again nothing should depend on this implementation-specific detail)
It is even worse for one product: it supports $TMPDIR (yeah) but not for all files used (WTF?). Another issue I need sudo for is that it requires a hard-coded path in /usr. I need to make a symbolic link there to escape of that idiot stupidity. As the company of that product does not exist anymore (at least not in terms of maint or support) there is no chance of getting that fixed I will investigate bind mounts! -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.31 porting perl5 on HP-UX, AIX, and Linux https://useplaintext.email https://tux.nl http://www.test-smoke.org http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/