unconditionally as a child process by another tool, such as package managers
running kernel-install in a postinstall script.
-`systemd-journald`:
+`systemd-journald`, `journalctl`:
* `$SYSTEMD_JOURNAL_COMPACT` – Takes a boolean. If enabled, journal files are written
in a more compact format that reduces the amount of disk space required by the
specified algorithm takes an effect immediately, you need to explicitly run
`journalctl --rotate`.
+* `$SYSTEMD_CATALOG` – path to the compiled catalog database file to use for
+ `journalctl -x`, `journalctl --update-catalog`, `journalctl --list-catalog`
+ and related calls.
+
+* `$SYSTEMD_CATALOG_SOURCES` – path to the catalog database input source
+ directory to use for `journalctl --update-catalog`.
+
`systemd-pcrphase`, `systemd-cryptsetup`:
* `$SYSTEMD_FORCE_MEASURE=1` — If set, force measuring of resources (which are
case ACTION_UPDATE_CATALOG: {
_cleanup_free_ char *database = NULL;
- database = path_join(arg_root, CATALOG_DATABASE);
+ database = path_join(arg_root, secure_getenv("SYSTEMD_CATALOG") ?: CATALOG_DATABASE);
if (!database)
return log_oom();
if (arg_action == ACTION_UPDATE_CATALOG) {
- r = catalog_update(database, arg_root, catalog_file_dirs);
+ const char *e;
+
+ e = secure_getenv("SYSTEMD_CATALOG_SOURCES");
+
+ r = catalog_update(
+ database,
+ arg_root,
+ e ? (const char* const*) STRV_MAKE(e) : catalog_file_dirs);
if (r < 0)
return log_error_errno(r, "Failed to list catalog: %m");
} else {
if (r < 0)
return r;
- r = catalog_get(CATALOG_DATABASE, id, &text);
+ r = catalog_get(secure_getenv("SYSTEMD_CATALOG") ?: CATALOG_DATABASE, id, &text);
if (r < 0)
return r;