summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd/default.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-01-26 16:15:19 +0100
committerFlorian Klink <flokli@flokli.de>2020-04-17 00:27:29 +0200
commita16ebf856126bb93bc0a2aa091eb4403e781cd33 (patch)
tree9d0a42b720f4591b0116132fb8948420470a6075 /pkgs/os-specific/linux/systemd/default.nix
parent1ad4accdafd29bd998f121dbda8f9c4e3df090b0 (diff)
downloadnixpkgs-a16ebf856126bb93bc0a2aa091eb4403e781cd33.tar
nixpkgs-a16ebf856126bb93bc0a2aa091eb4403e781cd33.tar.gz
nixpkgs-a16ebf856126bb93bc0a2aa091eb4403e781cd33.tar.bz2
nixpkgs-a16ebf856126bb93bc0a2aa091eb4403e781cd33.tar.lz
nixpkgs-a16ebf856126bb93bc0a2aa091eb4403e781cd33.tar.xz
nixpkgs-a16ebf856126bb93bc0a2aa091eb4403e781cd33.tar.zst
nixpkgs-a16ebf856126bb93bc0a2aa091eb4403e781cd33.zip
systemd: drop 001{4,5}-{catalog,hwdb}-don-t-update-on-install.patch
These patches removed logic in the meson install phase invoking
`journalctl --update-catalog` and `systemd-hwdb update`, which would
mutate the running system, and obviously fails in the sandbox.

Upstream also knows this is a bad thing if you're not on the machine you
want to deploy to, so there's logic in there to not execute it when
DESTDIR isn't empty. In our case, it is - as we set --prefix instead for
other reasons, but by just setting DESTIDIR to "/", we can still trigger
these things to be skipped.

The patches removed some context from
0018-Install-default-configuration-into-out-share-factory.patch, which
we need to introduce there to make that patch still apply.
Diffstat (limited to 'pkgs/os-specific/linux/systemd/default.nix')
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index b8693678566..82c8af30359 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -55,8 +55,6 @@ in stdenv.mkDerivation {
     ./0011-Fix-hwdb-paths.patch
     ./0012-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch
     ./0013-localectl-use-etc-X11-xkb-for-list-x11.patch
-    ./0014-catalog-don-t-update-on-install.patch
-    ./0015-hwdb-don-t-run-update-on-install.patch
     ./0016-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch
     ./0017-Fix-mount-option-x-initrd.mount-handling-35268-16.patch
     ./0018-Install-default-configuration-into-out-share-factory.patch
@@ -220,6 +218,11 @@ in stdenv.mkDerivation {
 
   doCheck = false; # fails a bunch of tests
 
+  # trigger the test -n "$DESTDIR" || mutate in upstreams build system
+  preInstall = ''
+    export DESTDIR=/
+  '';
+
   postInstall = ''
     # sysinit.target: Don't depend on
     # systemd-tmpfiles-setup.service. This interferes with NixOps's