Hello Stuart, all.

Stuart Henderson <[email protected]> wrote:
 |On 2018/03/09 18:39, Steffen Nurpmeso wrote:
 |> Stuart Henderson <[email protected]> wrote:
 |>|On 2018/03/08 17:35, Steffen Nurpmeso wrote:
 |>|> This brings in two and a half years of development and bug fixes.
 |>|> It has really improved, though a long road is ahead still.
 |>|> Changelog etc. at: https://www.sdaoden.eu/code-nail-ann.html
 ...
 |>|It picks up idn2 in preference to idn if present at build, so
 |>|WANTLIB/LIB_DEPENDS needs fixing.
 |> 
 |> ..Ok.. hmm.  I must say i dislike the entire IDN stuff very very
 |> much (if 25 years ago the DNS had some extensions to support
 |> longer labels UTF-8 could be it; even globally), so instead i have
 |> changed the configuration to prefer IDN over IDN2, and added the
 |> changeset as a patch for the OpenBSD port.  I really would prefer
 |> this approach and have no IDN2 around, if possible. ?
 |
 |Hm - I haven't been keeping close track of IDN, but don't some
 |DNS registrars (like .de) require IDNA 2008 (i.e. libidn2)?
 |There was a CVE in curl relating to this a couple of years ago.

Yes.  They use this backward incompatible stuff and also seem to
promote DNSSEC (instead of DNS/DTLS and/or DNS/TCP/TLS, imho).
Isn't it absurd that instead of using UTF-7 for internationalized
DNS with an extension bit to support longer names they have chosen
that mysterious algorithm to provide backward compatible somewhat
shorter-than-UTF-7 ASCII representations, and then just break
compatibility with already existing names with a shrug.  No.

Heck, whatever you say.  It is much larger, of course.  It took
two hours to compile here...  And noone uses it. :)
So how about adding an "idna" FLAVOR!?!

(For the future i have implemented an any_of mechanism, so we can
say VAL_IDNA="idn2 idnkit" in the future.
Thanks for pointing this out (it tips the scale in fact,
i wondered just last week how to allow users and the test to
choose the used PRG implementation, and have added non-generic
OPT_SSL_RANDOM, this has to go again).  Credits went to you.)

  ...
 |> Running "make test" does not work because we verify $HOME is an
 |> accessible directory, which the port framework does not provide.
  ...
 |Funnily enough this came up in another list post today.
 |You can either set PORTHOME as a port Makefile variable, or set
 |HOME as an environment variable for test. Using ${WRKDIR} for
 |this is often a good choice.

Ah, ok, i did not find anything in FAQ, and then refrained
from asking.  Now am seeing it in bsd.port.mk(5).
Did the first, ok?

Fine, so with a corrected patch (was not a double free indeed,
kept on wondering), and a patch for that false printf(1) in the
test, IDN2 patch removed and IDN2 dependency added for a new idna
FLAVOR (thus not using the .xz tarball since only IDN2 brings xz;
unfortunately there is no zstd(1) packaging around yet, nor is it
in the OpenBSD base system), all tests work and we end up as
pasted below.

Thanks Stuart for the comments and suggestions, a nice weekend
i wish you, and all,
Ciao already here,

Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/s-nail/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- Makefile    8 Dec 2017 01:04:14 -0000       1.19
+++ Makefile    10 Mar 2018 21:56:02 -0000
@@ -1,45 +1,51 @@
 # $OpenBSD: Makefile,v 1.19 2017/12/08 01:04:14 espie Exp $
 
-COMMENT=               enhanced, MIME capable Berkeley Mail
+COMMENT=       SysV mail/BSD Mail/POSIX mailx: send and receive mail
 
-DISTNAME=              s-nail-14.8.16
-CATEGORIES=            mail
-HOMEPAGE=              https://www.sdaoden.eu/code.html\#s-mailx
-FIX_EXTRACT_PERMISSIONS=Yes
+DISTNAME=      s-nail-14.9.9
+CATEGORIES=    mail
+FLAVORS=       idna
+HOMEPAGE=      https://www.sdaoden.eu/code.html\#s-mailx
+MAINTAINER=    Dmitrij D. Czarkoff <[email protected]>
 
+MASTER_SITES=  https://ftp.sdaoden.eu/
 # BSD
