Gentoo Archives: gentoo-commits

From: "Daniel Black (dragonheart)" <dragonheart@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-filter/opendkim: metadata.xml ChangeLog opendkim-1.1.2.ebuild
Date: Sun, 01 Nov 2009 23:21:11
Message-Id: E1N4jjQ-0003OY-Nn@stork.gentoo.org
1 dragonheart 09/11/01 23:21:08
2
3 Modified: metadata.xml ChangeLog
4 Added: opendkim-1.1.2.ebuild
5 Log:
6 version bump incorporating suggestions from steveb and Eray Aslan in bug #289929
7 (Portage version: 2.2_rc48/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.2 mail-filter/opendkim/metadata.xml
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/metadata.xml?rev=1.2&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/metadata.xml?rev=1.2&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/metadata.xml?r1=1.1&r2=1.2
15
16 Index: metadata.xml
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/mail-filter/opendkim/metadata.xml,v
19 retrieving revision 1.1
20 retrieving revision 1.2
21 diff -u -r1.1 -r1.2
22 --- metadata.xml 6 Oct 2009 09:10:43 -0000 1.1
23 +++ metadata.xml 1 Nov 2009 23:21:07 -0000 1.2
24 @@ -9,7 +9,14 @@
25 <longdescription>A program implementing the Milter API that signs and verifies
26 using the DKIM standard. This is a fork of Sendmail's DKIM-milter</longdescription>
27 <use>
28 - <flag name='db'>Include features like stats, querycache, popauth and
29 - bodylengthdb that include berkdb</flag>
30 + <flag name='db'>Include features like stats, querycache, popauth, report
31 + intervals and bodylengthdb that include berkdb</flag>
32 + <flag name='diffheaders'>On verification failure, compare the
33 + original and the received headers to look for possible munging</flag>
34 + <flag name='asyncdns'>Use inbuilt asynchronous DNS library for
35 + queries</flag>
36 + <flag name='multiplesigs'>Allow addition of multiple signatures when key
37 + lists are in use.</flag>
38 +
39 </use>
40 </pkgmetadata>
41
42
43
44 1.3 mail-filter/opendkim/ChangeLog
45
46 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.3&view=markup
47 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.3&content-type=text/plain
48 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/ChangeLog?r1=1.2&r2=1.3
49
50 Index: ChangeLog
51 ===================================================================
52 RCS file: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v
53 retrieving revision 1.2
54 retrieving revision 1.3
55 diff -u -r1.2 -r1.3
56 --- ChangeLog 6 Oct 2009 22:54:08 -0000 1.2
57 +++ ChangeLog 1 Nov 2009 23:21:07 -0000 1.3
58 @@ -1,6 +1,13 @@
59 # ChangeLog for mail-filter/opendkim
60 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
61 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.2 2009/10/06 22:54:08 dragonheart Exp $
62 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.3 2009/11/01 23:21:07 dragonheart Exp $
63 +
64 +*opendkim-1.1.2 (01 Nov 2009)
65 +
66 + 01 Nov 2009; Daniel Black <dragonheart@g.o> +opendkim-1.1.2.ebuild,
67 + +files/opendkim-1.1.2-test73.patch, metadata.xml:
68 + version bump incorporating suggestions from steveb and Eray Aslan in bug
69 + #289929
70
71 06 Oct 2009; Daniel Black <dragonheart@g.o> opendkim-1.1.0.ebuild:
72 dependency fix thanks Eray
73
74
75
76 1.1 mail-filter/opendkim/opendkim-1.1.2.ebuild
77
78 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/opendkim-1.1.2.ebuild?rev=1.1&view=markup
79 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/opendkim/opendkim-1.1.2.ebuild?rev=1.1&content-type=text/plain
80
81 Index: opendkim-1.1.2.ebuild
82 ===================================================================
83 # Copyright 1999-2009 Gentoo Foundation
84 # Distributed under the terms of the GNU General Public License v2
85 # $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/opendkim-1.1.2.ebuild,v 1.1 2009/11/01 23:21:07 dragonheart Exp $
86
87 EAPI="2"
88
89 inherit eutils
90
91 DESCRIPTION="A milter-based application to provide DKIM signing and verification"
92 HOMEPAGE="http://opendkim.org"
93 SRC_URI="mirror://sourceforge/opendkim/${P}.tar.gz"
94
95 LICENSE="Sendmail-Open-Source"
96 SLOT="0"
97 KEYWORDS="~amd64 ~x86"
98 IUSE="+db diffheaders asyncdns multiplesigs"
99
100 # FUTURE: unbound (dnssec lib) - bug #223103
101
102 DEPEND="dev-libs/openssl
103 db? ( >=sys-libs/db-3.2 )
104 || ( mail-filter/libmilter mail-mta/sendmail )
105 diffheaders? ( dev-libs/tre )"
106 RDEPEND="${DEPEND}"
107
108 pkg_setup() {
109 enewgroup milter
110 # mail-milter/spamass-milter creates milter user with this home directory
111 # For consistency reasons, milter user must be created here with this home directory
112 # even though this package doesn't need a home directory for this user (#280571)
113 enewuser milter -1 -1 /var/lib/milter milter
114 }
115
116 src_prepare() {
117 epatch "${FILESDIR}"/${P}-test73.patch
118 sed -i -e 's:/var/db/dkim:/etc/opendkim:g' \
119 -e 's:/etc/mail:/etc/opendkim:g' \
120 opendkim/opendkim.conf.sample
121 }
122
123 src_configure() {
124 econf $(use_enable db bodylengthdb) \
125 $(use_enable db popauth) \
126 $(use_enable db querycache) \
127 $(use_enable db reportintervals) \
128 $(use_enable db stats) \
129 $(use_enable diffheaders) \
130 $(use_enable asyncdns arlib) \
131 $(use_enable asyncdns dnsupgrade) \
132 $(use_enable multiplesigs multiplesigs) \
133 --without-domainkeys \
134 --enable-captureerrors \
135 --enable-dkimreputation \
136 --enable-identityheader \
137 --enable-redirect \
138 --enable-replacerules \
139 --enable-selectcanon \
140 --enable-selectorheader \
141 --enable-sendermacro \
142 --enable-vbr \
143 --enable-ztags
144 }
145
146 src_install() {
147 emake DESTDIR="${D}" install
148 # file collision
149 rm "${D}"/usr/share/man/man3/ar.3
150
151 mv "${D}"/usr/share/doc/opendkim "${D}"/usr/share/doc/${PF}
152 newinitd "${FILESDIR}/opendkim.init" opendkim
153 dodir /etc/opendkim /var/run/opendkim /var/lib/opendkim
154 fowners milter:milter /var/run/opendkim /etc/opendkim /var/lib/opendkim
155
156 # default configuration
157 if [ ! -f /etc/opendkim/opendkim.conf ]; then
158 grep ^[^#] "${S}"/opendkim/opendkim.conf.sample \
159 > "${D}"/etc/opendkim/opendkim.conf
160 echo \# Socket local:/var/run/opendkim/opendkim.sock >> \
161 "${D}"/etc/opendkim/opendkim.conf
162 echo UserID milter >> "${D}"/etc/opendkim/opendkim.conf
163 if use db; then
164 echo Statistics /var/lib/opendkim/stats.db >> \
165 "${D}"/etc/opendkim/opendkim.conf
166 fi
167 fi
168 }
169
170 pkg_postinst() {
171 elog "If you want to sign your mail messages, you will have to run"
172 elog " emerge --config ${CATEGORY}/${PN}"
173 elog "It will help you create your key and give you hints on how"
174 elog "to configure your DNS and MTA."
175
176 ewarn "Make sure your MTA has r/w access to the socket file."
177 ewarn "This can be done either by setting UMask to 002 and adding MTA's user"
178 ewarn "to milter group or you can simply set UMask to 000."
179 }
180
181 pkg_config() {
182 local selector keysize pubkey
183
184 read -p "Enter the selector name (default ${HOSTNAME}): " selector
185 [[ -n "${selector}" ]] || selector=${HOSTNAME}
186 if [[ -z "${selector}" ]]; then
187 eerror "Oddly enough, you don't have a HOSTNAME."
188 return 1
189 fi
190 if [[ -f "${ROOT}"etc/opendkim/${selector}.private ]]; then
191 ewarn "The private key for this selector already exists."
192 else
193 einfo "Select the size of private key:"
194 einfo " [1] 512 bits"
195 einfo " [2] 1024 bits"
196 while read -n 1 -s -p " Press 1 or 2 on the keyboard to select the key size " keysize ; do
197 [[ "${keysize}" == "1" || "${keysize}" == "2" ]] && echo && break
198 done
199 case ${keysize} in
200 1) keysize=512 ;;
201 *) keysize=1024 ;;
202 esac
203
204 # generate the private and public keys
205 opendkim-genkey.sh -b ${keysize} -D "${ROOT}"etc/opendkim/ \
206 -s ${selector} && \
207 chown milter:milter \
208 "${ROOT}"etc/opendkim/"${selector}".private || \
209 { eerror "Failed to create private and public keys." ; return 1; }
210 chmod go-r "${ROOT}"etc/opendkim/"${selector}".private
211 fi
212
213 # opendkim selector configuration
214 echo
215 einfo "Make sure you have the following settings in your dkim-filter.conf:"
216 einfo " Keyfile /etc/opendkim/${selector}.private"
217 einfo " Selector ${selector}"
218
219 # MTA configuration
220 echo
221 einfo "If you are using Postfix, add following lines to your main.cf:"
222 einfo " smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
223 einfo " non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock"
224
225 # DNS configuration
226 einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:"
227 cat "${ROOT}"etc/opendkim/${selector}.txt
228 einfo "t=y signifies you only test the DKIM on your domain. See following page for the complete list of tags:"
229 einfo " http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text"
230 einfo
231 einfo "Also look at the ADSP http://tools.ietf.org/html/rfc5617"
232 }