From patchwork Tue Aug 13 10:54:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3785 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:77d2:b0:5a1:d4fc:4ac6 with SMTP id r18csp151368mau; Tue, 13 Aug 2024 03:55:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWg2E9lMx+Tfr6Ak9EK7dSXUlH+HnMg/q08OaVMUCos5JPG7YlO5wZ2lcybZBuVA2xOP4vVns1TcoxQVZobu75GHAGS8/E= X-Google-Smtp-Source: AGHT+IHbnENnwvkl8jxRNcu4GqAHiRavKRAAg/SpaKi7BipVmju5qHQYDBOEBwIVzMKhI+oQ5VrL X-Received: by 2002:a05:6a00:1890:b0:70d:2cf6:598 with SMTP id d2e1a72fcca58-71258cf3f8dmr1443773b3a.5.1723546519664; Tue, 13 Aug 2024 03:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723546519; cv=none; d=google.com; s=arc-20160816; b=RMO0k6b8+DJbbRNztVyNVvyMXcgSicST9M/xWeDpE4O6K8T7DrjV8AdJ5qaNE6DLOL EiNtd5jTzjaLyu18ubGcILnUVn993vrCfS4yyYuSWWxIFfhYw2fhsWSWLhmY2x+ayyHn VESxdvN5fjDwiDjy5rJFJ2GIvVjYclyQ5Atu4eqDaDIYI2MFEitRZg4gg2nL5qukc66l E1DxErU3ADOlwFSEtqaKzUqL/sbDgLpS2aKg0ANq1x+CaBY1Rxos4lg2xR170pDF7aUv 02R1FbOFwLrMHPhqQM9wRxIpZ8yZ0jTFn3KuqxD7dt6BpGEl4zSIYhA6YomdPob8gZsD lVWw== 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=j6847jbYcsG7+8LjSbqBh7QkMOtUP0q1qJoKqFXpDUY=; fh=GFP4qDxgyJ2WEPo/oeLZg3Mj4NqvY1j2nTvTt7psNwg=; b=cG9wqEQIyCzSGlNaR+oDcDceXd1bB4cGKUjDcuh1/zpoE7AHaYHWMoznaTaXA/i9uc kZbYxtL23Gxoj3g8WyQj0Ahkdo1HJg3b7C/cp9vsK+JvnVR4rTQkaqrpcz4iLbTTptRU FSKCwh247wIcENNpCa5FSq1fiD24ZACM3ndbpeuiXg7w9Mu/Wnob4LDDvsCjJ2UVHIen nMCRzdOUZFaOlH3+Ddvk41078HCkGOIm44J20snIRG+nWSJLF6pYVKy+5imt0D9QIo3h F3A2H/YO1d62VzGOQNZixqQpuSe6NGvDt0clItn/0nl6uA3tymsmgn2rlvwKkqAf+OQa L7AQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=IB6H5eQg; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=L1hycHUj; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=HRZFwUin; 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; dara=fail header.i=@openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 41be03b00d2f7-7c697ae4f0dsi1522953a12.786.2024.08.13.03.55.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Aug 2024 03:55:19 -0700 (PDT) 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=IB6H5eQg; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=L1hycHUj; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=HRZFwUin; 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; dara=fail header.i=@openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sdpB1-0002Vx-31; Tue, 13 Aug 2024 10:54:55 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sdpAz-0002Vi-Pz for openvpn-devel@lists.sourceforge.net; Tue, 13 Aug 2024 10:54:53 +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=c99P8vLwTHx7+HBElvyKs8/U5DcKpiBhw//yjUX0bYs=; b=IB6H5eQgnO9hjyeAzWmycMg1wj kamOqXQ/yF8kjNT1wHtaEdiSAAwyy7liIEi20iS/dJanatKeSElHAl2RSptPAk1VA5z93z5sAB8zI jDNyooiXMWhK4WX/X1ao2LmL+CyitMutYVBcwryjIjU4o5UGN38Qc/jM3uFXfbG4Ya/U=; 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=c99P8vLwTHx7+HBElvyKs8/U5DcKpiBhw//yjUX0bYs=; b=L 1hycHUjnaJCupecQi37QmIW45Ya/ntqUbrYph8LbnS6m/r22p8UmSLRSHYQcG2n6mWV1aJZ8LFxhy JdXptGfk5ZoaC+9rfyVv04oYLVSdheDQOYkdPsD0G6Wae6AmcLkWCl99n6Ok8T8/O5xQm/LeWpiPj 9KE5o6WoNu6zjGZM=; Received: from mail-wr1-f51.google.com ([209.85.221.51]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1sdpAy-0003Mq-Kf for openvpn-devel@lists.sourceforge.net; Tue, 13 Aug 2024 10:54:53 +0000 Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3685a564bafso2432946f8f.3 for ; Tue, 13 Aug 2024 03:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1723546481; x=1724151281; 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=c99P8vLwTHx7+HBElvyKs8/U5DcKpiBhw//yjUX0bYs=; b=HRZFwUinu6IkiiQsSvYMTNmoWcnDHpvgUFkavaFnZIVWi2FNUYJ9JOeA6oUUOcASu/ fGL6lLEBdwIyuVCDUTefgykllgo/xupmAGbQooy2H8ZF2VwaDPRKMZZN5ymM1moOIYM0 7sLtdUbobri4+D8OqnLlT0aDJYhftnEbR7tVpC7x4oXqPb5l1XVH1ECiVCdbuvlrba1B 73LA5fMYwDud0GUYkVZ0C5RiIr2DDCdJ1/HLo35udpAxcUGh4KeiOG1UAb0ufbPNStCp F19e1cQaJ222ccw2bTbFTUmh+OALGbAGprWwduAppE9x2892d/44dluHRzj9W/dXQpXC WIeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723546481; x=1724151281; 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=c99P8vLwTHx7+HBElvyKs8/U5DcKpiBhw//yjUX0bYs=; b=g1Dsm65ZXA9LWezGy4q51LWMDDD1EvFJ5I2o62MnBPu9votYhDIcd7se3/EbFuo8wN 5v0P9h9T8lEhjF+YMwGH+34EOlc4o41SC0TSuEkRKHyaEM4tFNqr4ii0EqbbakIuWhYM MkGB/LtIhg9nDGjBpj6NFqhkQbP3K5SErKJIeNwZ6VJ7HmFQAR5C3dvXCbijRJyqqYHF AjstjFBPfypziE6eM8nNXgGXHzJcjf4SkqkhQnYsbgKLmX8LgX2fI6t13DxVQzg7PK1k nlIgkFu782o4P4Vhm2Z6r1SZS+PuLn7DWAZQcKtbdkIX8pvYIuXj6q/zlsW0U3u4qULB CBCw== X-Gm-Message-State: AOJu0YxpDA131tqXcKcU9b7FLPBbVgj8fsYlXeCwqnvjHyUwIKpwWOpI qXU6MxxKDN3aGYwpRssb6noExMyYdVMSgaFhMSzSsZyp3HLju0dq+Q0NP8E9s8NvgHEkCl6YNk3 5 X-Received: by 2002:a05:6000:45:b0:368:6f30:ddf1 with SMTP id ffacd0b85a97d-3716cd2ac73mr1927258f8f.59.1723546480882; Tue, 13 Aug 2024 03:54:40 -0700 (PDT) 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 ffacd0b85a97d-36e4c36ba72sm9928839f8f.16.2024.08.13.03.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 03:54:40 -0700 (PDT) From: "flichtenheld (Code Review)" X-Google-Original-From: "flichtenheld (Code Review)" X-Gerrit-PatchSet: 1 Date: Tue, 13 Aug 2024 10:54:40 +0000 To: plaisthos Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I39a6f58b11b922f5dbd3e55a5bc8574eda8a83fe X-Gerrit-Change-Number: 724 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 96dca20073b1b0d36cb8afff44ab8bef07fcd1c0 References: Message-ID: <94bfb0ae5e1dc15a7dea3c867c9251c614b43dec-HTML@gerrit.openvpn.net> 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-1.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: plaisthos. Hello plaisthos, 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_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [209.85.221.51 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.51 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1sdpAy-0003Mq-Kf Subject: [Openvpn-devel] [S] Change in openvpn[master]: configure: Handle libnl-genl and libcap-ng consistent with other libs 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: frank@lichtenheld.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1807269515626141695?= X-GMAIL-MSGID: =?utf-8?q?1807269515626141695?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/724?usp=email to review the following change. Change subject: configure: Handle libnl-genl and libcap-ng consistent with other libs ...................................................................... configure: Handle libnl-genl and libcap-ng consistent with other libs Do not communicate any of the flags via the global CFLAGS and LIBS, so that users are not confused when overriding them on the command line. Change-Id: I39a6f58b11b922f5dbd3e55a5bc8574eda8a83fe Signed-off-by: Frank Lichtenheld --- M configure.ac M src/openvpn/Makefile.am 2 files changed, 17 insertions(+), 9 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/24/724/1 diff --git a/configure.ac b/configure.ac index 9ce826c..5c44822 100644 --- a/configure.ac +++ b/configure.ac @@ -824,8 +824,8 @@ 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}" - LIBS="${LIBS} ${LIBNL_GENL_LIBS}" + OPTIONAL_LIBNL_GENL_CFLAGS="${LIBNL_GENL_CFLAGS}" + OPTIONAL_LIBNL_GENL_LIBS="${LIBNL_GENL_LIBS}" AC_DEFINE(ENABLE_DCO, 1, [Enable shared data channel offload]) AC_MSG_NOTICE([Enabled ovpn-dco support for Linux]) @@ -865,7 +865,6 @@ dnl case "$host" in *-*-linux*) - # We require pkg-config PKG_CHECK_MODULES([LIBCAPNG], [libcap-ng], [], @@ -873,8 +872,8 @@ ) AC_CHECK_HEADER([sys/prctl.h],,[AC_MSG_ERROR([sys/prctl.h not found!])]) - CFLAGS="${CFLAGS} ${LIBCAPNG_CFLAGS}" - LIBS="${LIBS} ${LIBCAPNG_LIBS}" + OPTIONAL_LIBCAPNG_CFLAGS="${LIBCAPNG_CFLAGS}" + OPTIONAL_LIBCAPNG_LIBS="${LIBCAPNG_LIBS}" AC_DEFINE(HAVE_LIBCAPNG, 1, [Enable libcap-ng support]) ;; esac @@ -1414,7 +1413,7 @@ # When testing a compiler option, we add -Werror to force # an error when the option is unsupported. This is not -# required for gcc, but some compilers such as clang needs it. +# required for gcc, but some compilers such as clang need it. AC_DEFUN([ACL_CHECK_ADD_COMPILE_FLAGS], [ old_cflags="$CFLAGS" CFLAGS="$1 -Werror $CFLAGS" @@ -1490,6 +1489,10 @@ AC_SUBST([OPTIONAL_SELINUX_LIBS]) AC_SUBST([OPTIONAL_CRYPTO_CFLAGS]) AC_SUBST([OPTIONAL_CRYPTO_LIBS]) +AC_SUBST([OPTIONAL_LIBCAPNG_CFLAGS]) +AC_SUBST([OPTIONAL_LIBCAPNG_LIBS]) +AC_SUBST([OPTIONAL_LIBNL_GENL_CFLAGS]) +AC_SUBST([OPTIONAL_LIBNL_GENL_LIBS]) AC_SUBST([OPTIONAL_LZO_CFLAGS]) AC_SUBST([OPTIONAL_LZO_LIBS]) AC_SUBST([OPTIONAL_LZ4_CFLAGS]) @@ -1534,10 +1537,11 @@ AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ]) AC_SUBST([ENABLE_UNITTESTS]) -TEST_LDFLAGS="${OPTIONAL_CRYPTO_LIBS} ${OPTIONAL_PKCS11_HELPER_LIBS}" +TEST_LDFLAGS="${OPTIONAL_CRYPTO_LIBS} ${OPTIONAL_PKCS11_HELPER_LIBS} ${OPTIONAL_LIBCAPNG_LIBS}" +TEST_LDFLAGS="${TEST_LDFLAGS} ${OPTIONAL_LIBNL_GENL_LIBS}" TEST_LDFLAGS="${TEST_LDFLAGS} ${OPTIONAL_LZO_LIBS} ${CMOCKA_LIBS}" -TEST_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${OPTIONAL_PKCS11_HELPER_CFLAGS}" -TEST_CFLAGS="${TEST_CFLAGS} ${OPTIONAL_LZO_CFLAGS}" +TEST_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${OPTIONAL_PKCS11_HELPER_CFLAGS} ${OPTIONAL_LIBCAPNG_CFLAGS}" +TEST_CFLAGS="${TEST_CFLAGS} ${OPTIONAL_LIBNL_GENL_CFLAGS} ${OPTIONAL_LZO_CFLAGS}" TEST_CFLAGS="${TEST_CFLAGS} -I\$(top_srcdir)/include ${CMOCKA_CFLAGS}" AC_SUBST([TEST_LDFLAGS]) diff --git a/src/openvpn/Makefile.am b/src/openvpn/Makefile.am index 56cce9d..3784a98 100644 --- a/src/openvpn/Makefile.am +++ b/src/openvpn/Makefile.am @@ -24,6 +24,8 @@ AM_CFLAGS = \ $(TAP_CFLAGS) \ $(OPTIONAL_CRYPTO_CFLAGS) \ + $(OPTIONAL_LIBCAPNG_CFLAGS) \ + $(OPTIONAL_LIBNL_GENL_CFLAGS) \ $(OPTIONAL_LZO_CFLAGS) \ $(OPTIONAL_LZ4_CFLAGS) \ $(OPTIONAL_PKCS11_HELPER_CFLAGS) \ @@ -147,6 +149,8 @@ openvpn_LDADD = \ $(top_builddir)/src/compat/libcompat.la \ $(SOCKETS_LIBS) \ + $(OPTIONAL_LIBCAPNG_LIBS) \ + $(OPTIONAL_LIBNL_GENL_LIBS) \ $(OPTIONAL_LZO_LIBS) \ $(OPTIONAL_LZ4_LIBS) \ $(OPTIONAL_PKCS11_HELPER_LIBS) \