Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Original-Author: Eelco Dolstra <eelco.dolstra@logicblox.com>
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c
index 57ab68deb6..8e281b8f2c 100644
index 25e229bf3e..b9af1c3b13 100644
--- a/src/shared/fstab-util.c
+++ b/src/shared/fstab-util.c
@@ -72,6 +72,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) {
@@ -76,6 +76,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) {
/* Don't bother with the OS data itself */
if (PATH_IN_SET(mount,
"/",
Expand All @@ -27,7 +27,7 @@ index 57ab68deb6..8e281b8f2c 100644
"/etc"))
return true;
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
index 45c6db9245..d7283b7fa6 100644
index 46f208824a..3a625ad2a6 100644
--- a/src/shutdown/umount.c
+++ b/src/shutdown/umount.c
@@ -178,8 +178,10 @@ int mount_points_list_get(FILE *f, MountPoint **head) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ container, so checking early whether it exists will fail.
1 file changed, 2 insertions(+)

diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index ab8746c442..480a9c55c6 100644
index e4fccaa3a7..05e6be8874 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -6165,6 +6165,7 @@ static int run(int argc, char *argv[]) {
@@ -6208,6 +6208,7 @@ static int run(int argc, char *argv[]) {
goto finish;
}
} else {
+#if 0
_cleanup_free_ char *p = NULL;

if (arg_pivot_root_new)
@@ -6184,6 +6185,7 @@ static int run(int argc, char *argv[]) {
@@ -6227,6 +6228,7 @@ static int run(int argc, char *argv[]) {
log_error_errno(r, "Unable to determine if %s looks like it has an OS tree (i.e. whether /usr/ exists): %m", arg_directory);
goto finish;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Original-Author: Eelco Dolstra <eelco.dolstra@logicblox.com>
2 files changed, 7 insertions(+), 21 deletions(-)

diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
index 58f2463104..0c263430a7 100644
index 862d57dcb6..8ba0ca4486 100644
--- a/src/core/systemd.pc.in
+++ b/src/core/systemd.pc.in
@@ -46,10 +46,10 @@ systemdsystemconfdir=${systemd_system_conf_dir}
Expand Down Expand Up @@ -46,10 +46,10 @@ index 58f2463104..0c263430a7 100644

systemd_sleep_dir=${prefix}/lib/systemd/system-sleep
diff --git a/src/libsystemd/sd-path/path-lookup.c b/src/libsystemd/sd-path/path-lookup.c
index 3ddbda0e9f..3eddc80c90 100644
index 389d7e2ad9..0819689ffa 100644
--- a/src/libsystemd/sd-path/path-lookup.c
+++ b/src/libsystemd/sd-path/path-lookup.c
@@ -64,11 +64,7 @@ int runtime_directory(RuntimeScope scope, const char *suffix, char **ret) {
@@ -86,11 +86,7 @@ int runtime_directory(RuntimeScope scope, const char *fallback_suffix, char **re
}

static const char* const user_data_unit_paths[] = {
Expand All @@ -61,7 +61,7 @@ index 3ddbda0e9f..3eddc80c90 100644
NULL
};

@@ -476,16 +472,13 @@ int lookup_paths_init(
@@ -498,16 +494,13 @@ int lookup_paths_init(
persistent_config,
SYSTEM_CONFIG_UNIT_DIR,
"/etc/systemd/system",
Expand All @@ -79,7 +79,7 @@ index 3ddbda0e9f..3eddc80c90 100644
STRV_IFNOTNULL(generator_late));
break;

@@ -503,13 +496,10 @@ int lookup_paths_init(
@@ -525,13 +518,10 @@ int lookup_paths_init(
add = strv_new(persistent_config,
USER_CONFIG_UNIT_DIR,
"/etc/systemd/user",
Expand All @@ -95,31 +95,31 @@ index 3ddbda0e9f..3eddc80c90 100644
break;

case RUNTIME_SCOPE_USER:
@@ -648,7 +638,6 @@ void lookup_paths_log(LookupPaths *lp) {
@@ -670,7 +660,6 @@ void lookup_paths_log(LookupPaths *lp) {
static const char* const system_generator_paths[] = {
"/run/systemd/system-generators",
"/etc/systemd/system-generators",
- "/usr/local/lib/systemd/system-generators",
SYSTEM_GENERATOR_DIR,
NULL,
};
@@ -656,7 +645,6 @@ static const char* const system_generator_paths[] = {
@@ -678,7 +667,6 @@ static const char* const system_generator_paths[] = {
static const char* const user_generator_paths[] = {
"/run/systemd/user-generators",
"/etc/systemd/user-generators",
- "/usr/local/lib/systemd/user-generators",
USER_GENERATOR_DIR,
NULL,
};
@@ -664,7 +652,6 @@ static const char* const user_generator_paths[] = {
@@ -686,7 +674,6 @@ static const char* const user_generator_paths[] = {
static const char* const system_env_generator_paths[] = {
"/run/systemd/system-environment-generators",
"/etc/systemd/system-environment-generators",
- "/usr/local/lib/systemd/system-environment-generators",
SYSTEM_ENV_GENERATOR_DIR,
NULL,
};
@@ -672,7 +659,6 @@ static const char* const system_env_generator_paths[] = {
@@ -694,7 +681,6 @@ static const char* const system_env_generator_paths[] = {
static const char* const user_env_generator_paths[] = {
"/run/systemd/user-environment-generators",
"/etc/systemd/user-environment-generators",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ in containers.
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/core/manager.c b/src/core/manager.c
index d85896577f..2a4782a55e 100644
index 7938c989af..c1ae20dfc0 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1575,7 +1575,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) {
@@ -1578,7 +1578,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) {
if (!unit_is_bound_by_inactive(u, &culprit))
continue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Subject: [PATCH] hostnamed, localed, timedated: disable methods that change
3 files changed, 25 insertions(+)

diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 06fb3f2878..b656e511b7 100644
index fbe1b2fa7a..30e7c75279 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -1388,6 +1388,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
Expand All @@ -35,7 +35,7 @@ index 06fb3f2878..b656e511b7 100644

context_read_machine_info(c);
diff --git a/src/locale/localed.c b/src/locale/localed.c
index 11d9130bbc..dd4d9e59ea 100644
index 041ba29cd8..02fbe3e278 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -221,6 +221,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er
Expand Down Expand Up @@ -69,7 +69,7 @@ index 11d9130bbc..dd4d9e59ea 100644

r = x11_context_verify_and_warn(&in, LOG_ERR, error);
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 662cc29ac5..57f3413dc6 100644
index d1ef772b56..9b1fe439f1 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -678,6 +678,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ index 3a13e04a27..4fd58068a1 100644
<literal>Etc/UTC</literal>. The resulting link should lead to the
corresponding binary
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
index 55931a2546..2e00bd7539 100644
index 8c776960e1..2e0563bd00 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -1410,7 +1410,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) {
@@ -1443,7 +1443,7 @@ static int get_timezones_from_zone1970_tab(char ***ret) {

assert(ret);

Expand All @@ -47,7 +47,7 @@ index 55931a2546..2e00bd7539 100644
if (!f)
return -errno;

@@ -1451,7 +1451,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) {
@@ -1488,7 +1488,7 @@ static int get_timezones_from_tzdata_zi(char ***ret) {

assert(ret);

Expand All @@ -56,7 +56,7 @@ index 55931a2546..2e00bd7539 100644
if (!f)
return -errno;

@@ -1562,7 +1562,7 @@ int verify_timezone(const char *name, int log_level) {
@@ -1603,7 +1603,7 @@ int verify_timezone(const char *name, int log_level) {
if (p - name >= PATH_MAX)
return -ENAMETOOLONG;

Expand All @@ -65,7 +65,7 @@ index 55931a2546..2e00bd7539 100644

fd = open(t, O_RDONLY|O_CLOEXEC);
if (fd < 0)
@@ -1614,7 +1614,7 @@ int get_timezone(char **ret) {
@@ -1675,7 +1675,7 @@ int get_timezone(char **ret) {
if (r < 0)
return r; /* Return EINVAL if not a symlink */

Expand All @@ -75,19 +75,19 @@ index 55931a2546..2e00bd7539 100644
return -EINVAL;
if (!timezone_is_valid(e, LOG_DEBUG))
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index 5ed6d3a9d2..f922d91a9d 100644
index 55bd273f21..d00aa16592 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -618,7 +618,7 @@ static int prompt_timezone(int rfd) {
@@ -571,7 +571,7 @@ static int prompt_timezone(int rfd, sd_varlink **mute_console_link) {

static int process_timezone(int rfd) {
static int process_timezone(int rfd, sd_varlink **mute_console_link) {
_cleanup_close_ int pfd = -EBADF;
- _cleanup_free_ char *f = NULL, *relpath = NULL;
+ _cleanup_free_ char *f = NULL;
const char *e;
int r;

@@ -664,12 +664,9 @@ static int process_timezone(int rfd) {
@@ -617,12 +617,9 @@ static int process_timezone(int rfd, sd_varlink **mute_console_link) {
if (isempty(arg_timezone))
return 0;

Expand All @@ -103,10 +103,10 @@ index 5ed6d3a9d2..f922d91a9d 100644
return log_error_errno(r, "Failed to create /etc/localtime symlink: %m");

diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 480a9c55c6..02c9ae6608 100644
index 05e6be8874..6dc00ff416 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1821,8 +1821,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid
@@ -1808,8 +1808,8 @@ int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t uid, gid
static const char *timezone_from_path(const char *path) {
return PATH_STARTSWITH_SET(
path,
Expand All @@ -118,7 +118,7 @@ index 480a9c55c6..02c9ae6608 100644

static bool etc_writable(void) {
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 57f3413dc6..6a456fe601 100644
index 9b1fe439f1..916886aeff 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -266,7 +266,7 @@ static int context_read_data(Context *c) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ NixOS has an option to link the xkb data files to /etc/X11, but not to
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/locale/localectl.c b/src/locale/localectl.c
index c595f81b40..90033f6566 100644
index 63703007ad..50def81940 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -302,7 +302,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
} state = NONE, look_for;
int r;
@@ -295,7 +295,7 @@ static const char* xkb_directory(void) {
static const char *cached = NULL;

- f = fopen("/usr/share/X11/xkb/rules/base.lst", "re");
+ f = fopen("/etc/X11/xkb/rules/base.lst", "re");
if (!f)
return log_error_errno(errno, "Failed to open keyboard mapping list: %m");
if (!cached)
- cached = secure_getenv("SYSTEMD_XKB_DIRECTORY") ?: "/usr/share/X11/xkb";
+ cached = secure_getenv("SYSTEMD_XKB_DIRECTORY") ?: "/etc/X11/xkb";
return cached;
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ files that I might have missed.
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/basic/constants.h b/src/basic/constants.h
index 7a09fbf878..ee3378f109 100644
index a26cff4062..3800c37e1b 100644
--- a/src/basic/constants.h
+++ b/src/basic/constants.h
@@ -40,13 +40,15 @@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ This is needed for NixOS to use such scripts as systemd directory is immutable.
1 file changed, 1 insertion(+)

diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c
index 3317068e47..021a3c0699 100644
index 25882970ef..599dd0a63f 100644
--- a/src/shutdown/shutdown.c
+++ b/src/shutdown/shutdown.c
@@ -358,6 +358,7 @@ static void notify_supervisor(void) {
@@ -329,6 +329,7 @@ static void notify_supervisor(void) {
int main(int argc, char *argv[]) {
static const char* const dirs[] = {
SYSTEM_SHUTDOWN_PATH,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This is needed for NixOS to use such scripts as systemd directory is immutable.
1 file changed, 1 insertion(+)

diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 3390ebe0c0..affc823bc4 100644
index 4fa6f16fcd..012cf16f90 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -248,6 +248,7 @@ static int execute(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ systemd itself uses extensively.
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/basic/path-util.h b/src/basic/path-util.h
index a3a82574dd..b836dba7f1 100644
index 5b2baef4e1..7f366e4544 100644
--- a/src/basic/path-util.h
+++ b/src/basic/path-util.h
@@ -9,11 +9,11 @@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ executables that are being called from managers.
1 file changed, 8 insertions(+)

diff --git a/src/core/manager.c b/src/core/manager.c
index 2a4782a55e..8dfdc227a1 100644
index c1ae20dfc0..c120e555a2 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -3977,9 +3977,17 @@ static int build_generator_environment(Manager *m, char ***ret) {
@@ -3994,9 +3994,17 @@ static int build_generator_environment(Manager *m, char ***ret) {
* adjust generated units to that. Let's pass down some bits of information that are easy for us to
* determine (but a bit harder for generator scripts to determine), as environment variables. */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ filename_is_valid with path_is_valid.
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c
index 57e7a91f93..faf45e4807 100644
index e089cfbc5e..35e135945b 100644
--- a/src/shared/tpm2-util.c
+++ b/src/shared/tpm2-util.c
@@ -724,7 +724,7 @@ int tpm2_context_new(const char *device, Tpm2Context **ret_context) {
@@ -741,7 +741,7 @@ int tpm2_context_new(const char *device, Tpm2Context **ret_context) {
fn = strjoina("libtss2-tcti-", driver, ".so.0");

/* Better safe than sorry, let's refuse strings that cannot possibly be valid driver early, before going to disk. */
- if (!filename_is_valid(fn))
+ if (!path_is_valid(fn))
return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "TPM2 driver name '%s' not valid, refusing.", driver);

context->tcti_dl = dlopen(fn, RTLD_NOW|RTLD_NODELETE);
const char *dle = NULL;
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ are written into `$XDG_CONFIG_HOME/systemd/user`.
1 file changed, 3 insertions(+)

diff --git a/src/systemctl/systemctl-edit.c b/src/systemctl/systemctl-edit.c
index 53bc57186a..0ed12ce931 100644
index a28180922a..22c9c8fdbd 100644
--- a/src/systemctl/systemctl-edit.c
+++ b/src/systemctl/systemctl-edit.c
@@ -330,6 +330,9 @@ int verb_edit(int argc, char *argv[], void *userdata) {
sd_bus *bus;
@@ -336,6 +336,9 @@ int verb_edit(int argc, char *argv[], void *userdata) {
sd_bus *bus = NULL;
int r;

+ if (!arg_runtime && arg_runtime_scope == RUNTIME_SCOPE_SYSTEM)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Subject: [PATCH] meson.build: do not create systemdstatedir
1 file changed, 1 deletion(-)

diff --git a/meson.build b/meson.build
index 238b935372..b0b67c9b99 100644
index 4746146a98..c13b72af56 100644
--- a/meson.build
+++ b/meson.build
@@ -2791,7 +2791,6 @@ install_data('LICENSE.GPL2',
@@ -2859,7 +2859,6 @@ install_data('LICENSE.GPL2',
install_subdir('LICENSES',
install_dir : docdir)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Subject: [PATCH] meson: Don't link ssh dropins
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index b0b67c9b99..4721b7482b 100644
index c13b72af56..32f6e791e7 100644
--- a/meson.build
+++ b/meson.build
@@ -219,13 +219,13 @@ sshconfdir = get_option('sshconfdir')
@@ -214,13 +214,13 @@ sshconfdir = get_option('sshconfdir')
if sshconfdir == ''
sshconfdir = sysconfdir / 'ssh/ssh_config.d'
endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Subject: [PATCH] install: unit_file_exists_full: follow symlinks
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/install.c b/src/shared/install.c
index 8195436564..dfbc35f357 100644
index a22c6df2f7..7e900c8bcd 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -3227,7 +3227,7 @@ int unit_file_exists_full(RuntimeScope scope, const LookupPaths *lp, const char
Expand Down
Loading
Loading