Summary: | mail/mutt: RUN_DEPENDS of some other port: mailcap(5) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Matthias Apitz <guru> | ||||||||||
Component: | Individual Port(s) | Assignee: | Adam Weinberger <adamw> | ||||||||||
Status: | Closed FIXED | ||||||||||||
Severity: | Affects Some People | CC: | Udo.Schweigert, adamw, guru | ||||||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(Udo.Schweigert) |
||||||||||
Version: | Latest | ||||||||||||
Hardware: | Any | ||||||||||||
OS: | Any | ||||||||||||
Attachments: |
|
Description
Matthias Apitz
2016-03-05 20:22:43 UTC
Created attachment 168129 [details]
patch
Attached patch solves the issue for the non-LITE port.
Committed with PORTREVISION bump, thanks! A commit references this bug: Author: feld Date: Tue Mar 15 12:56:33 UTC 2016 New revision: 411160 URL: https://svnweb.freebsd.org/changeset/ports/411160 Log: mail/mutt: Add missing RUN_DEPENDS Mutt requires mailcap to handle MIME attachments. http://www.mutt.org/doc/manual/manual-5.html PR: 207727 Approved by: maintainer Changes: head/mail/mutt/Makefile Are you sure this is right? Does this need to be a mandatory dependency for every single person? The man page says that metamail is *one way* to install a mailcap file. Mutt itself even ships with a sample mailcap file. The manpage listed in the commit contains a bunch of sample mailcap entries. Metamailis just another sample mailcap file and a couple viewer scripts. I'm not seeing the reason for it to be a dependency for every single person who uses non-lite mutt. Please, make this into an OPTION. This doesn't feel like the kind of thing that needs to be a hard dependency. (In reply to Adam Weinberger from comment #4) thd problem here is not having no example files, but not having its manpage; (In reply to Adam Weinberger from comment #4) metamail seems like a sane way of providing a mailcap file by default. It has zero dependencies now that X11 option is off by default. The pkg is only 125K on my filesystem. Is this really such a big concern? If so, do you have an alternative suggestion for how to provide a mailcap file by default? I'm open to anything; just want the best out of the box experience for users. Thanks! (In reply to Mark Felder from comment #6) mutt comes with a sample mailcap (/usr/local/share/examples/mutt/sample.mailcap). The manual.html file installed with mutt included a sample mailcap. What metamail installs by default is hooks to play audio files and show images. Nothing more. It includes some "sample" very rudimentary charset conversions that *mutt already does itself*. The only thing that'd be useful these days is a handler for text/html MIME parts, but metamail doesn't even reference it (partly because the last release was TWENTY-TWO YEARS AGO :-P ) Mutt works fine without a mailcap, and contains instructions on how to create one. Metamail installs a mailcap, but it does NOTHING. It is not the right dependency. (In reply to Matthias Apitz from comment #5) Other manpages referenced from mutt's manpages, from programs that are not included with mut: gpg-agent(1) encript(1) iconv(1) pgpring(1) smail(1) lockfile(1) maildir(5) I do want to reiterate: I'm not objecting to metamail as a dependency, just as a mandatory one. (In reply to Adam Weinberger from comment #7) Thank you for your thorough explanation, Adam. I am a mutt user but only occasionally, and rarely interact with MIME attachments with it. The situation is much clearer now. Do you think it is worthwhile to provide mailcap by default at all? Should we just make this an option and install mutt's sample mailcap or not at all? Ignore metamail completely because of how old and potentially irrelevant its MIME handling configuration is? I thought this was a very straightforward PR, but I guess I was wrong :-) (In reply to Adam Weinberger from comment #8) I'm not asking for including them into the mutt pkg, but if the man page of muttrc has them as reference, the user should not (as I was) in the situation looking around which other package/port could bring this man page on disk; it should just be there; (In reply to Mark Felder from comment #10) The thing about mailcap is, it just defines when to use external programs to view something that isn't plain-text. So unless you have the external translator/viewer, mailcap doesn't serve any particular purpose. Mutt's sample mailcap exists only to show syntax. Its examples require netscape (netscape!), xv, and pgp. The examples shown in the manual.html file require xanim, netscape, lynx, enscript, xv, ptmtoascii, and MS Excel. Mutt's mailcaps really are examples only. Installing a mailcap file by default, without the viewers listed in it, open up users to potential confusion from error messages of missing binaries/scripts. My recommendation is to remove the metamail dependency entirely---it brings in no benefit aside from installing a referenced manpage. If people want to use mutt to view images, HTML, etc., they can follow the examples in the included documentation. (In reply to Matthias Apitz from comment #11) By that logic, procmail, gnupg, enscript, qmail, and exim should all be mandatory dependencies of mutt because their manpages are referenced too. I don't agree with your conclusion, that a manpage reference is sufficient condition for producing a mandatory dependency. For future reference, the FreeBSD website has a phenomenal service where you can search all the manpages in the ports tree. http://www.freebsd.org/cgi/man.cgi (select "FreeBSD 10.2-RELEASE and Ports") http://www.freebsd.org/cgi/man.cgi?query=mailcap&apropos=0&sektion=0&manpath=FreeBSD+10.2-RELEASE+and+Ports&arch=default&format=html Folks, sorry I should have checked that before proposing the patch: it turns out that the metamail manpage for mailcap does not really reflect the functionality of mutt's mailcap. Therefore I propose to include the manpage for mailcap as part of the port and not as a dependency. I will write a manpage on my own and will come up with a new patch. Created attachment 168289 [details]
patch containing mailcap man page without dependency
OK, here is a patch avoiding the new dependency and providing a more accurate manpage for mailcap.
Created attachment 168290 [details]
patch containing mailcap man page without dependency
Fixed version (corrected a typo)
Three things here. One, given that this new manpage is very nearly a word-for-word copy of metamail's mailcap.5 manpage, I believe you'll need to specifically cite it or else it's plagiarism. Second, if mutt installs a mailcap.5 file then it must register CONFLICTS with metamail. Third, you should really be upstreaming this. If you believe that mutt needs a mailcap manpage then submit it to the mutt authors so that everybody can benefit from it. Of course it has a lot in common with metamail, as the only available source for this is RFC1524 and metamail's man page is almost verbatim copied from the RFC. I have adjusted to mutt's usage and deleted stuff not used by mutt and changed some wording. I copied the original copyright in the manpage's source. If that is not enough of course this could be made more visible in the rendered man-page. As metamail installs mailcap.4 and this here uses mailcap.5 in terms of the filesystem there is no conflict. (In reply to Udo.Schweigert from comment #18) Oh! You're completely right about the CONFLICTS. My mistake! I would recommend adding something to the manpage to cite the source. Maybe: HISTORY mailcap(5) is based off mailcap(4) from the metamail program (http://metamail's-website.com) Mark, do you want me to take this PR? I fear that I'm kindof stepping on your toes here. (In reply to Adam Weinberger from comment #19) Sure, feel free to take it from here. Thanks for your attentiveness to this issue. Mtinainer: add in a section that properly cites the metamail source (retaining copyright isn't sufficient) and I'm happy to commit this chanhge. Please do consider upstreaming this as well. WIth those changes I will commit these changes. Thanks for everyone's help in making the plan happen here. Created attachment 168356 [details]
patch containing amended mailcap man page
Attached a patch with an amended man page containing the reference to the RFC 1524 and metamail.
A commit references this bug: Author: adamw Date: Fri Mar 18 16:21:29 UTC 2016 New revision: 411359 URL: https://svnweb.freebsd.org/changeset/ports/411359 Log: Remove metamail dependency, and add a mailcap.5 manpage. The intention of r411160 was to provide a mailcap manpage, as referenced in multiple places by the mutt(1) and muttrc(5) manpages. Although mail/metamail provides a mailcap.4 manpage, metamail is not particularly relevant as a mailcap provider. The main external filter that mutt needs is something to render text/html mime parts, but the last metamail release was in 1994, 22 years ago. This commit removes that metamail dependency, and adds a mailcap.5 manpage written by Udo Schweigert (mail/mutt's maintainer), based off metamail's mailcap.4 manpage. PR: 207727 Submitted by: Udo Schweigert (maintainer) Changes: head/mail/mutt/Makefile head/mail/mutt/files/mailcap.5 head/mail/mutt/pkg-plist Udo, great work here! I made one tiny change: I added a period after your name in the final sentence of that manpage. Thank you for taking the time to put this together! |