[systemd-commits] 3 commits - Makefile.am man/systemd-tmpfiles.xml src/analyze src/firstboot src/notify src/run src/tmpfiles TODO

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Tue Jan 27 18:48:23 PST 2015


 Makefile.am               |   10 +++++++++-
 TODO                      |    4 ----
 man/systemd-tmpfiles.xml  |    8 ++++----
 src/analyze/analyze.c     |   17 +++++++----------
 src/firstboot/firstboot.c |    2 +-
 src/notify/notify.c       |   12 ++++++------
 src/run/run.c             |   10 +++++-----
 src/tmpfiles/tmpfiles.c   |    4 ++--
 8 files changed, 34 insertions(+), 33 deletions(-)

New commits:
commit 78eb158a20e2bee772f6e49d8b432b98f68cbb55
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Tue Jan 27 21:22:26 2015 -0500

    build-sys: add check for --help width

diff --git a/Makefile.am b/Makefile.am
index f42f132..620b4d2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6556,7 +6556,7 @@ endif
 #
 # Require python when making dist
 #
-.PHONY: dist-check-python
+.PHONY: dist-check-python dist-check-compat-libs dist-check-help
 dist-check-python:
 if !HAVE_PYTHON
 	@echo "*** python and python-lxml module must be installed and enabled in order to make dist"
@@ -6569,6 +6569,14 @@ if !ENABLE_COMPAT_LIBS
 	@false
 endif
 
+dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
+	for i in $(abspath $^); do                                             \
+            if $$i  --help | grep -v 'default:' | grep -E -q '.{80}.' ; then   \
+		echo "$(basename $$i) --help output is too wide:";             \
+	        $$i  --help | awk 'length > 80' | grep -E --color=yes '.{80}'; \
+	        exit 1;                                                        \
+            fi; done
+
 dist: dist-check-python dist-check-compat-libs
 
 # check "broken" platforms limited toolchains for link breakage before we release
diff --git a/TODO b/TODO
index d3b4b1d..7f5db20 100644
--- a/TODO
+++ b/TODO
@@ -31,10 +31,6 @@ External:
 
 Features:
 
-* add test targets to Makefile that runs all our tools with "--help"
-  and checks if the output is identical to the output when passed
-  through "fold -w 79".
-
 * nspawn: emulate /dev/kmsg using CUSE and turn off the syslog syscall
   with seccomp. That should provide us with a useful log buffer that
   systemd can log to during early boot, and disconnect container logs

commit b57b06258e0b1894edb6d1fc52a80b3c33164892
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Tue Jan 27 21:22:57 2015 -0500

    notify,firstboot,analyze,run: trim --help output to 80 lines

diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index 6a68551..46a97eb 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -1195,18 +1195,15 @@ static void help(void) {
                "     --user               Operate on user systemd instance\n"
                "  -H --host=[USER@]HOST   Operate on remote host\n"
                "  -M --machine=CONTAINER  Operate on local container\n"
-               "     --order              When generating a dependency graph, show only order\n"
-               "     --require            When generating a dependency graph, show only requirement\n"
-               "     --from-pattern=GLOB, --to-pattern=GLOB\n"
-               "                          When generating a dependency graph, filter only origins\n"
-               "                          or destinations, respectively\n"
-               "     --fuzz=TIMESPAN      When printing the tree of the critical chain, print also\n"
-               "                          services, which finished TIMESPAN earlier, than the\n"
-               "                          latest in the branch. The unit of TIMESPAN is seconds\n"
-               "                          unless specified with a different unit, i.e. 50ms\n"
+               "     --order              Show only order in the graph\n"
+               "     --require            Show only requirement in the graph\n"
+               "     --from-pattern=GLOB  Show only origins in the graph\n"
+               "     --to-pattern=GLOB    Show only destinations in the graph\n"
+               "     --fuzz=SECONDS       Also print also services which finished SECONDS\n"
+               "                          earlier than the latest in the branch\n"
                "     --man[=BOOL]         Do [not] check for existence of man pages\n\n"
                "Commands:\n"
-               "  time                    Print time spent in the kernel before reaching userspace\n"
+               "  time                    Print time spent in the kernel\n"
                "  blame                   Print list of running units ordered by time to init\n"
                "  critical-chain          Print a tree of the time critical chain of units\n"
                "  plot                    Output SVG graphic showing service initialization\n"
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index ce79574..a160c52 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -631,7 +631,7 @@ static void help(void) {
                "     --prompt-timezone         Prompt the user for timezone\n"
                "     --prompt-hostname         Prompt the user for hostname\n"
                "     --prompt-root-password    Prompt the user for root password\n"
-               "     --prompt                  Prompt for locale, timezone, hostname, root password\n"
+               "     --prompt                  Prompt for all of the above\n"
                "     --copy-locale             Copy locale from host\n"
                "     --copy-timezone           Copy timezone from host\n"
                "     --copy-root-password      Copy root password from host\n"
diff --git a/src/notify/notify.c b/src/notify/notify.c
index 5bf901e..f98075d 100644
--- a/src/notify/notify.c
+++ b/src/notify/notify.c
@@ -42,12 +42,12 @@ static bool arg_booted = false;
 static void help(void) {
         printf("%s [OPTIONS...] [VARIABLE=VALUE...]\n\n"
                "Notify the init system about service status updates.\n\n"
-               "  -h --help             Show this help\n"
-               "     --version          Show package version\n"
-               "     --ready            Inform the init system about service start-up completion\n"
-               "     --pid[=PID]        Set main pid of daemon\n"
-               "     --status=TEXT      Set status text\n"
-               "     --booted           Returns 0 if the system was booted up with systemd, non-zero otherwise\n",
+               "  -h --help            Show this help\n"
+               "     --version         Show package version\n"
+               "     --ready           Inform the init system about service start-up completion\n"
+               "     --pid[=PID]       Set main pid of daemon\n"
+               "     --status=TEXT     Set status text\n"
+               "     --booted          Check if the system was booted up with systemd\n",
                program_invocation_short_name);
 }
 
diff --git a/src/run/run.c b/src/run/run.c
index d6d0b42..723e0cb 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -86,11 +86,11 @@ static void help(void) {
                "  -t --pty                        Run service on pseudo tty\n"
                "  -q --quiet                      Suppress information messages during runtime\n\n"
                "Timer options:\n\n"
-               "     --on-active=SEC              Run after seconds\n"
-               "     --on-boot=SEC                Run after seconds from machine was booted up\n"
-               "     --on-startup=SEC             Run after seconds from systemd was first started\n"
-               "     --on-unit-active=SEC         Run after seconds from the last activation\n"
-               "     --on-unit-inactive=SEC       Run after seconds from the last deactivation\n"
+               "     --on-active=SECONDS          Run after SECONDS delay\n"
+               "     --on-boot=SECONDS            Run SECONDS after machine was booted up\n"
+               "     --on-startup=SECONDS         Run SECONDS after systemd activation\n"
+               "     --on-unit-active=SECONDS     Run SECONDS after the last activation\n"
+               "     --on-unit-inactive=SECONDS   Run SECONDS after the last deactivation\n"
                "     --on-calendar=SPEC           Realtime timer\n"
                "     --timer-property=NAME=VALUE  Set timer unit property\n",
                program_invocation_short_name);

commit 79ca888f5ad026b5b3844c05a80401905e64e2f0
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Tue Jan 27 21:22:08 2015 -0500

    tmpfiles: fix help text
    
    The help text, apart from being too long, did not describe what the options
    really do.

diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml
index d4c5bf2..f4d53b3 100644
--- a/man/systemd-tmpfiles.xml
+++ b/man/systemd-tmpfiles.xml
@@ -147,15 +147,15 @@
                         </varlistentry>
                         <varlistentry>
                                 <term><option>--prefix=<replaceable>path</replaceable></option></term>
-                                <listitem><para>Only apply rules that
-                                apply to paths with the specified
+                                <listitem><para>Only apply rules with
+                                paths that start with the specified
                                 prefix. This option can be specified
                                 multiple times.</para></listitem>
                         </varlistentry>
                         <varlistentry>
                                 <term><option>--exclude-prefix=<replaceable>path</replaceable></option></term>
-                                <listitem><para>Ignore rules that
-                                apply to paths with the specified
+                                <listitem><para>Ignore rules with
+                                paths that start with the specified
                                 prefix. This option can be specified
                                 multiple times.</para></listitem>
                         </varlistentry>
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index d60d5ba..473c511 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -1749,8 +1749,8 @@ static void help(void) {
                "     --clean                Clean up marked directories\n"
                "     --remove               Remove marked files/directories\n"
                "     --boot                 Execute actions only safe at boot\n"
-               "     --prefix=PATH          Only apply rules that apply to paths with the specified prefix\n"
-               "     --exclude-prefix=PATH  Ignore rules that apply to paths with the specified prefix\n"
+               "     --prefix=PATH          Only apply rules with the specified prefix\n"
+               "     --exclude-prefix=PATH  Ignore rules with the specified prefix\n"
                "     --root=PATH            Operate on an alternate filesystem root\n",
                program_invocation_short_name);
 }



More information about the systemd-commits mailing list