-PERMIT_PACKAGE_CDROM=  Yes
-
-WANTLIB += c crypto iconv idn ssl
-
-MASTER_SITES=          https://www.sdaoden.eu/downloads/
-MAINTAINER=            Dmitrij D. Czarkoff <[email protected]>
+PERMIT_PACKAGE_CDROM=Yes
+# XXX remove FIX_EXTRACT_PERMISSIONS with update to version >14.9.9
+FIX_EXTRACT_PERMISSIONS=Yes
 
-MAKE_FILE=             makefile
-MAKE_FLAGS=            CC="${CC}" \
-                       CFLAGS="${CFLAGS}" \
-                       C_INCLUDE_PATH="${LOCALBASE}/include" \
-                       LDFLAGS="${LDFLAGS}" \
-                       LD_LIBRARY_PATH="${LOCALBASE}/lib" \
-                       MANDIR="${PREFIX}/man" \
-                       SYSCONFDIR="${SYSCONFDIR}" \
-                       WANT_AUTOCC=0 \
-                       WANT_EDITLINE=0 \
-                       WANT_NCL=1 \
-                       WANT_DOTLOCK=0 \
-                       SID=
+FLAVOR?=
+WANTLIB=       c crypto curses iconv ssl
+LIB_DEPENDS=   converters/libiconv
+.if ${FLAVOR:Midna}
+WANTLIB+=      idn2
+LIB_DEPENDS+=  devel/libidn2
+.endif
 
+PORTHOME=      ${WRKDIR}
+MAKE_FILE=     makefile
+MAKE_ENV=      VERBOSE=anynonempty
+MAKE_FLAGS=    C_INCLUDE_PATH="${LOCALBASE}/include" \
+               LD_LIBRARY_PATH="${LOCALBASE}/lib" \
+               VAL_MANDIR="${PREFIX}/man" \
+               VAL_SYSCONFDIR="${SYSCONFDIR}" \
+               VAL_SID= \
+               \
+                       OPT_AGENT=no \
+               OPT_AUTOCC=no \
+               OPT_DOTLOCK=no \
+                       OPT_GSSAPI=no \
+               OPT_SPAM_SPAMC=yes \
+                       OPT_SSL_RANDOM=no
+.if ${FLAVOR:Midna}
+MAKE_FLAGS+=   OPT_IDNA=yes
+.else
+MAKE_FLAGS+=   OPT_IDNA=no
+.endif
 .if !empty(DEBUG)
-MAKE_FLAGS+=           WANT_DEBUG=1
-FAKE_FLAGS+=           WANT_DEBUG=1
+MAKE_FLAGS+=   OPT_DEBUG=yes
+FAKE_FLAGS+=   OPT_DEBUG=yes
 .endif
-
-MAKE_ENV=              VERBOSE=Yes
-
-LIB_DEPENDS=           converters/libiconv \
-                       devel/libidn
-
-INSTALL_TARGET=                packager-install
 
 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/nail
