From a428fcf3d824175c25580dd26b0e557c7860c138 Mon Sep 17 00:00:00 2001 From: Brandon Low Date: Fri, 20 Jun 2003 14:45:11 +0000 Subject: Fix TLS version --- net-mail/postfix/Manifest | 5 +- net-mail/postfix/files/digest-postfix-2.0.12 | 4 - net-mail/postfix/files/digest-postfix-2.0.12-r1 | 4 + net-mail/postfix/postfix-2.0.12-r1.ebuild | 236 ++++++++++++++++++++++++ net-mail/postfix/postfix-2.0.12.ebuild | 236 ------------------------ 5 files changed, 242 insertions(+), 243 deletions(-) delete mode 100644 net-mail/postfix/files/digest-postfix-2.0.12 create mode 100644 net-mail/postfix/files/digest-postfix-2.0.12-r1 create mode 100644 net-mail/postfix/postfix-2.0.12-r1.ebuild delete mode 100644 net-mail/postfix/postfix-2.0.12.ebuild (limited to 'net-mail') diff --git a/net-mail/postfix/Manifest b/net-mail/postfix/Manifest index c7393b37a584..e351e0a0d768 100644 --- a/net-mail/postfix/Manifest +++ b/net-mail/postfix/Manifest @@ -1,8 +1,8 @@ MD5 fc71783cead215556a8c40bddbf69700 postfix-2.0.10-r1.ebuild 6164 MD5 656396a2cf9d1d2c05cd6b55dc9e988d postfix-2.0.9.ebuild 6242 MD5 76726846989c0b6a5fc643d06b804e45 postfix-1.1.11.20020917-r1.ebuild 4945 -MD5 4baf72c617f25043af718b0455ed63f3 postfix-2.0.12-r1.ebuild 6012 -MD5 64016e0edf89f9ca32d5b5fce9ed76ef ChangeLog 15595 +MD5 356407d3452ad6a17e6c196d26e60dbd postfix-2.0.12-r1.ebuild 6015 +MD5 df10f90e9ba3c28c81a5dc16574d15a2 ChangeLog 15865 MD5 42c0c788c541d868b59874bc32ee037f postfix-2.0.11.ebuild 6013 MD5 c79b19f95cb38b8802966d7efb54bc60 postfix-1.1.11.20020917.ebuild 4924 MD5 a3eadfcfa0bf6f88ccff41e2d065745b files/postfix-2.0.8_patch.patch 552 @@ -12,7 +12,6 @@ MD5 569f1c46350b2718419b72bb9c443c3f files/saslpass 135 MD5 460833c3a1ffc3a240c72f0537802b5c files/tls+ipv6-1.4-pf-1.1.11-20020917.patch.bz2 72150 MD5 40a96d0b5dfb56714e11d1f379ddc5a7 files/main.cf 18376 MD5 1d4abcdc55f9e76735ae1ae0fcc13c53 files/digest-postfix-2.0.11 295 -MD5 318934ebf1e8f275d8763ec810a1d3cf files/digest-postfix-2.0.12 295 MD5 e651e2015b6c6f1495ac84a37e4a8871 files/smtpd.conf 130 MD5 ff6584c14212d383b742fe5fc0aceed5 files/postfix-2.0.9-get-FQDN.patch 993 MD5 e17b09d7df6537631ef2263b83fe0d38 files/master.cf 4421 diff --git a/net-mail/postfix/files/digest-postfix-2.0.12 b/net-mail/postfix/files/digest-postfix-2.0.12 deleted file mode 100644 index fe4a0b7909d3..000000000000 --- a/net-mail/postfix/files/digest-postfix-2.0.12 +++ /dev/null @@ -1,4 +0,0 @@ -MD5 94ce611b6f3e169caee2b4634c6b5370 postfix-2.0.12.tar.gz 1349796 -MD5 73502ea66254ee8c9a21962e4ec9b183 pfixtls-0.8.13-2.0.12-0.9.7b.tar.gz 226121 -MD5 6a3974a97cde56af94e8c0f9ab92c59e ipv6-1.14-pf-2.0.12.patch.gz 36038 -MD5 54fc03f23bad5a061e9bf254e1a3c3cb tls+ipv6-1.14-pf-2.0.12.patch.gz 99578 diff --git a/net-mail/postfix/files/digest-postfix-2.0.12-r1 b/net-mail/postfix/files/digest-postfix-2.0.12-r1 new file mode 100644 index 000000000000..4fde1688899b --- /dev/null +++ b/net-mail/postfix/files/digest-postfix-2.0.12-r1 @@ -0,0 +1,4 @@ +MD5 94ce611b6f3e169caee2b4634c6b5370 postfix-2.0.12.tar.gz 1349796 +MD5 42533d651553e97920b011dbf5812f4e pfixtls-0.8.14-2.0.12-0.9.7b.tar.gz 227935 +MD5 6a3974a97cde56af94e8c0f9ab92c59e ipv6-1.14-pf-2.0.12.patch.gz 36038 +MD5 54fc03f23bad5a061e9bf254e1a3c3cb tls+ipv6-1.14-pf-2.0.12.patch.gz 99578 diff --git a/net-mail/postfix/postfix-2.0.12-r1.ebuild b/net-mail/postfix/postfix-2.0.12-r1.ebuild new file mode 100644 index 000000000000..997301286ce5 --- /dev/null +++ b/net-mail/postfix/postfix-2.0.12-r1.ebuild @@ -0,0 +1,236 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/postfix/postfix-2.0.12-r1.ebuild,v 1.1 2003/06/20 14:45:07 lostlogic Exp $ + +IUSE="ssl mysql sasl ldap ipv6 maildir mbox" + +inherit eutils + +TLS_P="pfixtls-0.8.14-${PV}-0.9.7b" +IPV6="1.14" +IPV6_P="ipv6-${IPV6}-pf-${PV}" +IPV6_TLS_P="tls+${IPV6_P}" + +DESCRIPTION="A fast and secure drop-in replacement for sendmail" +HOMEPAGE="http://www.postfix.org" +SRC_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official/${P}.tar.gz + ssl? ( ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/${TLS_P}.tar.gz ) + ipv6? ( ftp://ftp.stack.nl/pub/postfix/tls+ipv6/${IPV6}/${IPV6_P}.patch.gz ) + ipv6? ( ftp://ftp.stack.nl/pub/postfix/tls+ipv6/${IPV6}/${IPV6_TLS_P}.patch.gz )" + +SLOT="0" +LICENSE="IPL-1" +KEYWORDS="~x86 ~sparc ~ppc" + +PROVIDE="virtual/mta + virtual/mda" + +DEPEND=">=sys-libs/db-3.2 + >=sys-apps/sed-4 + >=dev-libs/libpcre-3.4 + ldap? ( >=net-nds/openldap-1.2 ) + mysql? ( >=dev-db/mysql-3.23.51 ) + ssl? ( >=dev-libs/openssl-0.9.6g ) + sasl? ( dev-libs/cyrus-sasl )" + +RDEPEND="${DEPEND} + >=net-mail/mailbase-0.00 + !virtual/mta" + +is_postfix_installed() { + if [ -d /etc/postfix ] ; then + return 1 + fi + + return 0 +} + +pkg_setup() { + if ! grep -q ^postdrop: /etc/group ; then + groupadd postdrop || die "problem adding group postdrop" + fi + + if ! grep -q ^mail:.*postfix /etc/group ; then + usermod -G mail postfix || die "problem adding user postfix to group mail" + fi + + # Prevent mangling the smtpd.conf file + if [ ! -L ${ROOT}/usr/lib/sasl2/smtpd.conf ] + then + if [ -f ${ROOT}/usr/lib/sasl2/smtpd.conf ] + then + ebegin "Protecting your smtpd.conf file" + if [ ! -d ${ROOT}/etc/sasl2 ] + then + mkdir -p ${ROOT}/etc/sasl2 + fi + + # This shouldn't be necessary, but apparently + # Without it things can still get messy. + if [ -L ${ROOT}/etc/sasl2/smtpd.conf ] + then + rm ${ROOT}/etc/sasl2/smtpd.conf + fi + + # If both files exist, make sure that we + # preserve a copy of each with the ._cfg + # system + if [ -f ${ROOT}/etc/sasl2/smtpd.conf ] + then + mv ${ROOT}/etc/sasl2/smtpd.conf \ + ${ROOT}/etc/sasl2/._cfg0000_smtpd.conf + fi + mv ${ROOT}/usr/lib/sasl2/smtpd.conf ${ROOT}/etc/sasl2 + eend + fi + fi + +} + +src_unpack() { + unpack ${P}.tar.gz + cd ${S} + if [ "`use ssl`" ]; then + if [ "`use ipv6`" ]; then + epatch ${DISTDIR}/${IPV6_TLS_P}.patch.gz + else + unpack ${TLS_P}.tar.gz + epatch ${WORKDIR}/${P}/${TLS_P}/pfixtls.diff + fi + CCARGS="${CCARGS} -DHAS_SSL" + AUXLIBS="${AUXLIBS} -lssl -lcrypto" + elif [ "`use ipv6`" ]; then + epatch ${DISTDIR}/${IPV6_P}.patch.gz + fi + cd ${S}/conf + sed -i -e "s:/usr/libexec/postfix:/usr/lib/postfix:" main.cf + + if [ "`use sasl`" ] ; then + # sasl 2 + if [ -f /usr/include/sasl/sasl.h ]; then + AUXLIBS="${AUXLIBS} -lsasl2" + CCARGS="${CCARGS} -I/usr/include/sasl -DUSE_SASL_AUTH" + # sasl 1 + elif [ -f /usr/include/sasl.h ]; then + AUXLIBS="${AUXLIBS} -lsasl" + CCARGS="${CCARGS} -DUSE_SASL_AUTH" + fi + fi + + cd ${S}/src/global + sed -i -e "s:/usr/libexec/postfix:/usr/lib/postfix:" mail_params.h + + if [ "`use mysql`" ] ; then + CCARGS="${CCARGS} -DHAS_MYSQL -I/usr/include/mysql" + AUXLIBS="${AUXLIBS} -lmysqlclient -lm -lz" + fi + + if [ "`use ldap`" ] ; then + CCARGS="${CCARGS} -DHAS_LDAP" + AUXLIBS="${AUXLIBS} -lldap -llber" + fi + + if [ "`use pam`" ] ; then + AUXLIBS="${AUXLIBS} -lpam" + fi + + CCARGS="${CCARGS} -DHAS_PCRE" + AUXLIBS="${AUXLIBS} -L/usr/lib -lpcre -ldl -lcrypt" + + DEBUG="" + + cd ${S} + make makefiles CC="${CC}" OPT="${CFLAGS}" DEBUG="${DEBUG}" \ + CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" \ + || die "creating makefiles failed" + + # Postfix do not get the FQDN if no hostname is configured + epatch ${FILESDIR}/${PN}-2.0.9-get-FQDN.patch +} + +src_compile() { + #this is a bug fix for gcc-2.95.3-r5 (bug 16547) + export CC=gcc + emake || die "compile problem" +} + +src_install () { + dodir /usr/bin /usr/sbin /usr/lib/postfix /etc/postfix/sample + keepdir /var/spool/postfix/tmp + + cd ${S}/bin + dosbin post* sendmail + fowners root:postdrop /usr/sbin/{postdrop,postqueue} + fperms 2755 /usr/sbin/{postdrop,postqueue} + + dosym /usr/sbin/sendmail /usr/bin/mailq + dosym /usr/sbin/sendmail /usr/bin/newaliases + dosym /usr/sbin/sendmail /usr/lib/sendmail + + cd ${S}/libexec + exeinto /usr/lib/postfix + doexe * + + cd ${S}/man + doman man*/* + + cd ${S} + dodoc *README COMPATIBILITY HISTORY INSTALL LICENSE PORTING RELEASE_NOTES* + cd README_FILES + find . -type l |xargs rm + dodoc * + + cd ${S} + dohtml html/* + + cd ${S}/conf + insinto /etc/postfix/sample + doins access aliases canonical pcre_table regexp_table \ + relocated transport virtual *.cf + + exeinto /etc/postfix + doexe postfix-script post-install postfix-files + + insinto /etc/postfix + doins ${S}/conf/{main,master}.cf ${FILESDIR}/saslpass + cd ${D}/etc/postfix + epatch ${FILESDIR}/postfix-2.0.0/main.cf.diff + sed -i -e "s|/usr/share/doc/POSTFIX|/usr/share/doc/${PF}|" main.cf + chmod 644 main.cf + rm -f main.cf~ + fperms 600 /etc/postfix/saslpass + + exeinto /etc/init.d ; doexe ${FILESDIR}/postfix + insinto /etc/pam.d ; newins ${FILESDIR}/smtp.pam smtp + + insinto /etc/sasl2 + doins ${FILESDIR}/smtpd.conf + if [ "`use sasl`" ] ; then + dodir /usr/lib/sasl2 + dosym ../../../etc/sasl2/smtpd.conf /usr/lib/sasl2/smtpd.conf + fi + + cd ${D}/etc/postfix + if [ "`use maildir`" ]; then + sed -i -e "s:^#\(home_mailbox = \)Maildir/:\1.maildir/:" main.cf + elif [ "`use mbox`" ]; then + sed -i -e "s:^#\(mail_spool_directory = /var/spool/mail\):\1:" main.cf + fi + + #install an rmail for UUCP, closing bug #19127 + cd ${S}/auxiliary/rmail + dobin rmail +} + +pkg_postinst() { + install -d -m 0755 ${ROOT}/var/spool/postfix + + ewarn "If you upgraded from