mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
Merge pull request #28179 from poettering/sysvgendeprecated
make systemd-sysv-generator even more deprecated
This commit is contained in:
commit
1db8c86196
5
NEWS
5
NEWS
@ -22,6 +22,11 @@ CHANGES WITH 254 in spe:
|
||||
with escape as a non comment line. For details, see:
|
||||
https://github.com/systemd/systemd/issues/27975
|
||||
|
||||
* Support for System V service scripts is now deprecated and will be
|
||||
removed in a future release. Please make sure to update your software
|
||||
*now* to include a native systemd unit file instead of a legacy
|
||||
System V script to retain compatibility with future systemd releases.
|
||||
|
||||
Security relevant changes:
|
||||
|
||||
* pam_systemd will now by default pass the CAP_WAKE_ALARM ambient
|
||||
|
@ -564,3 +564,23 @@ the OS.
|
||||
|
||||
@TRIMMED_BYTES@ of memory were returned to the OS, which took @TRIMMED_USEC@
|
||||
micro-seconds (μs).
|
||||
|
||||
-- a8fa8dacdb1d443e9503b8be367a6adb
|
||||
Subject: SysV Service Found
|
||||
Defined-By: systemd
|
||||
Support: %SUPPORT_URL%
|
||||
|
||||
A System V service script @SYSVSCRIPT@ has been found on the system that lacks
|
||||
a native systemd unit. An automatic unit file @UNIT@ has been generated for
|
||||
compatibility.
|
||||
|
||||
Note that these automatically generated compatibility unit files cannot replace
|
||||
native unit files as they generally slow down the system (by creating
|
||||
unnecessary, additional synchronization points), are less robust (as SysV services
|
||||
cannot properly be life-cycle tracked or automatically restarted) and less
|
||||
secure (as no sandboxing restrictions can be enforced).
|
||||
|
||||
Compatibility support for System V services in systemd is deprecated. Please
|
||||
make sure to update the package in question to provide proper, native systemd
|
||||
unit files. Contact vendor if necesssary. Compatibility support for System V
|
||||
services is deprecated and will be removed soon.
|
||||
|
@ -514,7 +514,7 @@ SYSTEMD_HOME_DEBUG_SUFFIX=foo \
|
||||
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
|
||||
@ -529,6 +529,13 @@ SYSTEMD_HOME_DEBUG_SUFFIX=foo \
|
||||
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
|
||||
|
@ -2400,12 +2400,19 @@ static int run(int argc, char *argv[]) {
|
||||
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 {
|
||||
|
@ -3496,7 +3496,7 @@ _public_ int sd_journal_get_catalog(sd_journal *j, char **ret) {
|
||||
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;
|
||||
|
||||
|
@ -198,6 +198,9 @@ _SD_BEGIN_DECLARATIONS;
|
||||
#define SD_MESSAGE_MEMORY_TRIM SD_ID128_MAKE(f9,b0,be,46,5a,d5,40,d0,85,0a,d3,21,72,d5,7c,21)
|
||||
#define SD_MESSAGE_MEMORY_TRIM_STR SD_ID128_MAKE_STR(f9,b0,be,46,5a,d5,40,d0,85,0a,d3,21,72,d5,7c,21)
|
||||
|
||||
#define SD_MESSAGE_SYSV_GENERATOR_DEPRECATED SD_ID128_MAKE(a8,fa,8d,ac,db,1d,44,3e,95,03,b8,be,36,7a,6a,db)
|
||||
#define SD_MESSAGE_SYSV_GENERATOR_DEPRECATED_STR SD_ID128_MAKE_STR(a8,fa,8d,ac,db,1d,44,3e,95,03,b8,be,36,7a,6a,db)
|
||||
|
||||
_SD_END_DECLARATIONS;
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-messages.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dirent-util.h"
|
||||
#include "exit-status.h"
|
||||
@ -758,9 +760,16 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) {
|
||||
if (!fpath)
|
||||
return log_oom();
|
||||
|
||||
log_warning("SysV service '%s' lacks a native systemd unit file. "
|
||||
"Automatically generating a unit file for compatibility. "
|
||||
"Please update package to include a native systemd unit file, in order to make it more safe and robust.", fpath);
|
||||
log_struct(LOG_WARNING,
|
||||
LOG_MESSAGE("SysV service '%s' lacks a native systemd unit file. "
|
||||
"%s Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it safe, robust and future-proof. "
|
||||
"%s This compatibility logic is deprecated, expect removal soon. %s",
|
||||
fpath,
|
||||
special_glyph(SPECIAL_GLYPH_RECYCLING),
|
||||
special_glyph(SPECIAL_GLYPH_WARNING_SIGN), special_glyph(SPECIAL_GLYPH_WARNING_SIGN)),
|
||||
"MESSAGE_ID=" SD_MESSAGE_SYSV_GENERATOR_DEPRECATED_STR,
|
||||
"SYSVSCRIPT=%s", fpath,
|
||||
"UNIT=%s", name);
|
||||
|
||||
service = new(SysvStub, 1);
|
||||
if (!service)
|
||||
|
Loading…
Reference in New Issue
Block a user