From nobody Mon Sep 16 19:30:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1715885925; cv=none; d=zohomail.com; s=zohoarc; b=a4tBQKJ2JBZY5qoVlVABnzR7pwLW0XF6D+EA1A6VoDA4Op2EowoPmZn7j8ipJ65UcDOTsXiBYHJH1JvF4xFRep5gUWJPZmq0yxR9bO3ejwYsuE6hG1RDYibDY5v3uFDV7xGPjMUNH0EOCIlAO3CL5eSNltGv4VmvFZq4j66R7CE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715885925; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=C7RjB5NwR6WzQg0yeEc59qpmK1kkZdlkcceJ3D90NrA=; b=IJxWlRUoeVk+m4PsAkyUHaaGfFw8xug+60MQ9rtjcVjRBT7uFiZ7ktkFBeZRfyM+GJIC/okEU4SMuWNopj4Bu/HoJEj/+bdl2iFvwTbUZCRFTA1XZckmtw6sfJmvp36GjCARH//4NQau4wRG/wFXBZ/t8GpPmYU+bnoPzUcMgfA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1715885925180430.6482740917685; Thu, 16 May 2024 11:58:45 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.723570.1128523 (Exim 4.92) (envelope-from ) id 1s7gIu-0005FD-FE; Thu, 16 May 2024 18:58:12 +0000 Received: by outflank-mailman (output) from mailman id 723570.1128523; Thu, 16 May 2024 18:58:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s7gIu-0005F6-BR; Thu, 16 May 2024 18:58:12 +0000 Received: by outflank-mailman (input) for mailman id 723570; Thu, 16 May 2024 18:58:10 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s7gIs-00050W-OI for xen-devel@lists.xenproject.org; Thu, 16 May 2024 18:58:10 +0000 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [2a00:1450:4864:20::636]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3c78c0c0-13b6-11ef-b4bb-af5377834399; Thu, 16 May 2024 20:58:09 +0200 (CEST) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a59e4136010so388950866b.3 for ; Thu, 16 May 2024 11:58:09 -0700 (PDT) Received: from andrewcoop.citrite.net (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a179c7d9dsm1003072566b.132.2024.05.16.11.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 11:58:07 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3c78c0c0-13b6-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1715885888; x=1716490688; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C7RjB5NwR6WzQg0yeEc59qpmK1kkZdlkcceJ3D90NrA=; b=jFwUuVaf09yeB/Wxgxz6gjWQ4WjIW/8LCVvFirQOfKmNRj7AG52yeCGSxR8T/pJ5dE bpiX1Lm1l5kQKVVsi47S9YFpbHYC7uc9p9tOqXiAak4qOWDLFSE7Nq0bOG9T83PTiT9R hr/jyhy4Rq1NHrh9UlcbkhXs6F2om2d6TuyVw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715885888; x=1716490688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C7RjB5NwR6WzQg0yeEc59qpmK1kkZdlkcceJ3D90NrA=; b=CQBHXzas8b5fAoO6/gd0si8WjuRZhx8IV02WnCeuZhzj5p8ccGnBVfJLIP4ILT55yX eEi6Pi64o0dpi8EjsPAhQixnTVtXd9CC4dbCLZ1Bdirj9QNe/nQ7y/IQMKmrOjZl+vbc nGGUcUxa7HtYeeMhRz7n3ynoPcrqSqI9r8Oz+n27Q+SDpVGqZklYPs7PYxvbMZJShWG0 E1yaXBkDVP51y8Ck5HfkZbFvq4wsONU2KNVQP9n9cb6XSfit4U1QMPP1BcKLiomREr8B B7q6zgsw0vGC3yi5ozCiuv/WyggxwcDxr2fzpXhRFdij79Za1MpRoGPd5dt0EQkBgOq4 4tQA== X-Gm-Message-State: AOJu0YynvFIDv0l4S00KcaGN3sYP3Oz11WNsEqE/ERyWX4zpyRpjHcjS KLd2MCGUW+yNF0SWJR12LT6IjwS9dQnwjjWOvPqitJt0X2QODsJEVJ116tZK3fMAlnNQ0TvRrRy n X-Google-Smtp-Source: AGHT+IGjUYxNLa2ANB9M8W3Yq72DLYSKo/fpopvLQVj9Ov9vaL9WDbnLs5DR144E5aX43nVMPh4PcQ== X-Received: by 2002:a17:906:130f:b0:a5a:51dc:d1a with SMTP id a640c23a62f3a-a5a51dc13bdmr1026234166b.3.1715885888168; Thu, 16 May 2024 11:58:08 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Anthony PERARD , Juergen Gross , George Dunlap , Jan Beulich , Stefano Stabellini , Julien Grall , Christian Lindig , =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Subject: [PATCH v2 1/4] LICENSES: Add MIT-0 (MIT No Attribution) Date: Thu, 16 May 2024 19:58:01 +0100 Message-Id: <20240516185804.3309725-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240516185804.3309725-1-andrew.cooper3@citrix.com> References: <20240516185804.3309725-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1715885925907100005 We are about to import code licensed under MIT-0. It's compatible for us to use, so identify it as a permitted license. Signed-off-by: Andrew Cooper Acked-by: Christian Lindig Reviewed-by: Stefano Stabellini --- CC: Anthony PERARD CC: Juergen Gross CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall CC: Christian Lindig CC: Edwin T=C3=B6r=C3=B6k v2: * New --- LICENSES/MIT-0 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 LICENSES/MIT-0 diff --git a/LICENSES/MIT-0 b/LICENSES/MIT-0 new file mode 100644 index 000000000000..70fb90ee3486 --- /dev/null +++ b/LICENSES/MIT-0 @@ -0,0 +1,31 @@ +Valid-License-Identifier: MIT-0 + +SPDX-URL: https://spdx.org/licenses/MIT-0.html + +Usage-Guide: + + To use the MIT-0 License put the following SPDX tag/value pair into a + comment according to the placement guidelines in the licensing rules + documentation: + SPDX-License-Identifier: MIT-0 + +License-Text: + +MIT No Attribution + +Copyright + +Permission is hereby granted, free of charge, to any person obtaining a co= py +of this software and associated documentation files (the "Software"), to d= eal +in the Software without restriction, including without limitation the righ= ts +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FR= OM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN = THE +SOFTWARE. --=20 2.30.2 From nobody Mon Sep 16 19:30:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1715885924; cv=none; d=zohomail.com; s=zohoarc; b=XECsiEYFfIhONrfKc9ZouzR/ITo3In2IcWpOidWcP1v0C06LYLGJJLNTMSUrQP0FkjJ0Q7PoUkklrE2SJpDxy1lwGPxORf/Pf2w/8ZcTXhhBz3sqCVI7WWliYKPi27E1MFau1m9DWCctt+ATAr//6ZfWIuZnkdOYp0ouk8Ap5D0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715885924; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uqlRzkVHjotj0GkagN3hJ6XGCuDGrgNSXxfSAPXzj6I=; b=ngpoeEX2aC7CTiahttAqCYdKBQ1/3RBSsqulnacxfpR2G84fb+zTOtkNb+Mzz8gY85Mdjs7yC+GmIab4CGe8B7gzhL6UR/VbhaGhedUBWN3J44NIvq5d/9Mokj8J1tcInjJwuwO6nxbCvb6rct4XRsPH40hXNWsYM6UAeOhGbyM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1715885924576339.29638329573174; Thu, 16 May 2024 11:58:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.723571.1128533 (Exim 4.92) (envelope-from ) id 1s7gIv-0005TU-MB; Thu, 16 May 2024 18:58:13 +0000 Received: by outflank-mailman (output) from mailman id 723571.1128533; Thu, 16 May 2024 18:58:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s7gIv-0005TN-Ii; Thu, 16 May 2024 18:58:13 +0000 Received: by outflank-mailman (input) for mailman id 723571; Thu, 16 May 2024 18:58:11 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s7gIt-00050W-NV for xen-devel@lists.xenproject.org; Thu, 16 May 2024 18:58:11 +0000 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [2a00:1450:4864:20::52b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3d0a2313-13b6-11ef-b4bb-af5377834399; Thu, 16 May 2024 20:58:10 +0200 (CEST) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-574f7c0bab4so4099333a12.0 for ; Thu, 16 May 2024 11:58:10 -0700 (PDT) Received: from andrewcoop.citrite.net (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a179c7d9dsm1003072566b.132.2024.05.16.11.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 11:58:08 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3d0a2313-13b6-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1715885889; x=1716490689; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uqlRzkVHjotj0GkagN3hJ6XGCuDGrgNSXxfSAPXzj6I=; b=P38v09faVcPoIOXU4vjcHZkYpHsmilKZQQWhP2jnhW6NnDNMlke1R38WIg/DTowNfe WdRyVnFZF1I4l6tS9LreT0kIPeybnRiWrQpHha96bbcB/yJ3+n6d40xLqH4jlZdc4OdV ZgQ1+GumqmOUpc5wm7aNdDfchUpxT0LIDNPsM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715885889; x=1716490689; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uqlRzkVHjotj0GkagN3hJ6XGCuDGrgNSXxfSAPXzj6I=; b=cWbdrIiYqpFNR7kRlwErU4me4t3D3zbEzvdwmWAsYPMSTL7AmPE4gzl0lAdMFnnh3c nUyw4QDM9TV7vSuUh09aoj5uaYCwLHyWKKmDxbelRhYUDAJjsbzvNcIIiHJq5IVrAjQF v4QD+FZT+aCHgID86NsU9TZ8FqS7C1xim0ukV5i3QHBizRvjJITtFAMeqaLk1FAkpmYE 4w4noqs76Uy8tt7krInS5kE0HVVCGnlkb4jkXvUihoFfjiioa7bCWgdeRdRVNKFiO62O 1SnJ1zfpDnjt3RnCq5XkwxovgSkCdDpPiUZBinx1FeXNk5L75lStD7UJ9mEW1zmCnwcM XPgg== X-Gm-Message-State: AOJu0YytiHqm6h3IaY+CK2mbtzKPTAFN42ZstOTCq239KyCoef62dBc2 KoL8YFoy4I1ouSuu4L7UqONxrvRZC4JpfNiYRET3zEW/EUfLMN3qD4Guuu5i9QgADILzDX+2MF7 Z X-Google-Smtp-Source: AGHT+IEyWF6HXBnqO7J1kvSEwSr9tmQ4oJzGkpMwGHxblxwyZ36RhocSFZ8BIEIScVc6p5idf5CITQ== X-Received: by 2002:a17:906:da8d:b0:a5a:7a1:5da3 with SMTP id a640c23a62f3a-a5a2d09e4b4mr1964968566b.0.1715885889559; Thu, 16 May 2024 11:58:09 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Anthony PERARD , Juergen Gross , George Dunlap , Jan Beulich , Stefano Stabellini , Julien Grall , Christian Lindig , =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Subject: [PATCH v2 2/4] tools: Import standalone sd_notify() implementation from systemd Date: Thu, 16 May 2024 19:58:02 +0100 Message-Id: <20240516185804.3309725-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240516185804.3309725-1-andrew.cooper3@citrix.com> References: <20240516185804.3309725-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1715885925916100006 ... in order to avoid linking against the whole of libsystemd. Only minimal changes to the upstream copy, to function as a drop-in replacement for sd_notify() and as a header-only library. Signed-off-by: Andrew Cooper Acked-by: Christian Lindig Reviewed-by: Juergen Gross --- CC: Anthony PERARD CC: Juergen Gross CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall CC: Christian Lindig CC: Edwin T=C3=B6r=C3=B6k v2: * New --- tools/include/xen-sd-notify.h | 98 +++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 tools/include/xen-sd-notify.h diff --git a/tools/include/xen-sd-notify.h b/tools/include/xen-sd-notify.h new file mode 100644 index 000000000000..eda9d8b22d9e --- /dev/null +++ b/tools/include/xen-sd-notify.h @@ -0,0 +1,98 @@ +/* SPDX-License-Identifier: MIT-0 */ + +/* + * Implement the systemd notify protocol without external dependencies. + * Supports both readiness notification on startup and on reloading, + * according to the protocol defined at: + * https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html + * This protocol is guaranteed to be stable as per: + * https://systemd.io/PORTABILITY_AND_STABILITY/ + * + * Differences from the upstream copy: + * - Rename/rework as a drop-in replacement for systemd/sd-daemon.h + * - Only take the subset Xen cares about + * - Respect -Wdeclaration-after-statement + */ + +#ifndef XEN_SD_NOTIFY +#define XEN_SD_NOTIFY + +#include +#include +#include +#include +#include +#include + +static inline void xen_sd_closep(int *fd) { + if (!fd || *fd < 0) + return; + + close(*fd); + *fd =3D -1; +} + +static inline int xen_sd_notify(const char *message) { + union sockaddr_union { + struct sockaddr sa; + struct sockaddr_un sun; + } socket_addr =3D { + .sun.sun_family =3D AF_UNIX, + }; + size_t path_length, message_length; + ssize_t written; + const char *socket_path; + int __attribute__((cleanup(sd_closep))) fd =3D -1; + + /* Verify the argument first */ + if (!message) + return -EINVAL; + + message_length =3D strlen(message); + if (message_length =3D=3D 0) + return -EINVAL; + + /* If the variable is not set, the protocol is a noop */ + socket_path =3D getenv("NOTIFY_SOCKET"); + if (!socket_path) + return 0; /* Not set? Nothing to do */ + + /* Only AF_UNIX is supported, with path or abstract sockets */ + if (socket_path[0] !=3D '/' && socket_path[0] !=3D '@') + return -EAFNOSUPPORT; + + path_length =3D strlen(socket_path); + /* Ensure there is room for NUL byte */ + if (path_length >=3D sizeof(socket_addr.sun.sun_path)) + return -E2BIG; + + memcpy(socket_addr.sun.sun_path, socket_path, path_length); + + /* Support for abstract socket */ + if (socket_addr.sun.sun_path[0] =3D=3D '@') + socket_addr.sun.sun_path[0] =3D 0; + + fd =3D socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0); + if (fd < 0) + return -errno; + + if (connect(fd, &socket_addr.sa, offsetof(struct sockaddr_un, sun_path) = + path_length) !=3D 0) + return -errno; + + written =3D write(fd, message, message_length); + if (written !=3D (ssize_t) message_length) + return written < 0 ? -errno : -EPROTO; + + return 1; /* Notified! */ +} + +static inline int sd_notify(int unset_environment, const char *message) { + int r =3D xen_sd_notify(message); + + if (unset_environment) + unsetenv("NOTIFY_SOCKET"); + + return r; +} + +#endif /* XEN_SD_NOTIFY */ --=20 2.30.2 From nobody Mon Sep 16 19:30:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1715885928; cv=none; d=zohomail.com; s=zohoarc; b=hAvMqTrhA11blYaanrDWDgvFzCciu8DlFfAjOlE5vzMzxk5GgWxGTfhRgeZZ03owaIpOCaZo3FjD3K/csTL2yIpPGggTYIzFlrCAxftc09RJeb96m56WLdo5WhVT+95HMFOM5p1atHq8BiZgd1cABr71aWe0ApvuIU6LGQLZTvA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715885928; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BcRpXVcdvZAYil4Irc1oaRVZc77Zx6hRkAA/T1NmAPk=; b=hJyIBqasPVHSHDOs6s4Mot3NdDgy9WFvYWbYgNwqII0+o+l/o4ZZNLTFMEkEQK+Q9Nmkztl27Wq1UU25oNYcWAeN15tZMFkYsjgcsB0urAvBjMAQWHtsywtnLtjkZyLUlFGd34HERtB0hREhue00AkdN0G1BUtifDw1T7qxvZz4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1715885928196341.67008260648765; Thu, 16 May 2024 11:58:48 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.723572.1128540 (Exim 4.92) (envelope-from ) id 1s7gIv-0005Wd-WC; Thu, 16 May 2024 18:58:13 +0000 Received: by outflank-mailman (output) from mailman id 723572.1128540; Thu, 16 May 2024 18:58:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s7gIv-0005V3-Oz; Thu, 16 May 2024 18:58:13 +0000 Received: by outflank-mailman (input) for mailman id 723572; Thu, 16 May 2024 18:58:11 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s7gIt-00057x-QT for xen-devel@lists.xenproject.org; Thu, 16 May 2024 18:58:11 +0000 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [2a00:1450:4864:20::633]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 3d75aad3-13b6-11ef-909d-e314d9c70b13; Thu, 16 May 2024 20:58:10 +0200 (CEST) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a59c0a6415fso373774066b.1 for ; Thu, 16 May 2024 11:58:10 -0700 (PDT) Received: from andrewcoop.citrite.net (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a179c7d9dsm1003072566b.132.2024.05.16.11.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 11:58:09 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3d75aad3-13b6-11ef-909d-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1715885890; x=1716490690; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BcRpXVcdvZAYil4Irc1oaRVZc77Zx6hRkAA/T1NmAPk=; b=OqR99uHbYpRJqUdjk4Rv0b9dYEz4uiLCSlVq4J+V6HqrdtvZqz2vDTl2tXRj/n5ahi LRpLIVj9gTQowy/ubjFNov2eITWWCL+Aw2JyRslY+ibSLQRWAPK5G4jWzzP5Yg9P9ND4 xcl8XC83tBdoPcwEgzRj+vG1PMH4J5DZvPkg4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715885890; x=1716490690; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BcRpXVcdvZAYil4Irc1oaRVZc77Zx6hRkAA/T1NmAPk=; b=PyE6MGkAQeBV0inKbQ/1qli6ZAhlCjZjNMdNElsius0a5dcQClD6APsZeGdC06ClEd J8I/T0Wm97dRWh4wIKAbkVWp41e64dvkX+CdrmjNX6Nr9BxMTTPOiu32Oj9dEOHpJeY1 uMfwJ7c3Aq0GuFTOma7BwfVQnieL3v5CMbLLvsFUmLcgGHj8H0LX8Q10OgeKKfKTbFxZ nvv1XpCJZ5eXmq0yewtJ6tJPlL5kbQXo2/M2rvC42CwYLyyZpR6/Ykq/nj6liygpKilk CyFvcFhfV63fV2AZUJ1XcWRgYErcKdgdwsWBagDHEDIhkX4WlzaUqXYxrDqi9SN2hFLz vaIA== X-Gm-Message-State: AOJu0YyY3notNXiM2y4ZVkj6h/ntWY3geq1MICF3ptQXv5IlxXn8JlG4 U4totogfFUrnm+pxrR/WCYtRiedc+pGPdAuIcc7d3R7ZcTKAR8b2bpdG8voUScYJE3DQXoKecFB b X-Google-Smtp-Source: AGHT+IHHDTG9ObchtcVV/jVsqnfEynMKD2ibsufesvRXQQvkctYIHq8TbMcia1ICMivvqlAwStUKYQ== X-Received: by 2002:a17:906:ecb4:b0:a5a:2d30:b8c5 with SMTP id a640c23a62f3a-a5a2d5356f5mr1471090766b.16.1715885890249; Thu, 16 May 2024 11:58:10 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Anthony PERARD , Juergen Gross , George Dunlap , Jan Beulich , Stefano Stabellini , Julien Grall , Christian Lindig , =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Subject: [PATCH v2 3/4] tools/{c,o}xenstored: Don't link against libsystemd Date: Thu, 16 May 2024 19:58:03 +0100 Message-Id: <20240516185804.3309725-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240516185804.3309725-1-andrew.cooper3@citrix.com> References: <20240516185804.3309725-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1715885930130100001 Use the local freestanding wrapper instead. Signed-off-by: Andrew Cooper Acked-by: Christian Lindig Reviewed-by: Juergen Gross # tools/xenstored --- CC: Anthony PERARD CC: Juergen Gross CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall CC: Christian Lindig CC: Edwin T=C3=B6r=C3=B6k v2: * Redo almost from scratch, using the freestanding wrapper instead. --- tools/ocaml/xenstored/Makefile | 2 -- tools/ocaml/xenstored/systemd_stubs.c | 2 +- tools/xenstored/Makefile | 5 ----- tools/xenstored/posix.c | 4 ++-- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile index e8aaecf2e630..a8b8bb64698e 100644 --- a/tools/ocaml/xenstored/Makefile +++ b/tools/ocaml/xenstored/Makefile @@ -4,8 +4,6 @@ include $(OCAML_TOPLEVEL)/common.make =20 # Include configure output (config.h) CFLAGS +=3D -include $(XEN_ROOT)/tools/config.h -CFLAGS-$(CONFIG_SYSTEMD) +=3D $(SYSTEMD_CFLAGS) -LDFLAGS-$(CONFIG_SYSTEMD) +=3D $(SYSTEMD_LIBS) =20 CFLAGS +=3D $(CFLAGS-y) CFLAGS +=3D $(APPEND_CFLAGS) diff --git a/tools/ocaml/xenstored/systemd_stubs.c b/tools/ocaml/xenstored/= systemd_stubs.c index f4c875075abe..7dbbdd35bf30 100644 --- a/tools/ocaml/xenstored/systemd_stubs.c +++ b/tools/ocaml/xenstored/systemd_stubs.c @@ -25,7 +25,7 @@ =20 #if defined(HAVE_SYSTEMD) =20 -#include +#include =20 CAMLprim value ocaml_sd_notify_ready(value ignore) { diff --git a/tools/xenstored/Makefile b/tools/xenstored/Makefile index e0897ed1ba30..09adfe1d5064 100644 --- a/tools/xenstored/Makefile +++ b/tools/xenstored/Makefile @@ -9,11 +9,6 @@ xenstored: LDLIBS +=3D $(LDLIBS_libxenctrl) xenstored: LDLIBS +=3D -lrt xenstored: LDLIBS +=3D $(SOCKET_LIBS) =20 -ifeq ($(CONFIG_SYSTEMD),y) -$(XENSTORED_OBJS-y): CFLAGS +=3D $(SYSTEMD_CFLAGS) -xenstored: LDLIBS +=3D $(SYSTEMD_LIBS) -endif - TARGETS :=3D xenstored =20 .PHONY: all diff --git a/tools/xenstored/posix.c b/tools/xenstored/posix.c index d88c82d972d7..6037d739d013 100644 --- a/tools/xenstored/posix.c +++ b/tools/xenstored/posix.c @@ -27,7 +27,7 @@ #include #include #if defined(HAVE_SYSTEMD) -#include +#include #endif #include =20 @@ -393,7 +393,7 @@ void late_init(bool live_update) #if defined(HAVE_SYSTEMD) if (!live_update) { sd_notify(1, "READY=3D1"); - fprintf(stderr, SD_NOTICE "xenstored is ready\n"); + fprintf(stderr, "xenstored is ready\n"); } #endif } --=20 2.30.2 From nobody Mon Sep 16 19:30:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1715885923; cv=none; d=zohomail.com; s=zohoarc; b=ASiBgrAVBdX6MeuF1FYeHiJwwJbI6Sal33I5NXrktkbTVpsJOqC72L7K9Xr4IbC+M9Mofh6dEuGCzeJnfMwV06pv5QFe+RTvpdNUOdDpihkFU2CF0BCquyg2r5v8lbxq2yGF6KGdw/Vd50+WOeEvLDe+8qbbLN7mtDYJG1vLDAM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715885923; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9RPPdXWzS+h1KReJUUX36RCkolCXpVxyjNBaSjStXp4=; b=XiPblPp8USAnNIFr2jzuohPs65gy7YVgzzEiTnNNKFrm+41oC5Z4tVpq58o30xiCqSW5/17nkbdaHfnWhEMJDsn+a70MhE/3VY6kZ2H4HdXBKQbXOpNdqX08ycCLe1JXdmoVeFQ57tx65FUAaXhbznPO3UHcRws9xYb+NUa3WBo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1715885923455418.719711311633; Thu, 16 May 2024 11:58:43 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.723573.1128545 (Exim 4.92) (envelope-from ) id 1s7gIw-0005fM-AT; Thu, 16 May 2024 18:58:14 +0000 Received: by outflank-mailman (output) from mailman id 723573.1128545; Thu, 16 May 2024 18:58:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s7gIw-0005e6-6B; Thu, 16 May 2024 18:58:14 +0000 Received: by outflank-mailman (input) for mailman id 723573; Thu, 16 May 2024 18:58:13 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s7gIv-00050W-Ch for xen-devel@lists.xenproject.org; Thu, 16 May 2024 18:58:13 +0000 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [2a00:1450:4864:20::629]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3decdf70-13b6-11ef-b4bb-af5377834399; Thu, 16 May 2024 20:58:11 +0200 (CEST) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a599a298990so398021866b.2 for ; Thu, 16 May 2024 11:58:11 -0700 (PDT) Received: from andrewcoop.citrite.net (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a179c7d9dsm1003072566b.132.2024.05.16.11.58.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 11:58:10 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3decdf70-13b6-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1715885891; x=1716490691; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9RPPdXWzS+h1KReJUUX36RCkolCXpVxyjNBaSjStXp4=; b=O1ac5C0XJC9tJOfKcgJDYNTduuEDcREbhs/ovnpoWPM46u+s51fE9Da4LuZlAiof3I HRG4u2XencSUCCOU/mZHLS8bhkqn2TTQ5dso0+20cP7WJ9XXIi7ebUC1DNR4GbFSCB3v foAYu3c36F8bKls78CJJgyLbQrjMS6vNKtGcU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715885891; x=1716490691; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9RPPdXWzS+h1KReJUUX36RCkolCXpVxyjNBaSjStXp4=; b=oivlzXgvwFM5t6WrGcMG3MOZzNnG178uBQba8VHRpYO9IX0c+AUCxwEExU/JzV0u1W cCk1h4SVY3s8qi0/IIZjsJHI6BlvLh0desj3LnM/YY7kDaLv77EofCT9yxIJ/ANNPeRB iGc9YcgzYRWA5D4dkleEXjlzpqjcq4LX899OGk2w/fAHpX4qCRkd84RDQSQxI3JpDiuG bw9nrSS+kIt0OoY86j8qk5QhYIwoXhDbaM8yhBjVTSRctouEpnPMelvlDw+CkfpgL5fi mP3E+1X9WENNOlINDO0yg4+NlyiyDrhuZmUN//2mSTMhnJo95sS6d+n7xgvYkvK/UbWk bncA== X-Gm-Message-State: AOJu0YxigT5bE63CjPeW+XsHxLiDE71nWNJl1xAGX6pK51Hchm7Cru2S cG+tCwsNivJeW2s/OSAthVY8NyDd0HjfIDQXsepmNafmoBWpHMbarA9i7/ITUQGaKunyWzWsI/8 8 X-Google-Smtp-Source: AGHT+IEaucKEm0iXV/PnaVzx9IBaFmUmggPKs+Sh4PcPdsCfdTNeiXwPZCN45OUBuEBa7qPU3ADYmg== X-Received: by 2002:a17:907:1b0b:b0:a59:a3ef:21eb with SMTP id a640c23a62f3a-a5a2d675b19mr1635240566b.73.1715885891059; Thu, 16 May 2024 11:58:11 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Anthony PERARD , Juergen Gross , George Dunlap , Jan Beulich , Stefano Stabellini , Julien Grall , Christian Lindig , =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Subject: [PATCH v2 4/4] tools: Drop libsystemd as a dependency Date: Thu, 16 May 2024 19:58:04 +0100 Message-Id: <20240516185804.3309725-5-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240516185804.3309725-1-andrew.cooper3@citrix.com> References: <20240516185804.3309725-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1715885924033100003 There are no more users, and we want to disuade people from introducing new users just for sd_notify() and friends. Drop the dependency. We still want the overall --with{,out}-systemd to gate the generation of the service/unit/mount/etc files. Rerun autogen.sh, and mark the dependency as removed in the build container= s. Signed-off-by: Andrew Cooper Acked-by: Christian Lindig Reviewed-by: Juergen Gross --- CC: Anthony PERARD CC: Juergen Gross CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall CC: Christian Lindig CC: Edwin T=C3=B6r=C3=B6k v2: * Only strip out the library check. --- automation/build/archlinux/current.dockerfile | 1 + .../build/suse/opensuse-leap.dockerfile | 1 + .../build/suse/opensuse-tumbleweed.dockerfile | 1 + automation/build/ubuntu/focal.dockerfile | 1 + config/Tools.mk.in | 2 - m4/systemd.m4 | 9 - tools/configure | 256 ------------------ 7 files changed, 4 insertions(+), 267 deletions(-) diff --git a/automation/build/archlinux/current.dockerfile b/automation/bui= ld/archlinux/current.dockerfile index 3e37ab5c40c1..d29f1358c2bd 100644 --- a/automation/build/archlinux/current.dockerfile +++ b/automation/build/archlinux/current.dockerfile @@ -37,6 +37,7 @@ RUN pacman -S --refresh --sysupgrade --noconfirm --noprog= ressbar --needed \ sdl2 \ spice \ spice-protocol \ + # systemd for Xen < 4.19 systemd \ transfig \ usbredir \ diff --git a/automation/build/suse/opensuse-leap.dockerfile b/automation/bu= ild/suse/opensuse-leap.dockerfile index 48d0d50d005d..3ef33458a07c 100644 --- a/automation/build/suse/opensuse-leap.dockerfile +++ b/automation/build/suse/opensuse-leap.dockerfile @@ -59,6 +59,7 @@ RUN zypper install -y --no-recommends \ 'pkgconfig(sdl2)' \ python3-devel \ python3-setuptools \ + # systemd-devel for Xen < 4.19 systemd-devel \ tar \ transfig \ diff --git a/automation/build/suse/opensuse-tumbleweed.dockerfile b/automat= ion/build/suse/opensuse-tumbleweed.dockerfile index 53542ba1f4d9..a793601c876d 100644 --- a/automation/build/suse/opensuse-tumbleweed.dockerfile +++ b/automation/build/suse/opensuse-tumbleweed.dockerfile @@ -60,6 +60,7 @@ RUN zypper install -y --no-recommends \ 'pkgconfig(sdl2)' \ python3-devel \ python3-setuptools \ + # systemd-devel for Xen < 4.19 systemd-devel \ tar \ transfig \ diff --git a/automation/build/ubuntu/focal.dockerfile b/automation/build/ub= untu/focal.dockerfile index 7c6a4d07566b..078abd56d56f 100644 --- a/automation/build/ubuntu/focal.dockerfile +++ b/automation/build/ubuntu/focal.dockerfile @@ -34,6 +34,7 @@ RUN apt-get update && \ libnl-3-dev \ ocaml-nox \ libfindlib-ocaml-dev \ + # libsystemd-dev for Xen < 4.19 libsystemd-dev \ transfig \ pandoc \ diff --git a/config/Tools.mk.in b/config/Tools.mk.in index b54ab21f966b..50fbef841f3f 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -52,8 +52,6 @@ CONFIG_PYGRUB :=3D @pygrub@ CONFIG_LIBFSIMAGE :=3D @libfsimage@ =20 CONFIG_SYSTEMD :=3D @systemd@ -SYSTEMD_CFLAGS :=3D @SYSTEMD_CFLAGS@ -SYSTEMD_LIBS :=3D @SYSTEMD_LIBS@ XEN_SYSTEMD_DIR :=3D @SYSTEMD_DIR@ XEN_SYSTEMD_MODULES_LOAD :=3D @SYSTEMD_MODULES_LOAD@ CONFIG_9PFS :=3D @ninepfs@ diff --git a/m4/systemd.m4 b/m4/systemd.m4 index 112dc11b5e05..e4fe51a8ba5f 100644 --- a/m4/systemd.m4 +++ b/m4/systemd.m4 @@ -41,15 +41,6 @@ AC_DEFUN([AX_ALLOW_SYSTEMD_OPTS], [ ]) =20 AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon],, - [PKG_CHECK_MODULES([SYSTEMD], [libsystemd >=3D 209])] - ) - dnl pkg-config older than 0.24 does not set these for - dnl PKG_CHECK_MODULES() worth also noting is that as of version 208 - dnl of systemd pkg-config --cflags currently yields no extra flags yet. - AC_SUBST([SYSTEMD_CFLAGS]) - AC_SUBST([SYSTEMD_LIBS]) - AS_IF([test "x$SYSTEMD_DIR" =3D x], [ dnl In order to use the line below we need to fix upstream systemd dnl to properly ${prefix} for child variables in diff --git a/tools/configure b/tools/configure index 3d557234b319..b8faa1d520c5 100755 --- a/tools/configure +++ b/tools/configure @@ -9766,262 +9766,6 @@ $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h =20 systemd=3Dy =20 - -pkg_failed=3Dno -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS=3D"$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --pri= nt-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; then - pkg_cv_SYSTEMD_CFLAGS=3D`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev= /null` - test "x$?" !=3D "x0" && pkg_failed=3Dyes -else - pkg_failed=3Dyes -fi - else - pkg_failed=3Duntried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS=3D"$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --pri= nt-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; then - pkg_cv_SYSTEMD_LIBS=3D`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/nul= l` - test "x$?" !=3D "x0" && pkg_failed=3Dyes -else - pkg_failed=3Dyes -fi - else - pkg_failed=3Duntried -fi - - - -if test $pkg_failed =3D yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=3Dyes -else - _pkg_short_errors_supported=3Dno -fi - if test $_pkg_short_errors_supported =3D yes; then - SYSTEMD_PKG_ERRORS=3D`$PKG_CONFIG --short-errors --print-errors -= -cflags --libs "libsystemd-daemon" 2>&1` - else - SYSTEMD_PKG_ERRORS=3D`$PKG_CONFIG --print-errors --cflags --libs = "libsystemd-daemon" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - -pkg_failed=3Dno -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS=3D"$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --pri= nt-errors \"libsystemd >=3D 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >=3D 209") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; then - pkg_cv_SYSTEMD_CFLAGS=3D`$PKG_CONFIG --cflags "libsystemd >=3D 209" 2>/d= ev/null` - test "x$?" !=3D "x0" && pkg_failed=3Dyes -else - pkg_failed=3Dyes -fi - else - pkg_failed=3Duntried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS=3D"$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --pri= nt-errors \"libsystemd >=3D 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >=3D 209") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; then - pkg_cv_SYSTEMD_LIBS=3D`$PKG_CONFIG --libs "libsystemd >=3D 209" 2>/dev/n= ull` - test "x$?" !=3D "x0" && pkg_failed=3Dyes -else - pkg_failed=3Dyes -fi - else - pkg_failed=3Duntried -fi - - - -if test $pkg_failed =3D yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=3Dyes -else - _pkg_short_errors_supported=3Dno -fi - if test $_pkg_short_errors_supported =3D yes; then - SYSTEMD_PKG_ERRORS=3D`$PKG_CONFIG --short-errors --print-errors -= -cflags --libs "libsystemd >=3D 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=3D`$PKG_CONFIG --print-errors --cflags --libs = "libsystemd >=3D 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libsystemd >=3D 209) were not met: - -$SYSTEMD_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed =3D untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. M= ake sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - SYSTEMD_CFLAGS=3D$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=3D$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -elif test $pkg_failed =3D untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -pkg_failed=3Dno -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS=3D"$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --pri= nt-errors \"libsystemd >=3D 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >=3D 209") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; then - pkg_cv_SYSTEMD_CFLAGS=3D`$PKG_CONFIG --cflags "libsystemd >=3D 209" 2>/d= ev/null` - test "x$?" !=3D "x0" && pkg_failed=3Dyes -else - pkg_failed=3Dyes -fi - else - pkg_failed=3Duntried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS=3D"$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --pri= nt-errors \"libsystemd >=3D 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >=3D 209") 2>&5 - ac_status=3D$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? =3D $ac_status" >&5 - test $ac_status =3D 0; }; then - pkg_cv_SYSTEMD_LIBS=3D`$PKG_CONFIG --libs "libsystemd >=3D 209" 2>/dev/n= ull` - test "x$?" !=3D "x0" && pkg_failed=3Dyes -else - pkg_failed=3Dyes -fi - else - pkg_failed=3Duntried -fi - - - -if test $pkg_failed =3D yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=3Dyes -else - _pkg_short_errors_supported=3Dno -fi - if test $_pkg_short_errors_supported =3D yes; then - SYSTEMD_PKG_ERRORS=3D`$PKG_CONFIG --short-errors --print-errors -= -cflags --libs "libsystemd >=3D 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=3D`$PKG_CONFIG --print-errors --cflags --libs = "libsystemd >=3D 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libsystemd >=3D 209) were not met: - -$SYSTEMD_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed =3D untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. M= ake sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - SYSTEMD_CFLAGS=3D$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=3D$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -else - SYSTEMD_CFLAGS=3D$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=3D$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - - - if test "x$SYSTEMD_DIR" =3D x; then : =20 SYSTEMD_D= IR=3D"\$(prefix)/lib/systemd/system/" --=20 2.30.2