public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-libs/libesmtp/files/, net-libs/libesmtp/
@ 2018-10-26 18:09 Craig Andrews
  0 siblings, 0 replies; 3+ messages in thread
From: Craig Andrews @ 2018-10-26 18:09 UTC (permalink / raw
  To: gentoo-commits

commit:     fa230af7c9832b53e08d34799acbc5877a912fc5
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 26 16:50:33 2018 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Fri Oct 26 18:08:55 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa230af7

net-libs/libesmtp: Fix OpenSSL 1.1, EAPI=7 bump

Closes: https://bugs.gentoo.org/624412
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 ...esmtp-1.0.6-openssl-1.1-api-compatibility.patch | 72 ++++++++++++++++++++++
 net-libs/libesmtp/libesmtp-1.0.6-r3.ebuild         | 47 ++++++++++++++
 2 files changed, 119 insertions(+)

diff --git a/net-libs/libesmtp/files/libesmtp-1.0.6-openssl-1.1-api-compatibility.patch b/net-libs/libesmtp/files/libesmtp-1.0.6-openssl-1.1-api-compatibility.patch
new file mode 100644
index 00000000000..bc3e3f35684
--- /dev/null
+++ b/net-libs/libesmtp/files/libesmtp-1.0.6-openssl-1.1-api-compatibility.patch
@@ -0,0 +1,72 @@
+diff --git a/configure.ac b/configure.ac
+index 556f220..2c0693d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -303,7 +303,7 @@ if test x$with_openssl != xno ; then
+ 	)
+ fi
+ if test x$with_openssl != xno ; then
+-	AC_CHECK_LIB(ssl, SSL_library_init, [
++	AC_CHECK_LIB(ssl, SSL_new, [
+ 				with_openssl=yes
+ 				LIBS="-lssl -lcrypto $LIBS"
+ 		     ], [
+diff --git a/smtp-tls.c b/smtp-tls.c
+index 9a66806..cfc6589 100644
+--- a/smtp-tls.c
++++ b/smtp-tls.c
+@@ -57,6 +57,7 @@ static void *ctx_password_cb_arg;
+ #ifdef USE_PTHREADS
+ #include <pthread.h>
+ static pthread_mutex_t starttls_mutex = PTHREAD_MUTEX_INITIALIZER;
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ static pthread_mutex_t *openssl_mutex;
+ 
+ static void
+@@ -70,6 +71,7 @@ openssl_mutexcb (int mode, int n,
+     pthread_mutex_unlock (&openssl_mutex[n]);
+ }
+ #endif
++#endif
+ 
+ static int
+ starttls_init (void)
+@@ -77,6 +79,10 @@ starttls_init (void)
+   if (tls_init)
+     return 1;
+ 
++#if OPENSSL_VERSION_NUMBER < 0x10100000
++  /* starting from OpenSSL 1.1.0, OpenSSL uses a new threading API and does its own locking */
++  /* also initialization has been reworked and is done automatically */
++  /* so there's not much to do here any more */
+ #ifdef USE_PTHREADS
+   /* Set up mutexes for the OpenSSL library */
+   if (openssl_mutex == NULL)
+@@ -94,9 +100,10 @@ starttls_init (void)
+       CRYPTO_set_locking_callback (openssl_mutexcb);
+     }
+ #endif
+-  tls_init = 1;
+   SSL_load_error_strings ();
+   SSL_library_init ();
++#endif
++  tls_init = 1;
+   return 1;
+ }
+ 
+@@ -201,7 +208,15 @@ starttls_create_ctx (smtp_session_t session)
+      3207.  Servers typically support SSL as well as TLS because some
+      versions of Netscape do not support TLS.  I am assuming that all
+      currently deployed servers correctly support TLS.  */
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+   ctx = SSL_CTX_new (TLSv1_client_method ());
++#else
++  ctx = SSL_CTX_new (TLS_client_method ());
++  if (!SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION)) {
++        /* FIXME: set an error code AND free the allocated ctx */
++        return NULL;
++  }
++#endif
+ 
+   /* Load our keys and certificates.  To avoid messing with configuration
+      variables etc, use fixed paths for the certificate store.  These are

diff --git a/net-libs/libesmtp/libesmtp-1.0.6-r3.ebuild b/net-libs/libesmtp/libesmtp-1.0.6-r3.ebuild
new file mode 100644
index 00000000000..c0d28b116e7
--- /dev/null
+++ b/net-libs/libesmtp/libesmtp-1.0.6-r3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools
+
+DESCRIPTION="lib that implements the client side of the SMTP protocol"
+HOMEPAGE="http://brianstafford.info/libesmtp/"
+SRC_URI="http://brianstafford.info/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="debug libressl ntlm ssl static-libs threads"
+
+RDEPEND="
+	ssl? (
+		!libressl? ( dev-libs/openssl:0= )
+		libressl? ( dev-libs/libressl:= )
+	)"
+DEPEND="${RDEPEND}"
+DOCS=( AUTHORS ChangeLog NEWS Notes README TODO )
+PATCHES=(
+	"${FILESDIR}/${P}-openssl-1.1-api-compatibility.patch"
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		--disable-dependency-tracking \
+		$(use_enable static-libs static) \
+		--enable-all \
+		$(use_enable ntlm) \
+		$(use_enable threads pthreads) \
+		$(use_enable debug) \
+		$(use_with ssl openssl)
+}
+
+src_install() {
+	default
+	insinto /usr/share/doc/${PF}/xml
+	doins doc/api.xml
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/libesmtp/files/, net-libs/libesmtp/
@ 2021-07-26  3:25 John Helmert III
  0 siblings, 0 replies; 3+ messages in thread
From: John Helmert III @ 2021-07-26  3:25 UTC (permalink / raw
  To: gentoo-commits

commit:     00a184a68ba0372f2257b78735e7ec063cb8ff47
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 25 20:57:34 2021 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Mon Jul 26 03:12:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00a184a6

net-libs/libesmtp: drop 1.0.6-r3

Bug: https://bugs.gentoo.org/782532
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 net-libs/libesmtp/Manifest                         |  1 -
 ...esmtp-1.0.6-openssl-1.1-api-compatibility.patch | 72 ----------------------
 net-libs/libesmtp/libesmtp-1.0.6-r3.ebuild         | 49 ---------------
 net-libs/libesmtp/metadata.xml                     |  3 -
 4 files changed, 125 deletions(-)

diff --git a/net-libs/libesmtp/Manifest b/net-libs/libesmtp/Manifest
index 1f90f38fe74..63053aa86fb 100644
--- a/net-libs/libesmtp/Manifest
+++ b/net-libs/libesmtp/Manifest
@@ -1,2 +1 @@
-DIST libesmtp-1.0.6.tar.bz2 365506 BLAKE2B 9ce8c9f210e6c41c95bba55a7aec79c176c4582f5dafc1aba4fbf9adb411b75ab89d400ac7a12b7d5d24ede414cb8e2ca306299a2e156515e611d074142cf5e8 SHA512 c122fc5995b76771cce2db58c9e59597cc3a76d273feb6fc26b869f118e91bdf98a5721ee2d1de8175c376af018b5806b0379bbeba2f5da95108916028fd8dda
 DIST libesmtp-1.1.0.tar.gz 169134 BLAKE2B 94ef87c65101557f6d60a6bcd7a8b0de638c24d46536ddf602da05c09858780b0a50f9fd8dae1e54a5e9a7826d45fa6da10bad751a9be50475a8f441c94ad455 SHA512 fc2a9d9922a1807cce8c8cee627ea8fd3a79c33f0987c5a487080b1a1659fd504bc45da2f919d30eced33ab3e950105383a46ecf3365493134adc1183eb99e53

diff --git a/net-libs/libesmtp/files/libesmtp-1.0.6-openssl-1.1-api-compatibility.patch b/net-libs/libesmtp/files/libesmtp-1.0.6-openssl-1.1-api-compatibility.patch
deleted file mode 100644
index bc3e3f35684..00000000000
--- a/net-libs/libesmtp/files/libesmtp-1.0.6-openssl-1.1-api-compatibility.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index 556f220..2c0693d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -303,7 +303,7 @@ if test x$with_openssl != xno ; then
- 	)
- fi
- if test x$with_openssl != xno ; then
--	AC_CHECK_LIB(ssl, SSL_library_init, [
-+	AC_CHECK_LIB(ssl, SSL_new, [
- 				with_openssl=yes
- 				LIBS="-lssl -lcrypto $LIBS"
- 		     ], [
-diff --git a/smtp-tls.c b/smtp-tls.c
-index 9a66806..cfc6589 100644
---- a/smtp-tls.c
-+++ b/smtp-tls.c
-@@ -57,6 +57,7 @@ static void *ctx_password_cb_arg;
- #ifdef USE_PTHREADS
- #include <pthread.h>
- static pthread_mutex_t starttls_mutex = PTHREAD_MUTEX_INITIALIZER;
-+#if OPENSSL_VERSION_NUMBER < 0x10100000
- static pthread_mutex_t *openssl_mutex;
- 
- static void
-@@ -70,6 +71,7 @@ openssl_mutexcb (int mode, int n,
-     pthread_mutex_unlock (&openssl_mutex[n]);
- }
- #endif
-+#endif
- 
- static int
- starttls_init (void)
-@@ -77,6 +79,10 @@ starttls_init (void)
-   if (tls_init)
-     return 1;
- 
-+#if OPENSSL_VERSION_NUMBER < 0x10100000
-+  /* starting from OpenSSL 1.1.0, OpenSSL uses a new threading API and does its own locking */
-+  /* also initialization has been reworked and is done automatically */
-+  /* so there's not much to do here any more */
- #ifdef USE_PTHREADS
-   /* Set up mutexes for the OpenSSL library */
-   if (openssl_mutex == NULL)
-@@ -94,9 +100,10 @@ starttls_init (void)
-       CRYPTO_set_locking_callback (openssl_mutexcb);
-     }
- #endif
--  tls_init = 1;
-   SSL_load_error_strings ();
-   SSL_library_init ();
-+#endif
-+  tls_init = 1;
-   return 1;
- }
- 
-@@ -201,7 +208,15 @@ starttls_create_ctx (smtp_session_t session)
-      3207.  Servers typically support SSL as well as TLS because some
-      versions of Netscape do not support TLS.  I am assuming that all
-      currently deployed servers correctly support TLS.  */
-+#if OPENSSL_VERSION_NUMBER < 0x10100000
-   ctx = SSL_CTX_new (TLSv1_client_method ());
-+#else
-+  ctx = SSL_CTX_new (TLS_client_method ());
-+  if (!SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION)) {
-+        /* FIXME: set an error code AND free the allocated ctx */
-+        return NULL;
-+  }
-+#endif
- 
-   /* Load our keys and certificates.  To avoid messing with configuration
-      variables etc, use fixed paths for the certificate store.  These are

diff --git a/net-libs/libesmtp/libesmtp-1.0.6-r3.ebuild b/net-libs/libesmtp/libesmtp-1.0.6-r3.ebuild
deleted file mode 100644
index 8e13d2d8b76..00000000000
--- a/net-libs/libesmtp/libesmtp-1.0.6-r3.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools
-
-DESCRIPTION="lib that implements the client side of the SMTP protocol"
-HOMEPAGE="http://brianstafford.info/libesmtp/"
-SRC_URI="http://brianstafford.info/${PN}/${P}.tar.bz2"
-
-LICENSE="LGPL-2.1 GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="debug ntlm ssl static-libs threads"
-
-RDEPEND="
-	ssl? (
-		dev-libs/openssl:0=
-	)"
-DEPEND="${RDEPEND}"
-
-DOCS=( AUTHORS ChangeLog NEWS Notes README TODO )
-
-PATCHES=(
-	"${FILESDIR}/${P}-openssl-1.1-api-compatibility.patch"
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-src_configure() {
-	econf \
-		--enable-all \
-		$(use_enable static-libs static) \
-		$(use_enable ntlm) \
-		$(use_enable threads pthreads) \
-		$(use_enable debug) \
-		$(use_with ssl openssl)
-}
-
-src_install() {
-	default
-
-	docinto xml
-	dodoc doc/api.xml
-}

diff --git a/net-libs/libesmtp/metadata.xml b/net-libs/libesmtp/metadata.xml
index a7081847707..a42c167adff 100644
--- a/net-libs/libesmtp/metadata.xml
+++ b/net-libs/libesmtp/metadata.xml
@@ -2,9 +2,6 @@
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
 	<!-- maintainer-needed -->
-	<use>
-		<flag name="ntlm">Enable support for NTLM authentication</flag>
-	</use>
 	<upstream>
 		<remote-id type="github">libesmtp/libESMTP</remote-id>
 	</upstream>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/libesmtp/files/, net-libs/libesmtp/
@ 2023-10-08  8:20 Joonas Niilola
  0 siblings, 0 replies; 3+ messages in thread
From: Joonas Niilola @ 2023-10-08  8:20 UTC (permalink / raw
  To: gentoo-commits

commit:     6c55e3cb057abcb3846ef119189ceee2669f1ff1
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Sun Oct  1 16:56:31 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Oct  8 08:19:56 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c55e3cb

net-libs/libesmtp: Fix call to undeclared function strlcpy

And update EAPI 7 -> 8

Closes: https://bugs.gentoo.org/896056
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33149
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../libesmtp-1.1.0-fix-build-with-clang16.patch    | 21 ++++++++++
 net-libs/libesmtp/libesmtp-1.1.0-r2.ebuild         | 46 ++++++++++++++++++++++
 2 files changed, 67 insertions(+)

diff --git a/net-libs/libesmtp/files/libesmtp-1.1.0-fix-build-with-clang16.patch b/net-libs/libesmtp/files/libesmtp-1.1.0-fix-build-with-clang16.patch
new file mode 100644
index 000000000000..3211737e7be9
--- /dev/null
+++ b/net-libs/libesmtp/files/libesmtp-1.1.0-fix-build-with-clang16.patch
@@ -0,0 +1,21 @@
+Bug: https://bugs.gentoo.org/896056
+--- a/smtp-api.c
++++ b/smtp-api.c
+@@ -22,6 +22,7 @@
+ 
+ #include <config.h>
+ 
++#define _GNU_SOURCE
+ #include <stdarg.h>
+ #include <string.h>
+ #include <stdlib.h>
+--- a/smtp-tls.c
++++ b/smtp-tls.c
+@@ -47,6 +47,7 @@
+ 
+ /* This stuff doesn't belong here */
+ /* vvvvvvvvvvv */
++#define _GNU_SOURCE
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>

