1 |
commit: fd4e88c55e349b6c18cae294aeb01e0709bc9bdb |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 17 22:04:24 2023 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 17 22:04:24 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd4e88c5 |
7 |
|
8 |
qmail.eclass: remove EAPI 6 |
9 |
|
10 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
11 |
|
12 |
eclass/qmail.eclass | 59 ++++++++++++++++++++++++++++------------------------- |
13 |
1 file changed, 31 insertions(+), 28 deletions(-) |
14 |
|
15 |
diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass |
16 |
index b647ac5d8e3a..149bfa0c25f3 100644 |
17 |
--- a/eclass/qmail.eclass |
18 |
+++ b/eclass/qmail.eclass |
19 |
@@ -1,18 +1,18 @@ |
20 |
-# Copyright 1999-2022 Gentoo Authors |
21 |
+# Copyright 1999-2023 Gentoo Authors |
22 |
# Distributed under the terms of the GNU General Public License v2 |
23 |
|
24 |
# @ECLASS: qmail.eclass |
25 |
# @MAINTAINER: |
26 |
# Rolf Eike Beer <eike@×××××××.de> |
27 |
-# @SUPPORTED_EAPIS: 6 7 8 |
28 |
+# @SUPPORTED_EAPIS: 7 8 |
29 |
# @BLURB: common qmail functions |
30 |
|
31 |
-case ${EAPI:-0} in |
32 |
- [678]) ;; |
33 |
+case ${EAPI} in |
34 |
+ 7|8) ;; |
35 |
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
36 |
esac |
37 |
|
38 |
-if [[ -z ${_QMAIL_ECLASS} ]] ; then |
39 |
+if [[ -z ${_QMAIL_ECLASS} ]]; then |
40 |
_QMAIL_ECLASS=1 |
41 |
|
42 |
inherit flag-o-matic toolchain-funcs fixheadtails |
43 |
@@ -58,7 +58,7 @@ is_prime() { |
44 |
|
45 |
dospp() { |
46 |
exeinto "${QMAIL_HOME}"/plugins/ |
47 |
- newexe ${1} ${2:-$(basename ${1})} |
48 |
+ newexe ${1} ${2:-${1##*/}} |
49 |
} |
50 |
|
51 |
# @FUNCTION: dosupervise |
52 |
@@ -68,7 +68,7 @@ dospp() { |
53 |
dosupervise() { |
54 |
local service=$1 |
55 |
local runfile=${2:-${service}} logfile=${3:-${service}-log} |
56 |
- [[ -z "${service}" ]] && die "no service given" |
57 |
+ [[ -z ${service} ]] && die "no service given" |
58 |
|
59 |
dodir ${SUPERVISE_DIR}/${service}{,/log} |
60 |
fperms +t ${SUPERVISE_DIR}/${service}{,/log} |
61 |
@@ -92,16 +92,16 @@ qmail_set_cc() { |
62 |
|
63 |
echo "${cc} ${CFLAGS} ${CPPFLAGS}" > ./conf-cc || die 'Patching conf-cc failed.' |
64 |
echo "${ld} ${LDFLAGS}" > ./conf-ld || die 'Patching conf-ld failed.' |
65 |
- sed -e "s#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i make-makelib.sh |
66 |
+ sed -e "s#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i make-makelib.sh || die |
67 |
} |
68 |
|
69 |
genqmail_src_unpack() { |
70 |
- cd "${WORKDIR}" |
71 |
+ cd "${WORKDIR}" || die |
72 |
[[ -n ${GENQMAIL_PV} ]] && unpack "${GENQMAIL_F}" |
73 |
} |
74 |
|
75 |
qmail_spp_src_unpack() { |
76 |
- cd "${WORKDIR}" |
77 |
+ cd "${WORKDIR}" || die |
78 |
[[ -n ${QMAIL_SPP_PV} ]] && unpack "${QMAIL_SPP_F}" |
79 |
} |
80 |
|
81 |
@@ -109,23 +109,23 @@ qmail_spp_src_unpack() { |
82 |
# @DESCRIPTION: |
83 |
# Unpack common config files, and set built configuration (CFLAGS, LDFLAGS, etc) |
84 |
qmail_src_postunpack() { |
85 |
- cd "${S}" |
86 |
+ cd "${S}" || die |
87 |
|
88 |
qmail_set_cc |
89 |
|
90 |
mysplit=${QMAIL_CONF_SPLIT:-23} |
91 |
is_prime ${mysplit} || die "QMAIL_CONF_SPLIT is not a prime number." |
92 |
einfo "Using conf-split value of ${mysplit}." |
93 |
- echo -n ${mysplit} > "${S}"/conf-split |
94 |
+ echo -n ${mysplit} > "${S}"/conf-split || die |
95 |
} |
96 |
|
97 |
qmail_src_compile() { |
98 |
- cd "${S}" |
99 |
+ cd "${S}" || die |
100 |
emake it man "$@" |
101 |
} |
102 |
|
103 |
qmail_spp_src_compile() { |
104 |
- cd "${GENQMAIL_S}"/spp/ |
105 |
+ cd "${GENQMAIL_S}"/spp/ || die |
106 |
emake |
107 |
} |
108 |
|
109 |
@@ -152,6 +152,7 @@ qmail_base_install() { |
110 |
qreceipt sendmail tcp-env |
111 |
|
112 |
# obsolete tools, install if they are still present |
113 |
+ local i |
114 |
for i in elq maildirwatch pinq qail qsmhook; do |
115 |
[[ -x ${i} ]] && doexe ${i} |
116 |
done |
117 |
@@ -167,7 +168,6 @@ qmail_base_install() { |
118 |
|
119 |
exeopts -o qmailq -g qmail -m 4711 |
120 |
doexe qmail-queue |
121 |
- |
122 |
) |
123 |
} |
124 |
|
125 |
@@ -189,7 +189,7 @@ qmail_man_install() { |
126 |
dodoc BLURB* INSTALL* PIC* README* REMOVE* \ |
127 |
SENDMAIL* TEST* THANKS* VERSION* |
128 |
# notqmail converted the files to markdown |
129 |
- if [ -f CHANGES ]; then |
130 |
+ if [[ -f CHANGES ]]; then |
131 |
dodoc CHANGES FAQ SECURITY THOUGHTS UPGRADE |
132 |
else |
133 |
dodoc CHANGES.md FAQ.md SECURITY.md THOUGHTS.md UPGRADE.md |
134 |
@@ -225,13 +225,13 @@ qmail_maildir_install() { |
135 |
"${MAILDIRMAKE}" "${D}${QMAIL_HOME}"/alias/.maildir |
136 |
keepdir "${QMAIL_HOME}"/alias/.maildir/{cur,new,tmp} |
137 |
|
138 |
+ local i |
139 |
for i in "${QMAIL_HOME}"/alias/.qmail-{mailer-daemon,postmaster,root}; do |
140 |
- if [[ ! -f "${ROOT}${i}" ]]; then |
141 |
+ if [[ ! -f ${ROOT}${i} ]]; then |
142 |
touch "${D}${i}" |
143 |
fowners alias:qmail "${i}" |
144 |
fi |
145 |
done |
146 |
- |
147 |
) |
148 |
} |
149 |
|
150 |
@@ -240,7 +240,7 @@ qmail_tcprules_install() { |
151 |
insinto "${TCPRULES_DIR}" |
152 |
doins "${GENQMAIL_S}"/tcprules/Makefile.qmail |
153 |
doins "${GENQMAIL_S}"/tcprules/tcp.qmail-* |
154 |
- rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd |
155 |
+ rm -f "${D}${TCPRULES_DIR}"/tcp.qmail-pop3sd || die |
156 |
} |
157 |
|
158 |
qmail_supervise_install_one() { |
159 |
@@ -255,8 +255,9 @@ qmail_supervise_install_one() { |
160 |
qmail_supervise_install() { |
161 |
einfo "Installing supervise scripts" |
162 |
|
163 |
- cd "${GENQMAIL_S}"/supervise |
164 |
+ cd "${GENQMAIL_S}"/supervise || die |
165 |
|
166 |
+ local i |
167 |
for i in qmail-{send,smtpd,qmtpd,qmqpd}; do |
168 |
qmail_supervise_install_one ${i} |
169 |
done |
170 |
@@ -273,6 +274,7 @@ qmail_spp_install() { |
171 |
|
172 |
einfo "Installing qmail-spp plugins" |
173 |
keepdir "${QMAIL_HOME}"/plugins/ |
174 |
+ local i |
175 |
for i in authlog mfdnscheck ifauthnext tarpit; do |
176 |
dospp "${GENQMAIL_S}"/spp/${i} |
177 |
done |
178 |
@@ -330,7 +332,7 @@ qmail_queue_setup() { |
179 |
qmail_rootmail_fixup() { |
180 |
local TMPCMD="ln -sf ${QMAIL_HOME}/alias/.maildir/ ${ROOT}/root/.maildir" |
181 |
|
182 |
- if [[ -d "${ROOT}"/root/.maildir && ! -L "${ROOT}"/root/.maildir ]] ; then |
183 |
+ if [[ -d ${ROOT}/root/.maildir && ! -L ${ROOT}/root/.maildir ]] ; then |
184 |
elog "Previously the qmail ebuilds created /root/.maildir/ but not" |
185 |
elog "every mail was delivered there. If the directory does not" |
186 |
elog "contain any mail, please delete it and run:" |
187 |
@@ -343,13 +345,14 @@ qmail_rootmail_fixup() { |
188 |
} |
189 |
|
190 |
qmail_tcprules_build() { |
191 |
+ local f |
192 |
for f in tcp.qmail-{smtp,qmtp,qmqp,pop3}; do |
193 |
# please note that we don't check if it exists |
194 |
# as we want it to make the cdb files anyway! |
195 |
- src="${ROOT}${TCPRULES_DIR}/${f}" |
196 |
- cdb="${ROOT}${TCPRULES_DIR}/${f}.cdb" |
197 |
- tmp="${ROOT}${TCPRULES_DIR}/.${f}.tmp" |
198 |
- [[ -e "${src}" ]] && tcprules "${cdb}" "${tmp}" < "${src}" |
199 |
+ local src="${ROOT}${TCPRULES_DIR}/${f}" |
200 |
+ local cdb="${ROOT}${TCPRULES_DIR}/${f}.cdb" |
201 |
+ local tmp="${ROOT}${TCPRULES_DIR}/.${f}.tmp" |
202 |
+ [[ -e ${src} ]] && tcprules "${cdb}" "${tmp}" < "${src}" |
203 |
done |
204 |
} |
205 |
|
206 |
@@ -382,10 +385,10 @@ qmail_supervise_config_notice() { |
207 |
} |
208 |
|
209 |
qmail_config_fast() { |
210 |
- if [[ ${ROOT} = / ]]; then |
211 |
+ if [[ -z ${ROOT} ]]; then |
212 |
local host=$(hostname --fqdn) |
213 |
|
214 |
- if [[ -z "${host}" ]]; then |
215 |
+ if [[ -z ${host} ]]; then |
216 |
eerror |
217 |
eerror "Cannot determine your fully-qualified hostname" |
218 |
eerror "Please setup your /etc/hosts as described in" |
219 |
@@ -394,7 +397,7 @@ qmail_config_fast() { |
220 |
die "cannot determine FQDN" |
221 |
fi |
222 |
|
223 |
- if [[ ! -f "${ROOT}${QMAIL_HOME}"/control/me ]]; then |
224 |
+ if [[ ! -f ${ROOT}${QMAIL_HOME}/control/me ]]; then |
225 |
"${ROOT}${QMAIL_HOME}"/bin/config-fast ${host} |
226 |
fi |
227 |
else |