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