Skip to content

Commit

Permalink
systemd: 247.6 -> 248
Browse files Browse the repository at this point in the history
  • Loading branch information
thyol committed Apr 18, 2021
1 parent c6df94c commit aa1eaeb
Show file tree
Hide file tree
Showing 21 changed files with 148 additions and 169 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 2f4a5e9c9ef1cd57662e8bd4c24e1029a00d55b5 Mon Sep 17 00:00:00 2001
From b70ae6349411daa7fc072e144c9392d19fec7509 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 8 Jan 2013 15:46:30 +0100
Subject: [PATCH 01/19] Start device units for uninitialised encrypted devices
Subject: [PATCH 01/18] Start device units for uninitialised encrypted devices

This is necessary because the NixOS service that initialises the
filesystem depends on the appearance of the device unit. Also, this
Expand All @@ -13,7 +13,7 @@ unit. (However, this ignores the fsck unit, so it's not perfect...)
1 file changed, 4 deletions(-)

diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in
index 7c22eefdb7..e3a55e00b5 100644
index be972f90fb..fa0a81cb5b 100644
--- a/rules.d/99-systemd.rules.in
+++ b/rules.d/99-systemd.rules.in
@@ -17,10 +17,6 @@ SUBSYSTEM=="ubi", TAG+="systemd"
Expand All @@ -28,5 +28,5 @@ index 7c22eefdb7..e3a55e00b5 100644
SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}!="crypto_LUKS", SYMLINK+="gpt-auto-root"
SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}=="crypto_LUKS", SYMLINK+="gpt-auto-root-luks"
--
2.30.1
2.29.3

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 4e96b2e074c4a4f4ce900409872ce2f86704ee5b Mon Sep 17 00:00:00 2001
From 102c484f25b15789232c6d0f4680547a828c13da Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Fri, 12 Apr 2013 13:16:57 +0200
Subject: [PATCH 02/19] Don't try to unmount /nix or /nix/store
Subject: [PATCH 02/18] Don't try to unmount /nix or /nix/store

They'll still be remounted read-only.

Expand All @@ -12,7 +12,7 @@ https://github.com/NixOS/nixos/issues/126
2 files changed, 4 insertions(+)

diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c
index 292b97cd69..791b8e6b7e 100644
index f683f05981..5a04c2c2a6 100644
--- a/src/shared/fstab-util.c
+++ b/src/shared/fstab-util.c
@@ -40,6 +40,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) {
Expand All @@ -25,10 +25,10 @@ index 292b97cd69..791b8e6b7e 100644
"/etc"))
return true;
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
index 3a72a13e1a..541320dc9d 100644
index 906756292b..e4eece2d15 100644
--- a/src/shutdown/umount.c
+++ b/src/shutdown/umount.c
@@ -500,6 +500,8 @@ static int delete_md(MountPoint *m) {
@@ -496,6 +496,8 @@ static int delete_md(MountPoint *m) {

static bool nonunmountable_path(const char *path) {
return path_equal(path, "/")
Expand All @@ -38,5 +38,5 @@ index 3a72a13e1a..541320dc9d 100644
|| path_equal(path, "/usr")
#endif
--
2.30.1
2.29.3

12 changes: 6 additions & 6 deletions pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 3d1b2e56a6ed6cc86a64f6f89765a2900e576402 Mon Sep 17 00:00:00 2001
From e94adc4f22d7c309f8114d96ffe68977a05e4a2c Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Wed, 16 Apr 2014 10:59:28 +0200
Subject: [PATCH 03/19] Fix NixOS containers
Subject: [PATCH 03/18] Fix NixOS containers

In NixOS containers, the init script is bind-mounted into the
container, so checking early whether it exists will fail.
Expand All @@ -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 7515380fcd..14f8a82eb8 100644
index a4ac8ed2bb..71e2e74906 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5323,6 +5323,7 @@ static int run(int argc, char *argv[]) {
@@ -5361,6 +5361,7 @@ static int run(int argc, char *argv[]) {
goto finish;
}
} else {
+#if 0
const char *p, *q;

if (arg_pivot_root_new)
@@ -5337,6 +5338,7 @@ static int run(int argc, char *argv[]) {
@@ -5375,6 +5376,7 @@ static int run(int argc, char *argv[]) {
r = -EINVAL;
goto finish;
}
Expand All @@ -30,5 +30,5 @@ index 7515380fcd..14f8a82eb8 100644

} else {
--
2.30.1
2.29.3

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 3a721cf70e952e933ef5374006bbb11a3a0ad36a Mon Sep 17 00:00:00 2001
From 84a716bbbe3be91c390522e5f1405e08ceed0ebc Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Thu, 1 May 2014 14:10:10 +0200
Subject: [PATCH 04/19] Look for fsck in the right place
Subject: [PATCH 04/18] Look for fsck in the right place

---
src/fsck/fsck.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index 510689f3b7..25cab5acae 100644
index cd7adfaeb9..68cebdd158 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -368,7 +368,7 @@ static int run(int argc, char *argv[]) {
Expand All @@ -21,5 +21,5 @@ index 510689f3b7..25cab5acae 100644
cmdline[i++] = "-T";

--
2.30.1
2.29.3

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 8b7f881cf22e98e907506f4c403b9e304e332bf9 Mon Sep 17 00:00:00 2001
From 4227bc4bfd3fd019d4a3f4b580b295ee919b96c2 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Fri, 19 Dec 2014 14:46:17 +0100
Subject: [PATCH 05/19] Add some NixOS-specific unit directories
Subject: [PATCH 05/18] Add some NixOS-specific unit directories

Look in `/nix/var/nix/profiles/default/lib/systemd/{system,user}` for
units provided by packages installed into the default profile via
Expand Down Expand Up @@ -110,5 +110,5 @@ index b5cc8f94a5..a701cd05f8 100644

systemd_system_generator_dir=${root_prefix}/lib/systemd/system-generators
--
2.30.1
2.29.3

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 7a6529ee27028860b93bc539e8bbf3f2374d712f Mon Sep 17 00:00:00 2001
From 79301f8be7955c02bc28331fe5a0d5641b275898 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Mon, 11 May 2015 15:39:38 +0200
Subject: [PATCH 06/19] Get rid of a useless message in user sessions
Subject: [PATCH 06/18] Get rid of a useless message in user sessions

Namely lots of variants of

Expand All @@ -13,10 +13,10 @@ in containers.
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/core/unit.c b/src/core/unit.c
index 45a417a090..8af3cb08d6 100644
index 2c5dc54379..5647f96463 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2163,7 +2163,8 @@ static void unit_check_binds_to(Unit *u) {
@@ -1896,7 +1896,8 @@ static void unit_check_binds_to(Unit *u) {
}

assert(other);
Expand All @@ -27,5 +27,5 @@ index 45a417a090..8af3cb08d6 100644
/* A unit we need to run is gone. Sniff. Let's stop this. */
r = manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, NULL, &error, NULL);
--
2.30.1
2.29.3

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 5580303956ca7d8eb431d23c2af0030c9cc0e6e9 Mon Sep 17 00:00:00 2001
From 56c5094c6378642b1aaf9b0bf8f18abe1ca2f3d1 Mon Sep 17 00:00:00 2001
From: Gabriel Ebner <gebner@gebner.org>
Date: Sun, 6 Dec 2015 14:26:36 +0100
Subject: [PATCH 07/19] hostnamed, localed, timedated: disable methods that
Subject: [PATCH 07/18] hostnamed, localed, timedated: disable methods that
change system settings.

---
Expand All @@ -11,10 +11,10 @@ Subject: [PATCH 07/19] hostnamed, localed, timedated: disable methods that
3 files changed, 25 insertions(+)

diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index a1794bdab1..77134731e1 100644
index 2ece8b2fbd..6659507668 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -643,6 +643,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
@@ -773,6 +773,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
if (r < 0)
return r;

Expand All @@ -24,7 +24,7 @@ index a1794bdab1..77134731e1 100644
name = empty_to_null(name);

context_read_etc_hostname(c);
@@ -702,6 +705,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess
@@ -836,6 +839,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess
if (r < 0)
return r;

Expand All @@ -35,20 +35,20 @@ index a1794bdab1..77134731e1 100644

context_read_machine_info(c);
diff --git a/src/locale/localed.c b/src/locale/localed.c
index 736dacdee9..53e0ee935e 100644
index f44c0bab2a..0be2e7df59 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -317,6 +317,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er
@@ -360,6 +360,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er
if (r < 0)
return r;

+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
+ "Changing system settings via systemd is not supported on NixOS.");
+
+
use_localegen = locale_gen_check_available();

/* If single locale without variable name is provided, then we assume it is LANG=. */
if (strv_length(l) == 1 && !strchr(l[0], '=')) {
if (!locale_is_valid(l[0]))
@@ -432,6 +435,9 @@ static int method_set_vc_keyboard(sd_bus_message *m, void *userdata, sd_bus_erro
@@ -485,6 +488,9 @@ static int method_set_vc_keyboard(sd_bus_message *m, void *userdata, sd_bus_erro
if (r < 0)
return r;

Expand All @@ -58,7 +58,7 @@ index 736dacdee9..53e0ee935e 100644
keymap = empty_to_null(keymap);
keymap_toggle = empty_to_null(keymap_toggle);

@@ -606,6 +612,9 @@ static int method_set_x11_keyboard(sd_bus_message *m, void *userdata, sd_bus_err
@@ -665,6 +671,9 @@ static int method_set_x11_keyboard(sd_bus_message *m, void *userdata, sd_bus_err
if (r < 0)
return r;

Expand All @@ -69,7 +69,7 @@ index 736dacdee9..53e0ee935e 100644
model = empty_to_null(model);
variant = empty_to_null(variant);
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 76fe04900d..e87c4c8919 100644
index 567244dc24..73582daab7 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -646,6 +646,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error *
Expand Down Expand Up @@ -104,5 +104,5 @@ index 76fe04900d..e87c4c8919 100644
if (r < 0)
return r;
--
2.30.1
2.29.3

6 changes: 3 additions & 3 deletions pkgs/os-specific/linux/systemd/0008-Fix-hwdb-paths.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 874698425f6d68fc0d662cb17c7c29e0af3e8c25 Mon Sep 17 00:00:00 2001
From f8df64efac3d4ad9c1c070b631f075f811fd6cc7 Mon Sep 17 00:00:00 2001
From: Nikolay Amiantov <ab@fmap.me>
Date: Thu, 7 Jul 2016 02:47:13 +0300
Subject: [PATCH 08/19] Fix hwdb paths
Subject: [PATCH 08/18] Fix hwdb paths

Patch by vcunat.
---
Expand All @@ -28,5 +28,5 @@ index cb3c77ce96..7b8c80071f 100644
_public_ int sd_hwdb_new(sd_hwdb **ret) {
_cleanup_(sd_hwdb_unrefp) sd_hwdb *hwdb = NULL;
--
2.30.1
2.29.3

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 367d0dad3d1853048569e315931cb8a27e16a098 Mon Sep 17 00:00:00 2001
From 11d6639beb545dd470a1f1c72f512f80cfdc4330 Mon Sep 17 00:00:00 2001
From: Nikolay Amiantov <ab@fmap.me>
Date: Tue, 11 Oct 2016 13:12:08 +0300
Subject: [PATCH 09/19] Change /usr/share/zoneinfo to /etc/zoneinfo
Subject: [PATCH 09/18] Change /usr/share/zoneinfo to /etc/zoneinfo

NixOS uses this path.
---
Expand Down Expand Up @@ -35,10 +35,10 @@ index e486474c44..5f373d0723 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 5318d6378d..04069dc27b 100644
index 3c2b25bd2a..b7040b9063 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -1277,7 +1277,7 @@ int get_timezones(char ***ret) {
@@ -1275,7 +1275,7 @@ int get_timezones(char ***ret) {
n_allocated = 2;
n_zones = 1;

Expand All @@ -47,7 +47,7 @@ index 5318d6378d..04069dc27b 100644
if (f) {
for (;;) {
_cleanup_free_ char *line = NULL;
@@ -1372,7 +1372,7 @@ bool timezone_is_valid(const char *name, int log_level) {
@@ -1370,7 +1370,7 @@ bool timezone_is_valid(const char *name, int log_level) {
if (p - name >= PATH_MAX)
return false;

Expand All @@ -56,7 +56,7 @@ index 5318d6378d..04069dc27b 100644

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

Expand All @@ -66,10 +66,10 @@ index 5318d6378d..04069dc27b 100644
return -EINVAL;

diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index 742b43f9fc..f2cb121816 100644
index 8e3028717e..175fb6147b 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -459,7 +459,7 @@ static int process_timezone(void) {
@@ -456,7 +456,7 @@ static int process_timezone(void) {
if (isempty(arg_timezone))
return 0;

Expand All @@ -79,10 +79,10 @@ index 742b43f9fc..f2cb121816 100644
(void) mkdir_parents(etc_localtime, 0755);
if (symlink(e, etc_localtime) < 0)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 14f8a82eb8..8632dadec6 100644
index 71e2e74906..fa49512ba7 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1810,8 +1810,8 @@ static int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t u
@@ -1831,8 +1831,8 @@ static int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t u
static const char *timezone_from_path(const char *path) {
return PATH_STARTSWITH_SET(
path,
Expand All @@ -94,7 +94,7 @@ index 14f8a82eb8..8632dadec6 100644

static bool etc_writable(void) {
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index e87c4c8919..964a40ba81 100644
index 73582daab7..a8923dfb3f 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -269,7 +269,7 @@ static int context_read_data(Context *c) {
Expand Down Expand Up @@ -128,5 +128,5 @@ index e87c4c8919..964a40ba81 100644
return -ENOMEM;

--
2.30.1
2.29.3

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From bf285fe7e12bd22f95c14bcefbb5008888c32bfa Mon Sep 17 00:00:00 2001
From 263aecfb27289bb132e7a12bc1439952bc3918a7 Mon Sep 17 00:00:00 2001
From: Imuli <i@imu.li>
Date: Wed, 19 Oct 2016 08:46:47 -0400
Subject: [PATCH 10/19] localectl: use /etc/X11/xkb for list-x11-*
Subject: [PATCH 10/18] localectl: use /etc/X11/xkb for list-x11-*

NixOS has an option to link the xkb data files to /etc/X11, but not to
/usr/share/X11.
Expand All @@ -10,10 +10,10 @@ 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 7d2e887660..91c5139eed 100644
index 548ac8eb2c..5e372f1566 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -277,7 +277,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
@@ -280,7 +280,7 @@ static int list_x11_keymaps(int argc, char **argv, void *userdata) {
} state = NONE, look_for;
int r;

Expand All @@ -23,5 +23,5 @@ index 7d2e887660..91c5139eed 100644
return log_error_errno(errno, "Failed to open keyboard mapping list. %m");

--
2.30.1
2.29.3

0 comments on commit aa1eaeb

Please sign in to comment.