[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2] systemd: fall back to default system-sleep dir without systemd-devel



From: Mykola Kvach <mykola_kvach@xxxxxxxx>

Keep the pkg-config lookup for SYSTEMD_SLEEP_DIR, but fall back to
"$(prefix)/lib/systemd/system-sleep/" if the variable remains unset.
This avoids reintroducing a build-time dependency on systemd-devel while
still honoring the path provided by pkg-config when present.

Fixes: e54a6cd6a1f3 ("systemd: Add hooks to stop/start xen-watchdog on 
suspend/resume")
Reported-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
---
Build in which the regression was detected:
https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/10959608099
---
 m4/systemd.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/systemd.m4 b/m4/systemd.m4
index c47a25ef93..5fb5a7089e 100644
--- a/m4/systemd.m4
+++ b/m4/systemd.m4
@@ -81,7 +81,7 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [
        ], [])
 
        AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [
-           AC_MSG_ERROR([SYSTEMD_SLEEP_DIR is unset])
+           SYSTEMD_SLEEP_DIR="\$(prefix)/lib/systemd/system-sleep/"
        ], [])
 ])
 
-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.