mail/msmtp: update and use libtls [was Re: use libtls in mail/msmtp]

2022-05-12 Thread Evan Silberman
Ping

Evan Silberman  wrote:
> The attached updates to 1.8.20, hooks the build to skip pkg-config
> lookup for libtls, adds the devel/gettext dependency, and patches an
> incompatibility between our makeinfo and the author's. I am able to send
> email with TLS using the resulting binary. It seems unlikely that my
> patch to the info page entirely matches the author's intent but I have
> expended all my available patience for deciphering info errors for
> today.
> 
> --Evan

---
commit 9a498564345734c603e56197fa0d067d920244c5 (master)
from: Evan Silberman 
date: Thu May  5 04:46:17 2022 UTC
 
 Update msmtp to 1.8.20 and build with libtls
 
diff 2d1d2ac39b5b1483e919c50455e13a1c16726af5 
34555dd922eb703cb99963441b1686a3d427e082
blob - 8559134974b9a5c885fc1357f007a80bb70edbe0
blob + f2d39e507c6a889139ca8f8432e5474ad8976c88
--- mail/msmtp/Makefile
+++ mail/msmtp/Makefile
@@ -1,6 +1,6 @@
 COMMENT =  SMTP plugin for MUAs
 
-DISTNAME = msmtp-1.8.19
+DISTNAME = msmtp-1.8.20
 CATEGORIES =   mail
 
 HOMEPAGE = https://marlam.de/msmtp/
@@ -8,20 +8,22 @@ HOMEPAGE =https://marlam.de/msmtp/
 # GPLv3+
 PERMIT_PACKAGE =   Yes
 
-WANTLIB = c iconv idn2 intl gnutls
+WANTLIB = c iconv idn2 intl tls
 
 MASTER_SITES = https://marlam.de/msmtp/releases/
 EXTRACT_SUFX = .tar.xz
 
 LIB_DEPENDS =  devel/libidn2 \
-   security/gnutls
+   devel/gettext
 
 SEPARATE_BUILD =   Yes
 CONFIGURE_STYLE =  gnu
 CONFIGURE_ARGS =   --with-libgsasl=no \
--with-libidn=yes \
-   --with-tls=gnutls \
+   --with-tls=libtls \
--without-libsecret
+CONFIGURE_ENV +=   libtls_LIBS="-L/usr/lib -l tls" \
+   libtls_CFLAGS="-I/usr/include"
 
 post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/msmtp
blob - 68906af7403e8ac4e6c4f13a0d0e690f46ca78df
blob + d2eefeec5c7757e5f7bc3fdba33d69c1022cfe6e
--- mail/msmtp/distinfo
+++ mail/msmtp/distinfo
@@ -1,2 +1,2 @@
-SHA256 (msmtp-1.8.19.tar.xz) = NKHhmBF2h02+TuZu4NkQPJCYmqTc3Ehh5N4Fzn5EUms=
-SIZE (msmtp-1.8.19.tar.xz) = 383100
+SHA256 (msmtp-1.8.20.tar.xz) = 2TriqvwPSK99ydCzlN8buABYi4tOjQltizzyJTROsRE=
+SIZE (msmtp-1.8.20.tar.xz) = 385696
blob - /dev/null
blob + 3af164c7669d9092bcc17beaa972d7b5608f3911 (mode 644)
--- /dev/null
+++ mail/msmtp/patches/patch-doc_msmtp_texi
@@ -0,0 +1,21 @@
+Index: doc/msmtp.texi
+--- doc/msmtp.texi.orig
 doc/msmtp.texi
+@@ -1477,7 +1477,7 @@ just like @ref{passwordeval} in msmtp) or, if none is 
+ from the key ring or, if that fails, from a prompt.
+ @end table
+ 
+-@node Example using msmtpd as a system service
++@node Example using msmtpd as a system service,,,Minimal SMTP server (msmtpd)
+ @section Example: using msmtpd as a system service
+ 
+ Only use a local interface to listen on. Run msmtpd with correct user rights
+@@ -1494,7 +1494,7 @@ start-stop-daemon --start --pidfile /var/run/msmtpd.pi
+ start-stop-daemon --stop  --pidfile /var/run/msmtpd.pid --remove-pidfile 
--quiet --signal TERM
+ @end example
+ 
+-@node Example using msmtpd to handle outgoing mail for an SMTP-based mail 
client
++@node Example using msmtpd to handle outgoing mail for an SMTP-based mail 
client,,,Minimal SMTP server (msmtpd)
+ @section Example: using msmtpd to handle outgoing mail for an SMTP-based mail 
client
+ 
+ Some mail clients cannot send outgoing mail with a program like msmtp and
blob - f96d077bb49242d5ee6de42ebd8616aa9da5dfd2
blob + f6ef771f20351e64afacf6d9f891affcff48155c
--- mail/msmtp/pkg/PLIST
+++ mail/msmtp/pkg/PLIST
@@ -18,6 +18,8 @@ share/locale/eo/LC_MESSAGES/msmtp.mo
 share/locale/fr/LC_MESSAGES/msmtp.mo
 share/locale/pt_BR/LC_MESSAGES/msmtp.mo
 share/locale/sr/LC_MESSAGES/msmtp.mo
