* [PATCH] systemd: default system-sleep dir without pkg-config
@ 2025-12-05 13:13 Mykola Kvach
2025-12-05 13:57 ` Marek Marczykowski-Górecki
2025-12-05 15:05 ` Andrew Cooper
0 siblings, 2 replies; 7+ messages in thread
From: Mykola Kvach @ 2025-12-05 13:13 UTC (permalink / raw)
To: xen-devel; +Cc: Mykola Kvach, Anthony PERARD, Marek Marczykowski-Górecki
From: Mykola Kvach <mykola_kvach@epam.com>
Using PKG_CHECK_VAR() to obtain SYSTEMD_SLEEP_DIR reintroduced a build-time
dependency on systemd-devel. This breaks --enable-systemd builds that only
need the initscripts.
Use the same defaulting scheme as other systemd paths: if SYSTEMD_SLEEP_DIR
isn't provided, set it to "$(prefix)/lib/systemd/system-sleep/".
Fixes: e54a6cd6a1f3 ("systemd: Add hooks to stop/start xen-watchdog on suspend/resume")
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
---
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..ee684d3391 100644
--- a/m4/systemd.m4
+++ b/m4/systemd.m4
@@ -77,7 +77,7 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [
], [])
AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [
- PKG_CHECK_VAR([SYSTEMD_SLEEP_DIR], [systemd], [systemdsleepdir])
+ SYSTEMD_SLEEP_DIR="\$(prefix)/lib/systemd/system-sleep/"
], [])
AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] systemd: default system-sleep dir without pkg-config 2025-12-05 13:13 [PATCH] systemd: default system-sleep dir without pkg-config Mykola Kvach @ 2025-12-05 13:57 ` Marek Marczykowski-Górecki 2025-12-05 14:54 ` Mykola Kvach 2025-12-05 15:05 ` Andrew Cooper 1 sibling, 1 reply; 7+ messages in thread From: Marek Marczykowski-Górecki @ 2025-12-05 13:57 UTC (permalink / raw) To: Mykola Kvach; +Cc: xen-devel, Mykola Kvach, Anthony PERARD [-- Attachment #1: Type: text/plain, Size: 1864 bytes --] On Fri, Dec 05, 2025 at 03:13:32PM +0200, Mykola Kvach wrote: > From: Mykola Kvach <mykola_kvach@epam.com> > > Using PKG_CHECK_VAR() to obtain SYSTEMD_SLEEP_DIR reintroduced a build-time > dependency on systemd-devel. This breaks --enable-systemd builds that only > need the initscripts. > > Use the same defaulting scheme as other systemd paths: if SYSTEMD_SLEEP_DIR > isn't provided, set it to "$(prefix)/lib/systemd/system-sleep/". > > Fixes: e54a6cd6a1f3 ("systemd: Add hooks to stop/start xen-watchdog on suspend/resume") > Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> > Signed-off-by: Mykola Kvach <mykola_kvach@epam.com> > --- > Build in which the regression was detected: > https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/10959608099 Requires re-running autoconf, otherwise still fails: https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/12336879267 With autoconf: https://gitlab.com/xen-project/people/marmarek/xen/-/pipelines/2198372475 It's better now, so: Reviewed-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> But unconditional --enable-systemd uncovered other issues (not related to the configure change). > --- > m4/systemd.m4 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/m4/systemd.m4 b/m4/systemd.m4 > index c47a25ef93..ee684d3391 100644 > --- a/m4/systemd.m4 > +++ b/m4/systemd.m4 > @@ -77,7 +77,7 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ > ], []) > > AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [ > - PKG_CHECK_VAR([SYSTEMD_SLEEP_DIR], [systemd], [systemdsleepdir]) > + SYSTEMD_SLEEP_DIR="\$(prefix)/lib/systemd/system-sleep/" > ], []) > > AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [ > -- > 2.43.0 > -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] systemd: default system-sleep dir without pkg-config 2025-12-05 13:57 ` Marek Marczykowski-Górecki @ 2025-12-05 14:54 ` Mykola Kvach 2025-12-05 14:57 ` Andrew Cooper 0 siblings, 1 reply; 7+ messages in thread From: Mykola Kvach @ 2025-12-05 14:54 UTC (permalink / raw) To: Marek Marczykowski-Górecki; +Cc: xen-devel, Mykola Kvach, Anthony PERARD Hi, On Fri, Dec 5, 2025 at 3:57 PM Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> wrote: > > On Fri, Dec 05, 2025 at 03:13:32PM +0200, Mykola Kvach wrote: > > From: Mykola Kvach <mykola_kvach@epam.com> > > > > Using PKG_CHECK_VAR() to obtain SYSTEMD_SLEEP_DIR reintroduced a build-time > > dependency on systemd-devel. This breaks --enable-systemd builds that only > > need the initscripts. > > > > Use the same defaulting scheme as other systemd paths: if SYSTEMD_SLEEP_DIR > > isn't provided, set it to "$(prefix)/lib/systemd/system-sleep/". > > > > Fixes: e54a6cd6a1f3 ("systemd: Add hooks to stop/start xen-watchdog on suspend/resume") > > Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> > > Signed-off-by: Mykola Kvach <mykola_kvach@epam.com> > > --- > > Build in which the regression was detected: > > https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/10959608099 > > Requires re-running autoconf, otherwise still fails: Thanks for the note. I had assumed the Autoconf-generated files were refreshed during release or at merge time, since this updates generated artifacts. If the expectation is that contributors regenerate and include them with the patch, I will add the updated Autoconf outputs in the next revision of this series. > > https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/12336879267 > > With autoconf: > https://gitlab.com/xen-project/people/marmarek/xen/-/pipelines/2198372475 > > It's better now, so: > Reviewed-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Thanks, for the review and for testing both with and without Autoconf regeneration. > > But unconditional --enable-systemd uncovered other issues (not related > to the configure change). > > > > --- > > m4/systemd.m4 | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/m4/systemd.m4 b/m4/systemd.m4 > > index c47a25ef93..ee684d3391 100644 > > --- a/m4/systemd.m4 > > +++ b/m4/systemd.m4 > > @@ -77,7 +77,7 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ > > ], []) > > > > AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [ > > - PKG_CHECK_VAR([SYSTEMD_SLEEP_DIR], [systemd], [systemdsleepdir]) > > + SYSTEMD_SLEEP_DIR="\$(prefix)/lib/systemd/system-sleep/" > > ], []) > > > > AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [ > > -- > > 2.43.0 > > > > -- > Best Regards, > Marek Marczykowski-Górecki > Invisible Things Lab Best regards, Mykola ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] systemd: default system-sleep dir without pkg-config 2025-12-05 14:54 ` Mykola Kvach @ 2025-12-05 14:57 ` Andrew Cooper 2025-12-05 16:16 ` Mykola Kvach 0 siblings, 1 reply; 7+ messages in thread From: Andrew Cooper @ 2025-12-05 14:57 UTC (permalink / raw) To: Mykola Kvach, Marek Marczykowski-Górecki Cc: andrew.cooper3, xen-devel, Mykola Kvach, Anthony PERARD On 05/12/2025 2:54 pm, Mykola Kvach wrote: > Hi, > > On Fri, Dec 5, 2025 at 3:57 PM Marek Marczykowski-Górecki > <marmarek@invisiblethingslab.com> wrote: >> On Fri, Dec 05, 2025 at 03:13:32PM +0200, Mykola Kvach wrote: >>> From: Mykola Kvach <mykola_kvach@epam.com> >>> >>> Using PKG_CHECK_VAR() to obtain SYSTEMD_SLEEP_DIR reintroduced a build-time >>> dependency on systemd-devel. This breaks --enable-systemd builds that only >>> need the initscripts. >>> >>> Use the same defaulting scheme as other systemd paths: if SYSTEMD_SLEEP_DIR >>> isn't provided, set it to "$(prefix)/lib/systemd/system-sleep/". >>> >>> Fixes: e54a6cd6a1f3 ("systemd: Add hooks to stop/start xen-watchdog on suspend/resume") >>> Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> >>> Signed-off-by: Mykola Kvach <mykola_kvach@epam.com> >>> --- >>> Build in which the regression was detected: >>> https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/10959608099 >> Requires re-running autoconf, otherwise still fails: > Thanks for the note. I had assumed the Autoconf-generated files were refreshed > during release or at merge time, since this updates generated artifacts. If the > expectation is that contributors regenerate and include them with the patch, > I will add the updated Autoconf outputs in the next revision of this series. We regenerate on commit, but that still needs a reminder to remember to do so. > >> https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/12336879267 >> >> With autoconf: >> https://gitlab.com/xen-project/people/marmarek/xen/-/pipelines/2198372475 >> >> It's better now, so: >> Reviewed-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Thanks for the quick turnaround. I'll queue this shortly. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] systemd: default system-sleep dir without pkg-config 2025-12-05 14:57 ` Andrew Cooper @ 2025-12-05 16:16 ` Mykola Kvach 0 siblings, 0 replies; 7+ messages in thread From: Mykola Kvach @ 2025-12-05 16:16 UTC (permalink / raw) To: Andrew Cooper Cc: Marek Marczykowski-Górecki, xen-devel, Mykola Kvach, Anthony PERARD Hi, Thanks for the review. On Fri, Dec 5, 2025 at 4:57 PM Andrew Cooper <andrew.cooper3@citrix.com> wrote: > > On 05/12/2025 2:54 pm, Mykola Kvach wrote: > > Hi, > > > > On Fri, Dec 5, 2025 at 3:57 PM Marek Marczykowski-Górecki > > <marmarek@invisiblethingslab.com> wrote: > >> On Fri, Dec 05, 2025 at 03:13:32PM +0200, Mykola Kvach wrote: > >>> From: Mykola Kvach <mykola_kvach@epam.com> > >>> > >>> Using PKG_CHECK_VAR() to obtain SYSTEMD_SLEEP_DIR reintroduced a build-time > >>> dependency on systemd-devel. This breaks --enable-systemd builds that only > >>> need the initscripts. > >>> > >>> Use the same defaulting scheme as other systemd paths: if SYSTEMD_SLEEP_DIR > >>> isn't provided, set it to "$(prefix)/lib/systemd/system-sleep/". > >>> > >>> Fixes: e54a6cd6a1f3 ("systemd: Add hooks to stop/start xen-watchdog on suspend/resume") > >>> Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> > >>> Signed-off-by: Mykola Kvach <mykola_kvach@epam.com> > >>> --- > >>> Build in which the regression was detected: > >>> https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/10959608099 > >> Requires re-running autoconf, otherwise still fails: > > Thanks for the note. I had assumed the Autoconf-generated files were refreshed > > during release or at merge time, since this updates generated artifacts. If the > > expectation is that contributors regenerate and include them with the patch, > > I will add the updated Autoconf outputs in the next revision of this series. > > We regenerate on commit, but that still needs a reminder to remember to > do so. Got it, thanks for the clarification. > > > > >> https://gitlab.com/xen-project/people/marmarek/xen/-/jobs/12336879267 > >> > >> With autoconf: > >> https://gitlab.com/xen-project/people/marmarek/xen/-/pipelines/2198372475 > >> > >> It's better now, so: > >> Reviewed-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> > > Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> > > Thanks for the quick turnaround. I'll queue this shortly. Best regards, Mykola ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] systemd: default system-sleep dir without pkg-config 2025-12-05 13:13 [PATCH] systemd: default system-sleep dir without pkg-config Mykola Kvach 2025-12-05 13:57 ` Marek Marczykowski-Górecki @ 2025-12-05 15:05 ` Andrew Cooper 2025-12-05 15:27 ` Mykola Kvach 1 sibling, 1 reply; 7+ messages in thread From: Andrew Cooper @ 2025-12-05 15:05 UTC (permalink / raw) To: Mykola Kvach, xen-devel Cc: andrew.cooper3, Mykola Kvach, Anthony PERARD, Marek Marczykowski-Górecki On 05/12/2025 1:13 pm, Mykola Kvach wrote: > From: Mykola Kvach <mykola_kvach@epam.com> > > Using PKG_CHECK_VAR() to obtain SYSTEMD_SLEEP_DIR reintroduced a build-time > dependency on systemd-devel. This breaks --enable-systemd builds that only > need the initscripts. > > Use the same defaulting scheme as other systemd paths: if SYSTEMD_SLEEP_DIR > isn't provided, set it to "$(prefix)/lib/systemd/system-sleep/". > > Fixes: e54a6cd6a1f3 ("systemd: Add hooks to stop/start xen-watchdog on suspend/resume") > Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> > Signed-off-by: Mykola Kvach <mykola_kvach@epam.com> > --- > 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..ee684d3391 100644 > --- a/m4/systemd.m4 > +++ b/m4/systemd.m4 > @@ -77,7 +77,7 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ > ], []) > > AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [ > - PKG_CHECK_VAR([SYSTEMD_SLEEP_DIR], [systemd], [systemdsleepdir]) > + SYSTEMD_SLEEP_DIR="\$(prefix)/lib/systemd/system-sleep/" > ], []) > > AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [ Actually on second thoughts... The build failure was hitting this second check, not the PKG_CHECK_VAR() itself. If systemd-devel is installed, we should use what it provides. So, can't we just do this: diff --git a/m4/systemd.m4 b/m4/systemd.m4 index c47a25ef9393..5fb5a7089ee3 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/" ], []) ]) ? ~Andrew ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] systemd: default system-sleep dir without pkg-config 2025-12-05 15:05 ` Andrew Cooper @ 2025-12-05 15:27 ` Mykola Kvach 0 siblings, 0 replies; 7+ messages in thread From: Mykola Kvach @ 2025-12-05 15:27 UTC (permalink / raw) To: Andrew Cooper Cc: xen-devel, Mykola Kvach, Anthony PERARD, Marek Marczykowski-Górecki Hi Andrew, On Fri, Dec 5, 2025 at 5:05 PM Andrew Cooper <andrew.cooper3@citrix.com> wrote: > > On 05/12/2025 1:13 pm, Mykola Kvach wrote: > > From: Mykola Kvach <mykola_kvach@epam.com> > > > > Using PKG_CHECK_VAR() to obtain SYSTEMD_SLEEP_DIR reintroduced a build-time > > dependency on systemd-devel. This breaks --enable-systemd builds that only > > need the initscripts. > > > > Use the same defaulting scheme as other systemd paths: if SYSTEMD_SLEEP_DIR > > isn't provided, set it to "$(prefix)/lib/systemd/system-sleep/". > > > > Fixes: e54a6cd6a1f3 ("systemd: Add hooks to stop/start xen-watchdog on suspend/resume") > > Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> > > Signed-off-by: Mykola Kvach <mykola_kvach@epam.com> > > --- > > 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..ee684d3391 100644 > > --- a/m4/systemd.m4 > > +++ b/m4/systemd.m4 > > @@ -77,7 +77,7 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ > > ], []) > > > > AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [ > > - PKG_CHECK_VAR([SYSTEMD_SLEEP_DIR], [systemd], [systemdsleepdir]) > > + SYSTEMD_SLEEP_DIR="\$(prefix)/lib/systemd/system-sleep/" > > ], []) > > > > AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [ > > Actually on second thoughts... The build failure was hitting this > second check, not the PKG_CHECK_VAR() itself. > > If systemd-devel is installed, we should use what it provides. So, > can't we just do this: > > diff --git a/m4/systemd.m4 b/m4/systemd.m4 > index c47a25ef9393..5fb5a7089ee3 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/" > ], []) > ]) > > > ? Agreed. Using the systemd-provided value when available and falling back to the default otherwise makes sense. I’ve sent v2 of this series with your proposed change. > > ~Andrew Best regards, Mykola ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-12-05 16:17 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-12-05 13:13 [PATCH] systemd: default system-sleep dir without pkg-config Mykola Kvach 2025-12-05 13:57 ` Marek Marczykowski-Górecki 2025-12-05 14:54 ` Mykola Kvach 2025-12-05 14:57 ` Andrew Cooper 2025-12-05 16:16 ` Mykola Kvach 2025-12-05 15:05 ` Andrew Cooper 2025-12-05 15:27 ` Mykola Kvach
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.