Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 22080 - dovecot-0.99.9.1.ebuild (New Package)
Summary: dovecot-0.99.9.1.ebuild (New Package)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Net-Mail Packages
URL: http://dovecot.procontrol.fi/
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2003-06-02 01:58 UTC by Zach Bagnall
Modified: 2004-04-10 07:21 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild for Dovecot 0.99.9.1 (net-mail.dovecot.tar.gz,1.72 KB, application/x-gzip)
2003-06-02 01:59 UTC, Zach Bagnall
Details
ebuild (dovecot-0.99.9.1.ebuild,1.66 KB, text/plain)
2003-06-03 06:55 UTC, Zach Bagnall
Details
init script (dovecot,369 bytes, text/plain)
2003-06-03 06:57 UTC, Zach Bagnall
Details
patch (dovecot-0.99.9.1-fetch.patch,608 bytes, text/plain)
2003-06-03 06:59 UTC, Zach Bagnall
Details
Updated ebuild for just released 0.99.10. (dovecot-0.99.10.ebuild,1.70 KB, text/plain)
2003-06-26 15:01 UTC, Zach Bagnall
Details
Ebuild tarball for dovecot 0.99.10 (dovecot-0.99.10.ebuid.tar.bz2,2.70 KB, application/octet-stream)
2003-08-13 04:04 UTC, Andreas Simon
Details
Ebuild for Dovecot 0.99.10.2 (dovecot-0.99.10.2.ebuild,3.46 KB, text/plain)
2003-11-11 02:56 UTC, Zach Bagnall
Details
PAM profile from Andreas (dovecot,220 bytes, text/plain)
2003-11-11 02:58 UTC, Zach Bagnall
Details
Init script from Andreas (dovecot,426 bytes, text/plain)
2003-11-11 02:58 UTC, Zach Bagnall
Details
Ebuild for Dovecot 0.99.10.2 (dovecot-0.99.10.2.ebuild,3.43 KB, text/plain)
2003-11-15 16:36 UTC, Zach Bagnall
Details
Ebuild for Dovecot 0.99.10.2 (dovecot-0.99.10.2.ebuild,3.51 KB, text/plain)
2003-11-17 19:34 UTC, Zach Bagnall
Details
Ebuild for Dovecot 0.99.10.4 (dovecot-0.99.10.4.ebuild,3.51 KB, text/plain)
2003-11-24 14:11 UTC, Zach Bagnall
Details
Ebuild for Dovecot 0.99.10.4 (dovecot-0.99.10.4.ebuild,3.51 KB, text/plain)
2003-11-29 03:24 UTC, Zach Bagnall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zach Bagnall 2003-06-02 01:58:07 UTC
Dovecot is a secure unix IMAP & POP3 server. See URL for more info.

This is a simple ebuild for net-mail/dovecot version 0.99.9.1.

It includes a patch that may fix a CR+LF issue, as mentioned on the homepage.

It respects the USE flags: ipv6 pam ldap postgres sasl ssl
Though these have not all been thoroughly tested.

Dovecot is under heavy development. It is full featured and stabalising but I'd
still recommend keeping this ebuild masked for a while.
Comment 1 Zach Bagnall 2003-06-02 01:59:22 UTC
Created attachment 12658 [details]
Ebuild for Dovecot 0.99.9.1
Comment 2 Zach Bagnall 2003-06-03 06:54:13 UTC
Updated after reading http://cvs.gentoo.org/~liquidx/ebuildmistakes.html & associated docs. Removed some comments from the ebuild other fixups.

Files:
dovecot-0.99.9.1.ebuild (ebuild for latest packaged version of dovecot)
dovecot (init script for starting and stopping the daemon)
dovecot-0.99.9.1-fetch.patch (a patch to resolve a CR+LF issue)
Comment 3 Zach Bagnall 2003-06-03 06:55:40 UTC
Created attachment 12746 [details]
ebuild

Suggest net-mail/dovecot/
Comment 4 Zach Bagnall 2003-06-03 06:56:23 UTC
Comment on attachment 12658 [details]
Ebuild for Dovecot 0.99.9.1

Use attached individual files instead.
Comment 5 Zach Bagnall 2003-06-03 06:57:47 UTC
Created attachment 12747 [details]
init script

this goes in the files/ dir
Comment 6 Zach Bagnall 2003-06-03 06:59:34 UTC
Created attachment 12748 [details]
patch

in the files/ dir
Comment 7 Zach Bagnall 2003-06-26 15:01:12 UTC
Created attachment 13912 [details]
Updated ebuild for just released 0.99.10.
Comment 8 Andreas Simon 2003-08-13 04:04:33 UTC
Created attachment 16029 [details]
Ebuild tarball for dovecot 0.99.10

I made an ebuild too, I didn't saw that there is one already here. Would have
saved me the work.

My ebuild automatically modifies the dovecot config file to use the default
Gentoo mailbox locations (i.e. ~/.maildir for maildir, etc.) and generates ssl
certs if it is build with 'use ssl' (like cyrus-imapd). Also the ebuild applies
a patch (from the dovecot mailing list) to make dovecot run with 2.6 kernels
(it will still work with 2.4 kernels). For pam support it installs the pam file
from Red Hat's dovecot (yes, dovecot is now part of RHL). My ebuild also
automatically creats dovecot user and group because imap-login runs per default
as user dovecot.

