1 |
pacho 14/05/02 10:46:14 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: opendkim-2.9.2-r1.ebuild |
5 |
Log: |
6 |
Add unit file (#502054 by Andrius Stikonas) |
7 |
|
8 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A188FBD4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.78 mail-filter/opendkim/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.78&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?rev=1.78&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/ChangeLog?r1=1.77&r2=1.78 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v |
20 |
retrieving revision 1.77 |
21 |
retrieving revision 1.78 |
22 |
diff -u -r1.77 -r1.78 |
23 |
--- ChangeLog 15 Apr 2014 06:41:38 -0000 1.77 |
24 |
+++ ChangeLog 2 May 2014 10:46:14 -0000 1.78 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for mail-filter/opendkim |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.77 2014/04/15 06:41:38 eras Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/ChangeLog,v 1.78 2014/05/02 10:46:14 pacho Exp $ |
30 |
+ |
31 |
+*opendkim-2.9.2-r1 (02 May 2014) |
32 |
+ |
33 |
+ 02 May 2014; Pacho Ramos <pacho@g.o> +files/opendkim.service, |
34 |
+ +opendkim-2.9.2-r1.ebuild: |
35 |
+ Add unit file (#502054 by Andrius Stikonas) |
36 |
|
37 |
*opendkim-2.9.2 (15 Apr 2014) |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.1 mail-filter/opendkim/opendkim-2.9.2-r1.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/opendkim-2.9.2-r1.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/opendkim/opendkim-2.9.2-r1.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: opendkim-2.9.2-r1.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2014 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/mail-filter/opendkim/opendkim-2.9.2-r1.ebuild,v 1.1 2014/05/02 10:46:14 pacho Exp $ |
52 |
|
53 |
EAPI=5 |
54 |
inherit autotools db-use eutils systemd user |
55 |
|
56 |
# for betas |
57 |
#MY_P=${P/_b/.B} |
58 |
#S=${WORKDIR}/${PN}-2.8.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="+berkdb gnutls ldap lmdb lua memcached opendbx poll sasl selinux +ssl static-libs unbound" |
69 |
|
70 |
DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail ) |
71 |
dev-libs/libbsd |
72 |
ssl? ( >=dev-libs/openssl-0.9.8 ) |
73 |
berkdb? ( >=sys-libs/db-3.2 ) |
74 |
opendbx? ( >=dev-db/opendbx-1.4.0 ) |
75 |
lua? ( dev-lang/lua ) |
76 |
ldap? ( net-nds/openldap ) |
77 |
lmdb? ( dev-db/lmdb ) |
78 |
memcached? ( dev-libs/libmemcached ) |
79 |
sasl? ( dev-libs/cyrus-sasl ) |
80 |
selinux? ( sec-policy/selinux-dkim ) |
81 |
unbound? ( >=net-dns/unbound-1.4.1 net-dns/dnssec-root ) |
82 |
!unbound? ( net-libs/ldns ) |
83 |
gnutls? ( >=net-libs/gnutls-2.11.7 )" |
84 |
|
85 |
RDEPEND="${DEPEND} |
86 |
sys-process/psmisc" |
87 |
|
88 |
REQUIRED_USE="sasl? ( ldap )" |
89 |
|
90 |
pkg_setup() { |
91 |
enewgroup milter |
92 |
# mail-milter/spamass-milter creates milter user with this home directory |
93 |
# For consistency reasons, milter user must be created here with this home directory |
94 |
# even though this package doesn't need a home directory for this user (#280571) |
95 |
enewuser milter -1 -1 /var/lib/milter milter |
96 |
} |
97 |
|
98 |
src_prepare() { |
99 |
sed -i -e 's:/var/db/dkim:/etc/opendkim:g' \ |
100 |
-e 's:/var/db/opendkim:/var/lib/opendkim:g' \ |
101 |
-e 's:/etc/mail:/etc/opendkim:g' \ |
102 |
-e 's:mailnull:milter:g' \ |
103 |
-e 's:^#[[:space:]]*PidFile.*:PidFile /var/run/opendkim/opendkim.pid:' \ |
104 |
opendkim/opendkim.conf.sample opendkim/opendkim.conf.simple.in \ |
105 |
stats/opendkim-reportstats{,.in} || die |
106 |
|
107 |
sed -i -e 's:dist_doc_DATA:dist_html_DATA:' libopendkim/docs/Makefile.am \ |
108 |
|| die |
109 |
|
110 |
#sed -i -e '/sock.*mt.getcwd/s:mt.getcwd():"/tmp":' opendkim/tests/*.lua |
111 |
sed -i -e '/sock.*mt.getcwd/s:mt.getcwd():"/proc/self/cwd":' opendkim/tests/*.lua |
112 |
|
113 |
eautoreconf |
114 |
} |
115 |
|
116 |
src_configure() { |
117 |
local myconf |
118 |
if use berkdb ; then |
119 |
myconf=$(db_includedir) |
120 |
myconf="--with-db-incdir=${myconf#-I}" |
121 |
myconf+=" --enable-popauth" |
122 |
myconf+=" --enable-query_cache" |
123 |
myconf+=" --enable-stats" |
124 |
fi |
125 |
if use unbound; then |
126 |
myconf+=" --with-unbound" |
127 |
else |
128 |
myconf+=" --with-ldns" |
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_with lmdb) \ |
140 |
$(use_enable poll) \ |
141 |
$(use_enable static-libs static) \ |
142 |
$(use_with gnutls) \ |
143 |
$(use_with memcached libmemcached) \ |
144 |
${myconf} \ |
145 |
--docdir=/usr/share/doc/${PF} \ |
146 |
--htmldir=/usr/share/doc/${PF}/html \ |
147 |
--enable-filter \ |
148 |
--enable-adsp_lists \ |
149 |
--enable-atps \ |
150 |
--enable-identity_header \ |
151 |
--enable-rate_limit \ |
152 |
--enable-resign \ |
153 |
--enable-replace_rules \ |
154 |
--enable-default_sender \ |
155 |
--enable-sender_macro \ |
156 |
--enable-vbr \ |
157 |
--disable-live-testing |
158 |
#--disable-rpath \ |
159 |
#--with-test-socket=/tmp/opendkim-$(echo ${RANDOM})-S |
160 |
} |
161 |
|
162 |
src_install() { |
163 |
emake DESTDIR="${D}" install |
164 |
|
165 |
dosbin stats/opendkim-reportstats |
166 |
|
167 |
newinitd "${FILESDIR}/opendkim.init.r3" opendkim |
168 |
systemd_dounit "${FILESDIR}/opendkim.service" |
169 |
|
170 |
dodir /etc/opendkim /var/lib/opendkim |
171 |
fowners milter:milter /var/lib/opendkim |
172 |
|
173 |
# default configuration |
174 |
if [ ! -f "${ROOT}"/etc/opendkim/opendkim.conf ]; then |
175 |
grep ^[^#] "${S}"/opendkim/opendkim.conf.simple \ |
176 |
> "${D}"/etc/opendkim/opendkim.conf |
177 |
if use unbound; then |
178 |
echo TrustAnchorFile /etc/dnssec/root-anchors.txt >> "${D}"/etc/opendkim/opendkim.conf |
179 |
fi |
180 |
echo UserID milter >> "${D}"/etc/opendkim/opendkim.conf |
181 |
if use berkdb; then |
182 |
echo Statistics /var/lib/opendkim/stats.dat >> \ |
183 |
"${D}"/etc/opendkim/opendkim.conf |
184 |
fi |
185 |
fi |
186 |
|
187 |
use static-libs || find "${D}" -name "*.la" -delete |
188 |
} |
189 |
|
190 |
pkg_postinst() { |
191 |
if [[ -z ${REPLACING_VERSION} ]]; then |
192 |
elog "If you want to sign your mail messages and need some help" |
193 |
elog "please run:" |
194 |
elog " emerge --config ${CATEGORY}/${PN}" |
195 |
elog "It will help you create your key and give you hints on how" |
196 |
elog "to configure your DNS and MTA." |
197 |
|
198 |
ewarn "Make sure your MTA has r/w access to the socket file." |
199 |
ewarn "This can be done either by setting UMask to 002 and adding MTA's user" |
200 |
ewarn "to milter group or you can simply set UMask to 000." |
201 |
fi |
202 |
} |
203 |
|
204 |
pkg_config() { |
205 |
local selector keysize pubkey |
206 |
|
207 |
read -p "Enter the selector name (default ${HOSTNAME}): " selector |
208 |
[[ -n "${selector}" ]] || selector=${HOSTNAME} |
209 |
if [[ -z "${selector}" ]]; then |
210 |
eerror "Oddly enough, you don't have a HOSTNAME." |
211 |
return 1 |
212 |
fi |
213 |
if [[ -f "${ROOT}"etc/opendkim/${selector}.private ]]; then |
214 |
ewarn "The private key for this selector already exists." |
215 |
else |
216 |
keysize=1024 |
217 |
# generate the private and public keys |
218 |
opendkim-genkey -b ${keysize} -D "${ROOT}"etc/opendkim/ \ |
219 |
-s ${selector} -d '(your domain)' && \ |
220 |
chown milter:milter \ |
221 |
"${ROOT}"etc/opendkim/"${selector}".private || \ |
222 |
{ eerror "Failed to create private and public keys." ; return 1; } |
223 |
chmod go-r "${ROOT}"etc/opendkim/"${selector}".private |
224 |
fi |
225 |
|
226 |
# opendkim selector configuration |
227 |
echo |
228 |
einfo "Make sure you have the following settings in your /etc/opendkim/opendkim.conf:" |
229 |
einfo " Keyfile /etc/opendkim/${selector}.private" |
230 |
einfo " Selector ${selector}" |
231 |
|
232 |
# MTA configuration |
233 |
echo |
234 |
einfo "If you are using Postfix, add following lines to your main.cf:" |
235 |
einfo " smtpd_milters = unix:/var/run/opendkim/opendkim.sock" |
236 |
einfo " non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock" |
237 |
einfo " and read http://www.postfix.org/MILTER_README.html" |
238 |
|
239 |
# DNS configuration |
240 |
einfo "After you configured your MTA, publish your key by adding this TXT record to your domain:" |
241 |
cat "${ROOT}"etc/opendkim/${selector}.txt |
242 |
einfo "t=y signifies you only test the DKIM on your domain. See following page for the complete list of tags:" |
243 |
einfo " http://www.dkim.org/specs/rfc4871-dkimbase.html#key-text" |
244 |
einfo |
245 |
einfo "Also look at the ADSP http://tools.ietf.org/html/rfc5617" |
246 |
} |