Accepting request 582229 from server:mail
- Implement shared library packaging guideline. - forward req nnnnnn by elvigia OBS-URL: https://build.opensuse.org/request/show/582229 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libesmtp?expand=0&rev=20
This commit is contained in:
commit
cb7ed94e55
77
libesmtp-openssl11.patch
Normal file
77
libesmtp-openssl11.patch
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
Index: libesmtp-1.0.6/ntlm/ntlmdes.c
|
||||||
|
===================================================================
|
||||||
|
--- libesmtp-1.0.6.orig/ntlm/ntlmdes.c
|
||||||
|
+++ libesmtp-1.0.6/ntlm/ntlmdes.c
|
||||||
|
@@ -26,9 +26,21 @@
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <openssl/des.h>
|
||||||
|
#include <openssl/md4.h>
|
||||||
|
+#include <openssl/opensslv.h>
|
||||||
|
|
||||||
|
#include "ntlm.h"
|
||||||
|
|
||||||
|
+/* OpenSSL 1.1 compat shim */
|
||||||
|
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
|
||||||
|
+# define des_cblock DES_cblock
|
||||||
|
+# define const_des_cblock const_DES_cblock
|
||||||
|
+# define des_key_schedule DES_key_schedule
|
||||||
|
+# define des_set_odd_parity(k) DES_set_odd_parity((k))
|
||||||
|
+# define des_set_key(k,ks) DES_set_key((k),&(ks))
|
||||||
|
+# define des_ecb_encrypt(i,o,k,e) DES_ecb_encrypt((i),(o),&(k),(e))
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
lm_deshash (void *result, const_des_cblock *iv, const void *secret)
|
||||||
|
{
|
||||||
|
Index: libesmtp-1.0.6/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- libesmtp-1.0.6.orig/configure.ac
|
||||||
|
+++ libesmtp-1.0.6/configure.ac
|
||||||
|
@@ -303,17 +303,8 @@ if test x$with_openssl != xno ; then
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
if test x$with_openssl != xno ; then
|
||||||
|
- AC_CHECK_LIB(ssl, SSL_library_init, [
|
||||||
|
- with_openssl=yes
|
||||||
|
- LIBS="-lssl -lcrypto $LIBS"
|
||||||
|
- ], [
|
||||||
|
- if test x"$with_openssl" = xyes ; then
|
||||||
|
- AC_MSG_ERROR([cannot find the ssl library])
|
||||||
|
- else
|
||||||
|
- with_openssl=no
|
||||||
|
- fi],
|
||||||
|
- -lcrypto
|
||||||
|
- )
|
||||||
|
+PKG_CHECK_MODULES([SSL], [libssl])
|
||||||
|
+PKG_CHECK_MODULES([CRYPTO], [libcrypto])
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl #########################################################################
|
||||||
|
Index: libesmtp-1.0.6/ntlm/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- libesmtp-1.0.6.orig/ntlm/Makefile.am
|
||||||
|
+++ libesmtp-1.0.6/ntlm/Makefile.am
|
||||||
|
@@ -8,4 +8,5 @@ AM_CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
|
||||||
|
lib_LTLIBRARIES = sasl-ntlm.la
|
||||||
|
|
||||||
|
sasl_ntlm_la_SOURCES = client-ntlm.c ntlmdes.c ntlmstruct.c ntlm.h
|
||||||
|
-sasl_ntlm_la_LDFLAGS = -module -avoid-version @NTLM_LIBS@
|
||||||
|
+sasl_ntlm_la_LDFLAGS = -no-undefined -module -shared -avoid-version -export-dynamic
|
||||||
|
+sasl_ntlm_la_LIBADD = $(CRYPTO_LIBS)
|
||||||
|
Index: libesmtp-1.0.6/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- libesmtp-1.0.6.orig/Makefile.am
|
||||||
|
+++ libesmtp-1.0.6/Makefile.am
|
||||||
|
@@ -18,9 +18,9 @@ libesmtp_la_SOURCES = auth-client.c base
|
||||||
|
libesmtp-private.h message-source.h protocol-states.h \
|
||||||
|
protocol.h rfc2822date.h siobuf.h tokens.h \
|
||||||
|
getaddrinfo.h gethostbyname.h missing.h
|
||||||
|
-libesmtp_la_LIBADD = @LTLIBOBJS@
|
||||||
|
+libesmtp_la_LIBADD = @LTLIBOBJS@ $(CRYPTO_LIBS) $(SSL_LIBS)
|
||||||
|
|
||||||
|
-libesmtp_la_LDFLAGS = -export-dynamic \
|
||||||
|
+libesmtp_la_LDFLAGS = -export-dynamic -Wl,--no-undefined \
|
||||||
|
-version-info $(LIBESMTP_VERSION)
|
||||||
|
|
||||||
|
include_HEADERS = libesmtp.h auth-client.h auth-plugin.h
|
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Mar 3 16:32:02 UTC 2018 - jengelh@inai.de
|
||||||
|
|
||||||
|
- Drop ineffective --with-pic. Drop %__-type macro indirections.
|
||||||
|
Drop redundant %clean section.
|
||||||
|
- Implement shared library packaging guideline.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 16 20:12:12 UTC 2018 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
- SSL support was silently lost on openSSL 1.1 update.
|
||||||
|
libesmtp-openssl11.patch makes things work again.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Sep 30 14:58:41 UTC 2016 - crrodriguez@opensuse.org
|
Fri Sep 30 14:58:41 UTC 2016 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: libesmtp
|
Name: libesmtp
|
||||||
|
%define lname libesmtp6
|
||||||
Version: 1.0.6
|
Version: 1.0.6
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A Library for Posting Electronic Mail
|
Summary: A Library for Posting Electronic Mail
|
||||||
@ -30,59 +31,65 @@ Patch0: libesmtp-removedecls.diff
|
|||||||
Patch1: libesmtp-1.0.4-bloat.patch
|
Patch1: libesmtp-1.0.4-bloat.patch
|
||||||
# PATCH-FIX-UPSTREAM libesmtp-tlsv12.patch crrodriguez@opensuse.org -- All TLS clients must support and use the highest TLS version available
|
# PATCH-FIX-UPSTREAM libesmtp-tlsv12.patch crrodriguez@opensuse.org -- All TLS clients must support and use the highest TLS version available
|
||||||
Patch2: libesmtp-tlsv12.patch
|
Patch2: libesmtp-tlsv12.patch
|
||||||
|
Patch3: libesmtp-openssl11.patch
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
|
BuildRequires: libtool
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
libESMTP is a library to manage posting (or submission of) electronic
|
libESMTP is a library to manage posting (or submission of) electronic
|
||||||
mail using SMTP to a preconfigured Mail Transport Agent (MTA) such as
|
mail using SMTP to a preconfigured Mail Transport Agent (MTA). It may
|
||||||
Exim. It may be used as part of a Mail User Agent (MUA) or another
|
be used as part of a Mail User Agent (MUA) or another program that
|
||||||
program that must be able to post electronic mail but where mail
|
must be able to post electronic mail but where mail functionality is
|
||||||
functionality is not that program's primary purpose.
|
not that program's primary purpose.
|
||||||
|
|
||||||
|
%package -n %lname
|
||||||
|
Summary: A Library for Posting Electronic Mail
|
||||||
|
Group: System/Libraries
|
||||||
|
|
||||||
|
%description -n %lname
|
||||||
|
libESMTP is a library to manage posting (or submission of) electronic
|
||||||
|
mail using SMTP to a preconfigured Mail Transport Agent (MTA). It may
|
||||||
|
be used as part of a Mail User Agent (MUA) or another program that
|
||||||
|
must be able to post electronic mail but where mail functionality is
|
||||||
|
not that program's primary purpose.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: A Library for Posting Electronic Mail
|
Summary: A Library for Posting Electronic Mail
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: libesmtp = %{version}
|
Requires: %lname = %version
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
libESMTP is a library to manage posting (or submission of) electronic
|
libESMTP is a library to manage posting (or submission of) electronic
|
||||||
mail using SMTP to a preconfigured Mail Transport Agent (MTA) such as
|
mail using SMTP to a preconfigured Mail Transport Agent (MTA).
|
||||||
Exim. It may be used as part of a Mail User Agent (MUA) or another
|
|
||||||
program that must be able to post electronic mail but where mail
|
This subpackage contains the API definition files.
|
||||||
functionality is not that program's primary purpose.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0
|
%patch0
|
||||||
%patch1
|
%patch1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static --with-pic \
|
autoreconf -fiv
|
||||||
--enable-ntlm \
|
%configure --with-openssl=yes --disable-static --enable-ntlm --enable-etrn \
|
||||||
--enable-etrn \
|
--disable-isoc --with-auth-plugin-dir="%_libdir/%lname-plugins"
|
||||||
--disable-isoc
|
make %{?_smp_mflags}
|
||||||
%{__make} %{?_smp_mflags}
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%makeinstall
|
%make_install
|
||||||
#uses dlsym not ltdl ..useless files
|
# library uses dlsym not ltdl
|
||||||
rm -rf %{buildroot}%{_libdir}/esmtp-plugins/*a
|
find "%buildroot" -type f -name "*.la" -delete
|
||||||
rm -rf %{buildroot}%{_libdir}/*a
|
|
||||||
|
|
||||||
%clean
|
%post -n %lname -p /sbin/ldconfig
|
||||||
rm -rf %{buildroot}
|
%postun -n %lname -p /sbin/ldconfig
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%files -n %lname
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README AUTHORS ChangeLog COPYING
|
%doc README AUTHORS ChangeLog COPYING
|
||||||
%dir %{_libdir}/esmtp-plugins
|
%_libdir/%lname-plugins/
|
||||||
%{_libdir}/esmtp-plugins/*so*
|
|
||||||
%{_libdir}/libesmtp.*so.*
|
%{_libdir}/libesmtp.*so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
|
Loading…
Reference in New Issue
Block a user