Bug 235890

Summary: mail/mailutils: Circular dependency: emacs & mailutils with EMACS option enabled
Product: Ports & Packages Reporter: John Hein <jcfyecrayz>
Component: Individual Port(s)Assignee: Joseph Mingrone <jrm>
Status: Closed FIXED    
Severity: Affects Some People CC: danfe, emacs, jrm, w.schwarzenfeld
Priority: --- Keywords: needs-qa
Version: LatestFlags: koobs: merge-quarterly?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
[patch] remove EMACS option, install .el link if MH is on none

Description John Hein 2019-02-20 17:29:33 UTC
If the EMACS option is set when building mail/mailutils, poudriere rightly complains:

These packages depend on each other: mailutils-3.5 emacs-26.1_4,3
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2019-02-20 17:29:33 UTC
Maintainer informed via mail
Comment 2 Walter Schwarzenfeld 2019-02-20 17:50:38 UTC
Maintainer: please correct Mailadress
CC: zeus@gnu.org.ua did not match anything
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2019-08-19 05:14:12 UTC
CC committer (danfe@) of ports r430016 which added the EMACS option

Note: MAILUTILS is an option, enabled (ON) by default (OPTIONS_DEFAULT) in editors/emacs
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2019-08-19 05:18:45 UTC
CC committer (jrm@) of ports r471190 - MAILUTILS added to OPTIONS_DEFAULT in editors/emacs
Comment 5 Joseph Mingrone freebsd_committer freebsd_triage 2019-08-19 16:16:55 UTC
Having editors/emacs and editors/emacs-devel depend on mail/mailutils by default matches upstream's default installation.  Ideally we keep things as they are with the Emacs ports, otherwise Emacs can retrieve mail insecurely.  Turning the option off by default does not seem like a complete solution and mail/movemail does not depend Emacs by default.
Comment 6 Joseph Mingrone freebsd_committer freebsd_triage 2019-11-13 20:13:19 UTC
See https://reviews.freebsd.org/D22351

zeus@gnu.org.ua (or anyone else interested), please add yourself as a reviewer.  I couldn't find a Phab account for you.
Comment 7 John Hein 2019-11-14 14:04:21 UTC
(In reply to Joseph Mingrone from comment #6)
I added a comment in the review.

The gist is that I vote for just removing the EMACS option.  And always install the .el file if MH is on (and remove any [very marginally useful] .elc that might get installed for ease of managing pkg-plist).
Comment 8 Joseph Mingrone freebsd_committer freebsd_triage 2019-11-14 14:11:22 UTC
See my response on the review.
Comment 9 John Hein 2019-11-14 15:12:18 UTC
Created attachment 209147 [details]
[patch] remove EMACS option, install .el link if MH is on

Based partly on jrm's patch from the phab review, attached is a slightly different take that just removes the EMACS option and installs the .el link if MH is on.  This fixes the circular dependency and simplifies the OPTIONS list.

I don't know a good way to add this in the phab review without causing confusion with this partial patch (since the review also covers a mailutils update).

Joseph, integrate this with your patch in phab if you would like to.  Part of that depends on whether danfe is okay with removing EMACS (or putting it another way, consolidating it under the MH option).

This works whether emacs is installed or not.  The only reason emacs would be used in the build, as far as I saw, is to create the .elc file.  This patch just avoids the .elc byte compiled file.  The .el is very small and having a .elc shouldn't help the user in any noticeable way.

This slightly changes a package built with MH, so a PORTREVISION bump is called for unless this is merged with the update to 3.8
Comment 10 Alexey Dokuchaev freebsd_committer freebsd_triage 2019-11-15 01:30:58 UTC
(In reply to John Hein from comment #9)

> This fixes the circular dependency and simplifies the OPTIONS list.
> Part of that depends on whether danfe is okay with removing EMACS
> (or putting it another way, consolidating it under the MH option).
Sure, that's fine with me.  Less options is always good if they don't pull external dependencies.

> This slightly changes a package built with MH, so a PORTREVISION bump
> is called for unless this is merged with the update to 3.8
I guess it's OK to do this together with the update (and avoid port revision bump); the diff still remains of readable and manageable size.

That said, I'm still waiting for the general feedback from the maintainer.
Comment 11 commit-hook freebsd_committer freebsd_triage 2019-11-24 18:44:23 UTC
A commit references this bug:

Author: jrm
Date: Sun Nov 24 18:44:00 UTC 2019
New revision: 518346
URL: https://svnweb.freebsd.org/changeset/ports/518346

Log:
  mail/mailutils: Update to 3.8; fix circular [1] / missing dependencies

  - Remove the build dependency on Emacs since the installed elisp file is
    simple and does not need to be byte compiled.

  - Collapse the EMACS option in to the MH option [2].

  PR:		235890
  Submitted by:	John Hein <jcfyecrayz@liamekaens.com> [2]
  Reported by:	John Hein <jcfyecrayz@liamekaens.com> [1]
  Reviewed by:	John Hein <jcfyecrayz@liamekaens.com>
  Approved by:	danfe, Zeus Panchenko <zeus@gnu.org.ua> (maintainer)
  Differential Revision:	https://reviews.freebsd.org/D22351

Changes:
  head/mail/mailutils/Makefile
  head/mail/mailutils/distinfo
  head/mail/mailutils/files/git-018df5d
  head/mail/mailutils/files/git-113e144
  head/mail/mailutils/pkg-plist
Comment 12 Joseph Mingrone freebsd_committer freebsd_triage 2019-11-24 18:46:28 UTC
Committed.  Thank you all.