+share/locale/ta/
+share/locale/ta/LC_MESSAGES/
 share/locale/ta/LC_MESSAGES/msmtp.mo
 share/locale/uk/LC_MESSAGES/msmtp.mo
 share/msmtp/




Re: use libtls in mail/msmtp

2022-05-04 Thread Evan Silberman
Stuart Henderson  wrote:
> On 2022/04/12 12:45, Nihal Jere wrote:
> > Hi,
> > 
> > msmtp has had libtls support for a while, so I think using
> > it would be preferable to GnuTLS. Here is an (untested) diff
> > which replaces GnuTLS with libtls.
> 
> checking for libtls >= 0.0... no
> configure: WARNING: library libtls not found:
> configure: WARNING: Package libtls was not found in the pkg-config search path
> configure: WARNING: libtls is provided by LibreSSL
> configure: WARNING: Disabling TLS support, which is very bad. Consider using 
> GnuTLS!
> 
> it wants a pkg-config file for libtls, which is not included in OpenBSD
> 
> > -WANTLIB = c iconv idn2 intl gnutls
> > +WANTLIB = c iconv idn2 intl
> 
> When it does actually build against libtls the library dependency should
> show up in "make port-lib-depends-check" too, for adding to WANTLIB.
> 
> >  MASTER_SITES =https://marlam.de/msmtp/releases/
> >  EXTRACT_SUFX =.tar.xz
> >  
> > -LIB_DEPENDS =devel/libidn2 \
> > -security/gnutls
> > +LIB_DEPENDS =devel/libidn2
> 
> There is now no dependency path to libintl, devel/gettext must be added
> to LIB_DEPENDS.

The attached updates to 1.8.20, hooks the build to skip pkg-config
lookup for libtls, adds the devel/gettext dependency, and patches an
incompatibility between our makeinfo and the author's. I am able to send
email with TLS using the resulting binary. It seems unlikely that my
patch to the info page entirely matches the author's intent but I have
expended all my available patience for deciphering info errors for
today.

--Evan

---
commit 9a498564345734c603e56197fa0d067d920244c5 (master)
from: Evan Silberman 
date: Thu May  5 04:46:17 2022 UTC
 
 Update msmtp to 1.8.20 and build with libtls
 
diff 2d1d2ac39b5b1483e919c50455e13a1c16726af5 
34555dd922eb703cb99963441b1686a3d427e082
blob - 8559134974b9a5c885fc1357f007a80bb70edbe0
blob + f2d39e507c6a889139ca8f8432e5474ad8976c88
--- mail/msmtp/Makefile
+++ mail/msmtp/Makefile
@@ -1,6 +1,6 @@
 COMMENT =  SMTP plugin for MUAs
 
-DISTNAME = msmtp-1.8.19
+DISTNAME = msmtp-1.8.20
 CATEGORIES =   mail
 
 HOMEPAGE = https://marlam.de/msmtp/
@@ -8,20 +8,22 @@ HOMEPAGE =https://marlam.de/msmtp/
 # GPLv3+
 PERMIT_PACKAGE =   Yes
 
-WANTLIB = c iconv idn2 intl gnutls
+WANTLIB = c iconv idn2 intl tls
 
 MASTER_SITES = https://marlam.de/msmtp/releases/
 EXTRACT_SUFX = .tar.xz
 
 LIB_DEPENDS =  devel/libidn2 \
-   security/gnutls
+   devel/gettext
 
 SEPARATE_BUILD =   Yes
 CONFIGURE_STYLE =  gnu
 CONFIGURE_ARGS =   --with-libgsasl=no \
