Friday, August 27, 2021

Re: [UPDATE] profanity 0.11.0 & change to libstrophe

On 2021/08/26 23:26, Florian Viehweger wrote:
> Hi,
>
> this updates profanity to 0.11.0.
>
> Changes are listed here [1] as they are too long to list in this mail.
>
> This version fixes several issues regarding OMEMO. Additional the XMPP
> library is changed to libstrophe, as libmesode is deprecated upstream.
>
> portcheck, 'make lib-depends-check' and 'make test' are happy for both
> profanity and libstrophe.
>
> Tested on amd64. I'm using it with 'standard' conversations with OMEMO
> and on an another server with a self signed certificate in a MUC chat
> room, again with OMEMO. No issues so far, it is running fine.
>
> As libmesode is deprecated, I've modified devel/quirks.
>
> Comments? OK?

This is looking pretty good. Couple of small things inline:

> Thanks!
>
> [1] https://github.com/profanity-im/profanity/releases/tag/0.11.0
>
>
> Index: devel/quirks/files/Quirks.pm
> ===================================================================
> RCS file: /cvs/ports/devel/quirks/files/Quirks.pm,v
> retrieving revision 1.1296
> diff -u -p -u -p -r1.1296 Quirks.pm
> --- devel/quirks/files/Quirks.pm 10 Aug 2021 20:43:52 -0000 1.1296
> +++ devel/quirks/files/Quirks.pm 26 Aug 2021 20:25:58 -0000
> @@ -477,7 +477,8 @@ my $stem_extensions = {
> 'py-spark-parser' => 'py3-spark-parser',
> 'py-xdis' => 'py3-xdis',
> 'py-uncompyle6' => 'py3-uncompyle6',
> - 'py-click' => 'py3-click'
> + 'py-click' => 'py3-click',
> + 'libmesode' => 'libstrophe'
> };
>
> my $obsolete_reason = {};
> @@ -647,7 +648,6 @@ setup_obsolete_reason(
> 6 => 'suricata-update',
> 1 => 'exploitdb-papers',
> 3 => 'nautilus-sendto',
> - 5 => 'libstrophe',
> 2 => 'ghostview',
> 7 => 'libcudf',
> 7 => 'ocaml-cudf',
> @@ -1234,6 +1234,7 @@ setup_obsolete_reason(
> 3 => 'qt4-postgresql',
> 3 => 'qt4-sqlite2',
> 3 => 'qt4-tds',
> + 5 => 'libmesode',
> );

With the $stem_extensions addition that will automatically replace
libmesode with libstrophe, there shouldn't be a $obsolete_reason entry
for this. quirks needs a REVISION bump.

>
> # though it's not yet used, these should be pkgnames, so that eventually
> Index: net/Makefile
> ===================================================================
> RCS file: /cvs/ports/net/Makefile,v
> retrieving revision 1.1262
> diff -u -p -u -p -r1.1262 Makefile
> --- net/Makefile 24 Jul 2021 21:33:15 -0000 1.1262
> +++ net/Makefile 26 Aug 2021 20:26:04 -0000
> @@ -225,6 +225,7 @@
> SUBDIR += libsignal-protocol-c
> SUBDIR += libsmi
> SUBDIR += libst
> + SUBDIR += libstrophe
> SUBDIR += libtorrent
> SUBDIR += libtorrent-rasterbar
> SUBDIR += libunbound

libmesode should be removed from net/Makefile

> Index: net/libmesode/Makefile
> ===================================================================
> RCS file: net/libmesode/Makefile
> diff -N net/libmesode/Makefile
> --- net/libmesode/Makefile 23 Oct 2020 13:44:41 -0000 1.6
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,39 +0,0 @@
> -# $OpenBSD: Makefile,v 1.6 2020/10/23 13:44:41 rsadowski Exp $
> -
> -COMMENT = fork of libstrophe for use with profanity XMPP client
> -
> -GH_ACCOUNT = boothj5
> -GH_PROJECT = libmesode
> -GH_TAGNAME = 0.10.1
> -
> -CATEGORIES = net devel
> -
> -SHARED_LIBS += mesode 1.0 # 0.0
> -
> -MAINTAINER = Rafael Sadowski <rsadowski@openbsd.org>
> -
> -# Dual licensed: MIT and GPLv3
> -PERMIT_PACKAGE = Yes
> -
> -WANTLIB += crypto expat ssl
> -
> -# Only needed for tests, but cannot be a TEST_DEPENDS.
> -# Check must be present at build time for tests to work.
> -BUILD_DEPENDS += devel/check
> -
> -SEPARATE_BUILD = Yes
> -
> -USE_GMAKE = Yes
> -
> -AUTOMAKE_VERSION = 1.16
> -AUTOCONF_VERSION = 2.69
> -
> -MAKE_FLAGS = CC="${CC}" \
> - CFLAGS="${CFLAGS}"
> -
> -CONFIGURE_STYLE = autoreconf
> -CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include" \
> - LDFLAGS="-L${LOCALBASE}/lib"
> -AUTORECONF = ./bootstrap.sh
> -
> -.include <bsd.port.mk>
> Index: net/libmesode/distinfo
> ===================================================================
> RCS file: net/libmesode/distinfo
> diff -N net/libmesode/distinfo
> --- net/libmesode/distinfo 23 Oct 2020 13:44:41 -0000 1.4
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,2 +0,0 @@
> -SHA256 (libmesode-0.10.1.tar.gz) = yd2QZI5z2SuQ8rCuQaddj0abEW0+aqKXwUzVe+k32Z4=
> -SIZE (libmesode-0.10.1.tar.gz) = 150629
> Index: net/libmesode/pkg/DESCR
> ===================================================================
> RCS file: net/libmesode/pkg/DESCR
> diff -N net/libmesode/pkg/DESCR
> --- net/libmesode/pkg/DESCR 3 Mar 2019 19:14:28 -0000 1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,13 +0,0 @@
> -libmesode is a minimal XMPP library written in C. libmesode is a fork of
> -libstrophe for use in Profanity (ports/net/profanity).
> -
> -Reasons for forking:
> -
> - Remove Windows support
> - Support only one XML Parser implementation (expat)
> - Support only one SSL implementation (OpenSSL)
> -
> -This simplifies maintenance of the library when used in Profanity.
> -
> -Whilst Profanity will run against libstrophe, libmesode provides extra TLS
> -functionality such as manual SSL certificate verification.
> Index: net/libmesode/pkg/PLIST
> ===================================================================
> RCS file: net/libmesode/pkg/PLIST
> diff -N net/libmesode/pkg/PLIST
> --- net/libmesode/pkg/PLIST 9 Oct 2020 19:42:09 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,6 +0,0 @@
> -@comment $OpenBSD: PLIST,v 1.2 2020/10/09 19:42:09 rsadowski Exp $
> -include/mesode.h
> -@static-lib lib/libmesode.a
> -lib/libmesode.la
> -@lib lib/libmesode.so.${LIBmesode_VERSION}
> -lib/pkgconfig/libmesode.pc
> Index: net/libstrophe/Makefile
> ===================================================================
> RCS file: /cvs/ports/net/libstrophe/Makefile,v
> retrieving revision 1.4
> diff -u -p -u -p -r1.4 Makefile
> --- net/libstrophe/Makefile 12 Jul 2019 20:48:31 -0000 1.4
> +++ net/libstrophe/Makefile 26 Aug 2021 20:26:05 -0000
> @@ -2,16 +2,16 @@
>
> COMMENT = simple, lightweight XMPP C library
>
> -V = 0.9.2
> +V = 0.10.1
> DISTNAME = libstrophe-${V}
>
> -SHARED_LIBS = strophe 2.0 # 1.0
> +SHARED_LIBS = strophe 3.0 # 2.0
>
> CATEGORIES = net devel
>
> HOMEPAGE = http://strophe.im/libstrophe/
>
> -MAINTAINER = Rafael Sadowski <rsadowski@openbsd.org>
> +MAINTAINER = Florian Viehweger <openbsd@out-of-creativity.de>
>
> # Dual licensed: MIT and GPLv3
> PERMIT_PACKAGE = Yes
> @@ -34,6 +34,5 @@ MAKE_FLAGS = CC="${CC}" CFLAGS="${CFLAG
>
> CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include" \
> LDFLAGS="-L${LOCALBASE}/lib"
> -
>
> .include <bsd.port.mk>
> Index: net/libstrophe/distinfo
> ===================================================================
> RCS file: /cvs/ports/net/libstrophe/distinfo,v
> retrieving revision 1.3
> diff -u -p -u -p -r1.3 distinfo
> --- net/libstrophe/distinfo 29 Mar 2018 19:56:59 -0000 1.3
> +++ net/libstrophe/distinfo 26 Aug 2021 20:26:05 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (libstrophe-0.9.2.tar.gz) = eH5qO5K5i2HMToo+cWWTyYZOL+KlWl9JyecOzRfEdNc=
> -SIZE (libstrophe-0.9.2.tar.gz) = 500459
> +SHA256 (libstrophe-0.10.1.tar.gz) = SRjEcCns3qLeq0sPkzbKSouxLCi3KyzsOX2YZkuUx3E=
> +SIZE (libstrophe-0.10.1.tar.gz) = 520649
> Index: net/libstrophe/patches/patch-src_tls_openssl_c
> ===================================================================
> RCS file: net/libstrophe/patches/patch-src_tls_openssl_c
> diff -N net/libstrophe/patches/patch-src_tls_openssl_c
> --- net/libstrophe/patches/patch-src_tls_openssl_c 29 Mar 2018 19:56:59 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,41 +0,0 @@
> -$OpenBSD: patch-src_tls_openssl_c,v 1.1 2018/03/29 19:56:59 rsadowski Exp $
> -
> -Index: src/tls_openssl.c
> ---- src/tls_openssl.c.orig
> -+++ src/tls_openssl.c
> -@@ -51,7 +51,7 @@ static void _tls_log_error(xmpp_ctx_t *ctx);
> -
> - void tls_initialize(void)
> - {
> --#if OPENSSL_VERSION_NUMBER < 0x10100000L
> -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
> - SSL_library_init();
> - SSL_load_error_strings();
> - #else
> -@@ -66,14 +66,14 @@ void tls_shutdown(void)
> - * openssl after libstrophe finalization. Maybe better leak some fixed
> - * memory rather than cause random crashes of the main program.
> - */
> --#if OPENSSL_VERSION_NUMBER < 0x10100000L
> -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
> - ERR_free_strings();
> - EVP_cleanup();
> - CRYPTO_cleanup_all_ex_data();
> --#if OPENSSL_VERSION_NUMBER >= 0x10002000L
> -+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
> - SSL_COMP_free_compression_methods();
> -

No comments:

Post a Comment