But beware, the ldap or postgresql support is absolutly untested. These are two
things I can't test currently.
Comment 9 Zach Bagnall 2003-08-15 23:43:40 UTC
Looks really good, Andreas. If you're happy with it, mark the previous files as obsolete. Might be a good idea to attach the files here individually instead of as a tarball. It is easier to examine them online that way.

I've not yet heard from any Gentoo devs about adding dovecot to CVS. Maybe for 1.0 eh :-).
Comment 10 Lars Trieloff 2003-10-22 09:45:16 UTC
When I use the ebuild tarball, I get following error message:
trieloff portage # emerge dovecot
Calculating dependencies \
emerge: there are no masked or unmasked ebuilds to satisfy "dev-libs/cyrus-sasl-2.1".
 
!!! Error calculating dependencies. Please correct.

After changing the line to sasl? ( >=dev-libs/cyrus-sasl-2.1 )

the ebuild works perfect. Thank you.
Comment 11 Andrew Cooks (RETIRED) gentoo-dev 2003-11-07 03:31:22 UTC
Bump!

I'd like to see this in stable!

Is there such a thing as a bugzilla troll? I guess so...
Comment 12 Zach Bagnall 2003-11-11 02:56:30 UTC
Created attachment 20575 [details]
Ebuild for Dovecot 0.99.10.2

New ebuild adapted from Andreas'. This is for Dovecot 0.99.10.2.

Changes:

- Cosmetic change to HOMEPAGE
- LICENSE set to LGPL-2.1
- Set >=dev-libs/cyrus-sasl-2.1 as noted by Lars
- Changed ">=net-mail/mailbase-0.00" to just "net-mail/mailbase" in RDEPEND
- Removed explicit uid and gid setting from user/groupadd commands. When
dovecot becomes stable, a uid & gid should be reserved as with other system
apps.
- Removed reference to 0.99.10 setuid patch (change has been incorporated
in
release)
- Don't install dovecot.conf if it already exists in /etc/
- Don't regenerate /etc/ssl/{certs,private}/dovecot.pem if they already exist
- Added post-installation note regarding PAM profile change from imap to
dovecot
Comment 13 Zach Bagnall 2003-11-11 02:58:08 UTC
Created attachment 20576 [details]
PAM profile from Andreas
Comment 14 Zach Bagnall 2003-11-11 02:58:50 UTC
Created attachment 20577 [details]
Init script from Andreas
Comment 15 Zach Bagnall 2003-11-11 03:06:36 UTC
Andreas, please check out the latest ebuild then tag "Ebuild tarball for
dovecot 0.99.10" as obsoleted if you could.

The three most recent files go like this:
net-mail/dovecot/dovecot-0.99.10.2.ebuild
net-mail/dovecot/files/init.d/dovecot
net-mail/dovecot/files/pam.d/dovecot

I'm running this ebuild on my own PC and it looks good. Big thanks to Andreas
and Lars.

It'd be great to have dovecot in gentoo (masked) so that it can be tested
more thoroughly. Maybe stable shortly after 1.0 release..?
Comment 16 Andreas Simon 2003-11-15 04:23:05 UTC
- Marked the old 0.99.10 ebuild as obsolete

The new 0.99.10.2 looks and works fine. Thanks.

There is only a minor cosmetical issue:
Afer the removal of the explicit uid and gid setting from the user/groupadd commands, the comment "(same uid/gid as Red Hat Linux)" is obsolete.

I guess it's time now to bug some Gentoo developers to get it into portage...
Comment 17 Zach Bagnall 2003-11-15 16:36:37 UTC
Created attachment 20795 [details]
Ebuild for Dovecot 0.99.10.2

Fixed.
Comment 18 Zach Bagnall 2003-11-17 19:34:39 UTC
Created attachment 20891 [details]
Ebuild for Dovecot 0.99.10.2

Minor updates:

- Use ${A} instead of ${P}.tar.gz in src_unpack()
- Add a note about reviewing the config file because the default is to use
postgresql for authentication which wont work "out of the box"
Comment 19 Zach Bagnall 2003-11-24 14:11:05 UTC
Created attachment 21218 [details]
Ebuild for Dovecot 0.99.10.4

New dovecot release.
Comment 20 Tony Vroon (RETIRED) gentoo-dev 2003-11-26 14:29:16 UTC
Most recent ebuild compiles and works for me, but did manage to overwrite the /etc/dovecot.conf file I put in before emerging.
Comment 21 Zach Bagnall 2003-11-29 03:24:49 UTC
Created attachment 21459 [details]
Ebuild for Dovecot 0.99.10.4

Hmm. I just updated from .2 to .4 using the ebuild and it didn't alter the
/etc/dovecot.conf (I added a test comment to the file before updating to be
sure and it remained intact).

