[Openvpn-devel] Add PKG_CHECK_VAR compatibility definition for old autoconf versions
| Message ID | 20210318181258.89704-1-juliusz@wolfssl.com |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net> Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director14.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id CH57DdWYU2CvAQAAIUCqbw (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Thu, 18 Mar 2021 14:15:49 -0400 Received: from proxy13.mail.ord1d.rsapps.net ([172.30.191.6]) by director14.mail.ord1d.rsapps.net with LMTP id 6ItCDdWYU2C7DAAAeJ7fFg (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Thu, 18 Mar 2021 14:15:49 -0400 Received: from smtp30.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy13.mail.ord1d.rsapps.net with LMTPS id UFDaDNWYU2BmQQAAgjf6aA (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Thu, 18 Mar 2021 14:15:49 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp30.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=fail (p=none; dis=none) header.from=wolfssl.com X-Suspicious-Flag: YES X-Classification-ID: f6a17882-8815-11eb-9441-5254001e8e38-1-1 Received: from [216.105.38.7] ([216.105.38.7:40140] helo=lists.sourceforge.net) by smtp30.gate.ord1d.rsapps.net (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 75/F8-07319-4D893506; Thu, 18 Mar 2021 14:15:48 -0400 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.90_1) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1lMxAl-0002KW-GL; Thu, 18 Mar 2021 18:15:03 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from <juliusz@wolfssl.com>) id 1lMxA5-0002DY-SU for openvpn-devel@lists.sourceforge.net; Thu, 18 Mar 2021 18:14:21 +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:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2zo+VNjERcfT85S7pE/QtLRZjQgdC6jST2XcvAPn92Y=; b=aj5Kecx98Ha5Jhnl5gnzPgbtfN +qZkNCeX58bHoGrE2O9eDXZdR6uLHQFzUD5bbBHP06/zHDKnG7xjILTF38PqyKoP34gkGq2LA6dQa RsIIrX4GezgSMnJtGVuFgv3r6rBXhlQGk4ut0qvWLeFwCJk+yMtZrjvQWHxpdk8S4+DM=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=2zo+VNjERcfT85S7pE/QtLRZjQgdC6jST2XcvAPn92Y=; b=Y bGkqUqGQ6sig6w4Fjx/hlnUzu4SiP7OzFOqkLsGbWsGdsSHRz1mvkGS1As9NbSzsGtCmCIvlVtPwU WorepBwFd8xRxbCz8LQK6o4ITNlxl1QO/5Mkn8S/wKsdQDpBxL6nsw3ReFaGXwnVDoJH28kWmKGT5 zqiqI49rrX73Ajww=; Received: from p3plsmtpa08-07.prod.phx3.secureserver.net ([173.201.193.108]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1lMx9q-00Fq9m-DS for openvpn-devel@lists.sourceforge.net; Thu, 18 Mar 2021 18:14:21 +0000 Received: from localhost.localdomain ([77.254.7.13]) by :SMTPAUTH: with ESMTPSA id Mx8ml6QOOW7O2Mx9hlanio; Thu, 18 Mar 2021 11:13:58 -0700 X-CMAE-Analysis: v=2.4 cv=dpEet3s4 c=1 sm=1 tr=0 ts=60539866 a=wJoMW5e4oyNtTtYMQykkDQ==:117 a=wJoMW5e4oyNtTtYMQykkDQ==:17 a=VTTltBjBAAAA:8 a=nY0yCTGE356X9lFqgEUA:9 a=on_vo79ac8RWgsiwd8Ea:22 X-SECURESERVER-ACCT: juliusz@wolfssl.com From: Juliusz Sosinowicz <juliusz@wolfssl.com> To: openvpn-devel@lists.sourceforge.net Date: Thu, 18 Mar 2021 19:12:58 +0100 Message-Id: <20210318181258.89704-1-juliusz@wolfssl.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CMAE-Envelope: MS4xfN6tq7su0r98KpOi/HodN7vpkeINxkX1ibP3p/A3cT0muYZ6xpHnkZsYN5PcuiQxsu/+PW8hvIlAj4LPZKAWuSZMgAcRgOq14N4Z26wAF1ZKhE8KJaVB qUTED02A0K/LpFzC/11v7iIGSfNhTtTesstJww8CXPA46V+r09z7R+G6np8IfsnC8v47XNdZ6RUxWxgbnrQhE61fi70oxsKRo4KJxIMJXROB2g0Uh0iIk3mb 0F49/TvGCpjOqHs7s6Nc0A== X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 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: wolfssl.com] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [173.201.193.108 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [173.201.193.108 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 TIME_LIMIT_EXCEEDED Exceeded time limit / deadline X-Headers-End: 1lMx9q-00Fq9m-DS Subject: [Openvpn-devel] [PATCH] Add PKG_CHECK_VAR compatibility definition for old autoconf versions X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openvpn-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel> List-Post: <mailto:openvpn-devel@lists.sourceforge.net> List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox |
| Series |
[Openvpn-devel] Add PKG_CHECK_VAR compatibility definition for old autoconf versions
|
|
Commit Message
Juliusz Sosinowicz
March 18, 2021, 7:12 a.m. UTC
PKG_CHECK_VAR is not available on older versions of autoconf. This patch copies the definition generated by newer versions of autoconf to be used for compatibility with older versions. Tested with automake 1.14.1-2ubuntu1 and autoconf 2.69-6.
Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
---
compat.m4 | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
Comments
On 18/03/2021 19:12, Juliusz Sosinowicz wrote: > PKG_CHECK_VAR is not available on older versions of autoconf. This > patch copies the definition generated by newer versions of autoconf to > be used for compatibility with older versions. Tested with automake > 1.14.1-2ubuntu1 and autoconf 2.69-6. > > Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com> I ended up doing some more investigation here, to better understand where this could fail. So it seems this is not related to automake/autoconf versions. It is related to pkg-config version, which is the one providing /usr/share/aclocal/pkg.m4 which provides the PKG_CHECK_VAR() macro. <https://gitlab.freedesktop.org/pkg-config/pkg-config/-/commit/5b463c927b6caeb332bb147572ea82b1650ceb7d> What surprises me is that this was added to pkg-config 0.28, which was released in 2013-01-24. The latest release, 0.29.2 was released 2017-03-20. <https://gitlab.freedesktop.org/pkg-config/pkg-config/-/commit/74ceac54ef6f9247c00f08eecd8cca811a3c5934> <https://gitlab.freedesktop.org/pkg-config/pkg-config/-/tags> It would be great to figure out if pkg-config is available on those build hosts failing without this change. If it is present, it needs to be checked which version it is. If this is due to an outdated pkg-config, I'm reluctant to give this patch an ACK. Using properly up-to-date dependency stack should be a reasonable precondition to build OpenVPN. If it is due to unavailable pkg-config, it's a different story. Regardless, the commit message is incorrect. But that can probably be fixed at commit time.
For reference, the version of pkg-config shipped on my Ubuntu 14 vm is 0.26-1ubuntu4. It looks like the default packages are very outdated. Juliusz On 18/03/2021 21:52, David Sommerseth wrote: > On 18/03/2021 19:12, Juliusz Sosinowicz wrote: >> PKG_CHECK_VAR is not available on older versions of autoconf. This >> patch copies the definition generated by newer versions of autoconf to >> be used for compatibility with older versions. Tested with automake >> 1.14.1-2ubuntu1 and autoconf 2.69-6. >> >> Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com> > > I ended up doing some more investigation here, to better understand > where this could fail. > > So it seems this is not related to automake/autoconf versions. It is > related to pkg-config version, which is the one providing > /usr/share/aclocal/pkg.m4 which provides the PKG_CHECK_VAR() macro. > > <https://gitlab.freedesktop.org/pkg-config/pkg-config/-/commit/5b463c927b6caeb332bb147572ea82b1650ceb7d> > > > What surprises me is that this was added to pkg-config 0.28, which was > released in 2013-01-24. The latest release, 0.29.2 was released > 2017-03-20. > > <https://gitlab.freedesktop.org/pkg-config/pkg-config/-/commit/74ceac54ef6f9247c00f08eecd8cca811a3c5934> > > <https://gitlab.freedesktop.org/pkg-config/pkg-config/-/tags> > > It would be great to figure out if pkg-config is available on those > build hosts failing without this change. If it is present, it needs > to be checked which version it is. > > If this is due to an outdated pkg-config, I'm reluctant to give this > patch an ACK. Using properly up-to-date dependency stack should be a > reasonable precondition to build OpenVPN. If it is due to unavailable > pkg-config, it's a different story. > > Regardless, the commit message is incorrect. But that can probably be > fixed at commit time. > >
On 18/03/2021 21:52, David Sommerseth wrote: > It would be great to figure out if pkg-config is available on those > build hosts failing without this change. If it is present, it needs to > be checked which version it is. > > If this is due to an outdated pkg-config, I'm reluctant to give this > patch an ACK. Using properly up-to-date dependency stack should be a > reasonable precondition to build OpenVPN. If it is due to unavailable > pkg-config, it's a different story. So I managed to test this more properly on RHEL-7 and CentOS-7. This major release is forked off from a mixture of Fedora 19 and 20. And pkgconfig got upgraded from 0.27 in F19 to 0.28 in F20; but this was not pulled into RHEL-7 (which CentOS-7 builds on). This is also the latest pkgconfig version available on RHEL-7, which is the oldest enterprise Linux distro we support. So my concern about not up-to-date dependency stack is no longer valid. We need this change. If Gert is fine with updating the commit message at commit time, I'm ready to give it my ACK now. I propose this commit message: ---------------------------------------------------------------------- build: Add support for pkg-config < 0.28 RHEL-7 ships pkgconfig-0.27-1 which is lacking the PKG_CHECK_VAR() m4 macro. This might be the situation on other OS distributions as well. Ship our own macro providing this support when not found on the build host. ---------------------------------------------------------------------- Acked-By: David Sommerseth <davids@openvpn.net>
On 19/03/2021 00:00, Juliusz Sosinowicz wrote: > For reference, the version of pkg-config shipped on my Ubuntu 14 vm is > 0.26-1ubuntu4. It looks like the default packages are very outdated. Thanks for checking. You might want to reconsider if you want to support Ubuntu 14 these days; Ubuntu 16.04 LTS is the oldest one supported by Canonical, and after end of April this year only 16.04.4 is supported. <https://endoflife.software/operating-systems/linux/ubuntu>
Am 18.03.2021 um 21:52 schrieb David Sommerseth: > If this is due to an outdated pkg-config, I'm reluctant to give this > patch an ACK. Using properly up-to-date dependency stack should be a > reasonable precondition to build OpenVPN. If it is due to unavailable > pkg-config, it's a different story. We support RHEL7, which also has pkgconfig 0.27. So that is also a problem. And even if RHEL7 shipped a version that was recent enough, denying Ubuntu 16 support because an old dependency that can be fixed with this small change like would be quite a hyprocrasy as we supported old RHEL versions for a long time in OpenVPN often needing a lot larger compromises. In fact RHEL7/CentOS 7 is currently in my opinion only reason to still support OpenSSL 1.0.2, which has has reached end of life on 2019-12-31. Arne
Hi, On Fri, Mar 19, 2021 at 12:16:28AM +0100, David Sommerseth wrote: > On 19/03/2021 00:00, Juliusz Sosinowicz wrote: > > For reference, the version of pkg-config shipped on my Ubuntu 14 vm is > > 0.26-1ubuntu4. It looks like the default packages are very outdated. > > Thanks for checking. You might want to reconsider if you want to > support Ubuntu 14 these days; Ubuntu 16.04 LTS is the oldest one > supported by Canonical, and after end of April this year only 16.04.4 is > supported. > > <https://endoflife.software/operating-systems/linux/ubuntu> Ubuntu 16 and Ubuntu 18 (!) also have this old stuff and fail building, so it seems "updating pkgconfig" is really not their prime priority. I'll merge with the new commit message. Thanks for the review. gert
Your patch has been applied to the master branch.
I have amended the commit message to point out what David found out, that
this is related to pkg-config version and not autoconf itself. The patch
itself is unchanged.
I have thrown this branch towards all our buildbots first, and everything
builds again (well, it builds syntactically correct "configure" scripts,
that then fail at "missing lz4", but that's not your fault). THANKS!
commit 60c18b45c04f4c86241d9f6e4dc422c5c07405a1
Author: Juliusz Sosinowicz
Date: Thu Mar 18 19:12:58 2021 +0100
build: Add support for pkg-config < 0.28 for old autoconf versions
Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20210318181258.89704-1-juliusz@wolfssl.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21708.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/compat.m4 b/compat.m4 index e54a7203..47650f6d 100644 --- a/compat.m4 +++ b/compat.m4 @@ -64,6 +64,22 @@ ifdef( AC_DEFUN([AC_TYPE_UINT64_T], []) ] ) +ifdef( + [PKG_CHECK_VAR], + , + [ + AC_DEFUN([PKG_CHECK_VAR], + [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config]) + + _PKG_CONFIG([$1], [variable="][$3]["], [$2]) + AS_VAR_COPY([$1], [pkg_cv_][$1]) + + AS_VAR_IF([$1], [""], [$5], [$4]) + ]) + ] +) + if test -z "${docdir}"; then docdir="\$(datadir)/doc/\$(PACKAGE_NAME)" AC_SUBST([docdir])