diff --git a/net-libs/libesmtp/libesmtp-1.1.0-r2.ebuild b/net-libs/libesmtp/libesmtp-1.1.0-r2.ebuild
new file mode 100644
index 000000000000..35783f626e67
--- /dev/null
+++ b/net-libs/libesmtp/libesmtp-1.1.0-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson
+
+DESCRIPTION="Lib that implements the client side of the SMTP protocol"
+HOMEPAGE="https://libesmtp.github.io/"
+if [[ "${PV}" == *9999 ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/libesmtp/libESMTP.git"
+else
+	SRC_URI="https://github.com/libesmtp/libESMTP/archive/v${PV/_}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/libESMTP-${PV}"
+
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+LICENSE="LGPL-2.1+ GPL-2+"
+# 0/7 was a snapshot before 1.1.0
+# The SONAME was fixed just before the 1.1.0 release was made
+# ... but a patch was needed to get it exactly right too
+# so, we're on 0/8 now, even though ABI compatibility actually remained
+# in terms of symbols with the original <1.1.0.
+SLOT="0/8"
+IUSE="ssl static-libs threads"
+
+RDEPEND="ssl? ( >=dev-libs/openssl-1.1.0:0= )"
+DEPEND="${RDEPEND}"
+
+DOCS=( docs/{authors,bugreport,ChangeLog,faq,NEWS}.md README.md )
+
+PATCHES=(
+	"${FILESDIR}"/${P}-fix-soname.patch
+	"${FILESDIR}"/${P}-fix-build-with-clang16.patch
+)
+
+src_configure() {
+	local emesonargs=(
+		-Ddefault_library="$(usex static-libs both shared)"
+		$(meson_feature ssl tls)
+		$(meson_feature threads pthreads)
+	)
+	meson_src_configure
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-08  8:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-26 18:09 [gentoo-commits] repo/gentoo:master commit in: net-libs/libesmtp/files/, net-libs/libesmtp/ Craig Andrews
  -- strict thread matches above, loose matches on Subject: below --
2021-07-26  3:25 John Helmert III
2023-10-08  8:20 Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox