Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/vpopmail/
Date: Fri, 04 Oct 2019 04:38:33
Message-Id: 1570163874.9783b0fa207904be50354a7a2e3119f36ae5d83c.juippis@gentoo
1 commit: 9783b0fa207904be50354a7a2e3119f36ae5d83c
2 Author: Rolf Eike Beer <eike <AT> sf-mail <DOT> de>
3 AuthorDate: Tue Oct 1 17:24:04 2019 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 4 04:37:54 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9783b0fa
7
8 net-mail/vpopmail: remove old (5.4.33-r3)
9
10 Signed-off-by: Rolf Eike Beer <eike <AT> sf-mail.de>
11 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
12
13 net-mail/vpopmail/vpopmail-5.4.33-r3.ebuild | 304 ----------------------------
14 1 file changed, 304 deletions(-)
15
16 diff --git a/net-mail/vpopmail/vpopmail-5.4.33-r3.ebuild b/net-mail/vpopmail/vpopmail-5.4.33-r3.ebuild
17 deleted file mode 100644
18 index eca83681371..00000000000
19 --- a/net-mail/vpopmail/vpopmail-5.4.33-r3.ebuild
20 +++ /dev/null
21 @@ -1,304 +0,0 @@
22 -# Copyright 1999-2019 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=6
26 -
27 -inherit autotools eutils fixheadtails qmail user
28 -
29 -HOMEPAGE="http://www.inter7.com/index.php?page=vpopmail"
30 -DESCRIPTION="Collection of programs to manage virtual email on Qmail servers"
31 -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
32 -
33 -LICENSE="GPL-2"
34 -SLOT="0"
35 -KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
36 -IUSE="clearpasswd ipalias maildrop mysql postgres spamassassin"
37 -REQUIRED_USE="mysql? ( !postgres )"
38 -
39 -DEPEND="
40 - acct-group/vpopmail
41 - virtual/qmail
42 - maildrop? ( mail-filter/maildrop )
43 - mysql? ( dev-db/mysql-connector-c:0= )
44 - postgres? ( dev-db/postgresql:=[server] )
45 - spamassassin? ( mail-filter/spamassassin )"
46 -RDEPEND="${DEPEND}"
47 -
48 -PATCHES=(
49 - "${FILESDIR}"/${PN}-5.4.9-access.violation.patch
50 - "${FILESDIR}"/${PN}-lazy.patch
51 - "${FILESDIR}"/${PN}-vpgsql.patch
52 - "${FILESDIR}"/${PN}-double-free.patch
53 -)
54 -DOCS=(
55 - ChangeLog
56 - doc/AUTHORS
57 - doc/FAQ
58 - doc/INSTALL
59 - doc/README.activedirectory
60 - doc/README.authvchkpw
61 - doc/README.filelocking
62 - doc/README.ipaliasdomains
63 - doc/README.ldap
64 - doc/README.maildrop
65 - doc/README.mysql
66 - doc/README.onchange
67 - doc/README.oracle
68 - doc/README.pgsql
69 - doc/README.qmail-default
70 - doc/README.quotas
71 - doc/README.roamingusers
72 - doc/README.spamassassin
73 - doc/README.sybase
74 - doc/README.vdelivermail
75 - doc/README.vlimits
76 - doc/README.vpopmaild
77 - doc/README.vqmaillocal
78 -)
79 -HTML_DOCS=(
80 - doc/doc_html/vpopmail5.abw
81 - doc/doc_html/vpopmailapi.png
82 - doc/doc_html/vpopmail.html
83 - doc/man_html/clearopensmtp.html
84 - doc/man_html/index.html
85 - doc/man_html/vaddaliasdomain.html
86 - doc/man_html/vadddomain.html
87 - doc/man_html/vadduser.html
88 - doc/man_html/vchkpw.html
89 - doc/man_html/vconvert.html
90 - doc/man_html/vdeldomain.html
91 - doc/man_html/vdelivermail.html
92 - doc/man_html/vdeluser.html
93 - doc/man_html/vpasswd.html
94 - doc/man_html/vpopbull.html
95 - doc/man_html/vsetuserquota.html
96 -)
97 -
98 -# This makes sure the variable is set, and that it isn't null.
99 -VPOP_DEFAULT_HOME="/var/vpopmail"
100 -
101 -vpopmail_set_homedir() {
102 - VPOP_HOME=$(egethome vpopmail)
103 - if [[ -z "${VPOP_HOME}" ]]; then
104 - eerror "vpopmail's home directory is null in passwd data!"
105 - eerror "You probably want to check that out."
106 - eerror "Continuing with default."
107 - VPOP_HOME="${VPOP_DEFAULT_HOME}"
108 - else
109 - einfo "Setting VPOP_HOME to: $VPOP_HOME"
110 - fi
111 -}
112 -
113 -pkg_setup() {
114 - enewuser vpopmail 89 -1 ${VPOP_DEFAULT_HOME} vpopmail
115 - upgradewarning
116 -}
117 -
118 -src_prepare() {
119 - default
120 -
121 - echo 'install-recursive: install-exec-am' \
122 - >>"${S}"/Makefile.am
123 -
124 - # fix maildir paths
125 - sed -i -e 's|Maildir|.maildir|g' \
126 - vchkpw.c vconvert.c vdelivermail.c \
127 - vpopbull.c vpopmail.c vqmaillocal.c \
128 - vuserinfo.c maildirquota.c || die
129 -
130 - # remove vpopmail advertisement
131 - sed -i -e '/printf.*vpopmail/s:vpopmail (:(:' \
132 - vdelivermail.c vpopbull.c vqmaillocal.c || die
133 -
134 - # automake/autoconf
135 - mv -f "${S}"/configure.{in,ac} || die
136 - sed -i -e 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,g' \
137 - configure.ac || die
138 -
139 - # _FORTIFY_SOURCE
140 - sed -i \
141 - -e 's/\(snprintf(\s*\(LI->[a-zA-Z_]\+\),\s*\)[a-zA-Z_]\+,/\1 sizeof(\2),/' \
142 - vlistlib.c || die
143 -
144 - eautoreconf
145 - ht_fix_file cdb/Makefile
146 -}
147 -
148 -src_configure() {
149 - vpopmail_set_homedir
150 -
151 - local authopts
152 - if use mysql; then
153 - incdir=$(mysql_config --variable=pkgincludedir)
154 - libdir=$(mysql_config --variable=pkglibdir)
155 - authopts+=" --enable-auth-module=mysql"
156 - authopts+=" --enable-incdir=${incdir}"
157 - authopts+=" --enable-libdir=${libdir}"
158 - authopts+=" --enable-sql-logging"
159 - authopts+=" --enable-valias"
160 - authopts+=" --disable-mysql-replication"
161 - authopts+=" --enable-mysql-limits"
162 - elif use postgres; then
163 - libdir=$(pg_config --libdir)
164 - incdir=$(pg_config --pkgincludedir)
165 - authopts+=" --enable-auth-module=pgsql"
166 - authopts+=" --enable-incdir=${incdir}"
167 - authopts+=" --enable-libdir=${libdir}"
168 - authopts+=" --enable-sql-logging"
169 - authopts+=" --enable-valias"
170 - else
171 - authopts+=" --enable-auth-module=cdb"
172 - fi
173 -
174 - econf ${authopts} \
175 - --sysconfdir=${VPOP_HOME}/etc \
176 - --enable-non-root-build \
177 - --enable-qmaildir=${QMAIL_HOME} \
178 - --enable-qmail-newu=${QMAIL_HOME}/bin/qmail-newu \
179 - --enable-qmail-inject=${QMAIL_HOME}/bin/qmail-inject \
180 - --enable-qmail-newmrh=${QMAIL_HOME}/bin/qmail-newmrh \
181 - --enable-vpopuser=vpopmail \
182 - --enable-vpopgroup=vpopmail \
183 - --enable-many-domains \
184 - --enable-file-locking \
185 - --enable-file-sync \
186 - --enable-md5-passwords \
187 - --enable-logging \
188 - --enable-auth-logging \
189 - --enable-log-name=vpopmail \
190 - --enable-qmail-ext \
191 - --disable-tcpserver-file \
192 - --disable-roaming-users \
193 - $(use_enable ipalias ip-alias-domains) \
194 - $(use_enable clearpasswd clear-passwd) \
195 - $(use_enable maildrop) \
196 - $(use_enable maildrop maildrop-prog /usr/bin/maildrop) \
197 - $(use_enable spamassassin)
198 -}
199 -
200 -src_install() {
201 - vpopmail_set_homedir
202 -
203 - emake DESTDIR="${D}" install
204 - keepdir "${VPOP_HOME}"/domains
205 -
206 - # install helper script for maildir conversion
207 - into "${VPOP_HOME}"
208 - dobin "${FILESDIR}"/vpopmail-Maildir-dotmaildir-fix.sh
209 - into /usr
210 -
211 - einstalldocs
212 - rm -rf "${D}/${VPOP_HOME}"/doc
213 - dosym \
214 - $(realpath --relative-to "${D}/${VPOP_HOME}"/ "${D}"/usr/share/doc/${PF}/) \
215 - "${VPOP_HOME}"/doc
216 -
217 - # create /etc/vpopmail.conf
218 - if use mysql; then
219 - dodir /etc
220 - mv "${D}${VPOP_HOME}"/etc/vpopmail.mysql "${D}"/etc/vpopmail.conf
221 - dosym \
222 - $(realpath --relative-to "${D}/${VPOP_HOME}"/etc/ "${D}"/etc/vpopmail.conf) \
223 - "${VPOP_HOME}"/etc/vpopmail.mysql
224 -
225 - sed -e '12d' -i "${D}"/etc/vpopmail.conf
226 - echo '# Read-only DB' >> "${D}"/etc/vpopmail.conf
227 - echo 'localhost|0|vpopmail|secret|vpopmail' >> "${D}"/etc/vpopmail.conf
228 - echo '# Write DB' >> "${D}"/etc/vpopmail.conf
229 - echo 'localhost|0|vpopmail|secret|vpopmail' >> "${D}"/etc/vpopmail.conf
230 -
231 - # lock down perms
232 - fperms 640 /etc/vpopmail.conf
233 - fowners root:vpopmail /etc/vpopmail.conf
234 - fi
235 -
236 - insinto "${VPOP_HOME}"/etc
237 - doins vusagec.conf
238 - dosym "${VPOP_HOME}"/etc/vusagec.conf /etc/vusagec.conf
239 - sed -i 's/Disable = False;/Disable = True;/g' "${D}${VPOP_HOME}"/etc/vusagec.conf
240 -
241 - einfo "Installing env.d entry"
242 - dodir /etc/env.d
243 - doenvd "${FILESDIR}"/99vpopmail
244 -
245 - einfo "Locking down vpopmail permissions"
246 - fowners -R root:0 "${VPOP_HOME}"/{bin,etc,include}
247 - fowners root:vpopmail "${VPOP_HOME}"/bin/vchkpw
248 - fperms 4711 "${VPOP_HOME}"/bin/vchkpw
249 -}
250 -
251 -pkg_postinst() {
252 - if use mysql ; then
253 - elog
254 - elog "You have 'mysql' turned on in your USE"
255 - elog "Vpopmail needs a VALID MySQL USER. Let's call it 'vpopmail'"
256 - elog "You MUST add it and then specify its passwd in the /etc/vpopmail.conf file"
257 - elog
258 - elog "First log into mysql as your mysql root user and pass. Then:"
259 - elog "> create database vpopmail;"
260 - elog "> use mysql;"
261 - elog "> grant select, insert, update, delete, create, drop on vpopmail.* to"
262 - elog " vpopmail@localhost identified by 'your password';"
263 - elog "> flush privileges;"
264 - elog
265 - elog "If you have problems with vpopmail not accepting mail properly,"
266 - elog "please ensure that /etc/vpopmail.conf is chmod 640 and"
267 - elog "owned by root:vpopmail"
268 - elog
269 - fi
270 -
271 - # do this for good measure
272 - if [[ -e /etc/vpopmail.conf ]]; then
273 - chmod 640 /etc/vpopmail.conf
274 - chown root:vpopmail /etc/vpopmail.conf
275 - fi
276 -
277 - upgradewarning
278 -}
279 -
280 -pkg_postrm() {
281 - vpopmail_set_homedir
282 -
283 - elog "The vpopmail DATA will NOT be removed automatically."
284 - elog "You can delete them manually by removing the ${VPOP_HOME} directory."
285 -}
286 -
287 -upgradewarning() {
288 - ewarn
289 - ewarn "Massive important warning if you are upgrading to 5.2.1-r8 or older"
290 - ewarn "The internal structure of the mail storage has changed for"
291 - ewarn "consistancy with the rest of Gentoo! Please review and utilize the "
292 - ewarn "script at ${VPOP_HOME}/bin/vpopmail-Maildir-dotmaildir-fix.sh"
293 - ewarn "to upgrade your system! (It can do conversions both ways)."
294 - ewarn "You should be able to run it right away without any changes."
295 - ewarn
296 -
297 - elog
298 - elog "Use of vpopmail's tcp.smtp[.cdb] is also deprecated now, consider"
299 - elog "using net-mail/relay-ctrl instead."
300 - elog
301 -
302 - if use mysql; then
303 - elog
304 - elog "If you are upgrading from 5.4.17 or older, you have to fix your"
305 - elog "MySQL tables:"
306 - elog
307 - elog 'ALTER TABLE `dir_control` CHANGE `domain` `domain` CHAR(96) NOT NULL;'
308 - elog 'ALTER TABLE `ip_alias_map` CHANGE domain domain CHAR(96) NOT NULL;'
309 - elog 'ALTER TABLE `lastauth` CHANGE domain domain CHAR(96) NOT NULL;'
310 - elog 'ALTER TABLE `valias` CHANGE domain domain CHAR(96) NOT NULL;'
311 - elog 'ALTER TABLE `vlog` CHANGE domain domain CHAR(96) NOT NULL;'
312 - elog 'ALTER TABLE `vpopmail` CHANGE domain domain CHAR(96) NOT NULL;'
313 - elog 'ALTER TABLE `limits` CHANGE domain domain CHAR(96) NOT NULL,'
314 - elog ' ADD `disable_spamassassin` TINYINT(1) DEFAULT '0' NOT NULL AFTER `disable_smtp`,'
315 - elog ' ADD `delete_spam` TINYINT(1) DEFAULT '0' NOT NULL AFTER `disable_spamassassin`;'
316 - elog
317 - fi
318 -
319 - ewarn
320 - ewarn "Newer versions of vpopmail contain a quota daemon called vusaged."
321 - ewarn "This ebuild DOES NOT INSTALL vusaged and has therefore disabled"
322 - ewarn "its usage in ${VPOP_HOME}/etc/vusagec.conf. DO NOT ENABLE!"
323 - ewarn "Otherwise mail delivery WILL BREAK"
324 - ewarn
325 -}