From 8b2c2abc89a98bd715a7c2054986c51a7a6fb403 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 4 Dec 2017 13:11:25 +0900 Subject: [PATCH 1/9] stdio-bridge: add missing option --- src/stdio-bridge/stdio-bridge.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/stdio-bridge/stdio-bridge.c b/src/stdio-bridge/stdio-bridge.c index f523ff22389..4c099990ed6 100644 --- a/src/stdio-bridge/stdio-bridge.c +++ b/src/stdio-bridge/stdio-bridge.c @@ -57,9 +57,10 @@ static int parse_argv(int argc, char *argv[]) { }; static const struct option options[] = { - { "help", no_argument, NULL, 'h' }, - { "bus-path", required_argument, NULL, 'p' }, - { NULL, 0, NULL, 0 } + { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, ARG_VERSION }, + { "bus-path", required_argument, NULL, 'p' }, + {}, }; int c; From af8cbf4741bbc0b4bca9577069583243992f2829 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 4 Dec 2017 21:02:09 +0900 Subject: [PATCH 2/9] man: add missing options --- man/busctl.xml | 1 + man/localectl.xml | 1 + man/machinectl.xml | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/man/busctl.xml b/man/busctl.xml index 2446a8caa44..0c0d28b5d32 100644 --- a/man/busctl.xml +++ b/man/busctl.xml @@ -147,6 +147,7 @@ + diff --git a/man/localectl.xml b/man/localectl.xml index 85885410419..89a7ab28554 100644 --- a/man/localectl.xml +++ b/man/localectl.xml @@ -112,6 +112,7 @@ + diff --git a/man/machinectl.xml b/man/machinectl.xml index 73fc5a68f6d..43f4d127b85 100644 --- a/man/machinectl.xml +++ b/man/machinectl.xml @@ -301,6 +301,13 @@ , if another address will be output afterwards. + + + + + Suppresses additional informational output while running. + + From db9b9fb99dcd77341159d32508f89474a0905387 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 4 Dec 2017 21:05:18 +0900 Subject: [PATCH 3/9] man: convert info to information or informational --- man/coredumpctl.xml | 2 +- man/journalctl.xml | 2 +- man/systemd.network.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/man/coredumpctl.xml b/man/coredumpctl.xml index 73f4b87dacd..72191d1dc26 100644 --- a/man/coredumpctl.xml +++ b/man/coredumpctl.xml @@ -144,7 +144,7 @@ - Suppresses info messages about lack + Suppresses informational messages about lack of access to journal files and possible in-flight coredumps. diff --git a/man/journalctl.xml b/man/journalctl.xml index 089fb1378f4..257ff5a8168 100644 --- a/man/journalctl.xml +++ b/man/journalctl.xml @@ -439,7 +439,7 @@ - Suppresses all info messages + Suppresses all informational messages (i.e. "-- Logs begin at …", "-- Reboot --"), any warning messages regarding inaccessible system journals when run as a normal diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 5a5ecb0b168..3466f3a3cf7 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -1656,7 +1656,7 @@ VLANId= The VLAN ID for the new static MAC table entry. If - omitted, no VLAN ID info is appended to the new static MAC + omitted, no VLAN ID information is appended to the new static MAC table entry. From a135d2710532f69902038fa8b07ed083e9d79d36 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 4 Dec 2017 13:33:46 +0900 Subject: [PATCH 4/9] man: lists short options in systemd-udevd.service(8) Follow-up for 2d19c17e8eafbe6c460c3cd76cf65aecd80ead87. --- man/systemd-udevd.service.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml index 12b51a152de..ee18dae6ebb 100644 --- a/man/systemd-udevd.service.xml +++ b/man/systemd-udevd.service.xml @@ -89,6 +89,7 @@ Options + Detach and run in the background. @@ -96,6 +97,7 @@ + Print debug messages to standard error. @@ -103,6 +105,7 @@ + Limit the number of events executed in parallel. @@ -110,6 +113,7 @@ + Delay the execution of RUN @@ -121,6 +125,7 @@ + Set the number of seconds to wait for events to finish. After @@ -129,6 +134,7 @@ + Specify when systemd-udevd should resolve names of users and groups. @@ -140,11 +146,7 @@ - - - - - + From 5639df9a80a828f66ac1ab703dd4fe21a0fc1d19 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 5 Dec 2017 23:30:10 +0900 Subject: [PATCH 5/9] udevadm: getopt() and help message cleanup This adds missing options, mainly '--version' in getopt(), removes an unused option from getopt(). Also, this adds a deprecate message in `udevadm hwdb`, and cleanups help messages. Follow-up for 65eb4378c3e1de25383d8cd606909e64c71edc80. --- src/udev/udevadm-control.c | 12 +++++++++--- src/udev/udevadm-hwdb.c | 34 +++++++++++++++++++++------------ src/udev/udevadm-info.c | 2 +- src/udev/udevadm-monitor.c | 11 ++++++++--- src/udev/udevadm-settle.c | 12 +++++++++--- src/udev/udevadm-test-builtin.c | 13 +++++++++---- src/udev/udevadm-test.c | 17 +++++++++++------ src/udev/udevadm-trigger.c | 10 +++++++--- src/udev/udevadm-util.h | 4 ++++ 9 files changed, 80 insertions(+), 35 deletions(-) diff --git a/src/udev/udevadm-control.c b/src/udev/udevadm-control.c index a10621a468a..ab9237ff785 100644 --- a/src/udev/udevadm-control.c +++ b/src/udev/udevadm-control.c @@ -24,12 +24,13 @@ #include "time-util.h" #include "udev-util.h" #include "udev.h" +#include "udevadm-util.h" static void print_help(void) { - printf("%s control COMMAND\n\n" + printf("%s control OPTION\n\n" "Control the udev daemon.\n\n" " -h --help Show this help\n" - " --version Show package version\n" + " -V --version Show package version\n" " -e --exit Instruct the daemon to cleanup and exit\n" " -l --log-priority=LEVEL Set the udev log level for the daemon\n" " -s --stop-exec-queue Do not execute events, queue only\n" @@ -57,6 +58,7 @@ static int adm_control(struct udev *udev, int argc, char *argv[]) { { "env", required_argument, NULL, 'p' }, /* alias for -p */ { "children-max", required_argument, NULL, 'm' }, { "timeout", required_argument, NULL, 't' }, + { "version", no_argument, NULL, 'V' }, { "help", no_argument, NULL, 'h' }, {} }; @@ -70,7 +72,7 @@ static int adm_control(struct udev *udev, int argc, char *argv[]) { if (uctrl == NULL) return 2; - while ((c = getopt_long(argc, argv, "el:sSRp:m:h", options, NULL)) >= 0) + while ((c = getopt_long(argc, argv, "el:sSRp:m:t:Vh", options, NULL)) >= 0) switch (c) { case 'e': if (udev_ctrl_send_exit(uctrl, timeout) < 0) @@ -153,6 +155,10 @@ static int adm_control(struct udev *udev, int argc, char *argv[]) { } break; } + case 'V': + print_version(); + rc = 0; + break; case 'h': print_help(); rc = 0; diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index ba7a15e6e9d..ab5dc7ab642 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -34,6 +34,7 @@ #include "strbuf.h" #include "string-util.h" #include "udev.h" +#include "udevadm-util.h" #include "util.h" /* @@ -546,12 +547,17 @@ static int import_file(struct udev *udev, struct trie *trie, const char *filenam } static void help(void) { - printf("Usage: udevadm hwdb OPTIONS\n" - " -u,--update update the hardware database\n" - " --usr generate in " UDEVLIBEXECDIR " instead of /etc/udev\n" - " -t,--test=MODALIAS query database and print result\n" - " -r,--root=PATH alternative root path in the filesystem\n" - " -h,--help\n\n"); + printf("%s hwdb [OPTIONS]\n\n" + " -h --help Print this message\n" + " -V --version Print version of the program\n" + " -u --update Update the hardware database\n" + " --usr Generate in " UDEVLIBEXECDIR " instead of /etc/udev\n" + " -t --test=MODALIAS Query database and print result\n" + " -r --root=PATH Alternative root path in the filesystem\n\n" + "NOTE:\n" + "The sub-command 'hwdb' is deprecated, and is left for backwards compatibility.\n" + "Please use systemd-hwdb instead.\n" + , program_invocation_short_name); } static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { @@ -560,11 +566,12 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { }; static const struct option options[] = { - { "update", no_argument, NULL, 'u' }, - { "usr", no_argument, NULL, ARG_USR }, - { "test", required_argument, NULL, 't' }, - { "root", required_argument, NULL, 'r' }, - { "help", no_argument, NULL, 'h' }, + { "update", no_argument, NULL, 'u' }, + { "usr", no_argument, NULL, ARG_USR }, + { "test", required_argument, NULL, 't' }, + { "root", required_argument, NULL, 'r' }, + { "version", no_argument, NULL, 'V' }, + { "help", no_argument, NULL, 'h' }, {} }; const char *test = NULL; @@ -575,7 +582,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { int err, c; int rc = EXIT_SUCCESS; - while ((c = getopt_long(argc, argv, "ut:r:h", options, NULL)) >= 0) + while ((c = getopt_long(argc, argv, "ut:r:Vh", options, NULL)) >= 0) switch(c) { case 'u': update = true; @@ -589,6 +596,9 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { case 'r': root = optarg; break; + case 'V': + print_version(); + return EXIT_SUCCESS; case 'h': help(); return EXIT_SUCCESS; diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c index b39f1a637e6..396ccfb4e20 100644 --- a/src/udev/udevadm-info.c +++ b/src/udev/udevadm-info.c @@ -377,7 +377,7 @@ static int uinfo(struct udev *udev, int argc, char *argv[]) { export_prefix = optarg; break; case 'V': - printf("%s\n", PACKAGE_VERSION); + print_version(); return 0; case 'h': help(); diff --git a/src/udev/udevadm-monitor.c b/src/udev/udevadm-monitor.c index c8b85fb0f4c..028ef92bc2e 100644 --- a/src/udev/udevadm-monitor.c +++ b/src/udev/udevadm-monitor.c @@ -30,6 +30,7 @@ #include "format-util.h" #include "udev-util.h" #include "udev.h" +#include "udevadm-util.h" static bool udev_exit; @@ -60,10 +61,10 @@ static void print_device(struct udev_device *device, const char *source, int pro } static void help(void) { - printf("%s monitor [--property] [--kernel] [--udev] [--help]\n\n" + printf("%s monitor [OPTIONS]\n\n" "Listen to kernel and udev events.\n\n" " -h --help Show this help\n" - " --version Show package version\n" + " -V --version Show package version\n" " -p --property Print the event properties\n" " -k --kernel Print kernel uevents\n" " -u --udev Print udev events\n" @@ -94,6 +95,7 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[]) { { "udev", no_argument, NULL, 'u' }, { "subsystem-match", required_argument, NULL, 's' }, { "tag-match", required_argument, NULL, 't' }, + { "version", no_argument, NULL, 'V' }, { "help", no_argument, NULL, 'h' }, {} }; @@ -101,7 +103,7 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[]) { udev_list_init(udev, &subsystem_match_list, true); udev_list_init(udev, &tag_match_list, true); - while ((c = getopt_long(argc, argv, "pekus:t:h", options, NULL)) >= 0) + while ((c = getopt_long(argc, argv, "pekus:t:Vh", options, NULL)) >= 0) switch (c) { case 'p': case 'e': @@ -130,6 +132,9 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[]) { case 't': udev_list_entry_add(&tag_match_list, optarg, NULL); break; + case 'V': + print_version(); + return 0; case 'h': help(); return 0; diff --git a/src/udev/udevadm-settle.c b/src/udev/udevadm-settle.c index d72b6ffe208..0af3e6412b0 100644 --- a/src/udev/udevadm-settle.c +++ b/src/udev/udevadm-settle.c @@ -29,13 +29,14 @@ #include "parse-util.h" #include "udev.h" +#include "udevadm-util.h" #include "util.h" static void help(void) { - printf("%s settle OPTIONS\n\n" + printf("%s settle [OPTIONS]\n\n" "Wait for pending udev events.\n\n" " -h --help Show this help\n" - " --version Show package version\n" + " -V --version Show package version\n" " -t --timeout=SECONDS Maximum time to wait for events\n" " -E --exit-if-exists=FILE Stop waiting if file exists\n" , program_invocation_short_name); @@ -45,6 +46,7 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) { static const struct option options[] = { { "timeout", required_argument, NULL, 't' }, { "exit-if-exists", required_argument, NULL, 'E' }, + { "version", no_argument, NULL, 'V' }, { "help", no_argument, NULL, 'h' }, { "seq-start", required_argument, NULL, 's' }, /* removed */ { "seq-end", required_argument, NULL, 'e' }, /* removed */ @@ -59,7 +61,7 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) { struct udev_queue *queue; int rc = EXIT_FAILURE; - while ((c = getopt_long(argc, argv, "t:E:hs:e:q", options, NULL)) >= 0) { + while ((c = getopt_long(argc, argv, "t:E:Vhs:e:q", options, NULL)) >= 0) { switch (c) { case 't': { @@ -77,6 +79,10 @@ static int adm_settle(struct udev *udev, int argc, char *argv[]) { exists = optarg; break; + case 'V': + print_version(); + return EXIT_SUCCESS; + case 'h': help(); return EXIT_SUCCESS; diff --git a/src/udev/udevadm-test-builtin.c b/src/udev/udevadm-test-builtin.c index 2cdbec050f0..f5a39a11c11 100644 --- a/src/udev/udevadm-test-builtin.c +++ b/src/udev/udevadm-test-builtin.c @@ -25,12 +25,13 @@ #include "path-util.h" #include "string-util.h" #include "udev.h" +#include "udevadm-util.h" static void help(struct udev *udev) { - printf("%s builtin [--help] COMMAND SYSPATH\n\n" + printf("%s test-builtin [OPTIONS] COMMAND DEVPATH\n\n" "Test a built-in command.\n\n" " -h --help Print this message\n" - " --version Print version of the program\n\n" + " -V --version Print version of the program\n\n" "Commands:\n" , program_invocation_short_name); @@ -39,7 +40,8 @@ static void help(struct udev *udev) { static int adm_builtin(struct udev *udev, int argc, char *argv[]) { static const struct option options[] = { - { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, 'V' }, + { "help", no_argument, NULL, 'h' }, {} }; char *command = NULL; @@ -49,8 +51,11 @@ static int adm_builtin(struct udev *udev, int argc, char *argv[]) { enum udev_builtin_cmd cmd; int rc = EXIT_SUCCESS, c; - while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) + while ((c = getopt_long(argc, argv, "Vh", options, NULL)) >= 0) switch (c) { + case 'V': + print_version(); + goto out; case 'h': help(udev); goto out; diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c index 6d20987fa2e..ef1f2f0269a 100644 --- a/src/udev/udevadm-test.c +++ b/src/udev/udevadm-test.c @@ -29,13 +29,14 @@ #include "string-util.h" #include "udev-util.h" #include "udev.h" +#include "udevadm-util.h" static void help(void) { - printf("%s test OPTIONS \n\n" - "Test an event run.\n" + printf("%s test [OPTIONS] DEVPATH\n\n" + "Test an event run.\n\n" " -h --help Show this help\n" - " --version Show package version\n" + " -V --version Show package version\n" " -a --action=ACTION Set action string\n" " -N --resolve-names=early|late|never When to resolve names\n" , program_invocation_short_name); @@ -54,15 +55,16 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) { int rc = 0, c; static const struct option options[] = { - { "action", required_argument, NULL, 'a' }, + { "action", required_argument, NULL, 'a' }, { "resolve-names", required_argument, NULL, 'N' }, - { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, 'V' }, + { "help", no_argument, NULL, 'h' }, {} }; log_debug("version %s", PACKAGE_VERSION); - while ((c = getopt_long(argc, argv, "a:N:h", options, NULL)) >= 0) + while ((c = getopt_long(argc, argv, "a:N:Vh", options, NULL)) >= 0) switch (c) { case 'a': action = optarg; @@ -80,6 +82,9 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) { exit(EXIT_FAILURE); } break; + case 'V': + print_version(); + exit(EXIT_SUCCESS); case 'h': help(); exit(EXIT_SUCCESS); diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c index 23aaa474233..f78a2ba4373 100644 --- a/src/udev/udevadm-trigger.c +++ b/src/udev/udevadm-trigger.c @@ -68,10 +68,10 @@ static const char *keyval(const char *str, const char **val, char *buf, size_t s } static void help(void) { - printf("%s trigger OPTIONS\n\n" + printf("%s trigger [OPTIONS] DEVPATH\n\n" "Request events from the kernel.\n\n" " -h --help Show this help\n" - " --version Show package version\n" + " -V --version Show package version\n" " -v --verbose Print the list of devices while running\n" " -n --dry-run Do not actually trigger the events\n" " -t --type= Type of events to trigger\n" @@ -109,6 +109,7 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[]) { { "sysname-match", required_argument, NULL, 'y' }, { "name-match", required_argument, NULL, ARG_NAME }, { "parent-match", required_argument, NULL, 'b' }, + { "version", no_argument, NULL, 'V' }, { "help", no_argument, NULL, 'h' }, {} }; @@ -124,7 +125,7 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[]) { if (udev_enumerate == NULL) return 1; - while ((c = getopt_long(argc, argv, "vno:t:c:s:S:a:A:p:g:y:b:h", options, NULL)) >= 0) { + while ((c = getopt_long(argc, argv, "vnt:c:s:S:a:A:p:g:y:b:Vh", options, NULL)) >= 0) { const char *key; const char *val; char buf[UTIL_PATH_SIZE]; @@ -240,6 +241,9 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[]) { break; } + case 'V': + print_version(); + return 0; case 'h': help(); return 0; diff --git a/src/udev/udevadm-util.h b/src/udev/udevadm-util.h index 7963acaa53e..8262a8343f7 100644 --- a/src/udev/udevadm-util.h +++ b/src/udev/udevadm-util.h @@ -23,3 +23,7 @@ struct udev_device *find_device(struct udev *udev, const char *id, const char *prefix); + +static inline void print_version(void) { + printf("%s\n", PACKAGE_VERSION); +} From c94c581c7b3d13371a781be254fac6dc07a56178 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 5 Dec 2017 22:47:18 +0900 Subject: [PATCH 6/9] man: add missing options to and use standard-options.xml in udevadm(8) --- man/udevadm.xml | 105 +++++++++++++++--------------------------------- 1 file changed, 32 insertions(+), 73 deletions(-) diff --git a/man/udevadm.xml b/man/udevadm.xml index 471108642bd..753ddf98dae 100644 --- a/man/udevadm.xml +++ b/man/udevadm.xml @@ -23,7 +23,9 @@ along with systemd; If not, see . --> - + + udevadm systemd @@ -54,16 +56,16 @@ - udevadm info options + udevadm info options devpath - udevadm trigger options + udevadm trigger options devpath udevadm settle options - udevadm control command + udevadm control option udevadm monitor options @@ -86,24 +88,15 @@ Options + Print debug messages to standard error. - - - - Print version number. - - - - - - - Print help text. - - + + + udevadm info @@ -208,19 +201,9 @@ <para>Cleanup the udev database.</para> </listitem> </varlistentry> - <varlistentry> - <term><option>--version</option></term> - <listitem> - <para>Print version.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><option>-h</option></term> - <term><option>--help</option></term> - <listitem> - <para>Print help text.</para> - </listitem> - </varlistentry> + + <xi:include href="standard-options.xml" xpointer="version" /> + <xi:include href="standard-options.xml" xpointer="help" /> </variablelist> <para>In addition, an optional positional argument can be used @@ -352,13 +335,9 @@ device.</para> </listitem> </varlistentry> - <varlistentry> - <term><option>-h</option></term> - <term><option>--help</option></term> - <listitem> - <para>Print help text.</para> - </listitem> - </varlistentry> + + <xi:include href="standard-options.xml" xpointer="version" /> + <xi:include href="standard-options.xml" xpointer="help" /> </variablelist> <para>In addition, optional positional arguments can be used @@ -389,17 +368,13 @@ <para>Stop waiting if file exists.</para> </listitem> </varlistentry> - <varlistentry> - <term><option>-h</option></term> - <term><option>--help</option></term> - <listitem> - <para>Print help text.</para> - </listitem> - </varlistentry> + + <xi:include href="standard-options.xml" xpointer="version" /> + <xi:include href="standard-options.xml" xpointer="help" /> </variablelist> </refsect2> - <refsect2><title>udevadm control <replaceable>command</replaceable> + udevadm control <replaceable>option</replaceable> Modify the internal state of the running udev daemon. @@ -463,18 +438,15 @@ + seconds The maximum number of seconds to wait for a reply from systemd-udevd. - - - - - Print help text. - - + + + @@ -521,13 +493,9 @@ Filter udev events by tag. Only udev events with a given tag attached will pass. - - - - - Print help text. - - + + + @@ -557,13 +525,9 @@ and all devices will be owned by root. - - - - - Print help text. - - + + + @@ -576,13 +540,8 @@ for device DEVPATH, and print debug output. - - - - - Print help text. - - + + From e7ff71281d5f25fae78a3bc304a61ccc0bf94eab Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 4 Dec 2017 14:20:56 +0900 Subject: [PATCH 7/9] man: include standard-options.xml in systemd-hwdb(8) --- man/systemd-hwdb.xml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/man/systemd-hwdb.xml b/man/systemd-hwdb.xml index c54762a254b..58b151653b0 100644 --- a/man/systemd-hwdb.xml +++ b/man/systemd-hwdb.xml @@ -23,7 +23,9 @@ along with systemd; If not, see . --> - + + systemd-hwdb systemd @@ -68,13 +70,6 @@ Options - - - - - Print help text. - - @@ -88,6 +83,8 @@ Alternate root path in the filesystem. + + systemd-hwdb From bf2d3d7cae71c7e8f30b7e8b63778c1880c5fdba Mon Sep 17 00:00:00 2001 From: Yu Watanabe <watanabe.yu+github@gmail.com> Date: Mon, 4 Dec 2017 15:25:08 +0900 Subject: [PATCH 8/9] man: fix typo --- man/systemd.exec.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 019bc3bae51..849baec974f 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -1053,7 +1053,7 @@ CapabilityBoundingSet=~CAP_B CAP_C</programlisting> <listitem><para>Takes a boolean argument. If true, explicit module loading will be denied. This allows to turn off module load and unload operations on modular kernels. It is recommended to turn this on for most services - that do not need special file systems or extra kernel modules to work. Default to off. Enabling this option + that do not need special file systems or extra kernel modules to work. Defaults to off. Enabling this option removes <constant>CAP_SYS_MODULE</constant> from the capability bounding set for the unit, and installs a system call filter to block module system calls, also <filename>/usr/lib/modules</filename> is made inaccessible. For this setting the same restrictions regarding mount propagation and privileges apply as for From 3db93b3fc8a8c40efdc6cc2d9176f88431ea9c7b Mon Sep 17 00:00:00 2001 From: Yu Watanabe <watanabe.yu+github@gmail.com> Date: Mon, 4 Dec 2017 15:42:48 +0900 Subject: [PATCH 9/9] man: journal-remote: add missing options This adds documents about supported, mainly SSL related, options in jurnal-remote, journal-upload, and journal-gatewayd. --- man/custom-entities.ent.in | 1 + man/systemd-journal-gatewayd.service.xml | 7 ++++ man/systemd-journal-remote.xml | 47 +++++++++++++++++++++++- man/systemd-journal-upload.xml | 42 ++++++++++++++++++++- 4 files changed, 95 insertions(+), 2 deletions(-) diff --git a/man/custom-entities.ent.in b/man/custom-entities.ent.in index 0257c2a94f2..9ea92384aa7 100644 --- a/man/custom-entities.ent.in +++ b/man/custom-entities.ent.in @@ -5,3 +5,4 @@ <!ENTITY usergeneratordir @USER_GENERATOR_PATH@> <!ENTITY systemenvgeneratordir @SYSTEM_ENV_GENERATOR_PATH@> <!ENTITY userenvgeneratordir @USER_ENV_GENERATOR_PATH@> +<!ENTITY CERTIFICATE_ROOT @CERTIFICATE_ROOT@> diff --git a/man/systemd-journal-gatewayd.service.xml b/man/systemd-journal-gatewayd.service.xml index b82cc979e7e..4d461d9be4b 100644 --- a/man/systemd-journal-gatewayd.service.xml +++ b/man/systemd-journal-gatewayd.service.xml @@ -102,6 +102,13 @@ with <option>--cert=</option>.</para></listitem> </varlistentry> + <varlistentry> + <term><option>--trust=</option></term> + + <listitem><para>Specify the path to a file containing a + CA certificate in PEM format.</para></listitem> + </varlistentry> + <varlistentry> <term><option>-D <replaceable>DIR</replaceable></option></term> <term><option>--directory=<replaceable>DIR</replaceable></option></term> diff --git a/man/systemd-journal-remote.xml b/man/systemd-journal-remote.xml index ba88df535b0..658c7e07f4f 100644 --- a/man/systemd-journal-remote.xml +++ b/man/systemd-journal-remote.xml @@ -1,6 +1,9 @@ <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" -"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> +"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % entities SYSTEM "custom-entities.ent" > +%entities; +]> <!-- SPDX-License-Identifier: LGPL-2.1+ @@ -198,6 +201,48 @@ </listitem> </varlistentry> + <varlistentry> + <term><option>--key=</option></term> + + <listitem><para> + Takes a path to a SSL key file in PEM format. + Defaults to <filename>&CERTIFICATE_ROOT;/private/journal-remote.pem</filename>. + This option can be used with <option>--listen-https=</option>. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><option>--cert=</option></term> + + <listitem><para> + Takes a path to a SSL certificate file in PEM format. + Defaults to <filename>&CERTIFICATE_ROOT;/certs/journal-remote.pem</filename>. + This option can be used with <option>--listen-https=</option>. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><option>--trust=</option></term> + + <listitem><para> + Takes a path to a SSL CA certificate file in PEM format, + or <option>all</option>. If <option>all</option> is set, + then certificate checking will be disabled. + Defaults to <filename>&CERTIFICATE_ROOT;/ca/trusted.pem</filename>. + This option can be used with <option>--listen-https=</option>. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><option>--gnutls-log=</option></term> + + <listitem><para> + Takes a comma separated list of gnutls logging categories. + This option can be used with <option>--listen-http=</option> or + <option>--listen-https=</option>. + </para></listitem> + </varlistentry> + </variablelist> </refsect1> diff --git a/man/systemd-journal-upload.xml b/man/systemd-journal-upload.xml index 6fc477d75a1..a43062a6d5a 100644 --- a/man/systemd-journal-upload.xml +++ b/man/systemd-journal-upload.xml @@ -1,6 +1,9 @@ <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" -"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> +"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % entities SYSTEM "custom-entities.ent" > +%entities; +]> <!-- SPDX-License-Identifier: LGPL-2.1+ @@ -171,6 +174,43 @@ </para></listitem> </varlistentry> + <varlistentry> + <term><option>--follow</option><optional>=<replaceable>BOOL</replaceable></optional></term> + + <listitem><para> + If set to yes, then <command>systemd-journal-upload</command> waits for input. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><option>--key=</option></term> + + <listitem><para> + Takes a path to a SSL key file in PEM format. + Defaults to <filename>&CERTIFICATE_ROOT;/private/journal-upload.pem</filename>. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><option>--cert=</option></term> + + <listitem><para> + Takes a path to a SSL certificate file in PEM format. + Defaults to <filename>&CERTIFICATE_ROOT;/certs/journal-upload.pem</filename>. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><option>--trust=</option></term> + + <listitem><para> + Takes a path to a SSL CA certificate file in PEM format, + or <option>all</option>. If <option>all</option> is set, + then certificate checking will be disabled. + Defaults to <filename>&CERTIFICATE_ROOT;/ca/trusted.pem</filename>. + </para></listitem> + </varlistentry> + <xi:include href="standard-options.xml" xpointer="help" /> <xi:include href="standard-options.xml" xpointer="version" /> </variablelist>