Gentoo Archives: gentoo-commits

From: "Eray Aslan (eras)" <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-filter/opendkim: ChangeLog opendkim-2.4.1.ebuild
Date: Wed, 29 Jun 2011 19:53:15
Message-Id: 20110629195306.4B54820054@flycatcher.gentoo.org
1 eras 11/06/29 19:53:06
2
3 Modified: ChangeLog
4 Added: opendkim-2.4.1.ebuild
5 Log:
6 version bump
7
8 (Portage version: 2.1.10.3/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.23 mail-filter/opendkim/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.23&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.23&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?r1=1.22&r2=1.23
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v
20 retrieving revision 1.22
21 retrieving revision 1.23
22 diff -u -r1.22 -r1.23
23 --- ChangeLog 27 Jun 2011 07:03:04 -0000 1.22
24 +++ ChangeLog 29 Jun 2011 19:53:06 -0000 1.23
25 @@ -1,6 +1,11 @@
26 # ChangeLog for mail-filter/opendkim
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.22 2011/06/27 07:03:04 eras Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.23 2011/06/29 19:53:06 eras Exp $
30 +
31 +*opendkim-2.4.1 (29 Jun 2011)
32 +
33 + 29 Jun 2011; Eray Aslan <eras@g.o> +opendkim-2.4.1.ebuild:
34 + version bump
35
36 *opendkim-2.4.0 (27 Jun 2011)
37
38
39
40
41 1.1 mail-filter/opendkim/opendkim-2.4.1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/opendkim-2.4.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/opendkim-2.4.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: opendkim-2.4.1.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/opendkim-2.4.1.ebuild,v 1.1 2011/06/29 19:53:06 eras Exp $
51
52 EAPI=4
53
54 inherit eutils db-use
55
56 # for betas
57 #MY_P=${P/_b/.B}
58 #S=${WORKDIR}/${PN}-2.0.0
59 #SRC_URI="mirror://sourceforge/opendkim/${MY_P}.tar.gz"
60
61 DESCRIPTION="A milter-based application to provide DKIM signing and verification"
62 HOMEPAGE="http://opendkim.org"
63 SRC_URI="mirror://sourceforge/opendkim/${P}.tar.gz"
64
65 LICENSE="Sendmail-Open-Source BSD"
66 SLOT="0"
67 KEYWORDS="~amd64 ~x86"
68 IUSE="asyncdns +berkdb ldap lua opendbx poll sasl +ssl unbound"
69
70 # FUTURE: diffheaders (libtre error) - bug #296813
71
72 DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )
73 ssl? ( >=dev-libs/openssl-0.9.8 )
74 berkdb? ( >=sys-libs/db-3.2 )
75 opendbx? ( >=dev-db/opendbx-1.4.0 )
76 lua? ( dev-lang/lua )
77 ldap? ( net-nds/openldap )
78 sasl? ( dev-libs/cyrus-sasl )
79 unbound? ( >=net-dns/unbound-1.4.1 net-dns/dnssec-root )"
80 #diffheaders? ( dev-libs/tre )
81 #gnutls? ( >=net-libs/gnutls-2.11.7 )
82
83 RDEPEND="${DEPEND}"
84
85 REQUIRED_USE="sasl? ( ldap )"
86
87 pkg_setup() {
88 enewgroup milter
89 # mail-milter/spamass-milter creates milter user with this home directory
90 # For consistency reasons, milter user must be created here with this home directory
91 # even though this package doesn't need a home directory for this user (#280571)
92 enewuser milter -1 -1 /var/lib/milter milter
93 }
94
95 src_prepare() {
96 sed -i -e 's:/var/db/dkim:/etc/opendkim:g' \
97 -e 's:/var/db/opendkim:/var/lib/opendkim:g' \
98 -e 's:/etc/mail:/etc/opendkim:g' \
99 -e 's:mailnull:milter:g' \
100 -e 's:^#[[:space:]]*PidFile.*:PidFile /var/run/opendkim/opendkim.pid:' \
101 opendkim/opendkim.conf.sample opendkim/opendkim.conf.simple.in \
102 contrib/stats/opendkim-reportstats || die
103
104 epatch "${FILESDIR}/${PN}-2.4.0-ipv6.patch"
105 }
106
107 src_configure() {
108 local myconf
109 if use berkdb ; then
110 myconf=$(db_includedir)
111 myconf="--with-db-incdir=${myconf#-I}"
112 myconf+=" --enable-popauth"
113 myconf+=" --enable-query_cache"
114 myconf+=" --enable-report_intervals"
115 myconf+=" --enable-stats"
116 fi
117 if use asyncdns ; then
118 if use unbound; then
119 myconf+=" --with-unbound"
120 else
121 myconf+=" --enable-arlib"
122 fi
123 else
124 myconf+=" $(use_with unbound) --disable-arlib"
125 fi
126 if use ldap; then
127 myconf+=" $(use_with sasl)"
128 fi
129 econf \
130 $(use_with berkdb db) \
131 $(use_with opendbx odbx) \
132 $(use_with lua) \
133 $(use_enable lua statsext) \
134 $(use_enable lua rbl) \
135 $(use_with ldap openldap) \
136 $(use_enable ldap ldap_caching) \
137 $(use_enable poll) \
138 ${myconf} \
139 --docdir=/usr/share/doc/${PF} \
140 --enable-filter \
141 --without-domainkeys \
142 --enable-oversign \
143 --enable-adsp_lists \
144 --enable-dkim_reputation \
145 --enable-identity_header \
146 --enable-rate_limit \
147 --enable-redirect \
148 --enable-resign \
149 --enable-replace_rules \
150 --enable-selector_header \
151 --enable-default_sender \
152 --enable-sender_macro \
153 --enable-vbr \
154 --disable-rpath \
155 --disable-live-testing
156 #$(use_enable diffheaders)
157 }
158
159 src_install() {
160 emake DESTDIR="${D}" install
161 # file collision
162 rm -f "${D}"/usr/share/man/man3/ar.3
163
164 dosbin contrib/stats/opendkim-reportstats
165 newinitd "${FILESDIR}/opendkim.init.r2" opendkim
166 dodir /etc/opendkim /var/lib/opendkim
167 fowners milter:milter /var/lib/opendkim
168
169 # default configuration
170 if [ ! -f "${ROOT}"/etc/opendkim/opendkim.conf ]; then
171 grep ^[^#] "${S}"/opendkim/opendkim.conf.simple \
172 > "${D}"/etc/opendkim/opendkim.conf
173 if use unbound; then
174 echo TrustedAnchorFile /etc/dnssec/root-anchors.txt >> "${D}"/etc/opendkim/opendkim.conf
175 fi
176 echo UserID milter >> "${D}"/etc/opendkim/opendkim.conf
177 if use berkdb; then
178 echo Statistics /var/lib/opendkim/stats.dat >> \
179 "${D}"/etc/opendkim/opendkim.conf
180 fi
181 fi
182 }
183
184 pkg_postinst() {
185 elog "If you want to sign your mail messages and need some help"
186 elog "please run:"
187 elog " emerge --config ${CATEGORY}/${PN}"
188 elog "It will help you create your key and give you hints on how"
189 elog "to configure your DNS and MTA."
190
191 ewarn "Make sure your MTA has r/w access to the socket file."
192 ewarn "This can be done either by setting UMask to 002 and adding MTA's user"
193 ewarn "to milter group or you can simply set UMask to 000."
194 }
195
196 pkg_config() {
197 local selector keysize pubkey
198
199 read -p "Enter the selector name (default ${HOSTNAME}): " selector
200 [[ -n "${selector}" ]] || selector=${HOSTNAME}
201 if [[ -z "${selector}" ]]; then
202 eerror "Oddly enough, you don't have a HOSTNAME."
203 return 1
204 fi
205 if [[ -f "${ROOT}"etc/opendkim/${selector}.private ]]; then
206 ewarn "The private key for this selector already exists."
207 else
208 einfo "Select the size of private key:"
209 einfo " [1] 512 bits"
210 einfo " [2] 1024 bits"
211 while read -n 1 -s -p " Press 1 or 2 on the keyboard to select the key size " keysize ; do
212 [[ "${keysize}" == "1" || "${keysize}" == "2" ]] && echo && break
213 done
214 case ${keysize} in
215 1) keysize=512 ;;
216 *) keysize=1024 ;;
217 esac
218
219 # generate the private and public keys
220 opendkim-genkey -b ${keysize} -D "${ROOT}"etc/opendkim/ \
221 -s ${selector} -d '(your domain)' && \
222 chown milter:milter \
223 "${ROOT}"etc/opendkim/"${selector}".private || \
224 { eerror "Failed to create private and public keys." ; return 1; }
225 chmod go-r "${ROOT}"etc/opendkim/"${selector}".private
226 fi
227
228 # opendkim selector configuration
229 echo
230 einfo "Make sure you have the following settings in your /etc/opendkim/opendkim.conf:"
231 einfo " Keyfile /etc/opendkim/${selector}.private"
232 einfo " Selector ${selector}"
233
234 # MTA configuration
235 echo
236 einfo "If you are using Postfix, add following lines to your main.cf:"
237 einfo " smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
238 einfo " non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
239 einfo " and read http://www.postfix.org/MILTER_README.html"
240
241 # DNS configuration
242 einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:"
243 cat "${ROOT}"etc/opendkim/${selector}.txt
244 einfo "t=y signifies you only test the DKIM on your domain. See following page for the complete list of tags:"
245 einfo " http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text"
246 einfo
247 einfo "Also look at the ADSP http://tools.ietf.org/html/rfc5617"
248 }