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

Re: [PATCH] systemd: default system-sleep dir without pkg-config


  • To: Mykola Kvach <xakep.amatop@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 5 Dec 2025 15:05:15 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yGAjyj6tt0na3EhHIgXsFnrJrm/rdwBQBTX7GA5403M=; b=lj6b4ckPVjdydUFyyZ8Ta1N6+rdKJNKdhrvMEC7d2cvsdX//d5ukijHei3Q9Jz3SCI2wCEHIyUieUoFAadBIPQCX/8RDsw+L9LYm7WDILzFx8MCaeP7cAI/P0l3ovxknzE5BmrUzawOBC7JCL6JEJeHB3/N/Y/SOfhtYVnAm8BoXlmBTbfCAnSOFmSuesjYJ8AQQbQSg/KUB/sZR49867CrY/ey3LpDdRgW5tflPDniuejJ3hoZM2AUlY2MhPH/89O4pEELnzbyuD0VzDh9SxEjfHIgYvs6iCKEtj6Oz8QWBZ8fDbbod2yuOf53xtdfvwygg5SxDD1kVOigJtQwn+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=If7S0Kson7x33p/70fTIHs45SDHBBovz7Fwf+peFsmeJer0IP914KlOr0Xy/rOiinsyBeB09TgoGu84H78oFVmriv4++AedLW5vnTSRXhu6seDoPppON2LXdST+rZHhMw49T/a4NWGMaklid2raYLXEv81dkI5S3om/W8vESCe/JpI5lpG+16E2IuqQidtuzK1lL2VmanqNp2cPk4NmmL7a9+9dMq8nBP1D2YzMW8ohZnX6oE+M9/VooPlbH0AjOYK7ezbeGMuqZU0bV1C/NETJ094x+EcRioKYA6aGWaizDSby3jL+/L89Njl4MXkHnWTjf0P4+CMgldhjwc1sv/g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: andrew.cooper3@xxxxxxxxxx, Mykola Kvach <mykola_kvach@xxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 05 Dec 2025 15:05:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 05/12/2025 1:13 pm, Mykola Kvach wrote:
> From: Mykola Kvach <mykola_kvach@xxxxxxxx>
>
> 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@xxxxxxxxxxxxxxxxxxxxxx>
> 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..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



 


Rackspace

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