Skip to content
Closed
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
17 changes: 17 additions & 0 deletions nixos/doc/manual/release-notes/rl-2205.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ In addition to numerous new and upgraded packages, this release has the followin
Migrations may take a while, see the [changelog](https://docs.mattermost.com/install/self-managed-changelog.html#release-v6-3-extended-support-release)
and [important upgrade notes](https://docs.mattermost.com/upgrade/important-upgrade-notes.html).

- Systemd has been upgraded to the version 250.

## New Services {#sec-release-22.05-new-services}

- [aesmd](https://github.com/intel/linux-sgx#install-the-intelr-sgx-psw), the Intel SGX Architectural Enclave Service Manager. Available as [services.aesmd](#opt-services.aesmd.enable).
Expand Down Expand Up @@ -59,6 +61,21 @@ In addition to numerous new and upgraded packages, this release has the followin

## Backward Incompatibilities {#sec-release-22.05-incompatibilities}

- Since systemd version 250 wireguard tunnels that are managed using networkd
will install routes for each of the `AllowedIPs` entries. This is in contrast
to the previous behaviour where routes had to be added manually.
To disable the new behaviour you must set the `RoutingTable=off` option in
the `WireGuard` section within each of your netdev definitions.
For example like this:
```nix
{
systemd.network.netdev.my-wireguard-interface = {
wireguardConfig.RouteTable = "off";
};
}
```
-

- `pkgs.ghc` now refers to `pkgs.targetPackages.haskellPackages.ghc`.
This *only* makes a difference if you are cross-compiling and will
ensure that `pkgs.ghc` always runs on the host platform and compiles
Expand Down
22 changes: 17 additions & 5 deletions nixos/modules/system/boot/timesyncd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,27 @@ with lib;
};
users.groups.systemd-timesync.gid = config.ids.gids.systemd-timesync;

system.activationScripts.systemd-timesyncd-migration = mkIf (versionOlder config.system.stateVersion "19.09") ''
system.activationScripts.systemd-timesyncd-migration =
# workaround an issue of systemd-timesyncd not starting due to upstream systemd reverting their dynamic users changes
# - https://github.com/NixOS/nixpkgs/pull/61321#issuecomment-492423742
# - https://github.com/systemd/systemd/issues/12131
if [ -L /var/lib/systemd/timesync ]; then
rm /var/lib/systemd/timesync
mv /var/lib/private/systemd/timesync /var/lib/systemd/timesync
mkIf (versionOlder config.system.stateVersion "19.09") ''
if [ -L /var/lib/systemd/timesync ]; then
rm /var/lib/systemd/timesync
mv /var/lib/private/systemd/timesync /var/lib/systemd/timesync
fi
'';
system.activationScripts.systemd-timesyncd-init-clock =
# Ensure that we have some stored time to prevent systemd-timesyncd to
# resort back to the fallback time.
# If the file doesn't exist we assume that our current system clock is
# good enough to provide an initial value.
''
if ! [ -f /var/lib/systemd/timesync/clock ]; then
test -d /var/lib/systemd/timesync || mkdir -p /var/lib/systemd/timesync
touch /var/lib/systemd/timesync/clock
fi
'';
'';
};

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 93b2d29de784c68d1b4d70d7f214b19432aec6a8 Mon Sep 17 00:00:00 2001
From 8622539fe2ce67934ed2e60626a2303ef8191e40 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
Expand All @@ -16,17 +16,6 @@ diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in
index 25b8a590a6..d18999ea87 100644
--- a/rules.d/99-systemd.rules.in
+++ b/rules.d/99-systemd.rules.in
@@ -17,10 +17,6 @@ SUBSYSTEM=="ubi", TAG+="systemd"
SUBSYSTEM=="block", TAG+="systemd"
SUBSYSTEM=="block", ACTION=="add", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"

-# Ignore encrypted devices with no identified superblock on it, since
-# we are probably still calling mke2fs or mkswap on it.
-SUBSYSTEM=="block", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0"
-
# add symlink to GPT root disk
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.33.1
2.34.0

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 41edb381df0326e216b3c569d2cd5764591267d9 Mon Sep 17 00:00:00 2001
From a845786195182c376b72a85433e278c35243676d 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
Expand All @@ -11,24 +11,11 @@ https://github.com/NixOS/nixos/issues/126
src/shutdown/umount.c | 2 ++
2 files changed, 4 insertions(+)

diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c
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) {
/* Don't bother with the OS data itself */
if (PATH_IN_SET(mount,
"/",
+ "/nix",
+ "/nix/store",
"/usr",
"/etc"))
return true;
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
index 1f945b7875..6df9d383ba 100644
index f5a2cb20c1..51608d24c0 100644
--- a/src/shutdown/umount.c
+++ b/src/shutdown/umount.c
@@ -508,6 +508,8 @@ static int delete_md(MountPoint *m) {
@@ -502,6 +502,8 @@ static int delete_md(MountPoint *m) {

static bool nonunmountable_path(const char *path) {
return path_equal(path, "/")
Expand All @@ -38,5 +25,4 @@ index 1f945b7875..6df9d383ba 100644
|| path_equal(path, "/usr")
#endif
--
2.33.1

2.34.0
11 changes: 5 additions & 6 deletions pkgs/os-specific/linux/systemd/0003-Fix-NixOS-containers.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 43620479f6bfbbc4c3eed28947e0676c817acb7c Mon Sep 17 00:00:00 2001
From d33f3461fa2202ef9b0d6cdf2137c510c59fb052 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
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 575b9da447..438ca294db 100644
index 8f17ab8810..197e5aa252 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5590,6 +5590,7 @@ static int run(int argc, char *argv[]) {
@@ -5625,6 +5625,7 @@ static int run(int argc, char *argv[]) {
goto finish;
}
} else {
+#if 0
const char *p, *q;

if (arg_pivot_root_new)
@@ -5604,6 +5605,7 @@ static int run(int argc, char *argv[]) {
@@ -5639,6 +5640,7 @@ static int run(int argc, char *argv[]) {
r = -EINVAL;
goto finish;
}
Expand All @@ -30,5 +30,4 @@ index 575b9da447..438ca294db 100644

} else {
--
2.33.1

2.34.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From a08ed6697974d7f7dabe60d42bbc9e31a10f7e23 Mon Sep 17 00:00:00 2001
From 8fd5968163f3a1cb5f196d934756ba08ccaa5b1e 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
Expand All @@ -8,7 +8,7 @@ Subject: [PATCH 04/19] Look for fsck in the right place
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index cd7adfaeb9..68cebdd158 100644
index 745d01ff50..dd4eef45c3 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,4 @@ index cd7adfaeb9..68cebdd158 100644
cmdline[i++] = "-T";

--
2.33.1

2.34.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From ddcfae6de8c460903c5db8c536ffeb5771e976f8 Mon Sep 17 00:00:00 2001
From 90d1a90d3147e9c8db5caec8befabda270e755d4 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
Expand All @@ -14,10 +14,10 @@ Also, remove /usr and /lib as these don't exist on NixOS.
2 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
index 05eb17d66c..1cd141d012 100644
index 6fb8c40e7a..142ecdecec 100644
--- a/src/basic/path-lookup.c
+++ b/src/basic/path-lookup.c
@@ -91,11 +91,7 @@ int xdg_user_data_dir(char **ret, const char *suffix) {
@@ -92,11 +92,7 @@ int xdg_user_data_dir(char **ret, const char *suffix) {
}

static const char* const user_data_unit_paths[] = {
Expand All @@ -29,7 +29,7 @@ index 05eb17d66c..1cd141d012 100644
NULL
};

@@ -613,15 +609,13 @@ int lookup_paths_init(
@@ -614,15 +610,13 @@ int lookup_paths_init(
persistent_config,
SYSTEM_CONFIG_UNIT_DIR,
"/etc/systemd/system",
Expand All @@ -46,7 +46,7 @@ index 05eb17d66c..1cd141d012 100644
STRV_IFNOTNULL(generator_late));
break;

@@ -637,14 +631,11 @@ int lookup_paths_init(
@@ -638,14 +632,11 @@ int lookup_paths_init(
persistent_config,
USER_CONFIG_UNIT_DIR,
"/etc/systemd/user",
Expand All @@ -62,23 +62,23 @@ index 05eb17d66c..1cd141d012 100644
STRV_IFNOTNULL(generator_late));
break;

@@ -794,7 +785,6 @@ char **generator_binary_paths(UnitFileScope scope) {
@@ -795,7 +786,6 @@ char **generator_binary_paths(UnitFileScope scope) {
case UNIT_FILE_SYSTEM:
add = strv_new("/run/systemd/system-generators",
"/etc/systemd/system-generators",
- "/usr/local/lib/systemd/system-generators",
SYSTEM_GENERATOR_DIR);
break;

@@ -802,7 +792,6 @@ char **generator_binary_paths(UnitFileScope scope) {
@@ -803,7 +793,6 @@ char **generator_binary_paths(UnitFileScope scope) {
case UNIT_FILE_USER:
add = strv_new("/run/systemd/user-generators",
"/etc/systemd/user-generators",
- "/usr/local/lib/systemd/user-generators",
USER_GENERATOR_DIR);
break;

@@ -841,12 +830,10 @@ char **env_generator_binary_paths(bool is_system) {
@@ -842,12 +831,10 @@ char **env_generator_binary_paths(bool is_system) {
if (is_system)
add = strv_new("/run/systemd/system-environment-generators",
"/etc/systemd/system-environment-generators",
Expand Down Expand Up @@ -122,5 +122,4 @@ index fc0f8c34fa..162432e77f 100644

systemd_sleep_dir=${root_prefix}/lib/systemd/system-sleep
--
2.33.1

2.34.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From b39b8871bcaa07280d6b0cf2226b1a3be31232b8 Mon Sep 17 00:00:00 2001
From 213279752124dc4a57a4189df9b5b2e96feaa0b3 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
Expand All @@ -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 34891a8754..b9b4789720 100644
index 9368a1dfa1..5b0bdb1bc7 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1375,7 +1375,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) {
@@ -1408,7 +1408,8 @@ static unsigned manager_dispatch_stop_when_bound_queue(Manager *m) {
if (!unit_is_bound_by_inactive(u, &culprit))
continue;

Expand All @@ -27,5 +27,4 @@ index 34891a8754..b9b4789720 100644
/* If stopping a unit fails continuously we might enter a stop loop here, hence stop acting on the
* service being unnecessary after a while. */
--
2.33.1

2.34.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 566208aea81057789218b959f4d0e898eec54fc9 Mon Sep 17 00:00:00 2001
From 14474d5e116609ce4fac60d779b08fa3eab840c3 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
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 36702f2fb0..669257ea2f 100644
index b20a93ad81..6292fca4fc 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -797,6 +797,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
@@ -813,6 +813,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 36702f2fb0..669257ea2f 100644
name = empty_to_null(name);

context_read_etc_hostname(c);
@@ -860,6 +863,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess
@@ -876,6 +879,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess
if (r < 0)
return r;

Expand Down Expand Up @@ -104,5 +104,4 @@ index 66b454269d..0a8fe25d0f 100644
if (r < 0)
return r;
--
2.33.1

2.34.0
5 changes: 2 additions & 3 deletions pkgs/os-specific/linux/systemd/0008-Fix-hwdb-paths.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 3b9983969de2a86929768f6362ed41c20dd13bd3 Mon Sep 17 00:00:00 2001
From d668df39728c992ec0c691ef6e76664e7121f5bd 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
Expand All @@ -24,5 +24,4 @@ index 5ddc2211e6..ee621eec46 100644
+ "/etc/udev/hwdb.bin\0"
+
--
2.33.1

2.34.0
Loading