From nobody Sun Feb 9 09:11:44 2025 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YrMQn2ZDNz5SlTf; Sun, 09 Feb 2025 09:11:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YrMQm6GCJz3G1F; Sun, 09 Feb 2025 09:11:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739092304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfeYOZSEzeFoU461+Vqob/MFDy9KVPyzsyFoJ764UtY=; b=GugSfpbMItoGw/5Y/InukoqNTqNPxCaNjfn+4RJ7IZzrCoypYfg9DPB6ixeVWprXrsB4Ob MLCiLjGlS+LMfd4hqvIZnPW+hPycn3y3oZrwrb1tap4Jn3Op5WqIK6qQuWaXYiitgeaj/d TqP+KSMJK+SxmWDzkEz1oZE6LAi97+FG2KCyVipgeVZnAAjEle6Y3aHkQRTxLsc4ukfhJ6 2YQ0u06BLhZtQGPCtSwXwbtL6po6PTXOg+VX6J+M24PlX6Bdljw1VtecRW+PI85m1Zg2TX cz2oce7KGb4E6B522gtJsfRqJEIarrJyHdxWzAyb7G3dvVaMlXjQY7KygDdCfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739092304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfeYOZSEzeFoU461+Vqob/MFDy9KVPyzsyFoJ764UtY=; b=da1jsIcvLBe5VLGIh0kTXWHJw7RYTtbebndAN78m41rMhP+UjoTI/rZpkXc82tIlS56XYc 7UbtZNiv74+Cfj6ddB7R+KsRGjVFECb45hutcMuLARLNLfXzQQnN2waXmc3pF7NSsshlwv 2odkaqy7RdbUEKqB2QVsf7w3LEpYB8mrxgoGxcmnYhYjflqtl3JsZomNKBl+DKA25K19bX mSNhuxSXSUpN7alUERGxTVzGgwKm+870dVB1nYvbfJ7NbgME6atq6qGryCdg5KR5S709Hz 9VUVGopaBOkOeYHBgJYpHxctmt/LGMEhD4XEZtjVURQEAPmOLDPzVylTn1sKpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739092304; a=rsa-sha256; cv=none; b=jZMJzJIiEvso8AjWc4c2Hm+yp+lhtUuphYFL7mHiDNcvxvuHafH820xSXmOqlXBZaz2XSW paYAjdSbt/3n/Ghu3VO7GwXHuf8ZDqAZvKz299YuY3HUr72PfL9m6O7Kcpr9Mk7WVDXjOB uqqztU80DX7Jb295lQTm55/oHNlEHA8WsI3P2KBZnhu9tzu8Y/tPm8T5MovYfcY/iNqrNj PksZA7GWZH0OuXVLh1Szw1Zr0h5CyrN1HUd7wNg3kzIYHWfNKwwbyKXLJylZONJ7Vjj7Py KcDkymPrM0UZqOjhwD/OClqTZb3dg6YK24qZgXkHDSkCjwGcrslP75yFs7gFlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YrMQm5sdwzqxQ; Sun, 09 Feb 2025 09:11:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5199BiVg089790; Sun, 9 Feb 2025 09:11:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5199BiTu089787; Sun, 9 Feb 2025 09:11:44 GMT (envelope-from git) Date: Sun, 9 Feb 2025 09:11:44 GMT Message-Id: <202502090911.5199BiTu089787@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Eugene Grosbein Subject: git: ce0249b81507 - main - security/ipsec-tools: fix build for FreeBSD 15 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce0249b81507df3ac91fe768e8c7e9261ea5b6ae Auto-Submitted: auto-generated The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/ports/commit/?id=ce0249b81507df3ac91fe768e8c7e9261ea5b6ae commit ce0249b81507df3ac91fe768e8c7e9261ea5b6ae Author: Eugene Grosbein AuthorDate: 2025-02-09 09:04:28 +0000 Commit: Eugene Grosbein CommitDate: 2025-02-09 09:04:28 +0000 security/ipsec-tools: fix build for FreeBSD 15 FreeBSD 15.0 got some incompatible changes to the header /usr/include/netipsec/ipsec.h breaking build of this legacy code due to added "const". Fix it providing some patches that do not change the behavior. While here, suppress some warnings that pollute build log using modern Clang. This fixes build, so PORTREVISION not bumped. --- security/ipsec-tools/Makefile | 7 +++- .../ipsec-tools/files/patch-ipsec_dump_policy.c | 13 ++++++++ .../ipsec-tools/files/patch-ipsec_get_policylen.c | 11 ++++++ security/ipsec-tools/files/patch-libpfkey.h | 39 ++++++++++++++++++++++ security/ipsec-tools/files/patch-policy_parse.c | 11 ++++++ 5 files changed, 80 insertions(+), 1 deletion(-) diff --git a/security/ipsec-tools/Makefile b/security/ipsec-tools/Makefile index 8ba6e0d49df7..4f33c3990565 100644 --- a/security/ipsec-tools/Makefile +++ b/security/ipsec-tools/Makefile @@ -10,7 +10,7 @@ WWW= http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/dist/ipsec-tools/src/racoon LICENSE= BSD3CLAUSE -USES= cpe libtool tar:bzip2 ssl +USES= compiler cpe libtool tar:bzip2 ssl CONFLICTS= racoon INSTALL_TARGET= install-strip @@ -71,6 +71,11 @@ WCPSKEY_EXTRA_PATCHES= ${FILESDIR}/wildcard-psk.diff ${FILESDIR}/wildcard-psk-oa .include +.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 190 +CFLAGS+= -Wno-deprecated-declarations -Wno-deprecated-non-prototype \ + -Wno-incompatible-pointer-types-discards-qualifiers +.endif + .if ${OPSYS} == FreeBSD REQUIREMOD?= ipsec .endif diff --git a/security/ipsec-tools/files/patch-ipsec_dump_policy.c b/security/ipsec-tools/files/patch-ipsec_dump_policy.c new file mode 100644 index 000000000000..1f3ba06741d2 --- /dev/null +++ b/security/ipsec-tools/files/patch-ipsec_dump_policy.c @@ -0,0 +1,13 @@ +--- src/libipsec/ipsec_dump_policy.c.orig 2010-12-03 21:01:11.000000000 +0600 ++++ src/libipsec/ipsec_dump_policy.c 2025-02-09 15:01:50.443167000 +0700 +@@ -77,8 +77,8 @@ ipsec_dump_policy(policy, delimiter) + */ + char * + ipsec_dump_policy(policy, delimiter) +- ipsec_policy_t policy; +- __ipsec_const char *delimiter; ++ c_ipsec_policy_t policy; ++ __ipsec_nconst char *delimiter; + { + return ipsec_dump_policy1(policy, delimiter, 0); + } diff --git a/security/ipsec-tools/files/patch-ipsec_get_policylen.c b/security/ipsec-tools/files/patch-ipsec_get_policylen.c new file mode 100644 index 000000000000..206a6f6e625d --- /dev/null +++ b/security/ipsec-tools/files/patch-ipsec_get_policylen.c @@ -0,0 +1,11 @@ +--- src/libipsec/ipsec_get_policylen.c.orig 2007-07-18 12:07:50.000000000 +0000 ++++ src/libipsec/ipsec_get_policylen.c 2025-02-09 07:40:22.545915000 +0000 +@@ -48,7 +48,7 @@ + + int + ipsec_get_policylen(policy) +- ipsec_policy_t policy; ++ c_ipsec_policy_t policy; + { + return policy ? PFKEY_EXTLEN(policy) : -1; + } diff --git a/security/ipsec-tools/files/patch-libpfkey.h b/security/ipsec-tools/files/patch-libpfkey.h new file mode 100644 index 000000000000..52835c1b2cdd --- /dev/null +++ b/security/ipsec-tools/files/patch-libpfkey.h @@ -0,0 +1,39 @@ +--- src/libipsec/libpfkey.h.orig 2012-08-23 18:10:45.000000000 +0700 ++++ src/libipsec/libpfkey.h 2025-02-09 14:39:31.913248000 +0700 +@@ -34,6 +34,8 @@ + #ifndef _LIBPFKEY_H + #define _LIBPFKEY_H + ++#include ++ + #ifndef KAME_LIBPFKEY_H + #define KAME_LIBPFKEY_H + +@@ -64,6 +66,14 @@ + #define __ipsec_const const + #endif + ++#if __FreeBSD_version >= 1500019 ++typedef c_caddr_t c_ipsec_policy_t; ++#define __ipsec_nconst const ++#else ++typedef caddr_t c_ipsec_policy_t; ++#define __ipsec_nconst ++#endif ++ + struct pfkey_send_sa_args { + int so; /* socket */ + u_int type; +@@ -107,9 +117,9 @@ + void ipsec_hexdump __P((const void *, int)); + const char *ipsec_strerror __P((void)); + void kdebug_sadb __P((struct sadb_msg *)); +-ipsec_policy_t ipsec_set_policy __P((__ipsec_const char *, int)); +-int ipsec_get_policylen __P((ipsec_policy_t)); +-char *ipsec_dump_policy __P((ipsec_policy_t, __ipsec_const char *)); ++ipsec_policy_t ipsec_set_policy __P((__ipsec_nconst char *, int)); ++int ipsec_get_policylen __P((c_ipsec_policy_t)); ++char *ipsec_dump_policy __P((c_ipsec_policy_t, __ipsec_nconst char *)); + + /* PFKey Routines */ + diff --git a/security/ipsec-tools/files/patch-policy_parse.c b/security/ipsec-tools/files/patch-policy_parse.c new file mode 100644 index 000000000000..9382e7048f37 --- /dev/null +++ b/security/ipsec-tools/files/patch-policy_parse.c @@ -0,0 +1,11 @@ +--- src/libipsec/policy_parse.c.orig 2012-08-23 11:12:33.000000000 +0000 ++++ src/libipsec/policy_parse.c 2025-02-09 07:02:38.738230000 +0000 +@@ -2262,7 +2262,7 @@ ipsec_set_policy(msg, msglen) + + ipsec_policy_t + ipsec_set_policy(msg, msglen) +- __ipsec_const char *msg; ++ __ipsec_nconst char *msg; + int msglen; + { + caddr_t policy;