Bug 206357 - [feature request] [PATCH] mail/opensmtpd-devel: add libressl support, sync with mail/opensmtpd
Summary: [feature request] [PATCH] mail/opensmtpd-devel: add libressl support, sync wi...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ashish SHUKLA
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-01-18 04:30 UTC by Andrey Fesenko
Modified: 2016-02-22 12:34 UTC (History)
3 users (show)

See Also:
ashish: maintainer-feedback+


Attachments
Update patch (9.15 KB, patch)
2016-01-18 04:30 UTC, Andrey Fesenko
no flags Details | Diff
poudriere bulk -t log (153.43 KB, text/plain)
2016-01-18 04:32 UTC, Andrey Fesenko
no flags Details
patch-Makefile and files (7.77 KB, patch)
2016-02-07 00:36 UTC, Andrey Fesenko
no flags Details | Diff
poudriere bulk -t log (147.94 KB, text/plain)
2016-02-07 00:37 UTC, Andrey Fesenko
no flags Details
patch-Makefile and files (7.38 KB, patch)
2016-02-16 04:23 UTC, Andrey Fesenko
andrey: maintainer-approval? (ashish)
Details | Diff
poudriere bulk -t log curent (147.98 KB, text/plain)
2016-02-16 04:27 UTC, Andrey Fesenko
no flags Details
poudriere bulk -t log 9.3 (133.34 KB, text/plain)
2016-02-16 04:28 UTC, Andrey Fesenko
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Fesenko 2016-01-18 04:30:32 UTC
Created attachment 165739 [details]
Update patch

mail/opensmtpd-devel behind mail/opensmtpd, this patch sync both.
Unfortunately latest snapshot buildable only without makemap https://github.com/OpenSMTPD/OpenSMTPD/issues/584 (so while using release source)