Index: distinfo
===================================================================
RCS file: /cvs/ports/mail/s-nail/distinfo,v
retrieving revision 1.13
diff -u -p -r1.13 distinfo
--- distinfo    29 Jan 2017 06:08:51 -0000      1.13
+++ distinfo    10 Mar 2018 21:56:02 -0000
@@ -1,2 +1,2 @@
-SHA256 (s-nail-14.8.16.tar.gz) = xpt0+0scKhokHVOfVTFUpx53TocSI+6AjoY5Zl2bTMo=
-SIZE (s-nail-14.8.16.tar.gz) = 604423
+SHA256 (s-nail-14.9.9.tar.gz) = zb0ni2NPMt+A8i0KP8flmw1fPUGhn+9GOO/LbC0ZhJA=
+SIZE (s-nail-14.9.9.tar.gz) = 885904
Index: patches/patch-cc_test_sh
===================================================================
RCS file: patches/patch-cc_test_sh
diff -N patches/patch-cc_test_sh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-cc_test_sh    10 Mar 2018 21:56:02 -0000
@@ -0,0 +1,46 @@
+$OpenBSD$
+--- cc-test.sh
++++ cc-test.sh
+@@ -3052,16 +3052,16 @@ t_behave_attachments() {
+    printf 'att3-1\natt3-2\natt3-4\n' > ./.t3
+    printf 'att4-1\natt4-2\natt4-4\n' > './.t 4'
+ 
+-   printf '\
+-!@  ./.t3              "./.t 4"             ""
++   printf \
++'!@  ./.t3              "./.t 4"             ""
+ !p
+ !@
+    ./.t3
+  "./.t 2"
+ 
+ !p
+-!.
+-   ' | ${MAILX} ${ARGS} -Sescape=! -Smta=./.tsendmail.sh \
++!.' \
++   | ${MAILX} ${ARGS} -Sescape=! -Smta=./.tsendmail.sh \
+       -a ./.t1 -a './.t 2' \
+       -s attachment-test \
+       [email protected] > ./.tall 2>&1
+@@ -3069,8 +3069,8 @@ t_behave_attachments() {
+    check behave:attachments-2 - .tall '1928331872 720'
+ 
+    ${rm} -f "${MBOX}"
+-   printf '\
+-      mail [email protected]
++   printf \
++'mail [email protected]
+ !s This the subject is
+ !@  ./.t3        "#2"      "./.t 4"          "#1"   ""
+ !p
+@@ -3112,8 +3112,8 @@ t_behave_attachments() {
+  "#2"
+ 
+ !p
+-!.
+-   ' | ${MAILX} ${ARGS} -Sescape=! -Smta=./.tsendmail.sh -Rf ./.tx \
++!.' \
++   | ${MAILX} ${ARGS} -Sescape=! -Smta=./.tsendmail.sh -Rf ./.tx \
+          > ./.tall 2>&1
+    check behave:attachments-3 0 "${MBOX}" '798122412 2285'
+    check behave:attachments-4 - .tall '2526106274 1910'
Index: patches/patch-mime_c
===================================================================
RCS file: patches/patch-mime_c
diff -N patches/patch-mime_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-mime_c        10 Mar 2018 21:56:02 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- mime.c     2018-03-09 20:24:35.737754669 +0100
++++ mime.c     2018-03-09 20:24:39.107748465 +0100
+@@ -678,7 +678,6 @@ mime_write_tohdr_a(struct str *in, FILE
+       xin.l = PTR2SIZE(cp - lastcp);
+       if ((sz = a_mime__convhdra(&xin, f, colp, msh)) < 0)
+          goto jleave;
+-      xin.s[xin.l] = '<';
+       lastcp = cp;
+    } else {
+       cp = lastcp;
Index: patches/patch-nail_rc
===================================================================
RCS file: patches/patch-nail_rc
diff -N patches/patch-nail_rc
--- patches/patch-nail_rc       20 Oct 2016 10:49:23 -0000      1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-nail_rc,v 1.5 2016/10/20 10:49:23 czarkoff Exp $
-
---- nail.rc.orig       Wed Oct  5 12:04:53 2016
-+++ nail.rc    Sat Oct  8 03:38:20 2016
-@@ -43,6 +43,9 @@ set ask
- # *header* on a per-folder basis (it is meaningless unless *header* is set)
- set bsdannounce
- 
-+# Use the traditional BSD Mail interface style.
-+set bsdcompat
-+
- # Uncomment this in order to get coloured output in $PAGER.
- # (Coloured output is only used if $TERM is either found in *colour-terms*
- # or includes the string "color")
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/mail/s-nail/pkg/DESCR,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 DESCR
--- pkg/DESCR   29 Mar 2013 03:54:34 -0000      1.1.1.1
+++ pkg/DESCR   10 Mar 2018 21:56:02 -0000
@@ -1,5 +1,7 @@
-S-nail is a fork of Heirloom mailx, formerly known as nail.  It is a mail user
-agent derived from Berkeley Mail 8.1 and is intended to provide the
-functionality of the POSIX.2 mailx command with additional support for MIME
-messages, Maildir, POP3, IMAP, SMTP, threading, spam control, and other
-features.
+S-nail provides a simple and friendly environment for sending and receiving
+mail.  It is intended to provide the functionality of the POSIX mailx(1)
+command, but is MIME capable and optionally offers extensions for line editing,
+S/MIME, SMTP and POP3, among others.
+
+Flavors:
+       idna - Link with GNU Libidn2 to support internationalized domain names.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to