chiark / gitweb /
tmpfiles: make "f" lines behaviour match what the documentation says
authorLennart Poettering <lennart@poettering.net>
Wed, 24 Jan 2018 09:54:10 +0000 (10:54 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:50:18 +0000 (07:50 +0200)
CHANGE OF BEHAVIOUR — with this commit "f" line's behaviour is altered
to match what the documentation says: if an "argument" string is
specified it is written to the file only when the file didn't exist
before. Previously, it would be appended to the file each time
systemd-tmpfiles was invoked — which is not a particularly useful
behaviour as the tool is not idempotent then and the indicated files
grow without bounds each time the tool is invoked.

I did some spelunking whether this change in behaviour would break
things, but afaics nothing relies on the previous O_APPEND behaviour of
this line type, hence I think it's relatively safe to make "f" lines
work the way the docs say, rather than adding a new modifier for it or
so.

Triggered by:

https://lists.freedesktop.org/archives/systemd-devel/2018-January/040171.html

NEWS

diff --git a/NEWS b/NEWS
index 3fc947f98838829bb345ac639b8fef5d84346faa..1029e7b43f1aab75784566b3bfe38800204f127f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,18 @@ CHANGES WITH 237 in spe:
           keycodes are not recognized by any major desktop. They now produce
           Up/Down key events so that they can be used for scrolling.
 
+        * INCOMPATIBILITY: elogind-tmpfiles' "f" lines changed behaviour
+          slightly: previously, if an argument was specified for lines of this
+          type (i.e. the right-most column was set) this string was appended to
+          existing files each time elogind-tmpfiles was run. This behaviour was
+          different from what the documentation said, and not particularly
+          useful, as repeated elogind-tmpfiles invocations would not be
+          idempotent and grow such files without bounds. With this release
+          behaviour has been altered slightly, to match what the documentation
+          says: lines of this type only have an effect if the indicated files
+          don't exist yet, and only then the argument string is written to the
+          file.
+
         — Berlin, 2018-XX-XX
 
 CHANGES WITH 236: