systemd 251.20220811-3 (aarch64;znver1) 2022-15310
9999

Status published
Submitter alexander [@T] mezon.ru
Platform rolling
Repository main
URL https://abf.openmandriva.org/build_lists/235331
Packages
lib64nss_myhostname2-251.20220811-3.aarch64.binary
lib64nss_myhostname2-debuginfo-251.20220811-3.aarch64.debuginfo
lib64nss_mymachines2-251.20220811-3.aarch64.binary
lib64nss_mymachines2-debuginfo-251.20220811-3.aarch64.debuginfo
lib64nss_resolve2-251.20220811-3.aarch64.binary
lib64nss_resolve2-debuginfo-251.20220811-3.aarch64.debuginfo
lib64nss_systemd2-251.20220811-3.aarch64.binary
lib64nss_systemd2-debuginfo-251.20220811-3.aarch64.debuginfo
lib64systemd-devel-251.20220811-3.aarch64.binary
lib64systemd0-251.20220811-3.aarch64.binary
lib64systemd0-debuginfo-251.20220811-3.aarch64.debuginfo
lib64udev-devel-251.20220811-3.aarch64.binary
lib64udev1-251.20220811-3.aarch64.binary
lib64udev1-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-251.20220811-3.aarch64.binary
systemd-251.20220811-3.aarch64.source
systemd-analyze-251.20220811-3.aarch64.binary
systemd-analyze-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-bash-completion-251.20220811-3.aarch64.binary
systemd-boot-251.20220811-3.aarch64.binary
systemd-boot-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-console-251.20220811-3.aarch64.binary
systemd-console-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-container-251.20220811-3.aarch64.binary
systemd-container-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-coredump-251.20220811-3.aarch64.binary
systemd-coredump-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-cryptsetup-251.20220811-3.aarch64.binary
systemd-cryptsetup-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-debugsource-251.20220811-3.aarch64.binary
systemd-documentation-251.20220811-3.aarch64.binary
systemd-homed-251.20220811-3.aarch64.binary
systemd-homed-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-hwdb-251.20220811-3.aarch64.binary
systemd-hwdb-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-integritysetup-251.20220811-3.aarch64.binary
systemd-integritysetup-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-journal-remote-251.20220811-3.aarch64.binary
systemd-journal-remote-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-locale-251.20220811-3.aarch64.binary
systemd-networkd-251.20220811-3.aarch64.binary
systemd-networkd-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-oom-251.20220811-3.aarch64.binary
systemd-oom-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-polkit-251.20220811-3.aarch64.binary
systemd-portable-251.20220811-3.aarch64.binary
systemd-portable-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-repart-251.20220811-3.aarch64.binary
systemd-repart-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-rpm-macros-251.20220811-3.aarch64.binary
systemd-sysext-251.20220811-3.aarch64.binary
systemd-sysext-debuginfo-251.20220811-3.aarch64.debuginfo
systemd-zsh-completion-251.20220811-3.aarch64.binary
lib64nss_myhostname2-251.20220811-3.znver1.binary
lib64nss_myhostname2-debuginfo-251.20220811-3.znver1.debuginfo
lib64nss_mymachines2-251.20220811-3.znver1.binary
lib64nss_mymachines2-debuginfo-251.20220811-3.znver1.debuginfo
lib64nss_resolve2-251.20220811-3.znver1.binary
lib64nss_resolve2-debuginfo-251.20220811-3.znver1.debuginfo
lib64nss_systemd2-251.20220811-3.znver1.binary
lib64nss_systemd2-debuginfo-251.20220811-3.znver1.debuginfo
lib64systemd-devel-251.20220811-3.znver1.binary
lib64systemd0-251.20220811-3.znver1.binary
lib64systemd0-debuginfo-251.20220811-3.znver1.debuginfo
lib64udev-devel-251.20220811-3.znver1.binary
lib64udev1-251.20220811-3.znver1.binary
lib64udev1-debuginfo-251.20220811-3.znver1.debuginfo
libnss_myhostname2-251.20220811-3.znver1.binary
libnss_myhostname2-debuginfo-251.20220811-3.znver1.debuginfo
libnss_systemd2-251.20220811-3.znver1.binary
libnss_systemd2-debuginfo-251.20220811-3.znver1.debuginfo
libsystemd-devel-251.20220811-3.znver1.binary
libsystemd0-251.20220811-3.znver1.binary
libsystemd0-debuginfo-251.20220811-3.znver1.debuginfo
libudev-devel-251.20220811-3.znver1.binary
libudev1-251.20220811-3.znver1.binary
libudev1-debuginfo-251.20220811-3.znver1.debuginfo
systemd-251.20220811-3.znver1.source
systemd-251.20220811-3.znver1.binary
systemd-analyze-251.20220811-3.znver1.binary
systemd-analyze-debuginfo-251.20220811-3.znver1.debuginfo
systemd-bash-completion-251.20220811-3.znver1.binary
systemd-boot-251.20220811-3.znver1.binary
systemd-boot-debuginfo-251.20220811-3.znver1.debuginfo
systemd-console-251.20220811-3.znver1.binary
systemd-console-debuginfo-251.20220811-3.znver1.debuginfo
systemd-container-251.20220811-3.znver1.binary
systemd-container-debuginfo-251.20220811-3.znver1.debuginfo
systemd-coredump-251.20220811-3.znver1.binary
systemd-coredump-debuginfo-251.20220811-3.znver1.debuginfo
systemd-cryptsetup-251.20220811-3.znver1.binary
systemd-cryptsetup-debuginfo-251.20220811-3.znver1.debuginfo
systemd-debuginfo-251.20220811-3.znver1.debuginfo
systemd-debugsource-251.20220811-3.znver1.binary
systemd-documentation-251.20220811-3.znver1.binary
systemd-homed-251.20220811-3.znver1.binary
systemd-homed-debuginfo-251.20220811-3.znver1.debuginfo
systemd-hwdb-251.20220811-3.znver1.binary
systemd-hwdb-debuginfo-251.20220811-3.znver1.debuginfo
systemd-integritysetup-251.20220811-3.znver1.binary
systemd-integritysetup-debuginfo-251.20220811-3.znver1.debuginfo
systemd-journal-remote-251.20220811-3.znver1.binary
systemd-journal-remote-debuginfo-251.20220811-3.znver1.debuginfo
systemd-locale-251.20220811-3.znver1.binary
systemd-networkd-251.20220811-3.znver1.binary
systemd-networkd-debuginfo-251.20220811-3.znver1.debuginfo
systemd-oom-251.20220811-3.znver1.binary
systemd-oom-debuginfo-251.20220811-3.znver1.debuginfo
systemd-polkit-251.20220811-3.znver1.binary
systemd-portable-251.20220811-3.znver1.binary
systemd-portable-debuginfo-251.20220811-3.znver1.debuginfo
systemd-repart-251.20220811-3.znver1.binary
systemd-repart-debuginfo-251.20220811-3.znver1.debuginfo
systemd-rpm-macros-251.20220811-3.znver1.binary
systemd-sysext-251.20220811-3.znver1.binary
systemd-sysext-debuginfo-251.20220811-3.znver1.debuginfo
systemd-zsh-completion-251.20220811-3.znver1.binary
Build Date 2022-09-27 15:33:59 +0000 UTC
Last Updated 2022-09-30 17:28:58.096916387 +0000 UTC
$ git diff --patch-with-stat --summary 0117aef039dc9775c80aff3f354dc08bb20fba66..a2acff22d6acb3f64d8404b80849fb53ebccb5a2

 .abf.yml                                           |   3 +-
 ...setup-set-default-locale-to-a-unicode-one.patch |  33 +-
 0019-not-load-iptables.patch                       |  23 +-
 0025-skip-not-present-ACPI-devices.patch           |  43 +-
 0028-Compile-udev-with-O3.patch                    |  24 +-
 ...fi-comment-out-success-validation-message.patch |  33 --
 ...create-etc-resolv.conf-symlink-at-runtime.patch |  13 -
 23621.patch                                        | 115 ++++++
 6a941db798e3c5d896f6732afb4e6e482d708900.patch     |  39 ++
 90-default.preset                                  |  16 +-
 93651582ae.patch                                   |  98 +++++
 systemd-236-fix-build-with-LLVM.patch              |  16 -
 systemd-245-allow-compiling-with-gcc.patch         |  24 +-
 ...-249-no-clang-flags-for-bits-built-by-gcc.patch |  43 +-
 systemd-250-compile.patch                          |  22 ++
 systemd.spec                                       | 440 ++++++++++-----------
 triggers.systemd                                   | 139 +++----
 17 files changed, 622 insertions(+), 502 deletions(-)
 delete mode 100644 0040-boot-efi-comment-out-success-validation-message.patch
 create mode 100644 23621.patch
 create mode 100644 6a941db798e3c5d896f6732afb4e6e482d708900.patch
 create mode 100644 93651582ae.patch
 delete mode 100644 systemd-236-fix-build-with-LLVM.patch
 create mode 100644 systemd-250-compile.patch

diff --git a/.abf.yml b/.abf.yml
index 6873204..360ee37 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,3 @@
 sources:
