Bug 222860

Summary: mail/dovecot: make fails FreeBSD patch
Product: Ports & Packages Reporter: Eugene R <genie>
Component: Individual Port(s)Assignee: Adam Weinberger <adamw>
Status: Closed Works As Intended    
Severity: Affects Only Me CC: genie
Priority: --- Flags: bugzilla: maintainer-feedback? (adamw)
Version: Latest   
Hardware: Any   
OS: Any   

Description Eugene R 2017-10-08 13:27:41 UTC
The build process fails to find files to patch using patch-dovecot-example.conf
Not sure if this is related to renaming of mail/dovecot2 to mail/dovecot2

===> Fetching all distfiles required by dovecot-2.2.32_1 for building
===>  Extracting for dovecot-2.2.32_1
=> SHA256 Checksum OK for dovecot-2.2.32.tar.gz.
===>  Patching for dovecot-2.2.32_1
===>  Applying FreeBSD patches for dovecot-2.2.32_1
File to patch: ^C
=> FreeBSD patch patch-dovecot-example.conf failed to apply cleanly.
Comment 1 Adam Weinberger freebsd_committer freebsd_triage 2017-10-08 14:55:29 UTC
I'm not sure where that file came from, Eugene, but it's not in SVN and it shouldn't be there. Only the files listed in https://svnweb.freebsd.org/ports/head/mail/dovecot/files/ should be in mail/dovecot/files.

Delete that file, and any other stale files, and you should be good. To be on the safe side, you might delete the whole mail/dovecot directory and "svn up" it.

I'm closing this PR, but if you have any questions or if you encounter any other trouble, feel free to re-open it by commenting.
Comment 2 Eugene R 2017-10-08 15:35:16 UTC
Thank you, it worked.
Evidently, after the package origin change and the portsnap update, the mail/dovecot directory became a curious mix of the dovecot1 and dovecot2 ports.

Was not portsnap supposed to sync the tree properly? 
And was it really necessary to change the port name anyway, instead of just removing dovecot1? 
What will happen when Dovecot 3 is released? =)

Might it be reasonable to adjust the "pkg updating" instructions to present a more clean migration procedure?
Comment 3 Adam Weinberger freebsd_committer freebsd_triage 2017-10-09 02:15:41 UTC
Yes. It was necessary. Major version designations only make sense when there's two versions, and even then the mainline version should be unnumbered. When dovecot3 is released, the port will be forked into mail/dovecot and mail/dovecot2.

There is a pkg updating message, from 20170807.
Comment 4 Eugene R 2017-10-09 02:57:08 UTC
Yeah, the message is there, that is exactly how I got into this trouble =)
It simply says to change the origin by executing
   pkg set -o mail/dovecot2:mail/dovecot
without a warning about mixing of the old and new "mail/dovecot" directories, or any advice on how to handle this change cleanly without "rm -rf" and svn surgery.
Comment 5 Adam Weinberger freebsd_committer freebsd_triage 2017-10-09 12:55:21 UTC
I don't know if that's normal portsnap behaviour (I don't use it) or whether it glitched, but either way the problem would be with portsnap, not dovecot. Closing this PR as there's nothing for the dovecot port to do here.