From nobody Sun Aug 06 13:48:58 2023 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 4RJgmc2qTrz4TmN0 for ; Sun, 6 Aug 2023 13:49:36 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RJgmb6NFdz4bNh for ; Sun, 6 Aug 2023 13:49:35 +0000 (UTC) (envelope-from sunpoet@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691329775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6dCx+DqV5QiLoMZIBoVVM91LyXt4hoB2pyWpGFLwmUo=; b=gWhFPX44WValmFyFlPDst1CZTQ0xTqgET4XLF2qSsqEPSPYb+/uhADQRO0s5P/wPG0MovX HSeY1ENzkaxadnr3IXqjD4Nz36GvKVz/aAjSn51oLv5MszTxmfntwm1u59hrw01wn0/22n j+6qRc934t9olPqeQ75Hz8x+N6YH+tBH5xWpqGGATMTYM16FNxZaz6xE8EWsDN1VlQP83m zPUc9gWy6lHrIirSR081/qgTYrofK+x1xygrWbup2hBLYGcEMDby2NTuMT94jyP2T8cWm/ N5Kp+TkMcyr72sVOEeNDvN764ofQfE9IraZ842dMtqysgBNO2nJA1NoyXN8kEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691329775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6dCx+DqV5QiLoMZIBoVVM91LyXt4hoB2pyWpGFLwmUo=; b=kooAGkRKtCfoRHg22OWBiPiV6Ia4rXKTO79Q2QZ92VNYWRnbUDSxUzcHjH1haH53TpCSkt 5Pzki6QTxPj03Xw9SE76RFt70qKmwSVXkV7zLl2nEOjbaNqedNbtiwFJh9RmgxCHaf9fEx MZBbLtLNcyDbp6hhEX9BwF9UlQhs//Y2rKUWrWT2z8uvc6xihFfVhey+KYU5KfsaU+76lX wrA5P4mzjrwQbRs7TwcfoXW44WWRzLM5Ww5yH0fwbQwZOd19pMNI/jXROSpjYLSoQX7QWZ Lr28otcGVKs03fx+TdNNF6GmIillYYEhqzdqd1llb0VPwCpIBoCRkgl51NNIcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691329775; a=rsa-sha256; cv=none; b=UQXTk5N0D31rdhnjP74Jjo573Y/uuFJ0/RKOnv3WgRR9KPEKa+/2Cdprk8wdKXI2FHZQa+ 9WD/GlfRLfWoVpRmcYMAse4yuA5tVgg5ia/zXIBSOvgNhJkij7nlFaaJY6fQoSAWJN8fID WlgGc1PdsMejizPtL2+QYdOYg4CIPhFNFx+8sC/2DZ3ZvUmroHptwTIFiK09auuf4UubTG N4JuRR+Bxh5yzhd3YArTMdoZ2yozz03S5dpFrjD5QEVMZ5OhjrFHSETPMaZhL7qE30gyCj f4K+95qfa4b4QlannU4Llx7jsTFneeUYglXOzlfuUd/chsEndUGDEyt+FQ9gWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: sunpoet) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RJgmb5FF7zCrc for ; Sun, 6 Aug 2023 13:49:35 +0000 (UTC) (envelope-from sunpoet@freebsd.org) Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2b962c226ceso57002401fa.3 for ; Sun, 06 Aug 2023 06:49:35 -0700 (PDT) X-Gm-Message-State: AOJu0YzSyy+Ad7ue/ea/tYFFnqS8QzcslzD1GC6ShSNLTEdHT/rN6fzb bvmG0IzAN7cNyxJH+higThvT9BuwSrEM42y4qcHmSw== X-Google-Smtp-Source: AGHT+IHbQwuZysNCDOeu91zoNiL+nUKdOJHo+gOBo5BFCIePG9Fe/xvZM6cjNlzgUEQS3/6zhUTfu6lBl1ZkK66Amks= X-Received: by 2002:a2e:9215:0:b0:2ba:cbb:47a6 with SMTP id k21-20020a2e9215000000b002ba0cbb47a6mr4922222ljg.5.1691329774138; Sun, 06 Aug 2023 06:49:34 -0700 (PDT) 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: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 References: <202307091033.369AXqZ7055562@gitrepo.freebsd.org> In-Reply-To: From: Po-Chuan Hsieh Date: Sun, 6 Aug 2023 21:48:58 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: c25f0c013e88 - main - databases/libmemcached: Skip libcrypto.pc when using SSL from base system To: Daniel Engberg Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000062cef806024166f7" --00000000000062cef806024166f7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Aug 1, 2023 at 11:08=E2=80=AFAM Daniel Engberg = wrote: > On 2023-07-09 12:33, Po-Chuan Hsieh wrote: > > The branch main has been updated by sunpoet: > > > > URL: > > > https://cgit.FreeBSD.org/ports/commit/?id=3Dc25f0c013e88d84c620b2bb8c5615= 8e9ca7f8bef > > > > commit c25f0c013e88d84c620b2bb8c56158e9ca7f8bef > > Author: Po-Chuan Hsieh > > AuthorDate: 2023-07-09 10:17:04 +0000 > > Commit: Po-Chuan Hsieh > > CommitDate: 2023-07-09 10:17:04 +0000 > > > > databases/libmemcached: Skip libcrypto.pc when using SSL from base > > system > > > > - Bump PORTREVISION for package change > > --- > > databases/libmemcached/Makefile | 10 +++++++++- > > databases/libmemcached/files/extra-patch-openssl | 11 +++++++++++ > > 2 files changed, 20 insertions(+), 1 deletion(-) > > > > diff --git a/databases/libmemcached/Makefile > > b/databases/libmemcached/Makefile > > index e044f28499fd..71f031d3014f 100644 > > --- a/databases/libmemcached/Makefile > > +++ b/databases/libmemcached/Makefile > > @@ -1,5 +1,6 @@ > > PORTNAME=3D libmemcached > > PORTVERSION=3D 1.1.4 > > +PORTREVISION=3D 1 > > CATEGORIES=3D databases > > > > MAINTAINER=3D sunpoet@FreeBSD.org > > @@ -44,4 +45,11 @@ MURMUR_CMAKE_BOOL=3D ENABLE_HASH_MURMUR > > SASL_CMAKE_BOOL=3D ENABLE_SASL > > SASL_LIB_DEPENDS=3D libsasl2.so:security/cyrus-sasl2 > > > > -.include > > +.include > > + > > +# Skip libcrypto.pc while using OpenSSL from base system on older > > FreeBSD versions which does not skip this file > > +.if ${SSL_DEFAULT} =3D=3D base && > > !exists(/usr/libdata/pkgconfig/libcrypto.pc) > > +EXTRA_PATCHES+=3D ${PATCHDIR}/extra-patch-openssl > > +.endif > > + > > +.include > > diff --git a/databases/libmemcached/files/extra-patch-openssl > > b/databases/libmemcached/files/extra-patch-openssl > > new file mode 100644 > > index 000000000000..bf65fa7f4ece > > --- /dev/null > > +++ b/databases/libmemcached/files/extra-patch-openssl > > @@ -0,0 +1,11 @@ > > +--- src/libhashkit/CMakeLists.txt.orig 2023-03-06 08:47:30 UTC > > ++++ src/libhashkit/CMakeLists.txt > > +@@ -45,7 +45,7 @@ if(ENABLE_OPENSSL_CRYPTO) > > + if(OPENSSL_CRYPTO_LIBRARY) > > + target_compile_definitions(libhashkit > > PRIVATE HAVE_OPENSSL_CRYPTO) > > + target_link_libraries(libhashkit PUBLIC > > OpenSSL::Crypto) > > +- pkgconfig_export(REQUIRES_PRIVATE libcrypto) > > ++ pkgconfig_export(REQUIRES_PRIVATE "") > > + else() > > + message(WARNING "Could not find > > OpenSSL::Crypto") > > + endif() > > Hi, > > Resending as I didn't get a reply last time, > > I few things I noticed compared to the PR I submitted about this port. > > -std=3Dgnu++17 is set when unit tests are enabled so USES=3D > compiler:c++11-lang is incorrect > USES=3Dcompiler:c++11-lang for build is correct. I know that c++17 is required for the tests. But USES=3Dcompiler:c++11-lang is effectively the same as USES=3Dcompiler:c++17-lang. > Is there a reason why default filenames aren't used for patches? > The default filename comes from the path is OK. But it tells you nothing but the path which is already in the diff header. Naming the patch file by its purpose is better here. > Why are we using flex from base rather from ports? > What's wrong with flex from base? If you notice any issue, I'm happy to fix it. That openssl patch can be improved by doing something like this, > https://cgit.freebsd.org/ports/tree/archivers/libarchive/Makefile#n124 > > Best regards, > Daniel > --00000000000062cef806024166f7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Aug 1, 2023 at 11:08=E2=80=AFAM D= aniel Engberg <diizzy@freebsd.org<= /a>> wrote:
On 2023-07-09 12:33, Po-Chuan Hsieh wrote:
> The branch main has been updated by sunpoet:
>
> URL:
>
https://cgi= t.FreeBSD.org/ports/commit/?id=3Dc25f0c013e88d84c620b2bb8c56158e9ca7f8bef
>
> commit c25f0c013e88d84c620b2bb8c56158e9ca7f8bef
> Author:=C2=A0 =C2=A0 =C2=A0Po-Chuan Hsieh <sunpoet@FreeBSD.org><= br> > AuthorDate: 2023-07-09 10:17:04 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Po-Chuan Hsieh <sunpoet@FreeBSD.org><= br> > CommitDate: 2023-07-09 10:17:04 +0000
>
>=C2=A0 =C2=A0 =C2=A0databases/libmemcached: Skip libcrypto.pc when usin= g SSL from base
> system
>
>=C2=A0 =C2=A0 =C2=A0- Bump PORTREVISION for package change
> ---
>=C2=A0 databases/libmemcached/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 10 +++++++++-
>=C2=A0 databases/libmemcached/files/extra-patch-openssl | 11 ++++++++++= +
>=C2=A0 2 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/databases/libmemcached/Makefile
> b/databases/libmemcached/Makefile
> index e044f28499fd..71f031d3014f 100644
> --- a/databases/libmemcached/Makefile
> +++ b/databases/libmemcached/Makefile
> @@ -1,5 +1,6 @@
>=C2=A0 PORTNAME=3D=C2=A0 =C2=A0 libmemcached
>=C2=A0 PORTVERSION=3D 1.1.4
> +PORTREVISION=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 1
>=C2=A0 CATEGORIES=3D=C2=A0 databases
>
>=C2=A0 MAINTAINER=3D=C2=A0 sunpoet@FreeBSD.org
> @@ -44,4 +45,11 @@ MURMUR_CMAKE_BOOL=3D ENABLE_HASH_MURMUR
>=C2=A0 SASL_CMAKE_BOOL=3D=C2=A0 =C2=A0 =C2=A0ENABLE_SASL
>=C2=A0 SASL_LIB_DEPENDS=3D=C2=A0 =C2=A0 libsasl2.so:security/cyrus-sasl= 2
>
> -.include <
bsd.port.mk>
> +.include <bsd.port.pre.mk>
> +
> +# Skip libcrypto.pc while using OpenSSL from base system on older
> FreeBSD versions which does not skip this file
> +.if ${SSL_DEFAULT} =3D=3D base &&
> !exists(/usr/libdata/pkgconfig/libcrypto.pc)
> +EXTRA_PATCHES+=3D=C2=A0 =C2=A0 =C2=A0 ${PATCHDIR}/extra-patch-openssl=
> +.endif
> +
> +.include <bsd.port.post.mk>
> diff --git a/databases/libmemcached/files/extra-patch-openssl
> b/databases/libmemcached/files/extra-patch-openssl
> new file mode 100644
> index 000000000000..bf65fa7f4ece
> --- /dev/null
> +++ b/databases/libmemcached/files/extra-patch-openssl
> @@ -0,0 +1,11 @@
> +--- src/libhashkit/CMakeLists.txt.orig=C2=A0 =C2=A0 =C2=A0 =C2=A02023= -03-06 08:47:30 UTC
> ++++ src/libhashkit/CMakeLists.txt
> +@@ -45,7 +45,7 @@ if(ENABLE_OPENSSL_CRYPTO)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if(OPEN= SSL_CRYPTO_LIBRARY)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0target_compile_definitions(libhashkit
> PRIVATE HAVE_OPENSSL_CRYPTO)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0target_link_libraries(libhashkit PUBLIC
> OpenSSL::Crypto)
> +-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 pkgconfig_export(REQUIRES_PRIVATE libcrypto)
> ++=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 pkgconfig_export(REQUIRES_PRIVATE "")
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else()<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0message(WARNING "Could not find
> OpenSSL::Crypto")
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0endif()=

Hi,

Resending as I didn't get a reply last time,

I few things I noticed compared to the PR I submitted about this port.

-std=3Dgnu++17 is set when unit tests are enabled so USES=3D
compiler:c++11-lang is incorrect

USES=3Dcomp= iler:c++11-lang for build is correct.
I know that c++17 is required for = the tests.
But USES=3Dcompiler:c++11-lang is effectively the same a= s USES=3Dcompiler:c++17-lang.
=C2=A0
Is there a reason why default filenames aren't used for patches?

The default filename comes from the path is O= K.
But it tells you nothing but the path which is already in the d= iff header.
Naming the patch file by its purpose is better here.
<= div>=C2=A0
Why are we using flex from base rather from ports?
What's wrong with flex from base? If you notice any issue, = I'm happy to fix it.

That openssl patch can be improved by doing something like this,
https://cgit.freebsd.org/ports= /tree/archivers/libarchive/Makefile#n124

Best regards,
Daniel
--00000000000062cef806024166f7--