Commit Graph

147 Commits

Author SHA1 Message Date
Lennart Poettering 503298b724 man: document new specifiers 2020-04-28 23:14:28 +02:00
bemarek 1cee1c5283 Typo fix 2020-03-09 09:54:17 +09:00
Topi Miettinen d4ffda3871 man: tmpfiles.d: z/Z ignore the argument
The argument is not used for any MAC context by z and Z, so drop the confusing
text from the table.
2020-02-18 10:53:14 +00:00
Florian Klink 0de6103dff man: tmpfiles.d: list missing q
Also, Q creates directories (same as v), so update the example
accordingly.
2020-01-26 13:32:00 +09:00
Ansgar Burchardt 72a86dd5ec man: tmpfiles.d: only list "v" once 2020-01-03 20:22:48 +09:00
Ansgar Burchardt f6bc26ee7f man: tmpfiles.d: "b", "c" options require major and minor numbers 2020-01-03 20:22:31 +09:00
Anita Zhang d59fc29bb7 [man] fix URL 2019-12-18 16:08:53 -08:00
Zbigniew Jędrzejewski-Szmek f8b68539d0 man: fix a few bogus entries in directives index
When wrong element types are used, directives are sometimes placed in the wrong
section. Also, strip part of text starting with "'", which is used in a few
places and which is displayed improperly in the index.
2019-11-21 22:06:30 +01:00
Zbigniew Jędrzejewski-Szmek b0343f8c96 man: change noindex="true" to index="false"
We nowadays prefer positive options over negative.
2019-11-21 22:03:57 +01:00
Zach Smith 4b55952dbe systemd-tmpfiles: cleanup man page program listing 2019-11-08 20:29:36 -08:00
Zach Smith eccebf4b0d systemd-tmpfiles: deprecate F for f+ 2019-10-31 22:27:56 -07:00
Zach Smith d0ea5c5e39 systemd-tmpfiles: allow appending content to file
Adds support to append to files with w+ type.

 w /tmp/13291.out - - - - first line\n
 w+ /tmp/13291.out - - - - second line\n
2019-10-03 18:28:15 -07:00
Lennart Poettering f3d3a9ca07 man: highlight the different concepts behind h/H and t/T
Fixes: #13151
2019-07-24 11:41:35 +02:00
Lennart Poettering 6c75f78e94
Merge pull request #12750 from keszybz/tmpfiles-c-copy
Make tmpfiles C use --root
2019-07-11 18:13:19 +02:00
Lennart Poettering 007b77ac6c man: document tmpfiles.d/ user/group resolvability needs 2019-07-03 15:54:45 +02:00
Zbigniew Jędrzejewski-Szmek b0458daf94 man: add "quick reference" to tmpfiles.d(5)
The synopsis section would describe config file paths, but not their
syntax. Let's add a short table that so that it's possible to quickly
remind oneself what the different letter mean.
2019-06-05 15:56:45 +02:00
Lennart Poettering 75006470ce tmpfiles: support the FS_PROJINHERIT_FL chattr flag 2019-03-28 18:43:04 +01:00
Zbigniew Jędrzejewski-Szmek 3a54a15760 man: use same header for all files
The "include" files had type "book" for some raeason. I don't think this
is meaningful. Let's just use the same everywhere.

