From patchwork Fri Dec 1 13:12:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "ralf_lici (Code Review)" X-Patchwork-Id: 3499 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:d588:b0:fb:b703:d903 with SMTP id ev8csp329475dyc; Fri, 1 Dec 2023 05:13:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIkNo/nrYJJRW5kwKWGwoaq9hxbkg/8VoN5xuW/1axtdA8uGIBl3860TBSHMRfHwwuL+Og X-Received: by 2002:a17:902:e80b:b0:1cf:a718:384 with SMTP id u11-20020a170902e80b00b001cfa7180384mr25605469plg.6.1701436409290; Fri, 01 Dec 2023 05:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701436409; cv=none; d=google.com; s=arc-20160816; b=K50QRXrTu3NkZGNG4MLndJ0iMZQdNOqGf0d+o3479jkMMDhushf9FWUiNFVe5AzrrL gb7J7RzHSdKOUf9xHwhXi2YcOtkdjgxg9hHPXbj/AKocQC/iSdinRyx1N/b4wr0xr3Or yUh4M4zJBG5N9KRYxX/aMg7oQ3Pmc6txd7rqAqNIz44wYWtADWAPi/B02+8BiEHVyvvR eZ3s/4w463q9qELRsUJuSmilwipc/lXioWK+Zb3SbXB00auNKOcdUf7q4JPJvmcgqEaE 4ZVfamJ9F0LZeh5/HmzBFVV73lUBGL/TQkqNYwLLR304x8K9rCUDghX7eprKja01n75N Asyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=V1EY2UQTp9KnYe5ymKLXnsm+F67fq4BXygYLvhZgYDM=; fh=lm0MLPW7DntlrDqRECIiC9JlE1uPxhepE0URYHIf+eE=; b=DonMlbJu6CNtvXW9yC07Ojbn06FAdtBIBdaV204Y9eTD5yuiugxKWF3//Tkh/n+LqP iiAvgNryp+Yl4FYmvEN8F0sBk8VMh1Rr/alfz8aBQ4w4xocwQdVTow9jDf5RxCwSSslp A2kkvdYooGhzkkdZJUj/cK1pTaVyUzap2KdSvQdmw4R15ka3EKHQzqbevpaLU/O378a+ F3c5+DnCV3w8zsSFNd/KcdbOgWj4svTq189CO3eQISpmNfnmXf8xu1Qn7869eU6xyM6r XcMSlp5d8kZBmfyAlwoAZttzSsnpZTsGPg42miOUP6Ly6t/paf7LCtSw/YoO7p16GAfV 5jKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=PerbEvxg; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=GoFuUWNf; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=UUeNAqBy; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id k17-20020a170902c41100b001d00553ba44si3218363plk.446.2023.12.01.05.13.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Dec 2023 05:13:29 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=PerbEvxg; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=GoFuUWNf; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=UUeNAqBy; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1r93Jr-0004QL-Bl; Fri, 01 Dec 2023 13:12:35 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1r93Jn-0004QE-Qg for openvpn-devel@lists.sourceforge.net; Fri, 01 Dec 2023 13:12:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YtRGBf86mhaXRMiVQixtkPLlnY0OmPpO6v/a2rt9Mkc=; b=PerbEvxgJ5V1v98VEHuyHwWgvB vmOd+WlaIcvDtyoLyNH1Uk0vilR1tRXp3Wujm/fLK54G2Fd8+UPahk+ZIUifHIAt1cm7jVx/EZRfr VI64qBEQGdMMy5Pb+gM9Idxwm+CvLsa2VtNj6cWueABE+zrCfhFVYdzZqmPdDJ1s/lYg=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=YtRGBf86mhaXRMiVQixtkPLlnY0OmPpO6v/a2rt9Mkc=; b=G oFuUWNfUCXdBz8xQPeb2zHzhkkyn13UjEwhD5dtDn7fQ2dETV7doMCGcKxFPBBAG9R8Nx+L7lt49M f85iammQF18+pH5+EnEOMRW5K01O+8H/oBzkgN7pfFZA2uKRAah0Ne0P7mLfrx/Fda2rW5tx7lpW0 WIV8J21U/9r38mJo=; Received: from mail-lf1-f49.google.com ([209.85.167.49]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1r93Jm-0007Ak-20 for openvpn-devel@lists.sourceforge.net; Fri, 01 Dec 2023 13:12:31 +0000 Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-50bd928b13cso961324e87.2 for ; Fri, 01 Dec 2023 05:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1701436338; x=1702041138; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=YtRGBf86mhaXRMiVQixtkPLlnY0OmPpO6v/a2rt9Mkc=; b=UUeNAqBytqRSfK90rJelDA+ucIHksSpWPvhwtGoCocR4fg2ildNleX8yg4n4aj1JOQ Cu7TaPjkMu2jifSUkh2kD4Ms88DIwmN/BJ1XuCU9Kvlf6+sLzYcGfZ+QXJUVJeCnNOWB QcWifLlVxXCsjUbtIhiCwpSJ5LxF81YSNo1oKTT0vwo/Y7BLMLUsTUKa/4HcyQDoQnDb rVuD1zC4MmrHp4bPrWWllv4KjhkgeToRtDRn2B/iMyzQmO45BgMgFKdWLbkAk0rJ/Rfu 8N/GeYHJGeC7HG4/QVjGVzKxFEC66a7PUW7LLM6gQoGYhy6ofaUim6xwsYZpmxRQt0GK iRGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701436338; x=1702041138; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YtRGBf86mhaXRMiVQixtkPLlnY0OmPpO6v/a2rt9Mkc=; b=UNzbemOSVPmtZlB8FhNHm15Zu3aytb1PbcRn5cZIkbDbyWtlNkZz8Qde2YtQZw2Flf zzPAfNPXeE4HgeYKFXTSqgUNfUrxujb43tHl3qomuu0mVUU/yYL7Ni+VpUN9Ufkm9CXP qKpied+wZvbi+Dv+mQPE3M1Z0bu8Lu8yDWgEswgclGgVWxfPOqzAf84T+Dd8lPtb6hzk ccBK1YsyzM38MNSNk4AHtkb3gvy+wn/cIg7JJCy2O8niGxJHRdnWhIKPkm+9cd9mFCO4 2oR8d+ZsnDt88+n7RN+wgjRbIeo6HMhLoScQh6r6nQYhPbeyUkjYJslxrCIwlV2SlRbb fLpw== X-Gm-Message-State: AOJu0YzN99AcPvzhAPpaDqRyz+P57B7fKZ/lc/XCRteMW/3PuFcXOOMA DzL3DNRDfpqLPLj/vqffOjeSxpPoYSZ5cSeX3u0= X-Received: by 2002:ac2:46cd:0:b0:50b:d466:ba with SMTP id p13-20020ac246cd000000b0050bd46600bamr739276lfo.0.1701436338014; Fri, 01 Dec 2023 05:12:18 -0800 (PST) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id bd22-20020a05600c1f1600b004090798d29csm5478998wmb.15.2023.12.01.05.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 05:12:17 -0800 (PST) From: "plaisthos (Code Review)" X-Google-Original-From: "plaisthos (Code Review)" X-Gerrit-PatchSet: 1 Date: Fri, 1 Dec 2023 13:12:16 +0000 To: flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a X-Gerrit-Change-Number: 465 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: a3681899c32b00421f4271b2cd1af79a5cabb23e References: Message-ID: MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: openvpn.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.49 listed in wl.mailspike.net] 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1r93Jm-0007Ak-20 Subject: [Openvpn-devel] [S] Change in openvpn[master]: Make it more explicit and visible when pkg-config is not found X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1784085383935793623?= X-GMAIL-MSGID: =?utf-8?q?1784085383935793623?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/465?usp=email to review the following change. Change subject: Make it more explicit and visible when pkg-config is not found ...................................................................... Make it more explicit and visible when pkg-config is not found Users seem to struggle to read the full error message. This adds an indication if pkg-config is actually found to the warning/error message that use pkg-config. When found: configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (using /usr/bin/pkg-config) installed? Must be version 3.4.0 or newer for DCO not found: configure: error: libnl-genl-3.0 package not found or too old. Is the development package and pkg-config (not found) installed? Must be version 3.4.0 or newer for DCO Change-Id: Iebaa35a23e217a4cd7739af229cbfc08a3d8854a Signed-off-by: Arne Schwabe --- M configure.ac 1 file changed, 14 insertions(+), 5 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/65/465/1 diff --git a/configure.ac b/configure.ac index 84eaad6..2e3cbee 100644 --- a/configure.ac +++ b/configure.ac @@ -382,6 +382,14 @@ AM_CONDITIONAL([CROSS_COMPILING], test "${cross_compiling}" = "yes") PKG_PROG_PKG_CONFIG +# Add variable to print if pkg-config is found or not. Users often miss that +if test "${PKG_CONFIG}" = ""; then + pkg_config_found="(not found)" +else + pkg_config_found="(using ${PKG_CONFIG})" +fi + + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S @@ -818,7 +826,7 @@ [libnl-genl-3.0 >= 3.4.0], [have_libnl="yes"], [ - AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config installed? Must be version 3.4.0 or newer for DCO]) + AC_MSG_ERROR([libnl-genl-3.0 package not found or too old. Is the development package and pkg-config ${pkg_config_found} installed? Must be version 3.4.0 or newer for DCO]) ] ) CFLAGS="${CFLAGS} ${LIBNL_GENL_CFLAGS}" @@ -862,10 +870,11 @@ dnl case "$host" in *-*-linux*) + # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], - [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config installed?])] + [AC_MSG_ERROR([libcap-ng package not found. Is the development package and pkg-config ${pkg_config_found} installed?])] ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])]) @@ -886,7 +895,7 @@ [OPENSSL], [openssl >= 1.0.2], [have_openssl="yes"], - [] # If this fails, we will do another test next + [AC_MSG_WARN([OpenSSL not found by pkg-config ${pkg_config_found}])] # If this fails, we will do another test next ) OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi @@ -1091,7 +1100,7 @@ [WOLFSSL], [wolfssl], [], - [AC_MSG_ERROR([Could not find wolfSSL.])] + [AC_MSG_ERROR([Could not find wolfSSL using pkg-config ${pkg_config_found}])] ) PKG_CHECK_VAR( [WOLFSSL_INCLUDEDIR], @@ -1515,7 +1524,7 @@ PKG_CHECK_MODULES( [CMOCKA], [cmocka], [have_cmocka="yes"], - [AC_MSG_WARN([cmocka.pc not found on the system. Unit tests disabled])] + [AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_config_found}. Unit tests disabled])] ) AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS])