From 53c70a270662eef86f5a37ccacfbb3f9f779436a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 29 Mar 2018 17:47:03 +0200 Subject: [PATCH 1/4] update TODO --- TODO | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/TODO b/TODO index 35fcaef76b..c64ec8013f 100644 --- a/TODO +++ b/TODO @@ -24,6 +24,28 @@ Janitorial Clean-ups: Features: +* list the exit codes from the BSD/glibc in our own + exit-codes.[ch] tables. + +* introduce Ephemeral= unit file switch, that creates an ephemeral copy of all + files and directories that are left writable for a unit, and which are + removed after the unit goes down again. A bit like --ephemeral for + systemd-nspawn but for system services. If used together with RootImage= this + should reflink the image file itself. + + Related: add Ephemeral= … which would allow marking + specific paths only like this. + +* when RootImage= is used, mark the loopback device read-only if the other + settings permit it (i.e. if ProtectSystem=strict is set, and no directory if + the image is writable) + +* add CopyFile= or so as unit file setting that may be used to copy files or + directory trees from the host to te services RootImage= and RootDirectory= + environment. Which we can use for /etc/machine-id and in particular + /etc/resolv.conf. Should be smart and do something useful on read-only + images, for example fallback to read-only bind mounting the file instead. + * nspawn's console TTY should be allocated from within the container, not mounted in from the outside From 4afbb9004c4768ec4dd89fe293b688ccfea4c023 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 29 Mar 2018 16:27:45 +0200 Subject: [PATCH 2/4] CODING_STYLE: mention that we ship .editconfig/.vimrc/.dir-locals.el in our repo --- doc/CODING_STYLE | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/CODING_STYLE b/doc/CODING_STYLE index 66771ef523..8ee7628051 100644 --- a/doc/CODING_STYLE +++ b/doc/CODING_STYLE @@ -7,9 +7,11 @@ comments easily discernable from explanatory, documenting code comments (i.e. committable stuff). -- Don't break code lines too eagerly. We do *not* force line breaks at - 80ch, all of today's screens should be much larger than that. But - then again, don't overdo it, ~119ch should be enough really. +- Don't break code lines too eagerly. We do *not* force line breaks at 80ch, + all of today's screens should be much larger than that. But then again, don't + overdo it, ~119ch should be enough really. The .editorconfig, .vimrc and + .dir-locals.el files contained in the repository will set this limit up for + you automatically, if you let them (as well as a few other things). - Variables and functions *must* be static, unless they have a prototype, and are supposed to be exported. From 46f88673729fad4df6d9d7b8e26a735648266bc5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 29 Mar 2018 16:28:00 +0200 Subject: [PATCH 3/4] CODING_STYLE: two minor additions --- doc/CODING_STYLE | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/CODING_STYLE b/doc/CODING_STYLE index 8ee7628051..7025d242fa 100644 --- a/doc/CODING_STYLE +++ b/doc/CODING_STYLE @@ -69,7 +69,7 @@ values. Do not mix usec and msec, and usec and whatnot. - Make use of _cleanup_free_ and friends. It makes your code much - nicer to read! + nicer to read (and shorter)! - Be exceptionally careful when formatting and parsing floating point numbers. Their syntax is locale dependent (i.e. "5.000" in en_US is @@ -101,7 +101,9 @@ - Do not write "foo ()", write "foo()". -- Please use streq() and strneq() instead of strcmp(), strncmp() where applicable. +- Please use streq() and strneq() instead of strcmp(), strncmp() where + applicable (i.e. wherever you just care about equality/inequality, not about + the sorting order). - Please do not allocate variables on the stack in the middle of code, even if C99 allows it. Wrong: From 25ac900ad72e6fe15050228c45feed627c42495a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 29 Mar 2018 16:28:21 +0200 Subject: [PATCH 4/4] CODING_STYLE: document suggested suffixes to use in documentation --- doc/CODING_STYLE | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/CODING_STYLE b/doc/CODING_STYLE index 7025d242fa..be30359160 100644 --- a/doc/CODING_STYLE +++ b/doc/CODING_STYLE @@ -454,3 +454,15 @@ O_NONBLOCK has a benefit: it bypasses any mandatory lock that might be in effect on the regular file. If in doubt consider turning off O_NONBLOCK again after opening. + +- When referring to a configuration file option in the documentation and such, + please always suffix it with "=", to indicate that it is a configuration file + setting. + +- When referring to a command line option in the documentation and such, please + allways prefix with "--" or "-" (as appropriate), to indicate that it is a + command line option. + +- When referring to a file system path that is a directory, please always + suffix it with "/", to indicate that it is a directory, not a regular file + (or other file system object).