$ perl -i -0pe 's^..DOCTYPE (book|refentry) PUBLIC "-//OASIS//DTD DocBook XML V4.[25]//EN"\s+"http^<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"\n  "http^gms' man/*.xml
2019-03-14 14:42:05 +01:00
Lennart Poettering aa1f2e52e8 man: document the new BSD file lock logic in tmpfiles 2019-02-15 17:16:54 +01:00
Ronnie P. Thomas 7f700b8a27 Fixed minor typo in man/tmpfiles.d.xml 2019-01-30 07:30:27 +01:00
Ryan Gonzalez a6f4464571 tmpfiles: Make C still copy if the destination directory is empty
Fixes #11287.
2019-01-08 14:30:15 -06:00
Zbigniew Jędrzejewski-Szmek 6a89d671df man: add a note that /var/run should not be used in tmpfiles 2018-12-11 22:21:25 +01:00
Zbigniew Jędrzejewski-Szmek abcb67ceed man: rewrite the general description of tmpfiles
We would describe tmpfiles.d through what systemd-tmpfiles does with them, but
I think it's better to start with a geneneral statement what they are. Also,
let's make the description of volatile file systems less prominent.

Also, strenghten the advice to use RuntimeDirectory and mention
{Cache,Logs,Configuration,State}Directory=.
2018-12-11 22:20:07 +01:00
Zbigniew Jędrzejewski-Szmek 488e435253 man: reword tmpfiles.d descriptions to refer less to previous descriptions
I think it is OK if some option is described as "similar to ..., but in
addition ...", as long as the "in addition" part is strictly additive this is
unambiguous. Otherwise, we'd have to repeat a lot of text, and then we'd
probably forget to adjust some of the descriptions when doing changes.

But when the "in addition" part is about replacing or removing parts of
functionality, it is better to avoid this pattern and describe the later option
from scratch.

Some paragraph breaks are added and minor changes made. UID/GID is changed to
user/group, since we generally expect user/group names to be used, not numeric
ids.

Fixes #11115.
2018-12-11 22:20:07 +01:00
Lennart Poettering fd78fd122a man: minor fixes
As suggested here:

https://github.com/systemd/systemd/pull/10538#pullrequestreview-176710207
2018-11-20 15:56:24 +01:00
Lennart Poettering ad19c57898 man: document that for removal tmpfiles.d prefix is run after suffix 2018-11-08 09:52:16 +01:00
Lennart Poettering 51c169c8d6 man: stop mentioning /var/run in tmpfiles.d(5)
It's obsolete, stop mentioning it. Let's not confuse people suggests it
would be OK to use that, because it really isn't anymore, and it gives
us trouble with merging idenctical lines.
2018-11-08 09:52:16 +01:00
Davide Cavalca b75f0c69b3 shared: add %g, %G specifiers for group / gid (#10368) 2018-10-13 17:26:48 +09:00
Yu Watanabe 8a89c5392d man: fix explanation about UID/GID field in tmpfiles.d(5)
Fixes #9495.
2018-10-05 19:06:10 +02:00
William Douglas 6d7b543342 RFC tmpfiles: Allow configuration to ignore execution errors
This is an implementation that covers making errors encountered when writing
file content optionally fatal. If this is something that folks would want I'll
add handling of this for all the other directives. I'd appreciate suggestions
on how this might better be structured as well (use of a goto fail or such) as
I'm not super happy with the approach.
2018-09-25 23:30:30 +02:00
Franck Bui f17a8d6178 tmpfiles: don't adjust qgroups on existing subvolumes
The qgroup logic (types 'q' and 'Q') only has an effect if there's no previous
setup at all, and any explicitly configured subvolumes with their qgroups are
left entirely unmodified.

The idea is that if users want a different logic than the one we set up by
default, then by all means they should do that before hand, and tmpfiles won't
override their logic.
2018-08-08 12:37:35 +02:00
Lennart Poettering cfffa385a3
Merge pull request #9489 from keszybz/copyright-removal-3
Copyright header removal, part 3 (or 4?)
2018-07-03 16:55:01 +02:00
Lucas Werkmeister 8252eb18b8 man: add missing <option> tag
One mention of --user was missing the surrounding <option> tag, making
the table look inconsistent (though the inconsistency is less obvious
after the reordering in 709f4c472c, since the four specifiers mentioning
the --user option are no longer immediately adjacent).
2018-07-03 14:53:36 +02:00
Zbigniew Jędrzejewski-Szmek 514094f933 man: drop mode line in file headers
This is already included in .dir-locals, so we don't need it
in the files themselves.
2018-07-03 01:32:25 +02:00
Zbigniew Jędrzejewski-Szmek fdbbee37d5 man: drop unused <authorgroup> tags from man sources
Docbook styles required those to be present, even though the templates that we
use did not show those names anywhere. But something changed semi-recently (I
would suspect docbook templates, but there was only a minor version bump in
recent years, and the changelog does not suggest anything related), and builds
now work without those entries. Let's drop this dead weight.

Tested with F26-F29, debian unstable.

$ perl -i -0pe 's/\s*<authorgroup>.*<.authorgroup>//gms' man/*xml
2018-06-14 12:22:18 +02:00
Lennart Poettering 96b2fb93c5 tree-wide: beautify remaining copyright statements
Let's unify an beautify our remaining copyright statements, with a
unicode ©. This means our copyright statements are now always formatted
the same way. Yay.
2018-06-14 10:20:21 +02:00
Lennart Poettering 818bf54632 tree-wide: drop 'This file is part of systemd' blurb
This part of the copyright blurb stems from the GPL use recommendations:

https://www.gnu.org/licenses/gpl-howto.en.html

The concept appears to originate in times where version control was per
file, instead of per tree, and was a way to glue the files together.
Ultimately, we nowadays don't live in that world anymore, and this
information is entirely useless anyway, as people are very welcome to
copy these files into any projects they like, and they shouldn't have to
change bits that are part of our copyright header for that.

hence, let's just get rid of this old cruft, and shorten our codebase a
bit.
2018-06-14 10:20:20 +02:00
Lennart Poettering 052c59c3d0 man: don't refer to "service manager" in tmpfiles.d(5)
system-tmpfiles is not a "service manager" hence say "command" instead.
2018-05-29 11:39:15 +02:00
Lennart Poettering b294e5943f core: introduce specifiers for /tmp and /var/tmp
This corresponds nicely with the specifiers we already pass for
/var/lib, /var/cache, /run and so on.

This is particular useful to update the test-path service files to
operate without guessable files, thus allowing multiple parallel
test-path invocations to pass without issues (the idea is to set $TMPDIR
early on in the test to some private directory, and then only use the
new %T or %V specifier to refer to it).
2018-05-29 11:39:15 +02:00
Lennart Poettering 709f4c472c man: sort specifier list in systemd.unit(5) alphabetically
Usually, we order our settings in our unit files in a logical order,
grouping related settings together, and putting more relevant stuff
first, instead of following a strictly alphabetical order.

For specifiers I think it makes sense to follow an alphabetical order
however, since they literally are just characters, and hence I think the
concept of alphabetical ordering is much more commanding for them. Also,
since specifiers are usually not used in combination, but mostly used
indepdently of each other I think it's not that important to group
similar ones together.

No other changes except the reordering.
2018-05-29 11:39:15 +02:00
Zbigniew Jędrzejewski-Szmek 11a1589223 tree-wide: drop license boilerplate
Files which are installed as-is (any .service and other unit files, .conf
files, .policy files, etc), are left as is. My assumption is that SPDX
identifiers are not yet that well known, so it's better to retain the
extended header to avoid any doubt.

I also kept any copyright lines. We can probably remove them, but it'd nice to
obtain explicit acks from all involved authors before doing that.
2018-04-06 18:58:55 +02:00
Lucas Werkmeister 662b3e5861 man: document meaning of age in tmpfiles.d (#8092)
This documents how the age of a file is determined, which previously was
only alluded to in other parts of the documentation. Fixes #8091.

The phrasings of “last modification timestamp” etc. are taken from
man:inode(7) (as of man-pages 4.14). The debug messages in tmpfiles.c
use different messages (“modify time”), which according to a code
comment follow man:stat(1); however, my copy of that manpage (from GNU
coreutils 8.29) documents %y as “time of last data modification”
instead.
2018-02-05 08:19:09 +01:00
Lennart Poettering 49e87292dc tmpfiles: make "f" lines behaviour match what the documentation says
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
2018-01-24 10:54:10 +01:00
Lennart Poettering 7fa1074831 tmpfiles: create parent directories if they are missing for more line types
Currently, we create leading directories implicitly for all lines that
create directory or directory-like nodes.

With this, we also do the same for a number of other lines: f/F, C, p,
L, c/b (that is regular files, pipes, symlinks, device nodes as well as
file trees we copy).

The leading directories are created with te default access mode of 0755.
If something else is desired, users should simply declare appropriate
"d" lines.

Fixes: #7853
2018-01-23 21:19:00 +01:00
Zbigniew Jędrzejewski-Szmek 1655cdee04 man: fix example formatting in systemd.preset
Repeating "example" everywhere was not useful, so remove
that and improve the formatting a bit.
2018-01-20 10:37:34 +11:00
Zbigniew Jędrzejewski-Szmek 5a8575ef01 tmpfiles: also add %t/%S/%C/%L specifiers
sd_path_home() returns ENXIO when a variable (such as $XDG_RUNTIME_DIR) is not
defined. Previously we used ENOKEY for unresolvable specifiers. To avoid having
two codes, or translating ENXIO to ENOKEY, I replaced ENOKEY use with ENXIO.

v2:
- use sd_path_home and change to ENXIO everywhere
2017-12-06 10:30:26 +01:00
Zbigniew Jędrzejewski-Szmek f2b5ca0e4e tmpfiles: add --user switch 2017-12-06 10:19:29 +01:00
ayekat ca23eeb54c tmpfiles: Add specifiers to allow running as user instance
This commit adds specifiers %U, %u and %h for the user UID, name and
home directory, respectively.

[zj: drop untrue copy-pasted comments and move the next text
     to the new "Specifiers" section.
     Now that #7444 has been merged, also drop the specifier functions.]
2017-12-06 10:19:22 +01:00
Zbigniew Jędrzejewski-Szmek 751223fecf Fail on unknown (alphanumerical) specifiers
The code intentionally ignored unknown specifiers, treating them as text. This
needs to change because otherwise we can never add a new specifier in a backwards
compatible way. So just treat an unknown (potential) specifier as an error.

In principle this is a break of backwards compatibility, but the previous
behaviour was pretty much useless, since the expanded value could change every
time we add new specifiers, which we do all the time.

As a compromise for backwards compatibility, only fail on alphanumerical
characters. This should cover the most cases where an unescaped percent
character is used, like size=5% and such, which behave the same as before with
this patch. OTOH, this means that we will not be able to use non-alphanumerical
specifiers without breaking backwards compatibility again. I think that's an
acceptable compromise.

v2:
- add NEWS entry

v3:
- only fail on alphanumerical
2017-12-06 10:17:37 +01:00
Zbigniew Jędrzejewski-Szmek 2df36d096d man: specifiers are allow for argument field in tmpfiles 2017-12-01 18:58:54 +01:00