Add new options LIBRESSL and LIBRESSL_DEVEL
Comment 1 Andrey Fesenko 2016-01-18 04:32:15 UTC
Created attachment 165740 [details]
poudriere bulk -t log
Comment 2 Ashish SHUKLA freebsd_committer freebsd_triage 2016-01-23 01:14:58 UTC
(In reply to Andrey Fesenko from comment #0)

Hi,

I know about makemap, which is one of the reason I'm holding off on updating mail/opensmtpd-devel, as there is no suitable alternative that can substitute it.

Also mail/opensmtpd-devel only intends to provide opensmtpd from snapshots, so synchronizing it with mail/opensmtpd is not something that's needed.

Although LibreSSL support is nice to have in both ports.I'm wondering if it is possible for you to re-work your diff to only have LibreSSL support related stuff.

Thanks!
Comment 3 Andrey Fesenko 2016-01-23 14:50:23 UTC
Bug 206523 added "[feature request] [PATCH] mail/opensmtpd: add libressl support, Fix Options use"

> synchronizing it with mail/opensmtpd is not something that's needed

If "mail/opensmtpd" and "mail/opensmtpd-devel" not sync more hard porting and test new options.
Comment 4 Andrey Fesenko 2016-02-07 00:36:50 UTC
Created attachment 166679 [details]
patch-Makefile and files

After help fluffy@ https://people.freebsd.org/~fluffy/patches/opensmtpd-devel-201602031446.diff rework SSL support, add base-SSL (default), after 10.2 this satisfies all configure check (9.3 only disable EVP_aes_256_gcm).

Version BUMP 201602031446p1 now

patch files/patch-usernamelen (base mail/opensmtpd) It seems no longer upstream relevant, or needs to change, or delete. (I'm clean not work fragment, first changed in upstream, second rework)
Comment 5 Andrey Fesenko 2016-02-07 00:37:19 UTC
Created attachment 166680 [details]
poudriere bulk -t log
Comment 6 Dima Panov freebsd_committer freebsd_triage 2016-02-08 10:29:45 UTC
(In reply to Ashish SHUKLA from comment #2)

hello!

BTW, makemap function now integrated directly to smtpctl/smtpd, and substitute in mailer.conf works correctly with latest snapshot, tested it in real use at home box.
Comment 7 Ashish SHUKLA freebsd_committer freebsd_triage 2016-02-15 11:12:37 UTC
(In reply to Dima Panov from comment #6)

Hi,

Could you tell me how you use OpenSMTPD provided makemap on your home box ? AFAICS, OpenSMTPD does not install 'makemap' binary anymore, and /usr/sbin/makemap is not a symlink:

-r-xr-xr-x  1 root  wheel  84080 Sep  2 16:50 /usr/sbin/makemap

So, from what I understand, is that in update I should install `$PREFIX/libexec/makemap' as symlink to `$PREFIX/bin/smtpctl'. I'm wondering if you could confirm that this is indeed how you are using in your "real use" setup at home ?

Thanks!
Ashish
Comment 8 Dima Panov freebsd_committer freebsd_triage 2016-02-15 11:23:22 UTC
(In reply to Ashish SHUKLA from comment #7)

hello!

No additional symlink is needed, only override via /etc/mailer.conf to point system makemap to $PREFIX/sbin/smtpctl

It works.

However, latest snapshot is unstable while running — it refuses local messages to deliver sometimes, so I've reverted by box to release version for now. 

May be next snapshot will be more stable :)
Comment 9 Dima Panov freebsd_committer freebsd_triage 2016-02-15 14:53:38 UTC
(In reply to Ashish SHUKLA from comment #7)

BTW, snapshot from Feb 13 seems to be usable.

Made another patch, now without libressl declaration (it looks to be ugly to use in port) https://people.freebsd.org/~fluffy/patches/opensmtpd-devel-201602131907.diff

and so on, updated libasr-devel: https://people.freebsd.org/~fluffy/patches/libasr-devel-201602131606.diff

opensmtpd cleanup too: https://people.freebsd.org/~fluffy/patches/opensmtpd-5.7.3.p2.diff
Comment 10 Andrey Fesenko 2016-02-16 04:23:56 UTC
Created attachment 167067 [details]
patch-Makefile and files

Rewritten patch opensmtpd-devel-201602131907
SSL_PORT optional, disable by default if FreeBSD > 10 (base ssl 1.0.*)

If need support LibreSSL set /etc/make.conf
.if ${.CURDIR:M*/mail/opensmtpd*}
OPENSSL_PORT=   security/libressl-devel
.endif
Comment 11 Andrey Fesenko 2016-02-16 04:27:00 UTC
Created attachment 167068 [details]
poudriere bulk -t log curent
Comment 12 Andrey Fesenko 2016-02-16 04:28:44 UTC
Created attachment 167069 [details]
poudriere bulk -t log 9.3
Comment 13 Ashish SHUKLA freebsd_committer freebsd_triage 2016-02-16 09:36:50 UTC
(In reply to Dima Panov from comment #9)

Hi,

This diff looks similar to what I have, thanks for working on it.

I have a small question, after you install the port from your diff, could you provide the output of `ls -la /usr/sbin/makemap'.

If `/usr/sbin/makemap' is not symlink to `mailwrapper`, then it seems useless to put that line in mailer.conf(5).

If it's indeed a symlink on your host, then I wonder, if you could shed some light on that, as I tried this on different FreeBSD hosts, and everywhere it's a regular file.

Thanks
Ashish
Comment 14 commit-hook freebsd_committer freebsd_triage 2016-02-22 04:49:09 UTC
A commit references this bug:

Author: ashish
Date: Mon Feb 22 04:48:38 UTC 2016
New revision: 409317
URL: https://svnweb.freebsd.org/changeset/ports/409317

Log:
  - Update to 201602131606

  PR:		206357
  Submitted by:	fluffy

Changes:
  head/dns/libasr-devel/Makefile
  head/dns/libasr-devel/distinfo
  head/dns/libasr-devel/pkg-plist
Comment 15 commit-hook freebsd_committer freebsd_triage 2016-02-22 12:21:44 UTC
A commit references this bug:

Author: ashish
Date: Mon Feb 22 12:21:23 UTC 2016
New revision: 409336
URL: https://svnweb.freebsd.org/changeset/ports/409336

Log:
  - Update to 201602131907[1]
  - Switch to using DISTVERSIONSUFFIX[1]
  - Add SSL_PORT option to specify if OpenSSL from ports is to be used[1]
  - Enforce SSL_PORT for 9.x[1]
  - Cleanup OPTIONS[1]
  - Remove unnecessary diffs[1]
  - Add diff to handle long usernames (from mail/opensmtpd)
  - Mark smtpctl binary as setgid for offline mail queuing to work
    (reported/committed upstream)
  - Explicitly create symlink for makemap, as mailwrapper does not seem
    to manage the symlink
  - Fix rc.d script as process name has been changed

  PR:		206357
  Submitted by:	Andrey Fesenko <andrey at bsdnir dot info>[1]

Changes:
  head/mail/opensmtpd-devel/Makefile
  head/mail/opensmtpd-devel/distinfo
  head/mail/opensmtpd-devel/files/patch-mk_smtpd_Makefile.in
  head/mail/opensmtpd-devel/files/patch-openbsd-compat_defines.h
  head/mail/opensmtpd-devel/files/patch-usernamelen
  head/mail/opensmtpd-devel/files/pkg-install.in
  head/mail/opensmtpd-devel/files/pkg-message.in
  head/mail/opensmtpd-devel/files/smtpd.in
  head/mail/opensmtpd-devel/pkg-plist
Comment 16 Ashish SHUKLA freebsd_committer freebsd_triage 2016-02-22 12:34:19 UTC
Committed with some changes.

Thanks!