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.
wip/yesman
Florian Klink 4 years ago
parent 1ad4accdaf
commit a16ebf8561
  1. 24
      pkgs/os-specific/linux/systemd/0014-catalog-don-t-update-on-install.patch
  2. 27
      pkgs/os-specific/linux/systemd/0015-hwdb-don-t-run-update-on-install.patch
  3. 4
      pkgs/os-specific/linux/systemd/0018-Install-default-configuration-into-out-share-factory.patch
  4. 7
      pkgs/os-specific/linux/systemd/default.nix

@ -1,24 +0,0 @@
From 8e7aec49a387d8229b85cfc3ea2f2c1c9a45f6d0 Mon Sep 17 00:00:00 2001
From: Franz Pletz <fpletz@fnordicwalking.de>
Date: Wed, 17 Jan 2018 05:10:36 +0100
Subject: [PATCH 14/27] catalog: don't update on install
---
catalog/meson.build | 4 ----
1 file changed, 4 deletions(-)
diff --git a/catalog/meson.build b/catalog/meson.build
index 3db8e390f2..7004618750 100644
--- a/catalog/meson.build
+++ b/catalog/meson.build
@@ -28,7 +28,3 @@ foreach file : in_files
install : true,
install_dir : catalogdir)
endforeach
-
-meson.add_install_script('sh', '-c',
- 'test -n "$DESTDIR" || @0@/journalctl --update-catalog'
- .format(rootbindir))
--
2.24.1

@ -1,27 +0,0 @@
From 8a383521425d7a59e9b1850d1547d47fa5e8a952 Mon Sep 17 00:00:00 2001
From: Franz Pletz <fpletz@fnordicwalking.de>
Date: Sun, 11 Feb 2018 04:01:35 +0100
Subject: [PATCH 15/27] hwdb: don't run update on install
---
hwdb/meson.build | 4 ----
1 file changed, 4 deletions(-)
diff --git a/hwdb/meson.build b/hwdb/meson.build
index 31ee3e7409..badf39f555 100644
--- a/hwdb/meson.build
+++ b/hwdb/meson.build
@@ -27,10 +27,6 @@ if conf.get('ENABLE_HWDB') == 1
meson.add_install_script('sh', '-c',
mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
-
- meson.add_install_script('sh', '-c',
- 'test -n "$DESTDIR" || @0@/systemd-hwdb update'
- .format(rootbindir))
endif
############################################################
--
2.24.1

@ -40,6 +40,10 @@ index badf39f555..8fd9c7639f 100644
meson.add_install_script('sh', '-c',
- mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
+ mkdir_p.format(join_paths(factoryconfdir, 'udev/hwdb.d')))
meson.add_install_script('sh', '-c',
'test -n "$DESTDIR" || @0@/systemd-hwdb update'
.format(rootbindir))
endif
############################################################

@ -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

Loading…
Cancel
Save