-  systemd-249.20220113.tar.xz: e0b9a3640e45359b074d8833e16bb5b409b17376
+  systemd-251.20220617.tar.xz: c8f211151a653ba3169a8da627de8ecdfef3a25d
+  systemd-251.20220811.tar.xz: 0d26e84dc6c19df7070aa6dc38a7a4c25142ae5c
diff --git a/0010-locale-setup-set-default-locale-to-a-unicode-one.patch b/0010-locale-setup-set-default-locale-to-a-unicode-one.patch
index ae02d10..79fb81e 100644
--- a/0010-locale-setup-set-default-locale-to-a-unicode-one.patch
+++ b/0010-locale-setup-set-default-locale-to-a-unicode-one.patch
@@ -1,29 +1,16 @@
-From ebd82e5b224b5b9a708fd15b7af1a5f3e495f269 Mon Sep 17 00:00:00 2001
-From: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
-Date: Tue, 23 Jun 2015 11:50:44 +0100
-Subject: [PATCH 10/45] locale-setup: set default locale to a unicode one.
-
----
- src/core/locale-setup.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c
-index 33728b0ff2..3af4ff6cc0 100644
---- a/src/core/locale-setup.c
-+++ b/src/core/locale-setup.c
-@@ -58,6 +58,12 @@ int locale_setup(char ***environment) {
+diff -up systemd-251.20220617/src/core/locale-setup.c.18~ systemd-251.20220617/src/core/locale-setup.c
+--- systemd-251.20220617/src/core/locale-setup.c.18~	2022-06-17 12:47:21.914252029 +0200
++++ systemd-251.20220617/src/core/locale-setup.c	2022-06-17 12:48:56.859746983 +0200
+@@ -57,6 +57,12 @@ int locale_setup(char ***environment) {
                          log_warning_errno(r, "Failed to read /etc/locale.conf: %m");
          }
  
-+        /* Nothing set... use some UTF-8 locale */
-+        if (r <= 0) {
-+                variables[VARIABLE_LANG] = strdup("en_US.UTF-8");
-+        }
++	/* Nothing set... use some UTF-8 locale */
++	if (r <= 0) {
++		variables[VARIABLE_LANG] = strdup("en_US.UTF-8");
++	}
++	add = NULL;
 +
-+        add = NULL;
-         for (i = 0; i < _VARIABLE_LC_MAX; i++) {
+         for (LocaleVariable i = 0; i < _VARIABLE_LC_MAX; i++) {
                  char *s;
  
--- 
-2.26.0
-
diff --git a/0019-not-load-iptables.patch b/0019-not-load-iptables.patch
index 8746bd1..6820c7f 100644
--- a/0019-not-load-iptables.patch
+++ b/0019-not-load-iptables.patch
@@ -1,17 +1,7 @@
-From 2277d823e6d2cf78dd5f475c7794ff73a98eb265 Mon Sep 17 00:00:00 2001
-From: Arjan van de Ven <arjan@linux.intel.com>
-Date: Sun, 19 Jun 2016 00:51:22 +0000
-Subject: [PATCH 19/45] not load iptables
-
----
- src/core/kmod-setup.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
-index 1286743273..a356da013d 100644
---- a/src/core/kmod-setup.c
-+++ b/src/core/kmod-setup.c
-@@ -85,10 +85,6 @@ int kmod_setup(void) {
+diff -up systemd-251.20220617/src/core/kmod-setup.c.21~ systemd-251.20220617/src/core/kmod-setup.c
+--- systemd-251.20220617/src/core/kmod-setup.c.21~	2022-06-17 12:50:00.503083082 +0200
++++ systemd-251.20220617/src/core/kmod-setup.c	2022-06-17 12:50:39.852292409 +0200
+@@ -108,10 +108,6 @@ int kmod_setup(void) {
                  /* This should never be a module */
                  { "unix",      "/proc/net/unix",            true,   true,    NULL      },
  
@@ -21,7 +11,4 @@ index 1286743273..a356da013d 100644
 -#endif
                  /* virtio_rng would be loaded by udev later, but real entropy might be needed very early */
                  { "virtio_rng", NULL,                       false,  false,   has_virtio_rng },
-         };
--- 
-2.26.0
-
+ 
diff --git a/0025-skip-not-present-ACPI-devices.patch b/0025-skip-not-present-ACPI-devices.patch
index 1d6ea4b..83a4d3a 100644
--- a/0025-skip-not-present-ACPI-devices.patch
+++ b/0025-skip-not-present-ACPI-devices.patch
@@ -1,24 +1,8 @@
-From 04a9a9aad211ae1245cdcf8cb8e5eaf9786fa2ba Mon Sep 17 00:00:00 2001
-From: Auke Kok <auke-jan.h.kok@intel.com>
-Date: Fri, 14 Jul 2017 11:33:26 -0700
-Subject: [PATCH 25/42] skip not-present ACPI devices
-
-Xen and older Qemu expose a boatload (253) ACPI devices to the guest
-that are not present; these show up in sysfs but there's nothing
-meaningful one can do with them.
-
-This patch will have udev skip these devices to save the 100ms+
-boot time
----
- src/libsystemd/sd-device/device-enumerator.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/src/libsystemd/sd-device/device-enumerator.c b/src/libsystemd/sd-device/device-enumerator.c
-index 3ae80ab942..e7f3926351 100644
---- a/src/libsystemd/sd-device/device-enumerator.c
-+++ b/src/libsystemd/sd-device/device-enumerator.c
-@@ -347,6 +347,23 @@ static bool match_sysname(sd_device_enumerator *enumerator, const char *sysname)
-         return false;
+diff -up systemd-251.20220617/src/libsystemd/sd-device/device-enumerator.c.24~ systemd-251.20220617/src/libsystemd/sd-device/device-enumerator.c
+--- systemd-251.20220617/src/libsystemd/sd-device/device-enumerator.c.24~	2022-06-09 17:51:57.000000000 +0200
++++ systemd-251.20220617/src/libsystemd/sd-device/device-enumerator.c	2022-06-17 12:51:53.840688821 +0200
+@@ -665,6 +665,23 @@ static bool relevant_sysfs_subdir(const
+         return IN_SET(de->d_type, DT_DIR, DT_LNK);
  }
  
 +static int acpi_status_disabled(char *sysfspath)
@@ -38,19 +22,16 @@ index 3ae80ab942..e7f3926351 100644
 +        return 0;
 +}
 +
- static int enumerator_scan_dir_and_add_devices(sd_device_enumerator *enumerator, const char *basedir, const char *subdir1, const char *subdir2) {
-         _cleanup_closedir_ DIR *dir = NULL;
-         char *path;
-@@ -382,6 +399,9 @@ static int enumerator_scan_dir_and_add_devices(sd_device_enumerator *enumerator,
+ static int enumerator_scan_dir_and_add_devices(
+                 sd_device_enumerator *enumerator,
+                 const char *basedir,
+@@ -703,6 +720,9 @@ static int enumerator_scan_dir_and_add_d
  
-                 (void) sprintf(syspath, "%s%s", path, dent->d_name);
+                 (void) sprintf(syspath, "%s%s", path, de->d_name);
  
-+                if (acpi_status_disabled(syspath))
-+                        continue;
++		if (acpi_status_disabled(syspath))
++			continue;
 +
                  k = sd_device_new_from_syspath(&device, syspath);
                  if (k < 0) {
                          if (k != -ENODEV)
--- 
-2.32.0
-
diff --git a/0028-Compile-udev-with-O3.patch b/0028-Compile-udev-with-O3.patch
index 42b2dd9..9de45e9 100644
--- a/0028-Compile-udev-with-O3.patch
+++ b/0028-Compile-udev-with-O3.patch
@@ -1,25 +1,11 @@
-From cd499d14663b6807c742e0a5979c786a70f9c2a9 Mon Sep 17 00:00:00 2001
-From: Auke Kok <auke-jan.h.kok@intel.com>
-Date: Fri, 14 Jul 2017 11:35:13 -0700
-Subject: [PATCH 28/42] Compile udev with -O3
-
-udevd benefits from -O3 as it heavily affects boot time.
----
- meson.build | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/meson.build b/meson.build
-index 45d6161119..868bce1345 100644
---- a/meson.build
-+++ b/meson.build
-@@ -3194,6 +3194,7 @@ public_programs += executable(
- public_programs += executable(
+diff -up systemd-251.20220617/meson.build.26~ systemd-251.20220617/meson.build
+--- systemd-251.20220617/meson.build.26~	2022-06-17 12:52:11.782785457 +0200
++++ systemd-251.20220617/meson.build	2022-06-17 12:52:40.622941175 +0200
+@@ -3545,6 +3545,7 @@ public_programs += executable(
+ udevadm = executable(
          'udevadm',
          udevadm_sources,
 +        c_args : ['-O3'],
          include_directories : includes,
          link_with : [libudevd_core],
          dependencies : [versiondep,
--- 
-2.32.0
-
diff --git a/0040-boot-efi-comment-out-success-validation-message.patch b/0040-boot-efi-comment-out-success-validation-message.patch
deleted file mode 100644
index 91d1919..0000000
--- a/0040-boot-efi-comment-out-success-validation-message.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 7a92cd9d731dd6a1adb3da454e5796051fcd6daf Mon Sep 17 00:00:00 2001
-From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
-Date: Thu, 26 Sep 2019 12:31:15 -0500
-Subject: [PATCH 40/42] boot: efi: comment out success validation message
-
-When booting with sd-boot the message "SHA256 validated" is displayed,
-this is useful when debugging, but for end user could cause uncertainty.
-
-Let's do not print success validation message just error messages by
-comment this print function out.
-
-Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
-Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
----
- src/boot/efi/random-seed.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/boot/efi/random-seed.c b/src/boot/efi/random-seed.c
-index ff364695f3..54d1fc584f 100644
---- a/src/boot/efi/random-seed.c
-+++ b/src/boot/efi/random-seed.c
-@@ -215,7 +215,7 @@ static VOID validate_sha256(void) {
-                 }
-         }
- 
--        Print(L"SHA256 validated\n");
-+        /* Print(L"SHA256 validated\n"); */
- #endif
- }
- 
--- 
-2.32.0
-
diff --git a/0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch b/0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch
index d68e780..22f80f7 100644
--- a/0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch
+++ b/0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch
@@ -13,16 +13,3 @@ diff -up systemd-249.20210625/src/resolve/resolved.c.33~ systemd-249.20210625/sr
                  /* Drop privileges, but keep three caps. Note that we drop two of those too, later on (see below) */
                  r = drop_privileges(uid, gid,
                                      (UINT64_C(1) << CAP_NET_RAW)|          /* needed for SO_BINDTODEVICE */
-diff -up systemd-249.20210625/tmpfiles.d/etc.conf.in.33~ systemd-249.20210625/tmpfiles.d/etc.conf.in
---- systemd-249.20210625/tmpfiles.d/etc.conf.in.33~	2021-06-25 17:36:15.203222806 +0200
-+++ systemd-249.20210625/tmpfiles.d/etc.conf.in	2021-06-25 17:36:32.766171114 +0200
-@@ -12,9 +12,6 @@ L+ /etc/mtab - - - - ../proc/self/mounts
- {% if HAVE_SMACK_RUN_LABEL %}
- t /etc/mtab - - - - security.SMACK64=_
- {% endif %}
--{% if ENABLE_RESOLVE %}
--L! /etc/resolv.conf - - - - ../run/systemd/resolve/stub-resolv.conf
--{% endif %}
- C! /etc/nsswitch.conf - - - -
- {% if HAVE_PAM %}
- C! /etc/pam.d - - - -
diff --git a/23621.patch b/23621.patch
new file mode 100644
index 0000000..15bef6a
--- /dev/null
+++ b/23621.patch
@@ -0,0 +1,115 @@
+From 36cb69fc43cbce6d883b3a0da4f793c81dbf4b2e Mon Sep 17 00:00:00 2001
+From: Evgeny Vereshchagin <evvers@ya.ru>
+Date: Fri, 3 Jun 2022 18:16:57 +0000
+Subject: [PATCH 1/2] ci: build systemd with clang with -Dmode=release
+ --optimization=2
+
+This is what's most likely used to build systemd with clang in
+practice so let's test it as well.
+
+Preparation for reverting https://github.com/systemd/systemd/commit/0bd292567a543d124cd303f7dd61169a209cae64
+(which replaced bogus buffer overflow found with _FORTIFY_SOURCE=3
+with actual segfaults).
+---
+ .github/workflows/unit_tests.sh  | 12 ++++++++----
+ .github/workflows/unit_tests.yml |  2 +-
+ 2 files changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/.github/workflows/unit_tests.sh b/.github/workflows/unit_tests.sh
+index 442202f46a04..affd1e9357d1 100755
+--- a/.github/workflows/unit_tests.sh
++++ b/.github/workflows/unit_tests.sh
+@@ -53,12 +53,16 @@ for phase in "${PHASES[@]}"; do
+             apt-get -y install "${ADDITIONAL_DEPS[@]}"
+             pip3 install -r .github/workflows/requirements.txt --require-hashes
+             ;;
+-        RUN|RUN_GCC|RUN_CLANG)
+-            if [[ "$phase" = "RUN_CLANG" ]]; then
++        RUN|RUN_GCC|RUN_CLANG|RUN_CLANG_RELEASE)
++            if [[ "$phase" =~ ^RUN_CLANG ]]; then
+                 export CC=clang
+                 export CXX=clang++
+-                # The docs build is slow and is not affected by compiler/flags, so do it just once
+-                MESON_ARGS+=(-Dman=true)
++                if [[ "$phase" == RUN_CLANG ]]; then
++                    # The docs build is slow and is not affected by compiler/flags, so do it just once
++                    MESON_ARGS+=(-Dman=true)
++                else
++                    MESON_ARGS+=(-Dmode=release --optimization=2)
++                fi
+             fi
+             # The install_tag feature introduced in 0.60 causes meson to fail with fatal-meson-warnings
+             # "Project targeting '>= 0.53.2' but tried to use feature introduced in '0.60.0': install_tag arg in custom_target"
+diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml
+index 4a57f409b8a9..2821d7fdd16c 100644
+--- a/.github/workflows/unit_tests.yml
++++ b/.github/workflows/unit_tests.yml
+@@ -21,7 +21,7 @@ jobs:
+     strategy:
+       fail-fast: false
+       matrix:
+-        run_phase: [GCC, GCC_ASAN_UBSAN, CLANG, CLANG_ASAN_UBSAN, CLANG_ASAN_UBSAN_NO_DEPS]
++        run_phase: [GCC, GCC_ASAN_UBSAN, CLANG, CLANG_RELEASE, CLANG_ASAN_UBSAN, CLANG_ASAN_UBSAN_NO_DEPS]
+         cryptolib: [auto]
+         include:
+           - run_phase: GCC
+
+From 2cfb790391958ada34284290af1f9ab863a515c7 Mon Sep 17 00:00:00 2001
+From: Evgeny Vereshchagin <evvers@ya.ru>
+Date: Fri, 3 Jun 2022 19:06:22 +0000
+Subject: [PATCH 2/2] Revert "Support -D_FORTIFY_SOURCE=3 by using
+ __builtin_dynamic_object_size."
+
+This reverts commit 0bd292567a543d124cd303f7dd61169a209cae64.
+
+It isn't guaranteed anywhere that __builtin_dynamic_object_size can
+always deduce the size of every object passed to it so systemd
+can end up using either malloc_usable_size or
+__builtin_dynamic_object_size when pointers are passed around,
+which in turn can lead to actual segfaults like the one mentioned in
+https://github.com/systemd/systemd/issues/23619.
+
+Apparently __builtin_object_size can return different results for
+pointers referring to the same memory as well but somehow it hasn't
+caused any issues yet. Looks like this whole
+malloc_usable_size/FORTIFY_SOURCE stuff should be revisited.
+
+Closes https://github.com/systemd/systemd/issues/23619 and
+https://github.com/systemd/systemd/issues/23150.
+
+Reopens https://github.com/systemd/systemd/issues/22801
+---
+ src/basic/alloc-util.h | 16 +++-------------
+ 1 file changed, 3 insertions(+), 13 deletions(-)
+
+diff --git a/src/basic/alloc-util.h b/src/basic/alloc-util.h
+index 155fbf5f1fa8..13dab0304fe5 100644
+--- a/src/basic/alloc-util.h
++++ b/src/basic/alloc-util.h
+@@ -174,23 +174,13 @@ void* greedy_realloc0(void **p, size_t need, size_t size);
+  * is compatible with _FORTIFY_SOURCES. If _FORTIFY_SOURCES is used many memory operations will take the
+  * object size as returned by __builtin_object_size() into account. Hence, let's return the smaller size of
+  * malloc_usable_size() and __builtin_object_size() here, so that we definitely operate in safe territory by
+- * both the compiler's and libc's standards. Note that _FORTIFY_SOURCES=3 handles also dynamically allocated
+- * objects and thus it's safer using __builtin_dynamic_object_size if _FORTIFY_SOURCES=3 is used (#22801).
+- * Moreover, when NULL is passed malloc_usable_size() is documented to return zero, and
++ * both the compiler's and libc's standards. Note that __builtin_object_size() evaluates to SIZE_MAX if the
++ * size cannot be determined, hence the MIN() expression should be safe with dynamically sized memory,
++ * too. Moreover, when NULL is passed malloc_usable_size() is documented to return zero, and
+  * __builtin_object_size() returns SIZE_MAX too, hence we also return a sensible value of 0 in this corner
+  * case. */
+-
+-#if defined __has_builtin
+-#  if __has_builtin(__builtin_dynamic_object_size)
+-#    define MALLOC_SIZEOF_SAFE(x) \
+-        MIN(malloc_usable_size(x), __builtin_dynamic_object_size(x, 0))
+-#  endif
+-#endif
+-
+-#ifndef MALLOC_SIZEOF_SAFE
+ #define MALLOC_SIZEOF_SAFE(x) \
+         MIN(malloc_usable_size(x), __builtin_object_size(x, 0))
+-#endif
+ 
+ /* Inspired by ELEMENTSOF() but operates on malloc()'ed memory areas: typesafely returns the number of items
+  * that fit into the specified memory block */
diff --git a/6a941db798e3c5d896f6732afb4e6e482d708900.patch b/6a941db798e3c5d896f6732afb4e6e482d708900.patch
new file mode 100644
index 0000000..74bdcdc
--- /dev/null
+++ b/6a941db798e3c5d896f6732afb4e6e482d708900.patch
@@ -0,0 +1,39 @@
+From 6a941db798e3c5d896f6732afb4e6e482d708900 Mon Sep 17 00:00:00 2001
+From: Jan Janssen <medhefgo@web.de>
+Date: Tue, 9 Aug 2022 10:32:41 +0200
+Subject: [PATCH] meson: Test correct efi linker for supported args
+
+Fixes: #24241
+---
+ src/boot/efi/meson.build | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
+index 127b4e17a3a7..95785dfd5d83 100644
+--- a/src/boot/efi/meson.build
++++ b/src/boot/efi/meson.build
+@@ -266,11 +266,19 @@ efi_ldflags = [
+         efi_crt0,
+ ]
+ 
+-possible_link_flags = [
+-        '-Wl,--no-warn-execstack',
+-        '-Wl,--no-warn-rwx-segments',
+-]
+-efi_ldflags += cc.get_supported_link_arguments(possible_link_flags)
++foreach arg : ['-Wl,--no-warn-execstack',
++               '-Wl,--no-warn-rwx-segments']
++        # We need to check the correct linker for supported args. This is what
++        # cc.has_multi_link_arguments() is for, but it helpfully overrides our
++        # choice of linker by putting its own -fuse-ld= arg after ours.
++        if run_command('bash', '-c',
++                       'exec "$@" -x c -o/dev/null <(echo "int main(void){return 0;}")' +
++                       ' -fuse-ld=' + efi_ld + ' -Wl,--fatal-warnings ' + arg,
++                       'bash', cc.cmd_array(),
++                       check : false).returncode() == 0
++                efi_ldflags += arg
++        endif
++endforeach
+ 
+ if efi_arch[1] in ['aarch64', 'arm', 'riscv64']
+         efi_ldflags += ['-shared']
diff --git a/90-default.preset b/90-default.preset
index a713dd6..47d8b42 100644
--- a/90-default.preset
+++ b/90-default.preset
@@ -10,11 +10,10 @@ enable remote-fs.target
 enable remote-cryptsetup.target
 enable machines.target
 enable getty@tty1.service
-
-# Enable other system services
-enable systemd-bus-proxy.socket
-enable systemd-initctl.socket
 enable systemd-journald.socket
+enable systemd-oomd.socket
+enable systemd-homed.service
+enable systemd-userdbd.socket
 
 # Network services
 enable systemd-resolved.service
@@ -31,5 +30,12 @@ disable poweroff.target
 enable reboot.target
 disable rescue.target
 disable exit.target
+disable systemd-networkd-wait-online.service
+disable systemd-time-wait-sync.service
+disable systemd-boot-check-no-failures.service
+disable proc-sys-fs-binfmt_misc.mount
 disable syslog.socket
-enable systemd-oomd.service
+disable systemd-journal-gatewayd.*
+disable systemd-journal-remote.*
+disable systemd-journal-upload.*
+
diff --git a/93651582ae.patch b/93651582ae.patch
new file mode 100644
index 0000000..f8c0592
--- /dev/null
+++ b/93651582ae.patch
@@ -0,0 +1,98 @@
+From 93651582aef1ee626dc6f8d032195acd73bc9372 Mon Sep 17 00:00:00 2001
+From: Jonathan Lebon <jonathan@jlebon.com>
+Date: Mon, 23 Mar 2020 12:25:19 -0400
+Subject: [PATCH] manager: optionally, do a full preset on first boot
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+A compile time option is added to select behaviour: by default
+UNIT_FILE_PRESET_ENABLE_ONLY is still used, but the intent is to change to
+UNIT_FILE_PRESET_FULL at some point in the future. Distros that want to
+opt-in can use the config option to change the behaviour.
+
+(The option is just a boolean: it would be possible to make it multi-valued,
+and allow full, enable-only, disable-only, none. But so far nobody has asked
+for this, and it's better not to complicate things needlessly.)
+
+With the configuration option flipped, instead of only doing enablements,
+perform a full preset on first boot. The reason is that although
+`/etc/machine-id` might be missing, there may be other files provisioned in
+`/etc` (in fact, this use case is mentioned in `log_execution_mode`). Some of
+those possible files include enablement symlinks even if presets dictate it
+should be disabled.
+
+Such a seemingly contradictory situation occurs in {RHEL,Fedora} CoreOS,
+where we ship `/etc` as if `preset-all` were called. However, we want to
+allow users to disable default-enabled services via Ignition, which does
+this by creating preset dropins before switchroot. (For why we do
+`preset-all` at compose time, see:
+https://github.com/coreos/fedora-coreos-config/pull/77).
+
+For example, the composed FCOS image has a `enable zincati.service`
+preset and an enablement for that in `/etc`, while at boot time when we
+switch root, there may be a `disable zincati.service` preset with higher
+precedence. In that case, we want systemd to disable the service.
+
+This is essentially a revert of 304b3079a203. It seems like systemd
+*used* to do this, but it was changed to try to make the container
+workflow a bit faster.
+
+Resolves: https://github.com/coreos/fedora-coreos-tracker/issues/392
+
+Co-authored-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
+---
+ meson.build        | 3 +++
+ meson_options.txt  | 2 ++
+ src/core/manager.c | 4 +++-
+ 3 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 582e33c9a73d..72e586aa97c7 100644
+--- a/meson.build
++++ b/meson.build
+@@ -285,6 +285,8 @@ conf.set10('MEMORY_ACCOUNTING_DEFAULT',                       memory_accounting_
+ conf.set('STATUS_UNIT_FORMAT_DEFAULT',                        'STATUS_UNIT_FORMAT_' + status_unit_format_default.to_upper())
+ conf.set_quoted('STATUS_UNIT_FORMAT_DEFAULT_STR',             status_unit_format_default)
+ 
++conf.set10('FIRST_BOOT_FULL_PRESET',                          get_option('first-boot-full-preset'))
++
+ #####################################################################
+ 
+ cc = meson.get_compiler('c')
+@@ -4271,6 +4273,7 @@ foreach tuple : [
+         ['link-networkd-shared',  get_option('link-networkd-shared')],
+         ['link-timesyncd-shared', get_option('link-timesyncd-shared')],
+         ['link-boot-shared',      get_option('link-boot-shared')],
++        ['first-boot-full-preset'],
+         ['fexecve'],
+         ['standalone-binaries',   get_option('standalone-binaries')],
+         ['coverage',              get_option('b_coverage')],
+diff --git a/meson_options.txt b/meson_options.txt
+index 2a030ac28ec0..28765f900e87 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -27,6 +27,8 @@ option('link-timesyncd-shared', type: 'boolean',
+        description : 'link systemd-timesyncd and its helpers to libsystemd-shared.so')
+ option('link-boot-shared', type: 'boolean',
+        description : 'link bootctl and systemd-bless-boot against libsystemd-shared.so')
++option('first-boot-full-preset', type: 'boolean', value: false,
++       description : 'during first boot, do full preset-all (default will be changed to true later)')
+ 
+ option('static-libsystemd', type : 'combo',
+        choices : ['false', 'true', 'pic', 'no-pic'],
+diff --git a/src/core/manager.c b/src/core/manager.c
+index 18daff66c780..f4dacef1005d 100644
+--- a/src/core/manager.c
++++ b/src/core/manager.c
+@@ -1728,7 +1728,9 @@ static void manager_preset_all(Manager *m) {
+                 return;
+ 
+         /* If this is the first boot, and we are in the host system, then preset everything */
+-        r = unit_file_preset_all(LOOKUP_SCOPE_SYSTEM, 0, NULL, UNIT_FILE_PRESET_ENABLE_ONLY, NULL, 0);
++        UnitFilePresetMode mode = FIRST_BOOT_FULL_PRESET ? UNIT_FILE_PRESET_FULL : UNIT_FILE_PRESET_ENABLE_ONLY;
++
++        r = unit_file_preset_all(LOOKUP_SCOPE_SYSTEM, 0, NULL, mode, NULL, 0);
+         if (r < 0)
+                 log_full_errno(r == -EEXIST ? LOG_NOTICE : LOG_WARNING, r,
+                                "Failed to populate /etc with preset unit settings, ignoring: %m");
diff --git a/systemd-236-fix-build-with-LLVM.patch b/systemd-236-fix-build-with-LLVM.patch
deleted file mode 100644
index 282f822..0000000
--- a/systemd-236-fix-build-with-LLVM.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -up systemd-249.20210625/src/basic/macro.h.30~ systemd-249.20210625/src/basic/macro.h
---- systemd-249.20210625/src/basic/macro.h.30~	2021-06-25 17:33:53.256815134 +0200
-+++ systemd-249.20210625/src/basic/macro.h	2021-06-25 17:34:52.791526367 +0200
-@@ -30,10 +30,10 @@
- #define _weakref_(x) __attribute__((__weakref__(#x)))
- #define _alignas_(x) __attribute__((__aligned__(__alignof(x))))
- #define _alignptr_ __attribute__((__aligned__(sizeof(void*))))
--#if __GNUC__ >= 7
-+#if __GNUC__ >= 7 && __has_attribute(__fallthrough__)
- #define _fallthrough_ __attribute__((__fallthrough__))
- #else
--#define _fallthrough_
-+#define _fallthrough_ ((void)0)
- #endif
- /* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
-  * compiler versions */
diff --git a/systemd-245-allow-compiling-with-gcc.patch b/systemd-245-allow-compiling-with-gcc.patch
index bfaa6a0..3f4ce58 100644
--- a/systemd-245-allow-compiling-with-gcc.patch
+++ b/systemd-245-allow-compiling-with-gcc.patch
@@ -1,30 +1,30 @@
-diff -up systemd-245.20200614/src/libsystemd/disable-mempool.c.omv~ systemd-245.20200614/src/libsystemd/disable-mempool.c
---- systemd-245.20200614/src/libsystemd/disable-mempool.c.omv~	2020-06-14 03:38:48.801773430 +0200
-+++ systemd-245.20200614/src/libsystemd/disable-mempool.c	2020-06-14 03:38:55.831808656 +0200
+diff -up systemd-250.20220315/src/libsystemd/disable-mempool.c.32~ systemd-250.20220315/src/libsystemd/disable-mempool.c
+--- systemd-250.20220315/src/libsystemd/disable-mempool.c.32~	2022-03-11 14:37:06.000000000 +0100
++++ systemd-250.20220315/src/libsystemd/disable-mempool.c	2022-03-15 18:51:22.352968749 +0100
 @@ -2,4 +2,4 @@
  
  #include "mempool.h"
  
 -const bool mempool_use_allowed = false;
 +__attribute__((used)) const bool mempool_use_allowed = false;
-diff -up systemd-245.20200614/src/shared/enable-mempool.c.omv~ systemd-245.20200614/src/shared/enable-mempool.c
---- systemd-245.20200614/src/shared/enable-mempool.c.omv~	2020-06-14 03:38:33.224693203 +0200
-+++ systemd-245.20200614/src/shared/enable-mempool.c	2020-06-14 03:38:42.750742622 +0200
+diff -up systemd-250.20220315/src/shared/enable-mempool.c.32~ systemd-250.20220315/src/shared/enable-mempool.c
+--- systemd-250.20220315/src/shared/enable-mempool.c.32~	2022-03-11 14:37:06.000000000 +0100
++++ systemd-250.20220315/src/shared/enable-mempool.c	2022-03-15 18:51:22.353968724 +0100
 @@ -2,4 +2,4 @@
  
  #include "mempool.h"
  
 -const bool mempool_use_allowed = true;
 +__attribute__((used)) const bool mempool_use_allowed = true;
-diff -up systemd-246.20200806/src/test/test-set.c.omv~ systemd-246.20200806/src/test/test-set.c
---- systemd-246.20200806/src/test/test-set.c.omv~	2020-08-08 06:50:10.878162432 +0200
-+++ systemd-246.20200806/src/test/test-set.c	2020-08-08 06:50:17.877246466 +0200
-@@ -3,7 +3,7 @@
- #include "set.h"
+diff -up systemd-250.20220315/src/test/test-set.c.32~ systemd-250.20220315/src/test/test-set.c
+--- systemd-250.20220315/src/test/test-set.c.32~	2022-03-15 18:51:22.353968724 +0100
++++ systemd-250.20220315/src/test/test-set.c	2022-03-15 18:55:08.556098747 +0100
+@@ -5,7 +5,7 @@
  #include "strv.h"
+ #include "tests.h"
  
 -const bool mempool_use_allowed = VALGRIND;
 +__attribute__((used)) const bool mempool_use_allowed = VALGRIND;
  
- static void test_set_steal_first(void) {
+ TEST(set_steal_first) {
          _cleanup_set_free_ Set *m = NULL;
diff --git a/systemd-249-no-clang-flags-for-bits-built-by-gcc.patch b/systemd-249-no-clang-flags-for-bits-built-by-gcc.patch
index 742c7e4..44bbea5 100644
--- a/systemd-249-no-clang-flags-for-bits-built-by-gcc.patch
+++ b/systemd-249-no-clang-flags-for-bits-built-by-gcc.patch
@@ -1,32 +1,13 @@
-diff -up systemd-249.20210625/src/boot/efi/meson.build.omv~ systemd-249.20210625/src/boot/efi/meson.build
---- systemd-249.20210625/src/boot/efi/meson.build.omv~	2021-06-25 17:46:50.343244024 +0200
-+++ systemd-249.20210625/src/boot/efi/meson.build	2021-06-25 17:58:02.529412391 +0200
-@@ -175,19 +175,15 @@ if have_gnu_efi
- endif
+diff -up systemd-250.20220315/src/boot/efi/meson.build.34~ systemd-250.20220315/src/boot/efi/meson.build
+--- systemd-250.20220315/src/boot/efi/meson.build.34~	2022-03-15 20:11:56.242558640 +0100
++++ systemd-250.20220315/src/boot/efi/meson.build	2022-03-15 20:14:47.092083159 +0100
+@@ -157,8 +157,7 @@ efi_config_h = configure_file(
+         configuration : efi_conf)
  
- if have_gnu_efi
--        compile_args = cc.get_supported_arguments(
--                basic_disabled_warnings +
--                possible_common_cc_flags + [
--                        '-ffreestanding',
--                        '-fno-stack-protector',
--                        '-fno-strict-aliasing',
--                        '-fpic',
--                        '-fshort-wchar',
--                        '-Wall',
--                        '-Wextra',
--                        '-Wsign-compare',
--                ]
--        ) + [
-+        compile_args = [
-+                '-ffreestanding',
-+                '-fno-stack-protector',
-+                '-fno-strict-aliasing',
-+                '-fpic',
-+                '-fshort-wchar',
-+                '-Wall',
-+                '-Wextra',
-+                '-Wsign-compare',
-                 '-nostdlib',
-                 '-std=gnu99',
-                 '-isystem', efi_incdir,
+ efi_cflags = cc.get_supported_arguments(
+-        basic_disabled_warnings +
+-        possible_common_cc_flags + [
++        [
+                 '-fno-stack-protector',
+                 '-fno-strict-aliasing',
+                 '-fpic',
diff --git a/systemd-250-compile.patch b/systemd-250-compile.patch
new file mode 100644
index 0000000..0ce25ad
--- /dev/null
+++ b/systemd-250-compile.patch
@@ -0,0 +1,22 @@
+diff -up systemd-250.20220315/src/basic/locale-util.c.omv~ systemd-250.20220315/src/basic/locale-util.c
+--- systemd-250.20220315/src/basic/locale-util.c.omv~	2022-03-15 19:03:03.136633579 +0100
++++ systemd-250.20220315/src/basic/locale-util.c	2022-03-15 19:03:14.056345285 +0100
+@@ -188,7 +188,6 @@ static int add_locales_from_libdir (Set
+ 
+ static int add_locales_from_sharedir (Set *locales) {
+         _cleanup_closedir_ DIR *dir = NULL;
+-        struct dirent *entry;
+         int r;
+ 
+         dir = opendir("/usr/share/locale");
+diff -up systemd-250.20220315/src/libsystemd/sd-daemon/sd-daemon.c.omv~ systemd-250.20220315/src/libsystemd/sd-daemon/sd-daemon.c
+--- systemd-250.20220315/src/libsystemd/sd-daemon/sd-daemon.c.omv~	2022-03-15 19:02:10.264028783 +0100
++++ systemd-250.20220315/src/libsystemd/sd-daemon/sd-daemon.c	2022-03-15 19:02:26.870590696 +0100
+@@ -12,6 +12,7 @@
+ #include <sys/stat.h>
+ #include <sys/un.h>
+ #include <unistd.h>
++#include <asm/unistd.h> // for __NR_mq_getsetattr
+ 
+ #include "sd-daemon.h"
+ 
diff --git a/systemd.spec b/systemd.spec
index cd44977..7d654b1 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -5,21 +5,8 @@
 %bcond_with compat32
 %endif
 
-# FIXME workaround for a very very weird bug
-# systemd on x86_64, but not znver1 (so we're intentionally
-# not using %{x86_64} here), hangs indefinitely on upgrades
-# if built with clang.
-# Last verified with systemd 247.20210305, clang 12.0.0-0.20210224.1
-# aarch64 added for testing (to see if systemctl hangs on
-# synquacer and pinephone go away)
-%ifarch x86_64 aarch64
-%bcond_without gcc
-%else
-%bcond_with gcc
-%endif
-
 # (tpg) optimize it a bit
-%global optflags %{optflags} -O3
+%global optflags %{optflags} -O3 -Wno-implicit-int
 
 %bcond_with bootstrap
 
@@ -47,27 +34,27 @@
 %define lib32udev libudev%{udev_major}
 %define lib32udev_devel libudev-devel
 
-%define systemd_libdir /lib/systemd
-%define udev_libdir /lib/udev
+%define systemd_libdir %{_prefix}/lib/systemd
+%define udev_libdir %{_prefix}/lib/udev
 %define udev_rules_dir %{udev_libdir}/rules.d
 %define udev_user_rules_dir %{_sysconfdir}/udev/rules.d
 
-%define major 249
-%define stable 20220113
+%define major 251
+%define stable 20220811
 
 Summary:	A System and Session Manager
 Name:		systemd
 %if 0%stable
 Version:	%{major}.%{stable}
 # Packaged from v%(echo %{version} |cut -d. -f1)-stable branch of
-# git clone https://github.com/systemd/systemd-stable/ -b v249-stable
-# cd systemd-stable && git archive --prefix=systemd-249.$(date +%Y%m%d)/ --format=tar v249-stable | xz -9ef > ../systemd-249.$(date +%Y%m%d).tar.xz
+# git clone https://github.com/systemd/systemd-stable/ -b v251-stable
+# cd systemd-stable && git archive --prefix=systemd-251.$(date +%Y%m%d)/ --format=tar origin/v251-stable | xz -9ef > ../systemd-251.$(date +%Y%m%d).tar.xz
 Source0:	systemd-%{version}.tar.xz
 %else
 Version:	%{major}
 Source0:	https://github.com/systemd/systemd/archive/v%{version}.tar.gz
 %endif
-Release:	2
+Release:	3
 License:	GPLv2+
 Group:		System/Configuration/Boot and Init
 Url:		https://systemd.io/
@@ -117,7 +104,6 @@ Patch15:	0500-create-default-links-for-primary-cd_dvd-drive.patch
 Patch17:	0515-Add-path-to-locale-search.patch
 Patch18:	0516-udev-silence-version-print.patch
 Patch19:	systemd-243-random-seed-no-insane-timeouts.patch
-Patch20:	http://crazy.dev.frugalware.org/fix-macros.systemd.in.patch
 
 # (tpg) ClearLinux patches
 Patch100:	0001-journal-raise-compression-threshold.patch
@@ -140,21 +126,22 @@ Patch116:	0031-Don-t-do-transient-hostnames-we-set-ours-already.patch
 Patch117:	0032-don-t-use-libm-just-for-integer-exp10.patch
 Patch119:	0033-Notify-systemd-earlier-that-resolved-is-ready.patch
 Patch120:	0038-Localize-1-symbol.patch
-patch121:	0040-boot-efi-comment-out-success-validation-message.patch
 
 # (tpg) OMV patches
-Patch1000:	systemd-236-fix-build-with-LLVM.patch
 Patch1001:	systemd-245-allow-compiling-with-gcc.patch
 #(tpg) we use bsdtar so let's adapt attribues to match implementation
 # httpa://github.com/systemd/systemd/issues/16506
 Patch1002:	systemd-245-importctl-fix-bsdtar-attributes.patch
 Patch1003:	systemd-249-no-clang-flags-for-bits-built-by-gcc.patch
+Patch1004:	systemd-250-compile.patch
 
 # (tpg) Fedora patches
 Patch1100:	0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch
 
 # Upstream patches from master that haven't landed in -stable yet
-
+Patch2000:	https://patch-diff.githubusercontent.com/raw/systemd/systemd/pull/23621.patch
+Patch2001:	6a941db798e3c5d896f6732afb4e6e482d708900.patch
+Patch2002:	https://github.com/systemd/systemd/commit/93651582ae.patch
 BuildRequires:	meson
 BuildRequires:	quota
 BuildRequires:	pkgconfig(libacl)
@@ -170,9 +157,7 @@ BuildRequires:	pkgconfig(libelf)
 BuildRequires:	keyutils-devel
 BuildRequires:	pkgconfig(dbus-1) >= 1.12.2
 BuildRequires:	pkgconfig(glib-2.0)
-BuildRequires:	pkgconfig(libgcrypt)
 BuildRequires:	pkgconfig(openssl)
-BuildRequires:	pkgconfig(gpg-error)
 BuildRequires:	gtk-doc
 BuildRequires:	rsync
 %if !%{with bootstrap}
@@ -185,7 +170,6 @@ BuildRequires:	pkgconfig(libzstd)
 BuildRequires:	pkgconfig(libxslt)
 BuildRequires:	pkgconfig(libmicrohttpd)
 BuildRequires:	pkgconfig(libqrencode)
-BuildRequires:	pkgconfig(libiptc)
 BuildRequires:	xsltproc
 BuildRequires:	pkgconfig(blkid) >= 2.30
 BuildRequires:	pkgconfig(liblz4)
@@ -231,17 +215,17 @@ Conflicts:	udev < 221-1
 #(tpg) time to drop consolekit stuff as it is replaced by native logind
 Provides:	consolekit = 0.4.5-6
 Provides:	consolekit-x11 = 0.4.5-6
-Obsoletes:	consolekit <= 0.4.5-5
-Obsoletes:	consolekit-x11 <= 0.4.5-5
-Obsoletes:	libconsolekit0
-Obsoletes:	lib64consolekit0
+Obsoletes:	consolekit < 0.4.5-6
+Obsoletes:	consolekit-x11 < 0.4.5-6
+Obsoletes:	libconsolekit0 < 0.4.5-6
+Obsoletes:	lib64consolekit0 < 0.4.5-6
 # (tpg) this is obsoleted
 Obsoletes:	suspend < 1.0-10
 Provides:	suspend = 1.0-10
 Obsoletes:	suspend-s2ram < 1.0-10
 Provides:	suspend-s2ram = 1.0-10
 Provides:	should-restart = system
-Requires:	(%{name}-rpm-macros = %{EVRD} if rpm-build)
+Requires(meta):	(%{name}-rpm-macros = %{EVRD} if rpm-build)
 # (tpg) just to be sure we install this libraries
 Requires:	%{libsystemd} = %{EVRD}
 Requires:	%{libnss_myhostname} = %{EVRD}
@@ -271,7 +255,6 @@ Provides:	sysvinit = 2.87-23, SysVinit = 2.87-23
 Obsoletes:	sysvinit < 2.87-23, SysVinit < 2.87-23
 # Due to halt/poweroff etc. in _bindir
 Conflicts:	usermode-consoleonly < 1:1.110
-Obsoletes:	hal <= 0.5.14-6
 # (tpg) moved form makedev package
 Provides:	dev
 Obsoletes:	MAKEDEV < 4.4-23
@@ -290,10 +273,8 @@ Provides:	python-%{name} = 223
 %rename		systemd-resolved
 %rename		udev
 %if %{with compat32}
+BuildRequires:	libc6
 BuildRequires:	devel(libcap)
-BuildRequires:	devel(libgcrypt)
-BuildRequires:	devel(libip4tc)
-BuildRequires:	devel(libip6tc)
 BuildRequires:	devel(libpcre2-8)
 BuildRequires:	devel(liblz4)
 BuildRequires:	devel(libcrypto)
@@ -307,6 +288,7 @@ BuildRequires:	devel(libidn2)
 BuildRequires:	devel(libz)
 BuildRequires:	devel(libdw)
 BuildRequires:	devel(libdbus-1)
+BuildRequires:	devel(libssl)
 %endif
 
 %description
@@ -609,7 +591,7 @@ This functionality only applies to containers using network namespacing.
 Summary:	Provide hostname resolution via systemd-resolved.service
 Group:		System/Libraries
 Provides:	libnss_resolve = %{EVRD}
-Provides:	nss_resolve= %{EVRD}
+Provides:	nss_resolve = %{EVRD}
 Requires:	%{name} = %{EVRD}
 Conflicts:	%{libnss_myhostname} < 235
 
@@ -637,7 +619,6 @@ for details on this option.
 %package -n %{libudev}
 Summary:	Library for udev
 Group:		System/Libraries
-Obsoletes:	%{mklibname hal 1} <= 0.5.14-6
 
 %description -n %{libudev}
 Library for udev.
@@ -741,11 +722,19 @@ Devel library for udev.
 %package oom
 Summary:	Out of Memory handler
 Group:		System/Configuration/Boot and Init
-Requires:	%{name}
+Requires:	%{name} = %{EVRD}
 
 %description oom
 Out of Memory handler.
 
+%package integritysetup
+Summary:	System integrity checker
+Group:		System/Configuration/Boot and Init
+Requires:	%{name} = %{EVRD}
+
+%description integritysetup
+System integrity checker
+
 %prep
 %autosetup -p1
 
@@ -756,18 +745,11 @@ ln -sf %{_bindir}/ld.bfd bin/ld
 PATH=$PWD/bin:$PATH
 %endif
 
-# FIXME
-# Switch to
-#	-Ddefault-hierarchy=unified \
-# below once Docker has been fixed to work with it.
-# In the mean time, hybrid provides cgroups2 features
-# while keeping docker working.
-# https://github.com/opencontainers/runc/issues/654
-#
-# In order to switch to cgroup2 it is enough to pass systemd.unified_cgroup_hierarchy=1 via kernel command line.
+# In order to switch to cgroup1 it is enough to pass systemd.unified_cgroup_hierarchy=0 via kernel command line.
 
 %if %{with compat32}
 %meson32 \
+	-Dmode=release \
 	-Danalyze=false \
 	-Dapparmor=false \
 	-Daudit=false \
@@ -782,6 +764,7 @@ PATH=$PWD/bin:$PATH
 	-Dfirstboot=false \
 	-Dgnu-efi=false \
 	-Dgnutls=false\
+	-Dgcrypt=false \
 	-Dhibernate=false \
 	-Dhomed=false \
 	-Dhostnamed=false \
@@ -799,7 +782,6 @@ PATH=$PWD/bin:$PATH
 	-Dmachined=false \
 	-Dman=false \
 	-Dmicrohttpd=false \
-	-Dmode=release \
 	-Dnetworkd=false \
 	-Dnscd=false \
 	-Doomd=false \
@@ -819,7 +801,8 @@ PATH=$PWD/bin:$PATH
 	-Drfkill=false \
 	-Dseccomp=false \
 	-Dselinux=false \
-	-Dsplit-usr=true \
+	-Dsplit-usr=false \
+	-Dsplit-bin=false \
 	-Dsupport-url="%{disturl}" \
 	-Dsysext=false \
 	-Dsysusers=false \
@@ -833,7 +816,10 @@ PATH=$PWD/bin:$PATH
 	-Dutmp=false \
 	-Dvalgrind=false \
 	-Dvconsole=false \
-	-Dxdg-autostart=false
+	-Dxdg-autostart=false \
+	-Dfirst-boot-full-preset=false \
+	-Dcryptolib=openssl \
+	-Dlibiptc=false
 
 %ninja_build -C build32
 %endif
@@ -845,14 +831,11 @@ export LD=gcc
 %endif
 %meson \
 	-Dmode=release \
-	-Drootprefix="" \
-	-Drootlibdir=/%{_lib} \
 	-Dsysvinit-path=%{_initrddir} \
 	-Dsysvrcnd-path=%{_sysconfdir}/rc.d \
 	-Drc-local=%{_sysconfdir}/rc.d/rc.local \
 %ifarch %{efi}
-	-Defi-cc=gcc \
-	-Defi-ld=ld.bfd \
+	-Defi-ld=bfd \
 	-Defi=true \
 	-Dgnu-efi=true \
 	-Defi-libdir=%{_libdir} \
@@ -869,9 +852,10 @@ export LD=gcc
 	-Dlibcryptsetup=false \
 %else
 	-Dlibcryptsetup=true \
+	-Dlibcryptsetup-plugins-dir="%{_libdir}/cryptsetup" \
 %endif
-	-Dsplit-usr=true \
-	-Dsplit-bin=true \
+	-Dsplit-usr=false \
+	-Dsplit-bin=false \
 	-Dxkbcommon=true \
 	-Dtpm=true \
 	-Ddev-kvm-mode=0666 \
@@ -897,20 +881,22 @@ export LD=gcc
 	-Dlz4=true \
 	-Dpam=true \
 	-Dpamconfdir="%{_sysconfdir}/pam.d" \
+	-Dpamlibdir="%{_libdir}/security" \
 	-Dacl=true \
 	-Dsmack=true \
-	-Dgcrypt=true \
+	-Dgcrypt=false \
 	-Daudit=false \
 	-Delfutils=true \
 	-Dqrencode=true \
 	-Dgnutls=true \
 	-Dmicrohttpd=true \
 	-Dlibidn2=true \
-	-Dlibiptc=true \
+	-Dlibiptc=false \
 	-Dlibcurl=true \
 	-Dtpm=true \
 	-Dhwdb=true \
 	-Dsysusers=true \
+	-Dsysupdate=false \
 	-Dman=true \
 	-Dhtml=true \
 	-Dtests=unsafe \
@@ -923,9 +909,9 @@ export LD=gcc
 	-Dloadkeys-path=%{_bindir}/loadkeys \
 	-Dsetfont-path=%{_bindir}/setfont \
 	-Dcertificate-root="%{_sysconfdir}/pki" \
-	-Dfallback-hostname=openmandriva \
+	-Dfallback-hostname="localhost" \
 	-Dsupport-url="%{disturl}" \
-	-Ddefault-hierarchy=hybrid \
+	-Ddefault-hierarchy=unified \
 	-Dtty-gid=5 \
 	-Dusers-gid=100 \
 	-Dnobody-user=nobody \
@@ -954,7 +940,11 @@ export LD=gcc
 	-Dwheel-gid=10 \
 	-Dsystemd-journal-gid=190 \
 	-Dsystemd-network-uid=194 \
-	-Dsystemd-resolve-uid=191
+	-Dsystemd-resolve-uid=191 \
+	-Dfirst-boot-full-preset=true \
+	-Dstatus-unit-format-default=combined \
+	-Dcompat-mutable-uid-boundaries=true \
+	-Dcryptolib=openssl
 # -Dsystemd-timesync-uid=, not set yet
 
 %meson_build
@@ -963,39 +953,20 @@ export LD=gcc
 %if %{with compat32}
 %ninja_install -C build32
 rm -rf %{buildroot}%{_sysconfdir} %{buildroot}/lib/{systemd,modprobe.d,udev} %{buildroot}%{_datadir}/{dbus-1,factory,polkit-1}
-# 32 bit cruft is not needed at early bootup...
-mv %{buildroot}/lib/* %{buildroot}%{_prefix}/lib/
-rmdir %{buildroot}/lib
 # (tpg) remove as PAM is not enabled with 32 bit build
 rm -rf %{buildroot}%{_sysconfdir}/pam.d
 rm -rf %{buildroot}%{_prefix}/lib/{sysusers.d,tmpfile.d,sysctl.d,kernel,systemd/catalog}
 %endif
 %meson_install
 
-mkdir -p %{buildroot}{/bin,%{_sbindir}}
-
 # (bor) create late shutdown and sleep directory
 mkdir -p %{buildroot}%{systemd_libdir}/system-shutdown
 mkdir -p %{buildroot}%{systemd_libdir}/system-sleep
 
-# Create SysV compatibility symlinks. systemctl/systemd are smart
-# enough to detect in which way they are called.
-mkdir -p %{buildroot}/sbin
-ln -s ..%{systemd_libdir}/%{name} %{buildroot}/bin/%{name}
-
-# (tpg) install compat symlinks - enable when split-bin=true
-for i in halt poweroff reboot; do
-    ln -s /bin/systemctl %{buildroot}/bin/$i
-done
-
-ln -s /bin/loginctl %{buildroot}%{_bindir}/%{name}-loginctl
-
-# (tpg) dracut needs this
-ln -sf /bin/systemctl %{buildroot}%{_bindir}/systemctl
-ln -sf /bin/systemd-escape %{buildroot}%{_bindir}/systemd-escape
+ln -s loginctl %{buildroot}%{_bindir}/%{name}-loginctl
 
 # We create all wants links manually at installation time to make sure
-# they are not owned and hence overriden by rpm after the used deleted
+# they are not owned and hence overriden by rpm after the user deleted
 # them.
 rm -rf %{buildroot}%{_sysconfdir}/%{name}/system/*.target.wants
 
@@ -1011,19 +982,15 @@ mkdir -p %{buildroot}/%{systemd_libdir}/system/initrd.target.wants
 mkdir -p %{buildroot}/%{systemd_libdir}/system/kexec.target.wants
 mkdir -p %{buildroot}/%{systemd_libdir}/system/poweroff.target.wants
 mkdir -p %{buildroot}/%{systemd_libdir}/system/reboot.target.wants
-mkdir -p %{buildroot}/%{systemd_libdir}/systemsound.target.wants
+mkdir -p %{buildroot}/%{systemd_libdir}/system/sound.target.wants
 mkdir -p %{buildroot}/%{systemd_libdir}/system/system-update.target.wants
-mkdir -p %{buildroot}/%{_prefix}/lib/%{name}/user/basic.target.wants
-mkdir -p %{buildroot}/%{_prefix}/lib/%{name}/user/default.target.wants
-mkdir -p %{buildroot}/%{_prefix}/lib/%{name}/user/sockets.target.wants
+mkdir -p %{buildroot}/%{systemd_libdir}/user/basic.target.wants
+mkdir -p %{buildroot}/%{systemd_libdir}/user/default.target.wants
+mkdir -p %{buildroot}/%{systemd_libdir}/user/sockets.target.wants
 
 # And the default symlink we generate automatically based on inittab
 rm -f %{buildroot}%{_sysconfdir}/%{name}/system/default.target
 
-# (tpg) this is needed
-mkdir -p %{buildroot}%{_prefix}/lib/%{name}/system-generators
-mkdir -p %{buildroot}%{_prefix}/lib/%{name}/user-generators
-
 # (bor) make sure we own directory for bluez to install service
 mkdir -p %{buildroot}/%{systemd_libdir}/system/bluetooth.target.wants
 
@@ -1035,7 +1002,6 @@ sed -i -e 's/^#SwapAuto=yes$/SwapAuto=yes/' %{buildroot}/etc/%{name}/system.conf
 mkdir %{buildroot}/run
 
 # (tpg) create missing dir
-mkdir -p %{buildroot}%{_libdir}/%{name}/user/
 mkdir -p %{buildroot}%{_sysconfdir}/%{name}/user/default.target.wants
 
 # Create new-style configuration files so that we can ghost-own them
@@ -1056,7 +1022,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/%{name}/nspawn
 # (cg) Set up the pager to make it generally more useful
 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
 cat > %{buildroot}%{_sysconfdir}/profile.d/40systemd.sh << EOF
-export SYSTEMD_PAGER="/usr/bin/less -FR"
+export SYSTEMD_PAGER="%{_bindir}/less -FR"
 EOF
 chmod 644 %{buildroot}%{_sysconfdir}/profile.d/40systemd.sh
 
@@ -1080,7 +1046,7 @@ install -m 0644 %{SOURCE13} %{buildroot}%{systemd_libdir}/system-preset/
 install -m 0644 %{SOURCE14} %{buildroot}%{systemd_libdir}/system-preset/
 
 # (tpg) install userspace presets
-install -m 0644 %{SOURCE18} %{buildroot}%{_prefix}/lib/%{name}/user-preset/
+install -m 0644 %{SOURCE18} %{buildroot}%{systemd_libdir}/user-preset/
 
 # (tpg) remove 90-systemd-preset as it is included in ours 90-default.preset
 rm -rf %{buildroot}%{systemd_libdir}/system-preset/90-systemd.preset
@@ -1091,10 +1057,10 @@ install -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/rsyslog.d/
 
 # (tpg) silent kernel messages
 # print only KERN_ERR and more serious alerts
-echo "kernel.printk = 2 2 2 2" >> %{buildroot}/usr/lib/sysctl.d/50-default.conf
+echo "kernel.printk = 2 2 2 2" >> %{buildroot}%{_prefix}/lib/sysctl.d/50-default.conf
 
 # (tpg) by default enable SysRq
-sed -i -e 's/^#kernel.sysrq = 0/kernel.sysrq = 1/' %{buildroot}/usr/lib/sysctl.d/50-default.conf
+sed -i -e 's/^#kernel.sysrq = 0/kernel.sysrq = 1/' %{buildroot}%{_prefix}/lib/sysctl.d/50-default.conf
 
 # (tpg) use 100M as a default maximum value for journal logs
 sed -i -e 's/^#SystemMaxUse=.*/SystemMaxUse=100M/' %{buildroot}%{_sysconfdir}/%{name}/journald.conf
@@ -1130,39 +1096,24 @@ mkdir -p  %{buildroot}%{_sysconfdir}/sysconfig/udev
 install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/udev/
 install -m 0644 %{SOURCE19} %{buildroot}%{udev_rules_dir}/
 
-# probably not required, but let's just be on the safe side for now..
-ln -sf /bin/udevadm %{buildroot}/sbin/udevadm
-ln -sf /bin/udevadm %{buildroot}%{_bindir}/udevadm
-ln -sf /bin/udevadm %{buildroot}%{_sbindir}/udevadm
-
 mkdir -p %{buildroot}%{_prefix}/lib/firmware/updates
 mkdir -p %{buildroot}%{_sysconfdir}/udev/agents.d/usb
 touch %{buildroot}%{_sysconfdir}/scsi_id.config
 
-ln -s /bin/udevadm %{buildroot}/sbin/udevd
-ln -s /bin/udevadm %{buildroot}%{udev_libdir}/udevd
+ln -s udevadm %{buildroot}%{_bindir}/udevd
+ln -s %{_bindir}/udevadm %{buildroot}%{udev_libdir}/udevd
 
-mkdir -p %{buildroot}/lib/firmware/updates
+mkdir -p %{buildroot}%{_prefix}/lib/firmware/updates
 # default /dev content, from Fedora RPM
 mkdir -p %{buildroot}%{udev_libdir}/devices/{net,hugepages,pts,shm}
 # From previous Mandriva /etc/udev/devices.d
 mkdir -p %{buildroot}%{udev_libdir}/devices/cpu/0
 
-# A lot of configure scripts don't check /lib64 for linkable libraries, so
-# let's symlink libudev to something more common
-ln -s ../../%{_lib}/libudev.so %{buildroot}%{_libdir}/
-
 #################
 #	UDEV	#
 #	END	#
 #################
 
-# (tpg) just delete this for now
-# file /usr/share/man/man5/crypttab.5.xz
-# from install of systemd-186-2.x86_64
-# conflicts with file from package initscripts-9.25-10.x86_64
-rm -rf %{buildroot}%{_mandir}/man5/crypttab*
-
 # https://bugzilla.redhat.com/show_bug.cgi?id=1378974
 install -Dm0644 -t %{buildroot}%{systemd_libdir}/system/systemd-udev-trigger.service.d/ %{SOURCE23}
 
@@ -1172,10 +1123,6 @@ install -Dm0644 -t %{buildroot}%{systemd_libdir}/system/systemd-udev-trigger.ser
 # Compute catalog
 ./build/journalctl --root %{buildroot} --update-catalog
 
-# Compilers don't look in /lib or /lib64
-rm %{buildroot}/%{_lib}/libsystemd.so
-ln -s ../../%{_lib}/libsystemd.so.0 %{buildroot}%{_libdir}/libsystemd.so
-
 %find_lang %{name}
 
 %include %{SOURCE1}
@@ -1185,43 +1132,43 @@ ln -s ../../%{_lib}/libsystemd.so.0 %{buildroot}%{_libdir}/libsystemd.so
 # trigger is executed on both self and target install so no need to have
 # extra own post
 if [ $1 -ge 2 ] || [ $2 -ge 2 ]; then
-    /bin/systemctl daemon-reexec 2>&1 || :
+    %{_bindir}/systemctl daemon-reexec 2>&1 || :
 fi
 
 %post
-/bin/systemd-firstboot --setup-machine-id &>/dev/null ||:
-/bin/systemd-machine-id-setup &>/dev/null ||:
-/bin/systemctl daemon-reexec &>/dev/null ||:
+%{_bindir}/systemd-firstboot --setup-machine-id &>/dev/null ||:
+%{_bindir}/systemd-machine-id-setup &>/dev/null ||:
+%{_bindir}/systemctl daemon-reexec &>/dev/null ||:
 
 if [ $1 -eq 1 ] ; then
-    [ -w %{_localstatedir} ] && mkdir -p %{_localstatedir}/log/journal
-    /bin/systemd-sysusers &>/dev/null ||:
-    %{systemd_libdir}/systemd-random-seed save &>/dev/null ||:
-    /bin/journalctl --update-catalog &>/dev/null ||:
-    /bin/systemd-tmpfiles --create &>/dev/null ||:
-
-# Init 90-default.preset only on first install
-    /bin/systemctl preset-all &>/dev/null ||:
-    /bin/systemctl --global preset-all &>/dev/null ||:
-
-# (tpg) link to resolv.conf from systemd
-    [ -e /etc/resolv.conf ] && rm -f /etc/resolv.conf
-    ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
-    if [ ! -e /run/systemd/resolve/resolv.conf ] || [ ! -e /run/systemd/resolve/stub-resolv.conf ]; then
-	mkdir -p /run/systemd/resolve
-	printf '%s\n' "nameserver 208.67.222.222" "nameserver 208.67.220.220" > /run/systemd/resolve/resolv.conf
-	printf '%s\n' "nameserver 208.67.222.222" "nameserver 208.67.220.220" > /run/systemd/resolve/stub-resolv.conf
-    fi
+	[ -w %{_localstatedir} ] && mkdir -p %{_localstatedir}/log/journal
+	%{_bindir}/systemd-sysusers &>/dev/null ||:
+	%{systemd_libdir}/systemd-random-seed save &>/dev/null ||:
+	%{_bindir}/journalctl --update-catalog &>/dev/null ||:
+	%{_bindir}/systemd-tmpfiles --create &>/dev/null ||:
+
+	# Init 90-default.preset only on first install
+	%{_bindir}/systemctl preset-all &>/dev/null ||:
+	%{_bindir}/systemctl --global preset-all &>/dev/null ||:
+
+	# (tpg) link to resolv.conf from systemd
+	[ -e /etc/resolv.conf ] && rm -f /etc/resolv.conf
+	ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
+	if [ ! -e /run/systemd/resolve/resolv.conf ] || [ ! -e /run/systemd/resolve/stub-resolv.conf ]; then
+		mkdir -p /run/systemd/resolve
+		printf '%s\n' "nameserver 208.67.222.222" "nameserver 208.67.220.220" > /run/systemd/resolve/resolv.conf
+		printf '%s\n' "nameserver 208.67.222.222" "nameserver 208.67.220.220" > /run/systemd/resolve/stub-resolv.conf
+	fi
 fi
 
 hostname_new=$(cat %{_sysconfdir}/hostname 2>/dev/null)
 if [ -z "$hostname_new" ]; then
-    hostname_old=$(cat /etc/sysconfig/network 2>/dev/null | grep HOSTNAME | cut -d "=" -f2)
-    if [ ! -z "$hostname_old" ]; then
-	printf '%s\n' "$hostname_old" >> %{_sysconfdir}/hostname
-    else
-	printf '%s\n' "localhost" >> %{_sysconfdir}/hostname
-    fi
+	hostname_old=$(cat /etc/sysconfig/network 2>/dev/null | grep HOSTNAME | cut -d "=" -f2)
+	if [ ! -z "$hostname_old" ]; then
+		printf '%s\n' "$hostname_old" >> %{_sysconfdir}/hostname
+	else
+		printf '%s\n' "localhost" >> %{_sysconfdir}/hostname
+	fi
 fi
 
 %triggerin -- %{name} < 239
@@ -1234,23 +1181,23 @@ fi
 # Remove spurious /etc/fstab entries from very old installations
 if [ -e /etc/fstab ]; then
 	grep -v -E -q '^(devpts|tmpfs|sysfs|proc)' /etc/fstab || \
-	    sed -i.rpm.bak -r '/^devpts\s+\/dev\/pts\s+devpts\s+defaults\s+/d; /^tmpfs\s+\/dev\/shm\s+tmpfs\s+defaults\s+/d; /^sysfs\s+\/sys\s+sysfs\s+defaults\s+/d; /^proc\s+\/proc\s+proc\s+defaults\s+/d' /etc/fstab || :
+		sed -i.rpm.bak -r '/^devpts\s+\/dev\/pts\s+devpts\s+defaults\s+/d; /^tmpfs\s+\/dev\/shm\s+tmpfs\s+defaults\s+/d; /^sysfs\s+\/sys\s+sysfs\s+defaults\s+/d; /^proc\s+\/proc\s+proc\s+defaults\s+/d' /etc/fstab || :
 fi
 
 # Try to read default runlevel from the old inittab if it exists
-runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
+runlevel=$(%{_bindir}/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
 if [ -z "$runlevel" ] ; then
-	target="/lib/systemd/system/graphical.target"
-    else
-	target="/lib/systemd/system/runlevel$runlevel.target"
- fi
+	target="%{systemd_libdir}/system/graphical.target"
+else
+	target="%{systemd_libdir}/system/runlevel$runlevel.target"
+fi
 
 # And symlink what we found to the new-style default.target
-/bin/ln -sf "$target" %{_sysconfdir}/systemd/system/default.target 2>&1 || :
+ln -sf "$target" %{_sysconfdir}/systemd/system/default.target 2>&1 || :
 
 %triggerin -- %{libnss_myhostname} < 237
 if [ -f /etc/nsswitch.conf ]; then
-# sed-fu to add myhostanme to hosts line
+# sed-fu to add myhostname to hosts line
 	grep -v -E -q '^hosts:.* myhostname' /etc/nsswitch.conf &&
 	sed -i.bak -e '
 		/^hosts:/ !b
@@ -1299,9 +1246,9 @@ fi
 %sysusers_create_package systemd-remote.conf %{SOURCE25}
 
 %files
-%dir /lib/firmware
-%dir /lib/firmware/updates
-%dir /lib/modprobe.d
+%dir %{_prefix}/lib/firmware
+%dir %{_prefix}/lib/firmware/updates
+%dir %{_prefix}/lib/modprobe.d
 %dir %{_datadir}/factory
 %dir %{_datadir}/factory/etc
 %dir %{_datadir}/factory/etc/pam.d
@@ -1312,9 +1259,7 @@ fi
 %dir %{_prefix}/lib/sysctl.d
 %dir %{_prefix}/lib/kernel
 %dir %{_prefix}/lib/kernel/install.d
-%dir %{_prefix}/lib/%{name}
 %dir %{_prefix}/lib/%{name}/catalog
-%dir %{_prefix}/lib/%{name}/system-generators
 %dir %{_prefix}/lib/%{name}/user
 %dir %{_prefix}/lib/%{name}/user-preset
 %dir %{_prefix}/lib/%{name}/user-generators
@@ -1339,7 +1284,6 @@ fi
 %dir %{_sysconfdir}/udev/agents.d/usb
 %dir %{_sysconfdir}/udev/rules.d
 %dir %{systemd_libdir}
-#dir %{systemd_libdir}/*-generators
 %dir %{systemd_libdir}/system
 %dir %{systemd_libdir}/system-preset
 %dir %{systemd_libdir}/system-shutdown
@@ -1367,7 +1311,7 @@ fi
 %dir %{systemd_libdir}/system/kexec.target.wants
 %dir %{systemd_libdir}/system/poweroff.target.wants
 %dir %{systemd_libdir}/system/reboot.target.wants
-%dir %{systemd_libdir}/systemsound.target.wants
+%dir %{systemd_libdir}/system/sound.target.wants
 %dir %{systemd_libdir}/system/system-update.target.wants
 %dir %{systemd_libdir}/system/timers.target.wants
 %dir %{systemd_libdir}/system/machines.target.wants
@@ -1386,9 +1330,9 @@ fi
 %ghost %config(noreplace) %{_sysconfdir}/timezone
 %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf
 %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
-%doc /lib/modprobe.d/README
-%doc /lib/udev/hwdb.d/README
-%doc /lib/udev/rules.d/README
+%doc %{_prefix}/lib/modprobe.d/README
+%doc %{_prefix}/lib/udev/hwdb.d/README
+%doc %{_prefix}/lib/udev/rules.d/README
 %doc %{_prefix}/lib/sysctl.d/README
 %doc %{_prefix}/lib/sysusers.d/README
 %doc %{_prefix}/lib/tmpfiles.d/README
@@ -1398,43 +1342,38 @@ fi
 %{_datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf
 %{_datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf
 %{_datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf
+%{_datadir}/polkit-1/actions/org.freedesktop.timesync1.policy
 %{_prefix}/lib/%{name}/user-generators/systemd-xdg-autostart-generator
-/%{_lib}/security/pam_systemd.so
-/bin/halt
-/bin/journalctl
-/bin/loginctl
-/bin/poweroff
-/bin/reboot
-/bin/systemctl
-/bin/%{name}
-/bin/%{name}-ask-password
-/bin/%{name}-escape
-/bin/%{name}-firstboot
-/bin/%{name}-inhibit
-/bin/%{name}-machine-id-setup
-/bin/%{name}-notify
-/bin/%{name}-sysusers
-/bin/%{name}-tmpfiles
-/bin/%{name}-tty-ask-password-agent
-/bin/udevadm
-/bin/userdbctl
-/sbin/init
-/sbin/resolvconf
-/sbin/runlevel
-/sbin/shutdown
-/sbin/telinit
-/sbin/halt
-/sbin/poweroff
-/sbin/reboot
+%{_libdir}/security/pam_systemd.so
+%{_bindir}/halt
+%{_bindir}/journalctl
+%{_bindir}/loginctl
+%{_bindir}/poweroff
+%{_bindir}/reboot
+%{_bindir}/systemctl
+%{_bindir}/%{name}-ask-password
+%{_bindir}/%{name}-escape
+%{_bindir}/%{name}-firstboot
+%{_bindir}/%{name}-inhibit
+%{_bindir}/%{name}-machine-id-setup
+%{_bindir}/%{name}-notify
+%{_bindir}/%{name}-sysusers
+%{_bindir}/%{name}-tmpfiles
+%{_bindir}/%{name}-tty-ask-password-agent
+%{_bindir}/%{name}-creds
+%{_bindir}/userdbctl
+%{_bindir}/init
+%{_bindir}/resolvconf
+%{_bindir}/runlevel
+%{_bindir}/shutdown
+%{_bindir}/telinit
 %{_bindir}/busctl
 %{_bindir}/hostnamectl
 %{_bindir}/kernel-install
 %{_bindir}/localectl
-%{_bindir}/systemctl
 %{_bindir}/systemd-cat
 %{_bindir}/systemd-detect-virt
 %{_bindir}/systemd-dissect
-%{_bindir}/systemd-escape
 %{_bindir}/systemd-id128
 %{_bindir}/systemd-loginctl
 %{_bindir}/systemd-mount
@@ -1456,13 +1395,13 @@ fi
 %{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service
 %{_datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf
 %{_datadir}/factory/etc/nsswitch.conf
+%{_datadir}/factory/etc/locale.conf
 %{_datadir}/factory/etc/pam.d/other
 %{_datadir}/factory/etc/pam.d/system-auth
 %{_datadir}/%{name}/kbd-model-map
 %{_datadir}/%{name}/language-fallback-map
 %{_initrddir}/README
-%{_logdir}/README
-/lib/modprobe.d/systemd.conf
+%{_prefix}/lib/modprobe.d/systemd.conf
 %{_prefix}/lib/kernel/install.d/*.install
 %{_prefix}/lib/environment.d/99-environment.conf
 %{_prefix}/lib/%{name}/user-preset/*.preset
@@ -1754,7 +1693,8 @@ fi
 %{systemd_libdir}/systemd-volatile-root
 %{systemd_libdir}/systemd-xdg-autostart-condition
 %{systemd_libdir}/resolv.conf
-# (tpg) internal library - only systemd uses it
+# (tpg) internal libraries - only systemd uses them
+%{systemd_libdir}/libsystemd-core-%{major}.so
 %{systemd_libdir}/libsystemd-shared-%{major}.so
 #
 %{udev_rules_dir}/10-imx.rules
@@ -1768,6 +1708,7 @@ fi
 %{udev_rules_dir}/60-serial.rules
 %{udev_rules_dir}/64-btrfs.rules
 %{udev_rules_dir}/69-printeracl.rules
+%{udev_rules_dir}/70-camera.rules
 %{udev_rules_dir}/70-power-switch.rules
 %{udev_rules_dir}/70-uaccess.rules
 %{udev_rules_dir}/71-seat.rules
@@ -1778,12 +1719,10 @@ fi
 %{udev_rules_dir}/81-net-dhcp.rules
 %{udev_rules_dir}/99-systemd.rules
 %attr(02755,root,systemd-journal) %dir %{_logdir}/journal
-/sbin/udevadm
-/sbin/udevd
+%{_bindir}/udevd
 %{_bindir}/udevadm
-%{_sbindir}/udevadm
-/lib/udev/dmi_memory_id
-/lib/udev/rules.d/70-memory.rules
+%{_prefix}/lib/udev/dmi_memory_id
+%{_prefix}/lib/udev/rules.d/70-memory.rules
 %attr(0755,root,root) %{udev_libdir}/ata_id
 %attr(0755,root,root) %{udev_libdir}/fido_id
 %attr(0755,root,root) %{udev_libdir}/scsi_id
@@ -1794,8 +1733,12 @@ fi
 %config(noreplace) %{_prefix}/lib/sysctl.d/50-pid-max.conf
 %endif
 %config(noreplace) %{_prefix}/lib/sysusers.d/basic.conf
-%config(noreplace) %{_prefix}/lib/sysusers.d/systemd.conf
 %config(noreplace) %{_prefix}/lib/sysusers.d/systemd-remote.conf
+%config(noreplace) %{_prefix}/lib/sysusers.d/systemd-coredump.conf
+%config(noreplace) %{_prefix}/lib/sysusers.d/systemd-journal.conf
+%config(noreplace) %{_prefix}/lib/sysusers.d/systemd-network.conf
+%config(noreplace) %{_prefix}/lib/sysusers.d/systemd-resolve.conf
+%config(noreplace) %{_prefix}/lib/sysusers.d/systemd-timesync.conf
 %config(noreplace) %{_sysconfdir}/pam.d/systemd-user
 %config(noreplace) %{_sysconfdir}/rsyslog.d/listen.conf
 %config(noreplace) %{_sysconfdir}/sysconfig/udev
@@ -1815,29 +1758,80 @@ fi
 # This takes care of interface renaming etc. -- it is NOT for networkd
 %dir %{systemd_libdir}/network
 %{systemd_libdir}/network/99-default.link
+# New in -250, need to verify if this needs to go to subpackages
+%{systemd_libdir}/system/factory-reset.target
+%{systemd_libdir}/system/systemd-boot-update.service
+%{systemd_libdir}/systemd-update-helper
+%{_prefix}/lib/kernel/install.conf
+%{_datadir}/dbus-1/interfaces/org.freedesktop.LogControl1.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.home1.Home.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.home1.Manager.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.import1.Manager.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.import1.Transfer.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.login1.Manager.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.login1.Seat.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.login1.Session.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.login1.User.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.machine1.Image.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.machine1.Machine.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.machine1.Manager.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.network1.DHCPServer.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.network1.Link.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.network1.Manager.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.network1.Network.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.oom1.Manager.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.portable1.Image.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.portable1.Manager.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.resolve1.DnssdService.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.resolve1.Link.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.resolve1.Manager.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Automount.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Device.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Job.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Manager.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Mount.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Path.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Scope.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Service.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Slice.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Socket.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Swap.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Target.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Timer.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Unit.xml
+%{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml
 
 %files sysext
-/bin/systemd-sysext
+%{_bindir}/systemd-sysext
 %{systemd_libdir}/system/systemd-sysext.service
 
 %files repart
-/bin/systemd-repart
+%{_bindir}/systemd-repart
 %{systemd_libdir}/system/systemd-repart.service
 %{systemd_libdir}/system/initrd-root-fs.target.wants/systemd-repart.service
 %{systemd_libdir}/system/sysinit.target.wants/systemd-repart.service
 
 %files homed
-/bin/homectl
+%{_bindir}/homectl
 %config(noreplace) %{_sysconfdir}/systemd/homed.conf
 %{systemd_libdir}/system/systemd-homed-activate.service
 %{systemd_libdir}/system/systemd-homed.service
 %{systemd_libdir}/systemd-homed
 %{systemd_libdir}/systemd-homework
-/%{_lib}/security/pam_systemd_home.so
+%{_libdir}/security/pam_systemd_home.so
 %{_datadir}/dbus-1/system-services/org.freedesktop.home1.service
 %{_datadir}/dbus-1/system.d/org.freedesktop.home1.conf
 %{_datadir}/polkit-1/actions/org.freedesktop.home1.policy
 
+%files integritysetup
+%{systemd_libdir}/system-generators/systemd-integritysetup-generator
+%{systemd_libdir}/system/sysinit.target.wants/integritysetup.target
+%{systemd_libdir}/systemd-integritysetup
+%{systemd_libdir}/system/integritysetup.target
+%{systemd_libdir}/system/integritysetup-pre.target
+
 %files portable
 %dir %{systemd_libdir}/portable
 %{_datadir}/dbus-1/system.d/org.freedesktop.portable1.conf
@@ -1848,7 +1842,7 @@ fi
 %{systemd_libdir}/systemd-portabled
 %{_datadir}/polkit-1/actions/org.freedesktop.portable1.policy
 %{_prefix}/lib/tmpfiles.d/portables.conf
-/bin/portablectl
+%{_bindir}/portablectl
 
 %files journal-remote
 %config(noreplace) %{_sysconfdir}/%{name}/journal-remote.conf
@@ -1882,7 +1876,7 @@ fi
 %{systemd_libdir}/systemd-pull
 %{systemd_libdir}/import-pubring.gpg
 %dir %{_sysconfdir}/%{name}/nspawn
-/bin/machinectl
+%{_bindir}/machinectl
 %{_bindir}/systemd-nspawn
 %{_prefix}/lib/tmpfiles.d/systemd-nspawn.conf
 %{_datadir}/dbus-1/system-services/org.freedesktop.import1.service
@@ -1893,19 +1887,19 @@ fi
 %{_datadir}/polkit-1/actions/org.freedesktop.machine1.policy
 
 %files -n %{libnss_mymachines}
-/%{_lib}/libnss_mymachines.so.%{libnss_major}
+%{_libdir}/libnss_mymachines.so.%{libnss_major}
 
 %files -n %{libnss_myhostname}
-/%{_lib}/libnss_myhostname.so.%{libnss_major}*
+%{_libdir}/libnss_myhostname.so.%{libnss_major}*
 
 %files -n %{libnss_resolve}
-/%{_lib}/libnss_resolve.so.%{libnss_major}
+%{_libdir}/libnss_resolve.so.%{libnss_major}
 
 %files -n %{libnss_systemd}
-/%{_lib}/libnss_systemd.so.%{libnss_major}
+%{_libdir}/libnss_systemd.so.%{libnss_major}
 
 %files -n %{libsystemd}
-/%{_lib}/libsystemd.so.%{libsystemd_major}*
+%{_libdir}/libsystemd.so.%{libsystemd_major}*
 
 %files -n %{libsystemd_devel}
 %dir %{_includedir}/%{name}
@@ -1927,10 +1921,9 @@ fi
 %{_libdir}/pkgconfig/lib%{name}.pc
 
 %files -n %{libudev}
-/%{_lib}/libudev.so.%{udev_major}*
+%{_libdir}/libudev.so.%{udev_major}*
 
 %files -n %{libudev_devel}
-/%{_lib}/libudev.so
 %{_libdir}/libudev.so
 %{_libdir}/pkgconfig/libudev.pc
 %{_datadir}/pkgconfig/udev.pc
@@ -1993,7 +1986,7 @@ fi
 %ghost %{_sysconfdir}/udev/hwdb.bin
 %{systemd_libdir}/system/sysinit.target.wants/systemd-hwdb-update.service
 %{systemd_libdir}/system/systemd-hwdb-update.service
-/bin/systemd-hwdb
+%{_bindir}/systemd-hwdb
 %{udev_libdir}/*.bin
 %{udev_libdir}/hwdb.d/*.hwdb
 %{udev_rules_dir}/60-cdrom_id.rules
@@ -2030,7 +2023,7 @@ fi
 %{systemd_libdir}/systemd-networkd
 %{systemd_libdir}/systemd-networkd-wait-online
 %{_datadir}/dbus-1/system.d/org.freedesktop.network1.conf
-/bin/networkctl
+%{_bindir}/networkctl
 %{_datadir}/dbus-1/system-services/org.freedesktop.network1.service
 %{systemd_libdir}/network/80-container-host0.network
 %{systemd_libdir}/network/80-container-ve.network
@@ -2039,12 +2032,15 @@ fi
 %{systemd_libdir}/network/80-wifi-adhoc.network
 %{systemd_libdir}/network/80-wifi-ap.network.example
 %{systemd_libdir}/network/80-wifi-station.network.example
+%{systemd_libdir}/network/80-6rd-tunnel.network
+%{systemd_libdir}/network/80-ethernet.network.example
+%{systemd_libdir}/system/systemd-networkd-wait-online@.service
 %{_datadir}/polkit-1/actions/org.freedesktop.network1.policy
 %{_datadir}/polkit-1/rules.d/systemd-networkd.rules
 
 %preun networkd
 if [ $1 -eq 0 ] ; then
-    /bin/systemctl --quiet disable systemd-networkd.service 2>&1 || :
+    %{_bindir}/systemctl --quiet disable systemd-networkd.service 2>&1 || :
 fi
 
 %if !%{with bootstrap}
@@ -2064,6 +2060,7 @@ fi
 %{systemd_libdir}/system/veritysetup-pre.target
 %{systemd_libdir}/system/veritysetup.target
 %{_bindir}/systemd-cryptenroll
+%{_libdir}/cryptsetup/libcryptsetup-token-systemd-pkcs11.so
 %endif
 
 %files zsh-completion
@@ -2078,15 +2075,16 @@ fi
 %{_rpmmacrodir}/macros.systemd
 
 %files oom
-/bin/oomctl
+%{_bindir}/oomctl
 %{_sysconfdir}/systemd/oomd.conf
 %dir %{systemd_libdir}/oomd.conf.d
 %{systemd_libdir}/oomd.conf.d/10-oomd-defaults.conf
 %{systemd_libdir}/system/-.slice.d/10-oomd-root-slice-defaults.conf
 %{systemd_libdir}/system/user@.service.d/10-oomd-user-service-defaults.conf
+%{systemd_libdir}/system/systemd-oomd.socket
 %{systemd_libdir}/system/systemd-oomd.service
-%{systemd_libdir}/system/dbus-org.freedesktop.oom1.service
 %{systemd_libdir}/systemd-oomd
+%config(noreplace) %{_prefix}/lib/sysusers.d/systemd-oom.conf
 %{_datadir}/dbus-1/system-services/org.freedesktop.oom1.service
 %{_datadir}/dbus-1/system.d/org.freedesktop.oom1.conf
 
diff --git a/triggers.systemd b/triggers.systemd
index 2d26317..3224e69 100644
--- a/triggers.systemd
+++ b/triggers.systemd
@@ -1,5 +1,5 @@
 #  -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #  Copyright © 2018 Neal Gompa
@@ -8,90 +8,81 @@
 #
 # Minimum rpm version supported: 4.14.0
 
-%transfiletriggerin -P 900900 -p <lua> -- /lib/systemd/system /etc/systemd/system
+%transfiletriggerin -P 900900 -p <lua> -- /usr/lib/systemd/system /etc/systemd/system
 -- This script will run after any package is initially installed or
 -- upgraded. We care about the case where a package is initially
 -- installed, because other cases are covered by the *un scriptlets,
 -- so sometimes we will reload needlessly.
+pid = posix.fork()
+if pid == 0 then
+    assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "system-reload-restart"))
+elseif pid > 0 then
+    posix.wait(pid)
+end
 
-if posix.access("/run/systemd/system") then
-    pid = posix.fork()
-    if pid == 0 then
-	assert(posix.exec("/bin/systemctl", "daemon-reload"))
-    elseif pid > 0 then
-	posix.wait(pid)
-    end
-
-    pid = posix.fork()
-    if pid == 0 then
-	assert(posix.exec("/bin/systemctl", "reload-or-restart", "--marked"))
-    elseif pid > 0 then
-	posix.wait(pid)
-    end
+%transfiletriggerin -P 900899 -p <lua> -- /usr/lib/systemd/user /etc/systemd/user
+pid = posix.fork()
+if pid == 0 then
+    assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "user-reload-restart"))
+elseif pid > 0 then
+    posix.wait(pid)
 end
 
-%transfiletriggerpostun -P 1000100 -p <lua> -- /lib/systemd/system /etc/systemd/system
+%transfiletriggerpostun -P 1000100 -p <lua> -- /usr/lib/systemd/system /etc/systemd/system
 -- On removal, we need to run daemon-reload after any units have been
 -- removed.
 -- On upgrade, we need to run daemon-reload after any new unit files
 -- have been installed, but before %postun scripts in packages get
 -- executed.
-if posix.access("/run/systemd/system") then
-    pid = posix.fork()
-    if pid == 0 then
-	assert(posix.exec("/bin/systemctl", "daemon-reload"))
-    elseif pid > 0 then
-	posix.wait(pid)
-    end
+pid = posix.fork()
+if pid == 0 then
+    assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "system-reload"))
+elseif pid > 0 then
+    posix.wait(pid)
 end
 
-%transfiletriggerpostun -P 10000 -p <lua> -- /lib/systemd/system /etc/systemd/system
--- We restart remaining services that should be restarted here.
-if posix.access("/run/systemd/system") then
-    pid = posix.fork()
-    if pid == 0 then
-        assert(posix.exec("%{_bindir}/systemctl", "reload-or-restart", "--marked"))
-    elseif pid > 0 then
-        posix.wait(pid)
-    end
+%transfiletriggerpostun -P 1000100 -p <lua> -- /usr/lib/systemd/system /etc/systemd/system
+-- Execute daemon-reload in user managers.
+pid = posix.fork()
+if pid == 0 then
+    assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "user-reload"))
+elseif pid > 0 then
+    posix.wait(pid)
+end
+
+%transfiletriggerpostun -P 10000 -p <lua> -- /usr/lib/systemd/system /etc/systemd/system
+-- We restart remaining system services that should be restarted here.
+pid = posix.fork()
+if pid == 0 then
+    assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "system-restart"))
+elseif pid > 0 then
+    posix.wait(pid)
+end
+
+%transfiletriggerpostun -P 9999 -p <lua> -- /usr/lib/systemd/user /etc/systemd/user
+-- We restart remaining user services that should be restarted here.
+pid = posix.fork()
+if pid == 0 then
+    assert(posix.exec("/usr/lib/systemd/systemd-update-helper", "user-restart"))
+elseif pid > 0 then
+    posix.wait(pid)
 end
 
 %transfiletriggerin -P 100700 -p <lua> -- /usr/lib/sysusers.d
 -- This script will process files installed in /usr/lib/sysusers.d to create
 -- specified users automatically. The priority is set such that it
 -- will run before the tmpfiles file trigger.
-if posix.access("/run/systemd/system") then
-    pid = posix.fork()
-    if pid == 0 then
-	assert(posix.exec("/bin/systemd-sysusers"))
-    elseif pid > 0 then
-	posix.wait(pid)
-    end
-end
+assert(rpm.execute("systemd-sysusers"))
 
-%transfiletriggerin hwdb -P 1000700 -p <lua> -- /lib/udev/hwdb.d
+%transfiletriggerin -P 1000700 -p <lua> -- /usr/lib/udev/hwdb.d
 -- This script will automatically invoke hwdb update if files have been
--- installed or updated in /lib/udev/hwdb.d.
-if posix.access("/run/systemd/system") then
-    pid = posix.fork()
-    if pid == 0 then
-	assert(posix.exec("/bin/systemd-hwdb", "update"))
-    elseif pid > 0 then
-	posix.wait(pid)
-    end
-end
+-- installed or updated in /usr/lib/udev/hwdb.d.
+assert(rpm.execute("systemd-hwdb", "update"))
 
-%transfiletriggerin locale -P 1000700 -p <lua> -- /usr/lib/systemd/catalog
+%transfiletriggerin -P 1000700 -p <lua> -- /usr/lib/systemd/catalog
 -- This script will automatically invoke journal catalog update if files
 -- have been installed or updated in /usr/lib/systemd/catalog.
-if posix.access("/run/systemd/system") then
-    pid = posix.fork()
-    if pid == 0 then
-	assert(posix.exec("/bin/journalctl", "--update-catalog"))
-    elseif pid > 0 then
-	posix.wait(pid)
-    end
-end
+assert(rpm.execute("journalctl", "--update-catalog"))
 
 %transfiletriggerin -P 1000700 -p <lua> -- /usr/lib/binfmt.d
 -- This script will automatically apply binfmt rules if files have been
@@ -99,9 +90,9 @@ end
 if posix.access("/run/systemd/system") then
     pid = posix.fork()
     if pid == 0 then
-	assert(posix.exec("/lib/systemd/systemd-binfmt"))
+        assert(posix.exec("/usr/lib/systemd/systemd-binfmt"))
     elseif pid > 0 then
-	posix.wait(pid)
+        posix.wait(pid)
     end
 end
 
@@ -110,24 +101,14 @@ end
 -- tmpfiles automatically. The priority is set such that it will run
 -- after the sysusers file trigger, but before any other triggers.
 if posix.access("/run/systemd/system") then
-    pid = posix.fork()
-    if pid == 0 then
-	assert(posix.exec("/bin/systemd-tmpfiles", "--create"))
-    elseif pid > 0 then
-	posix.wait(pid)
-    end
+    assert(rpm.execute("systemd-tmpfiles", "--create"))
 end
 
-%transfiletriggerin -P 1000600 -p <lua> -- /lib/udev/rules.d
+%transfiletriggerin -P 1000600 -p <lua> -- /usr/lib/udev/rules.d
 -- This script will automatically update udev with new rules if files
--- have been installed or updated in /lib/udev/rules.d and /etc/udev/rules.d.
-if posix.access("/run/systemd/system") then
-    pid = posix.fork()
-    if pid == 0 then
-	assert(posix.exec("/sbin/udevadm", "control", "--reload"))
-    elseif pid > 0 then
-	posix.wait(pid)
-    end
+-- have been installed or updated in /usr/lib/udev/rules.d.
+if posix.access("/run/udev/control") then
+    assert(rpm.execute("udevadm", "control", "--reload"))
 end
 
 %transfiletriggerin -P 1000500 -p <lua> -- /usr/lib/sysctl.d
@@ -136,8 +117,8 @@ end
 if posix.access("/run/systemd/system") then
     pid = posix.fork()
     if pid == 0 then
-	assert(posix.exec("/lib/systemd/systemd-sysctl"))
+        assert(posix.exec("/usr/lib/systemd/systemd-sysctl"))
     elseif pid > 0 then
-	posix.wait(pid)
+        posix.wait(pid)
     end
 end
Not Available

benbullard79 [@T] cox.netNo Comment.567d 01hrs
benbullard79 [@T] cox.netNo Comment.566d 23hrs