From patchwork Tue Sep 17 13:32:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3840 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:6794:b0:5b9:581e:f939 with SMTP id c20csp180207mao; Tue, 17 Sep 2024 06:33:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWwBEIme+xVFAEDwQUhdd4sDpHLle6QbuFeEhrv6JHhV5jRTCq34fD+bF3NerQ6FYEqB8MDJ8boL2w=@openvpn.net X-Google-Smtp-Source: AGHT+IHlWGpwPx7f0UVxGMAKdy+JK/4brYRt+m0i2YH7GmtYx22O/Kxf0mWULXvCIYcZYTphR7er X-Received: by 2002:a05:6e02:13a6:b0:398:39f:8b4d with SMTP id e9e14a558f8ab-3a0848e54afmr183631795ab.5.1726580000553; Tue, 17 Sep 2024 06:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726580000; cv=none; d=google.com; s=arc-20240605; b=LYJ+n5jSN2A4vmTN6PaueBds5qVPVWoks1NcH1Kuw6NuGyQgXZqiO7PjbGcc/2kmxV R8LmAf5cWdflPnMwLO0I1VlEnd8ZuNcIuCkcGaJDpG4KwykLvzR9lMifPSbML1XceC+1 ODymZ032fiInDzE7zRqQDq9mMvC6qzft3jMLKfobpQrF3RZxZ8dLnIrq6yc8+MEEYHlI 0bzow4Wx/cLnjWuhJIE8irrXkP3Y9YZQABMFWUDEy1HKtr7fOiGO57zbkamJHyfs+KWR SalDGmRvCynPz5hTJPQ17K3F9ykm+sXJV2bmAlXSEBHM5CH2lkRDqDHT9DUriqnPGPt8 4Flg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=h6syzDcwXhTVqhK1iSA4fisiedgujKNCDxOQ7EPkYUs=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=Ulgb+HJl/qxs/QpiclYj3CLe7BX8CyWDW/kLPsX05vPZ+5xuDvoO8PfmxUFfplxc5m 3R+43zq70hoZ5RwrBXik2eNVLLRGlE9jYxi7N44vINHR6fUfyuHjvhOL2RtlkQsy1/HC mtFcZY1R3VIb2UM3UhuPCV9nMMUPOBIhdzVWiWSyGYSr+2hQgiv4en1iI2oliCkC5uRc JjSb96Yo+N/GNSr1f7EYi36Vj4mfrhPzbyx1WkdTFu5omb1+Ntv+nD8XyrIanKJjfRFu CaGd+gBOXh1fPIuGJwWz4MNlQngpHfOGTDexmpdzEWeUpfNc1IV6omVGa5IQIfqGeHPp f8Ug==; 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=dBw79psZ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XdZYA7Ic; 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=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id e9e14a558f8ab-3a092e9ddc0si34946675ab.191.2024.09.17.06.33.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Sep 2024 06:33:20 -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=dBw79psZ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XdZYA7Ic; 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=muc.de Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sqYKM-0004DY-Nu; Tue, 17 Sep 2024 13:33:10 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sqYKK-0004DO-SP for openvpn-devel@lists.sourceforge.net; Tue, 17 Sep 2024 13:33:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pyqe/GMbqWRuXVgJi0zh7ekcbr+sqHcCw9rFVJjb1QY=; b=dBw79psZ45S7ITIaMhp6qy4lCG NsNmUeg73f5AYsDVVtNrg8QDkFf1fUIUuK0RXekeLQ25sFy1BRNilQ7nkBVKrtX0WPMcuPImgBx5x AtQ8a3sVxkn6tu0goxwjGmc99xfxagIwoyHECSe7bbhjLBIkbusEkThFYgX1rLH5/t+o=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pyqe/GMbqWRuXVgJi0zh7ekcbr+sqHcCw9rFVJjb1QY=; b=XdZYA7Ic+vDCm2RJJkbgkYDwXh RaP2ObCYP4ySEAnrF7sMT+Dmg7C5qAWQecs3YgGWVEXsm03FVluBcGpzU5qzLbulCPmZPIMl+KYdn NAabxdUfrWZuNTStqEYs74S+Uc02l0LUBPnvRAexDQoWWR63ZwUpSOAcmk8b0aAniXCE=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1sqYKI-0000dm-3G for openvpn-devel@lists.sourceforge.net; Tue, 17 Sep 2024 13:33:08 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 48HDWsAa019626 for ; Tue, 17 Sep 2024 15:32:54 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 48HDWsmh019625 for openvpn-devel@lists.sourceforge.net; Tue, 17 Sep 2024 15:32:54 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 17 Sep 2024 15:32:53 +0200 Message-ID: <20240917133253.19616-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.44.2 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 0.8 (/) 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: From: Frank Lichtenheld 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. Github: closes OpenVPN/openvpn#586 Change-Id: I39a6f58b11b922f5dbd3e55a5bc8574eda8a83fe Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering --- Content analysis details: (0.8 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.8 UPPERCASE_50_75 message body is 50-75% uppercase X-Headers-End: 1sqYKI-0000dm-3G Subject: [Openvpn-devel] [PATCH v3] 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1810450350675256300?= X-GMAIL-MSGID: =?utf-8?q?1810450350675256300?= From: Frank Lichtenheld 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. Github: closes OpenVPN/openvpn#586 Change-Id: I39a6f58b11b922f5dbd3e55a5bc8574eda8a83fe Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/724 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering 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) \