The attached ebuild uses -e instead of -f for the existance tests. This should
work in case /etc/dovecot.conf is a symlink to elsewhere (likewise for the two
PEM files).
Comment 22 Andreas Simon 2004-03-30 05:12:08 UTC
For it's ssl support dovecot can use the openssl or the gnutls implementation.
But the ebuild is fixed to openssl.

Here is a patch (for the dovecot 0.99.10.4 ebuild) which makes it possible to use gnutls as well. Further I removed the required minimum version number for ssl. I think it's not needed anymore (especially since the ssl version in the dovecot ebuild has some security issues).

I didn't used the ssl use flag anymore since ssl is per default in all profiles. Thus I think it makes more sense to choose the ssl implementation with the gnutls use flag. It's done this way in libsoup too, libsoup is the only ebuild I found where one can choose with use flags between openssl and gnutls. It makes sense to do it the same way in both ebuilds. Although some ebuilds which don't support openssl at all use the ssl flag to mark gnutls support, thus using gnutls instead of ssl for dovecot is more clear. Per default dovecot will still use openssl, this patch doesn't change that.


--- dovecot-0.99.10.4.ebuild    2003-11-25 16:12:06.000000000 +0100
+++ dovecot-0.99.10.4-r1.ebuild 2004-03-30 14:36:58.066534312 +0200
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $

-IUSE="debug ipv6 ldap maildir pam postgres sasl ssl vpopmail nopop3d"
+IUSE="debug gnutls ipv6 ldap maildir pam postgres sasl vpopmail nopop3d"

 inherit base

@@ -21,7 +21,8 @@
        ldap? ( >=net-nds/openldap-1.2 )
        pam? ( sys-libs/pam )
        sasl? ( >=dev-libs/cyrus-sasl-2.1 )
-       ssl? ( >=dev-libs/openssl-0.9.6g )
+       !gnutls? ( dev-libs/openssl )
+       gnutls? ( net-libs/gnutls )
        postgres? ( dev-db/postgresql )
        vpopmail? ( net-mail/vpopmail )"

@@ -53,7 +54,9 @@
        use pam || myconf="${myconf} --without-pam"
        use postgres && myconf="${myconf} --with-pgsql"
        use sasl && myconf="${myconf} --with-cyrus-sasl2"
-       use ssl || myconf="${myconf} --without-ssl"
+       use gnutls \
+               && myconf="${myconf} --with-ssl=gnutls" \
+               || myconf="${myconf} --with-ssl=openssl"
        use vpopmail || myconf="${myconf} --without-vpopmail"

        ./configure ${myconf} \
Comment 23 Grant Goodyear (RETIRED) gentoo-dev 2004-04-09 17:15:15 UTC
Since dovecot can be built w/o ssl support, the ebuild should have
both ssl and gnutls USE flags.  The trick, then, is that if both
flags are specified, then gnutls would be chosen.

Does that make sense?
Comment 24 Grant Goodyear (RETIRED) gentoo-dev 2004-04-09 17:29:33 UTC
While I'm hacking, a note to the original author.  Instead of grepping 
the /etc/passwd file (which ldap and nis folks may not be using), you should
instead grep the results of "getent passwd".  We should also choose specific
uid / gid info for the ebuild, but I'm not sure what the current method is
for doing that sanely.
Comment 25 Grant Goodyear (RETIRED) gentoo-dev 2004-04-09 20:48:52 UTC
More random notes:

I don't think the "inherit base" is needed, but I could be wrong there.

pkg_setup() isn't called when a binary package is installed, so adding
groups / users needs to be in pkg_preinst() instead.
Comment 26 Grant Goodyear (RETIRED) gentoo-dev 2004-04-09 22:37:52 UTC
Okay, I'm willing to commit this ebuild to cvs, but first I need permission
to change the copyright to Gentoo Technologies, Inc, as that's the current
Gentoo policy (you can see the full explanation at http://www.gentoo.org/proj/en/devrel/copyright/index.xml).

Thanks,
g2boojum
Comment 27 Andreas Simon 2004-04-10 06:27:44 UTC
Oops, there is really a "Copyright 2003 Andreas Simon" line in the ebuild.
I don't remember writing that ;-) Actually I feel silly having a
"Copyright" on such trivial stuff at all.

Of course you have (at least from my part) permission to change the copyright to Gentoo Technologies, Inc,.

Having both use flags, gnutls and ssl, seems like a good idea, especially if someone doesn't want ssl support at all. BTW, dovecot will not compile with tha latest gnutls version (1.0.9) because of some changes in gnutls, but this gnutls version is not yet in portage. Thus dovecot should depend on =gnutls-1.0.4 and not later versions.

I don't see a reason for inherit base either. Must be the remains from some old cut&paste.
Comment 28 Grant Goodyear (RETIRED) gentoo-dev 2004-04-10 07:21:36 UTC
Thank you very much; I appreciate it.  My apologies for this ebuild languishing
so long!  

Since dovecot seems to work w/ the 0.8.10 version of gnutls I've replaced
the DEPEND w/ <=net-libs/gnutls-1.0.4.

I'm very much a novice w/ this ebuild, so those of you who have been doing such a
good job of keeping up this ebuild please do continue to do so.

Now in CVS; should propagate to rsync in an hour or so.