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: ChangeLog opendkim-2.2.2.ebuild
Date: Tue, 30 Nov 2010 11:27:50
Message-Id: 20101130112737.D3D0320054@flycatcher.gentoo.org
1 dragonheart 10/11/30 11:27:37
2
3 Modified: ChangeLog
4 Added: opendkim-2.2.2.ebuild
5 Log:
6 version bump
7
8 (Portage version: 2.2.0_alpha3/cvs/Linux i686)
9
10 Revision Changes Path
11 1.21 mail-filter/opendkim/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.21&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.21&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?r1=1.20&r2=1.21
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v
20 retrieving revision 1.20
21 retrieving revision 1.21
22 diff -u -r1.20 -r1.21
23 --- ChangeLog 18 Jul 2010 16:38:00 -0000 1.20
24 +++ ChangeLog 30 Nov 2010 11:27:37 -0000 1.21
25 @@ -1,6 +1,11 @@
26 # ChangeLog for mail-filter/opendkim
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.20 2010/07/18 16:38:00 hwoarang Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.21 2010/11/30 11:27:37 dragonheart Exp $
30 +
31 +*opendkim-2.2.2 (30 Nov 2010)
32 +
33 + 30 Nov 2010; Daniel Black <dragonheart@g.o> +opendkim-2.2.2.ebuild:
34 + version bump
35
36 18 Jul 2010; Markos Chandras <hwoarang@g.o> opendkim-2.0.4.ebuild:
37 Stable on amd64 wrt bug #317981
38
39
40
41 1.1 mail-filter/opendkim/opendkim-2.2.2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/opendkim-2.2.2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/opendkim-2.2.2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: opendkim-2.2.2.ebuild
47 ===================================================================
48 # Copyright 1999-2010 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.2.2.ebuild,v 1.1 2010/11/30 11:27:37 dragonheart Exp $
51
52 EAPI="2"
53
54 inherit eutils
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 +db opendbx ldap lua sasl unbound"
69
70 # FUTURE: diffheaders (libtre error) - bug #296813
71
72 DEPEND="dev-libs/openssl
73 db? ( >=sys-libs/db-3.2 )
74 || ( mail-filter/libmilter mail-mta/sendmail )
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 )
80 unbound? ( >=net-dns/unbound-1.4.1 net-dns/dnssec-root )"
81 # diffheaders? ( dev-libs/tre )
82 RDEPEND="${DEPEND}"
83
84 pkg_setup() {
85 enewgroup milter
86 # mail-milter/spamass-milter creates milter user with this home directory
87 # For consistency reasons, milter user must be created here with this home directory
88 # even though this package doesn't need a home directory for this user (#280571)
89 enewuser milter -1 -1 /var/lib/milter milter
90 }
91
92 src_prepare() {
93 sed -i -e 's:/var/db/dkim:/etc/opendkim:g' \
94 -e 's:/var/db/opendkim:/var/lib/opendkim:g' \
95 -e 's:/etc/mail:/etc/opendkim:g' \
96 -e 's:mailnull:milter:g' \
97 -e 's:^#[[:space:]]*PidFile.*:PidFile /var/run/opendkim/opendkim.pid:' \
98 opendkim/opendkim.conf.sample opendkim/opendkim.conf.simple.in \
99 contrib/opendkim-reportstats
100 }
101
102 src_configure() {
103 local conf
104 if use asyncdns ; then
105 if use unbound; then
106 conf=$(use_with unbound)
107 else
108 conf="$(use_enable asyncdns arlib)"
109 fi
110 else
111 conf="$(use_with unbound) $(use_enable asyncdns arlib)"
112 fi
113 if use ldap; then
114 conf="${conf} $(use_with sasl)"
115 fi
116 econf $(use_enable db bodylength_db) \
117 $(use_enable db popauth) \
118 $(use_enable db query_cache) \
119 $(use_enable db report_intervals) \
120 $(use_enable db stats) \
121 $(use_enable db stats_i) \
122 $(use_with opendbx odbx) \
123 $(use_with lua) \
124 $(use_enable lua statsext) \
125 $(use_with ldap openldap) \
126 $(use_enable ldap ldap_caching) \
127 ${conf} \
128 --docdir=/usr/share/doc/${PF} \
129 --without-domainkeys \
130 --enable-adsp_lists \
131 --enable-capture_unknown_errors \
132 --enable-dkim_reputation \
133 --enable-identity_header \
134 --enable-redirect \
135 --enable-resign \
136 --enable-replace_rules \
137 --enable-select_canonicalization \
138 --enable-selector_header \
139 --enable-default_sender \
140 --enable-sender_macro \
141 --enable-vbr
142 # $(use_enable diffheaders) \
143 }
144
145 src_install() {
146 emake DESTDIR="${D}" install
147 # file collision
148 rm -f "${D}"/usr/share/man/man3/ar.3
149
150 dosbin contrib/opendkim-reportstats
151 newinitd "${FILESDIR}/opendkim.init" opendkim
152 dodir /etc/opendkim /var/run/opendkim /var/lib/opendkim
153 fowners milter:milter /var/run/opendkim /etc/opendkim /var/lib/opendkim
154
155 # default configuration
156 if [ ! -f "${ROOT}"/etc/opendkim/opendkim.conf ]; then
157 grep ^[^#] "${S}"/opendkim/opendkim.conf.simple \
158 > "${D}"/etc/opendkim/opendkim.conf
159 if use unbound; then
160 echo TrustedAnchorFile /etc/dnssec/root-anchors.txt >> "${D}"/etc/opendkim/opendkim.conf
161 fi
162 echo UserID milter >> "${D}"/etc/opendkim/opendkim.conf
163 if use db; then
164 echo Statistics /var/lib/opendkim/stats.dat >> \
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 -b ${keysize} -D "${ROOT}"etc/opendkim/ \
206 -s ${selector} -d '(your domain)' && \
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 /etc/opendkim/opendkim.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 }