--with-libidn=yes \
-   --with-tls=gnutls \
+   --with-tls=libtls \
--without-libsecret
+CONFIGURE_ENV +=   libtls_LIBS="-L/usr/lib -l tls" \
+   libtls_CFLAGS="-I/usr/include"
 
 post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/msmtp
blob - 68906af7403e8ac4e6c4f13a0d0e690f46ca78df
blob + d2eefeec5c7757e5f7bc3fdba33d69c1022cfe6e
--- mail/msmtp/distinfo
+++ mail/msmtp/distinfo
@@ -1,2 +1,2 @@
-SHA256 (msmtp-1.8.19.tar.xz) = NKHhmBF2h02+TuZu4NkQPJCYmqTc3Ehh5N4Fzn5EUms=
-SIZE (msmtp-1.8.19.tar.xz) = 383100
+SHA256 (msmtp-1.8.20.tar.xz) = 2TriqvwPSK99ydCzlN8buABYi4tOjQltizzyJTROsRE=
+SIZE (msmtp-1.8.20.tar.xz) = 385696
blob - /dev/null
blob + 3af164c7669d9092bcc17beaa972d7b5608f3911 (mode 644)
--- /dev/null
+++ mail/msmtp/patches/patch-doc_msmtp_texi
@@ -0,0 +1,21 @@
+Index: doc/msmtp.texi
+--- doc/msmtp.texi.orig
 doc/msmtp.texi
+@@ -1477,7 +1477,7 @@ just like @ref{passwordeval} in msmtp) or, if none is 
+ from the key ring or, if that fails, from a prompt.
+ @end table
+ 
+-@node Example using msmtpd as a system service
++@node Example using msmtpd as a system service,,,Minimal SMTP server (msmtpd)
+ @section Example: using msmtpd as a system service
+ 
+ Only use a local interface to listen on. Run msmtpd with correct user rights
+@@ -1494,7 +1494,7 @@ start-stop-daemon --start --pidfile /var/run/msmtpd.pi
+ start-stop-daemon --stop  --pidfile /var/run/msmtpd.pid --remove-pidfile 
--quiet --signal TERM
+ @end example
+ 
+-@node Example using msmtpd to handle outgoing mail for an SMTP-based mail 
client
++@node Example using msmtpd to handle outgoing mail for an SMTP-based mail 
client,,,Minimal SMTP server (msmtpd)
+ @section Example: using msmtpd to handle outgoing mail for an SMTP-based mail 
client
+ 
+ Some mail clients cannot send outgoing mail with a program like msmtp and
blob - f96d077bb49242d5ee6de42ebd8616aa9da5dfd2
blob + f6ef771f20351e64afacf6d9f891affcff48155c
--- mail/msmtp/pkg/PLIST
+++ mail/msmtp/pkg/PLIST
@@ -18,6 +18,8 @@ share/locale/eo/LC_MESSAGES/msmtp.mo
 share/locale/fr/LC_MESSAGES/msmtp.mo
 share/locale/pt_BR/LC_MESSAGES/msmtp.mo
 share/locale/sr/LC_MESSAGES/msmtp.mo
+share/locale/ta/

Re: use libtls in mail/msmtp

2022-04-12 Thread Stuart Henderson
On 2022/04/12 12:45, Nihal Jere wrote:
> Hi,
> 
> msmtp has had libtls support for a while, so I think using
> it would be preferable to GnuTLS. Here is an (untested) diff
> which replaces GnuTLS with libtls.

checking for libtls >= 0.0... no
configure: WARNING: library libtls not found:
configure: WARNING: Package libtls was not found in the pkg-config search path
configure: WARNING: libtls is provided by LibreSSL
configure: WARNING: Disabling TLS support, which is very bad. Consider using 
GnuTLS!

it wants a pkg-config file for libtls, which is not included in OpenBSD

> -WANTLIB = c iconv idn2 intl gnutls
> +WANTLIB = c iconv idn2 intl

When it does actually build against libtls the library dependency should
show up in "make port-lib-depends-check" too, for adding to WANTLIB.

>  MASTER_SITES =https://marlam.de/msmtp/releases/
>  EXTRACT_SUFX =.tar.xz
>  
> -LIB_DEPENDS =devel/libidn2 \
> -security/gnutls
> +LIB_DEPENDS =devel/libidn2

There is now no dependency path to libintl, devel/gettext must be added
to LIB_DEPENDS.