1 |
commit: 47afd5252208d69ef4df50a86442bdd73287530e |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 28 13:50:23 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 28 13:50:40 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47afd525 |
7 |
|
8 |
mail-mta/exim: fix USE=dlfunc |
9 |
|
10 |
Closes: https://bugs.gentoo.org/688572 |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
Package-Manager: Portage-2.3.66, Repoman-2.3.11 |
13 |
|
14 |
.../{exim-4.92-r1.ebuild => exim-4.92-r2.ebuild} | 59 ++++++++++++++-------- |
15 |
mail-mta/exim/exim-4.92.ebuild | 2 + |
16 |
.../exim/files/exim-4.92-localscan_dlopen.patch | 2 +- |
17 |
3 files changed, 40 insertions(+), 23 deletions(-) |
18 |
|
19 |
diff --git a/mail-mta/exim/exim-4.92-r1.ebuild b/mail-mta/exim/exim-4.92-r2.ebuild |
20 |
similarity index 90% |
21 |
rename from mail-mta/exim/exim-4.92-r1.ebuild |
22 |
rename to mail-mta/exim/exim-4.92-r2.ebuild |
23 |
index a0346ffb579..3a5c9bf51b0 100644 |
24 |
--- a/mail-mta/exim/exim-4.92-r1.ebuild |
25 |
+++ b/mail-mta/exim/exim-4.92-r2.ebuild |
26 |
@@ -131,25 +131,27 @@ src_prepare() { |
27 |
src_configure() { |
28 |
# general config and paths |
29 |
|
30 |
- sed -i.orig \ |
31 |
- -e "/SYSTEM_ALIASES_FILE/s'SYSTEM_ALIASES_FILE'${EPREFIX}/etc/mail/aliases'" \ |
32 |
- "${S}"/src/configure.default || die |
33 |
+ local aliases="${EPREFIX}/etc/mail/aliases" |
34 |
+ sed -i \ |
35 |
+ -e "/SYSTEM_ALIASES_FILE/s'SYSTEM_ALIASES_FILE'${aliases}'" \ |
36 |
+ src/configure.default || die |
37 |
|
38 |
- sed -i -e 's/^buildname=.*/buildname=exim-gentoo/g' Makefile || die |
39 |
+ sed -i -e 's/^buildname=.*/buildname=exim-gentoo/' Makefile || die |
40 |
|
41 |
+ if use elibc_musl; then |
42 |
+ sed -i -e 's/^LIBS = -lnsl/LIBS =/g' OS/Makefile-Linux || die |
43 |
+ fi |
44 |
+ |
45 |
+ local conffile="${EPREFIX}/etc/exim/exim.conf" |
46 |
sed -e "48i\CFLAGS=${CFLAGS}" \ |
47 |
-e "s:BIN_DIRECTORY=/usr/exim/bin:BIN_DIRECTORY=${EPREFIX}/usr/sbin:" \ |
48 |
-e "s:EXIM_USER=:EXIM_USER=${MAILUSER}:" \ |
49 |
- -e "s:CONFIGURE_FILE=/usr/exim/configure:CONFIGURE_FILE=${EPREFIX}/etc/exim/exim.conf:" \ |
50 |
+ -e "s:CONFIGURE_FILE=.*$:CONFIGURE_FILE=${conffile}:" \ |
51 |
-e "s:ZCAT_COMMAND=.*$:ZCAT_COMMAND=${EPREFIX}/bin/zcat:" \ |
52 |
-e "s:COMPRESS_COMMAND=.*$:COMPRESS_COMMAND=${EPREFIX}/bin/gzip:" \ |
53 |
- src/EDITME > Local/Makefile |
54 |
- |
55 |
- if use elibc_musl; then |
56 |
- sed -e 's/^LIBS = -lnsl/LIBS =/g' \ |
57 |
- -i OS/Makefile-Linux |
58 |
- fi |
59 |
+ src/EDITME > Local/Makefile || die |
60 |
|
61 |
+ # work on Local/Makefile from now on |
62 |
cd Local |
63 |
|
64 |
cat >> Makefile <<- EOC |
65 |
@@ -181,6 +183,7 @@ src_configure() { |
66 |
|
67 |
# |
68 |
# mail storage formats |
69 |
+ # |
70 |
|
71 |
# mailstore is Exim's traditional storage format |
72 |
cat >> Makefile <<- EOC |
73 |
@@ -218,14 +221,14 @@ src_configure() { |
74 |
|
75 |
if ! use dnsdb; then |
76 |
# DNSDB lookup is enabled by default |
77 |
- sed -i "s:^LOOKUP_DNSDB=yes:# LOOKUP_DNSDB=yes:" Makefile |
78 |
+ sed -i -e 's:^LOOKUP_DNSDB=yes:# LOOKUP_DNSDB=yes:' Makefile || die |
79 |
fi |
80 |
|
81 |
if use ldap; then |
82 |
cat >> Makefile <<- EOC |
83 |
LOOKUP_LDAP=yes |
84 |
LDAP_LIB_TYPE=OPENLDAP2 |
85 |
- LOOKUP_INCLUDE += -I"${EROOT}"usr/include/ldap |
86 |
+ LOOKUP_INCLUDE += -I"${EPREFIX}"/usr/include/ldap |
87 |
LOOKUP_LIBS += -lldap -llber |
88 |
EOC |
89 |
fi |
90 |
@@ -245,7 +248,7 @@ src_configure() { |
91 |
EOC |
92 |
if use elibc_glibc ; then |
93 |
cat >> Makefile <<- EOC |
94 |
- CFLAGS += -I/usr/include/tirpc |
95 |
+ CFLAGS += -I"${EPREFIX}"/usr/include/tirpc |
96 |
EOC |
97 |
fi |
98 |
fi |
99 |
@@ -272,17 +275,17 @@ src_configure() { |
100 |
EOC |
101 |
fi |
102 |
|
103 |
- # |
104 |
# Exim monitor, enabled by default, controlled via X USE-flag, |
105 |
# disable if not requested, bug #46778 |
106 |
if use X; then |
107 |
cp ../exim_monitor/EDITME eximon.conf || die |
108 |
else |
109 |
- sed -i -e '/^EXIM_MONITOR=/s/^/# /' Makefile |
110 |
+ sed -i -e '/^EXIM_MONITOR=/s/^/# /' Makefile || die |
111 |
fi |
112 |
|
113 |
# |
114 |
# features |
115 |
+ # |
116 |
|
117 |
# content scanning support |
118 |
if use exiscan-acl; then |
119 |
@@ -317,7 +320,10 @@ src_configure() { |
120 |
|
121 |
# log to syslog |
122 |
if use syslog; then |
123 |
- sed -i "s:LOG_FILE_PATH=/var/log/exim/exim_%s.log:LOG_FILE_PATH=syslog:" Makefile |
124 |
+ local eximlog="${EPREFIX}/var/log/exim/exim_%s.log" |
125 |
+ sed -i \ |
126 |
+ -e "s:LOG_FILE_PATH=${eximlog}:LOG_FILE_PATH=syslog:" \ |
127 |
+ Makefile || die |
128 |
cat >> Makefile <<- EOC |
129 |
LOG_FILE_PATH=syslog |
130 |
EOC |
131 |
@@ -365,6 +371,8 @@ src_configure() { |
132 |
if use dlfunc; then |
133 |
cat >> Makefile <<- EOC |
134 |
EXPAND_DLFUNC=yes |
135 |
+ HAVE_LOCAL_SCAN=yes |
136 |
+ DLOPEN_LOCAL_SCAN=yes |
137 |
EOC |
138 |
fi |
139 |
|
140 |
@@ -392,6 +400,7 @@ src_configure() { |
141 |
|
142 |
# |
143 |
# experimental features |
144 |
+ # |
145 |
|
146 |
# Authenticated Receive Chain |
147 |
if use arc; then |
148 |
@@ -428,6 +437,7 @@ src_configure() { |
149 |
|
150 |
# |
151 |
# authentication (SMTP AUTH) |
152 |
+ # |
153 |
|
154 |
# standard bits |
155 |
cat >> Makefile <<- EOC |
156 |
@@ -531,9 +541,12 @@ src_install () { |
157 |
newinitd "${FILESDIR}"/exim.rc10 exim |
158 |
newconfd "${FILESDIR}"/exim.confd exim |
159 |
|
160 |
- systemd_dounit "${FILESDIR}"/{exim.service,exim.socket,exim-submission.socket} |
161 |
- systemd_newunit "${FILESDIR}"/exim_at.service 'exim@.service' |
162 |
- systemd_newunit "${FILESDIR}"/exim-submission_at.service 'exim-submission@.service' |
163 |
+ systemd_dounit \ |
164 |
+ "${FILESDIR}"/{exim.service,exim.socket,exim-submission.socket} |
165 |
+ systemd_newunit \ |
166 |
+ "${FILESDIR}"/exim_at.service 'exim@.service' |
167 |
+ systemd_newunit \ |
168 |
+ "${FILESDIR}"/exim-submission_at.service 'exim-submission@.service' |
169 |
|
170 |
diropts -m 0750 -o ${MAILUSER} -g ${MAILGROUP} |
171 |
keepdir /var/log/${PN} |
172 |
@@ -542,8 +555,10 @@ src_install () { |
173 |
pkg_postinst() { |
174 |
if [[ ! -f ${EROOT}etc/exim/exim.conf ]] ; then |
175 |
einfo "${EROOT}etc/exim/system_filter.exim is a sample system_filter." |
176 |
- einfo "${EROOT}etc/exim/auth_conf.sub contains the configuration sub for using smtp auth." |
177 |
- einfo "Please create ${EROOT}etc/exim/exim.conf from ${EROOT}etc/exim/exim.conf.dist." |
178 |
+ einfo "${EROOT}etc/exim/auth_conf.sub contains the configuration sub" |
179 |
+ einfo "for using smtp auth." |
180 |
+ einfo "Please create ${EROOT}etc/exim/exim.conf from" |
181 |
+ einfo " ${EROOT}etc/exim/exim.conf.dist." |
182 |
fi |
183 |
if use dcc ; then |
184 |
einfo "DCC support is experimental, you can find some limited" |
185 |
|
186 |
diff --git a/mail-mta/exim/exim-4.92.ebuild b/mail-mta/exim/exim-4.92.ebuild |
187 |
index a68f1b94203..fe6cf5e40f1 100644 |
188 |
--- a/mail-mta/exim/exim-4.92.ebuild |
189 |
+++ b/mail-mta/exim/exim-4.92.ebuild |
190 |
@@ -364,6 +364,8 @@ src_configure() { |
191 |
if use dlfunc; then |
192 |
cat >> Makefile <<- EOC |
193 |
EXPAND_DLFUNC=yes |
194 |
+ HAVE_LOCAL_SCAN=yes |
195 |
+ DLOPEN_LOCAL_SCAN=yes |
196 |
EOC |
197 |
fi |
198 |
|
199 |
|
200 |
diff --git a/mail-mta/exim/files/exim-4.92-localscan_dlopen.patch b/mail-mta/exim/files/exim-4.92-localscan_dlopen.patch |
201 |
index b52d2ad7b9c..57363e56d50 100644 |
202 |
--- a/mail-mta/exim/files/exim-4.92-localscan_dlopen.patch |
203 |
+++ b/mail-mta/exim/files/exim-4.92-localscan_dlopen.patch |
204 |
@@ -23,7 +23,7 @@ diff -ur exim-4.92.orig/src/EDITME exim-4.92/src/EDITME |
205 |
+# to be recompiled with the desired local_scan function. For a full |
206 |
+# description of the API to this function, see the Exim specification. |
207 |
+ |
208 |
-+DLOPEN_LOCAL_SCAN=yes |
209 |
++#DLOPEN_LOCAL_SCAN=yes |
210 |
+ |
211 |
+# If you set DLOPEN_LOCAL_SCAN, then you need to include -rdynamic in the |
212 |
+# linker flags. Without it, the loaded .so won't be able to access any |