From 201cd2f9a0516959de7be66bf2c1c6af0f390792 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 8 Jan 2007 14:52:05 +0000 Subject: [PATCH] Use docert from ssl-cert eclass to make our certs. Touch certs in pkg_postinst so newer portages don't remove them. Package-Manager: portage-2.1.2_rc4-r6 --- net-mail/dovecot/ChangeLog | 6 +++- net-mail/dovecot/Manifest | 16 ++++----- net-mail/dovecot/dovecot-1.0_rc17.ebuild | 41 ++++++++++++++---------- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/net-mail/dovecot/ChangeLog b/net-mail/dovecot/ChangeLog index c240e8bc646a..cfdbe77936e7 100644 --- a/net-mail/dovecot/ChangeLog +++ b/net-mail/dovecot/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-mail/dovecot # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.83 2007/01/07 19:48:38 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.84 2007/01/08 14:52:05 uberlord Exp $ + + 08 Jan 2007; Roy Marples dovecot-1.0_rc17.ebuild: + Use docert from ssl-cert eclass to make our certs. + Touch certs in pkg_postinst so newer portages don't remove them. *dovecot-1.0_rc17 (07 Jan 2007) diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest index 84b7416b9e48..2ff829eab1de 100644 --- a/net-mail/dovecot/Manifest +++ b/net-mail/dovecot/Manifest @@ -23,14 +23,14 @@ EBUILD dovecot-1.0_rc16.ebuild 5689 RMD160 61dbf78e03f4b6c47d0f1140a18e916744d6d MD5 a596a1b95c83e1cc117c46e927131d29 dovecot-1.0_rc16.ebuild 5689 RMD160 61dbf78e03f4b6c47d0f1140a18e916744d6ddb1 dovecot-1.0_rc16.ebuild 5689 SHA256 f4326361d84ab84b6afb4fe907b71cd55f6606ac2551050fd15b71c3dab9c187 dovecot-1.0_rc16.ebuild 5689 -EBUILD dovecot-1.0_rc17.ebuild 5689 RMD160 a052f5b0648ea2c71b8cb0ffc18cbab51b010e00 SHA1 d319207251e788f4f381c4ee1ea5ca58d6b175fc SHA256 7a202e807b3e1265fb6c5785a48898e9760d0be51e5351afef18c31b01166522 -MD5 4cc0f6eca0792b00ab6aa72c566733fd dovecot-1.0_rc17.ebuild 5689 -RMD160 a052f5b0648ea2c71b8cb0ffc18cbab51b010e00 dovecot-1.0_rc17.ebuild 5689 -SHA256 7a202e807b3e1265fb6c5785a48898e9760d0be51e5351afef18c31b01166522 dovecot-1.0_rc17.ebuild 5689 -MISC ChangeLog 14294 RMD160 10844ed2ddd2809cc03e21ff14f3eaf616de0bab SHA1 8e55e4c0502b95a76f54d49938d61f0412441b6a SHA256 8499eb84fb1e2a52de8e8318154adc4c786b5049fed135f0abfdbcfde089417a -MD5 2828c58c92c71d918578766a4e37b50a ChangeLog 14294 -RMD160 10844ed2ddd2809cc03e21ff14f3eaf616de0bab ChangeLog 14294 -SHA256 8499eb84fb1e2a52de8e8318154adc4c786b5049fed135f0abfdbcfde089417a ChangeLog 14294 +EBUILD dovecot-1.0_rc17.ebuild 6057 RMD160 393215c69a3050d4299d334f0dc5c5d7162b3630 SHA1 308682abce347745db13cab0a1a0188488533cc2 SHA256 ab0ed7789eeaaba6d1ce48a820bd556537e21f95fe9dcb82f846bd95c79c1d9c +MD5 23be4b3c6c1002fcf31390ebea13f5e6 dovecot-1.0_rc17.ebuild 6057 +RMD160 393215c69a3050d4299d334f0dc5c5d7162b3630 dovecot-1.0_rc17.ebuild 6057 +SHA256 ab0ed7789eeaaba6d1ce48a820bd556537e21f95fe9dcb82f846bd95c79c1d9c dovecot-1.0_rc17.ebuild 6057 +MISC ChangeLog 14489 RMD160 bc04ac724ad0159f146b4a8ae61e1b48da06db8f SHA1 f706f5f92664016156e4b46f75c814ccda0c9c77 SHA256 4f863d54fa3280d01a545767c3a7adb2c84808a99b83f17d4433fd2910c32a54 +MD5 57ad2c0badc8ce41b05c8927a391e20b ChangeLog 14489 +RMD160 bc04ac724ad0159f146b4a8ae61e1b48da06db8f ChangeLog 14489 +SHA256 4f863d54fa3280d01a545767c3a7adb2c84808a99b83f17d4433fd2910c32a54 ChangeLog 14489 MISC metadata.xml 252 RMD160 97c0c41abc4b61586ab48653ced79067cb964aa6 SHA1 57de811cfb02936b35c4bef2108018e6b2697a99 SHA256 419ffa57f459d89a62dd42ee4bb01934f03e6913b470323f5b2b8a7c89e2dc66 MD5 b6ff89c08602229bdd234da83a89df77 metadata.xml 252 RMD160 97c0c41abc4b61586ab48653ced79067cb964aa6 metadata.xml 252 diff --git a/net-mail/dovecot/dovecot-1.0_rc17.ebuild b/net-mail/dovecot/dovecot-1.0_rc17.ebuild index b47467626a18..68f4f05cc50c 100644 --- a/net-mail/dovecot/dovecot-1.0_rc17.ebuild +++ b/net-mail/dovecot/dovecot-1.0_rc17.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.0_rc17.ebuild,v 1.1 2007/01/07 19:48:38 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.0_rc17.ebuild,v 1.2 2007/01/08 14:52:05 uberlord Exp $ -inherit autotools eutils +inherit autotools eutils ssl-cert MY_P="${P/_/.}" S="${WORKDIR}/${MY_P}" @@ -113,6 +113,22 @@ src_install () { sed -i -e 's/^#listen = \*/listen = \[::\]/g' "${conf}" || die fi + # Update ssl cert locations + if use ssl ; then + sed -i -e 's,^#ssl_cert_file =.*,#ssl_cert_file = /etc/ssl/dovecot/server.pem,' \ + -e 's,^#ssl_key_file =.*,#ssl_key_file = /etc/ssl/dovecot/server.key,' \ + "${conf}" || die + + # Let's not make a new certificate if we already have one + if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ + -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" + insinto "${ROOT}"/etc/ssl/dovecot + docert server + fowners dovecot:mail /etc/ssl/dovecot/server.{key,pem} + fi + fi + # Install SQL configuration if use mysql || use postgres ; then cp doc/dovecot-sql.conf "${D}"/etc/dovecot @@ -129,21 +145,6 @@ src_install () { dodoc doc/dovecot-ldap.conf fi - # Create SSL certificates - if use ssl ; then - dodir /etc/ssl/certs - dodir /etc/ssl/private - # Let's not make a new certificate if we already have one - if ! [[ -e /etc/ssl/certs/dovecot.pem && \ - -e /etc/ssl/private/dovecot.pem ]]; then - einfo "Generating X.509 certificate for SSL" - pushd doc >/dev/null && \ - SSLDIR="${D}"/etc/ssl sh mkcert.sh && \ - popd >/dev/null - fi - dodoc doc/*.cnf doc/mkcert.sh - fi - # Install sieve plugin if use sieve ; then make -C "${SIEVE_S}" DESTDIR="${D}" install || die "make install failed" @@ -163,6 +164,12 @@ get_config_var() { } pkg_postinst() { + # Touch ssl certs so that they are modified outisde of src_install + # We do this so portage does't unmerge them - silly portage + if use ssl ; then + touch "${ROOT}"/etc/ssl/dovecot/server.{key,pem} + fi + einfo "The dovecot configuration has vastly changed since 0.99." einfo "You are encouraged to start afresh with a new configuration file." einfo "see http://wiki.dovecot.org/ for configuration examples." -- 2.26.2