1 |
tupone 08/01/04 22:45:16 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: qmail-scanner-2.01-r1.ebuild |
5 |
Log: |
6 |
Home directory fix, clamav integration, various upstream changes, and updating of st patches: Bug #178680 #151801 #135636 #73001 |
7 |
(Portage version: 2.1.3.19) |
8 |
|
9 |
Revision Changes Path |
10 |
1.38 mail-filter/qmail-scanner/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/qmail-scanner/ChangeLog?rev=1.38&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/qmail-scanner/ChangeLog?rev=1.38&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/qmail-scanner/ChangeLog?r1=1.37&r2=1.38 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/ChangeLog,v |
19 |
retrieving revision 1.37 |
20 |
retrieving revision 1.38 |
21 |
diff -u -r1.37 -r1.38 |
22 |
--- ChangeLog 2 Jul 2007 15:01:42 -0000 1.37 |
23 |
+++ ChangeLog 4 Jan 2008 22:45:16 -0000 1.38 |
24 |
@@ -1,6 +1,18 @@ |
25 |
# ChangeLog for mail-filter/qmail-scanner |
26 |
-# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/ChangeLog,v 1.37 2007/07/02 15:01:42 peper Exp $ |
28 |
+# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
29 |
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/ChangeLog,v 1.38 2008/01/04 22:45:16 tupone Exp $ |
30 |
+ |
31 |
+*qmail-scanner-2.01-r1 (03 Jan 2008) |
32 |
+ |
33 |
+ 03 Jan 2008; Tupone Alfredo <tupone@g.o> |
34 |
+ +files/qmail-scanner-2.01.logrotate, +qmail-scanner-2.01-r1.ebuild: |
35 |
+ Directory misconfiguration fix, various upstream changes, and updating of st |
36 |
+ patches: |
37 |
+ bug #178680 by Stanislav Kogan |
38 |
+ bug #151801 by Michail Baikov |
39 |
+ bug #135636 by Peter Gantner (a.k.a. nephros) |
40 |
+ Adding instruction to make clamav working with qmail-scanner: |
41 |
+ bug #73001 by David Röhr <david@××××.se> |
42 |
|
43 |
02 Jul 2007; Piotr Jaroszyński <peper@g.o> |
44 |
qmail-scanner-1.25-r1.ebuild, qmail-scanner-2.01.ebuild: |
45 |
|
46 |
|
47 |
|
48 |
1.1 mail-filter/qmail-scanner/qmail-scanner-2.01-r1.ebuild |
49 |
|
50 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/qmail-scanner/qmail-scanner-2.01-r1.ebuild?rev=1.1&view=markup |
51 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/qmail-scanner/qmail-scanner-2.01-r1.ebuild?rev=1.1&content-type=text/plain |
52 |
|
53 |
Index: qmail-scanner-2.01-r1.ebuild |
54 |
=================================================================== |
55 |
# Copyright 1999-2008 Gentoo Foundation |
56 |
# Distributed under the terms of the GNU General Public License v2 |
57 |
# $Header: /var/cvsroot/gentoo-x86/mail-filter/qmail-scanner/qmail-scanner-2.01-r1.ebuild,v 1.1 2008/01/04 22:45:16 tupone Exp $ |
58 |
|
59 |
inherit fixheadtails toolchain-funcs eutils |
60 |
|
61 |
Q_S_DATE=20070204 |
62 |
DESCRIPTION="E-Mail virus scanner for qmail." |
63 |
HOMEPAGE="http://qmail-scanner.sourceforge.net/" |
64 |
SRC_URI="mirror://sourceforge/qmail-scanner/${P}.tgz |
65 |
http://toribio.apollinare.org/qmail-scanner/download/q-s-${PV}st-${Q_S_DATE}.patch.gz" |
66 |
|
67 |
IUSE="spamassassin" |
68 |
|
69 |
LICENSE="GPL-2" |
70 |
SLOT="0" |
71 |
KEYWORDS="~amd64 ~x86" |
72 |
RESTRICT="userpriv" |
73 |
|
74 |
DEPEND=">=dev-lang/perl-5.6.1-r1 |
75 |
>=virtual/perl-Time-HiRes-01.20-r2 |
76 |
>=net-mail/tnef-1.1.1 |
77 |
>=virtual/perl-DB_File-1.803-r2 |
78 |
net-mail/ripmime |
79 |
virtual/qmail |
80 |
>=app-arch/unzip-5.42-r1 |
81 |
virtual/antivirus |
82 |
spamassassin? ( >=mail-filter/spamassassin-2.64 )" |
83 |
|
84 |
pkg_setup() { |
85 |
enewgroup qscand 210 |
86 |
enewuser qscand 210 -1 /var/spool/qscan qscand |
87 |
} |
88 |
|
89 |
pkg_preinst() { |
90 |
local oldname="/var/qmail/bin/qmail-scanner-queue.pl" |
91 |
if [ -f ${oldname} ]; then |
92 |
newname=${oldname}.`date +%Y%m%d%H%M%S` |
93 |
elog "Backing up old qmail-scanner as $newname in case of modifications." |
94 |
cp ${oldname} ${newname} |
95 |
chmod 600 ${newname} |
96 |
fi |
97 |
} |
98 |
|
99 |
src_unpack() { |
100 |
unpack ${A} |
101 |
cd "${S}" |
102 |
rm index.php && cp README.html index.php |
103 |
epatch ${DISTDIR}/q-s-${PV}st-${Q_S_DATE}.patch.gz |
104 |
ht_fix_file autoupdaters/* configure |
105 |
sed -i \ |
106 |
-e "s:/var/spool/qscand:/var/spool/qscan:g" \ |
107 |
README-st-patch.html \ |
108 |
README-st-patch.txt || die "Fixing doc with sed failed" |
109 |
|
110 |
EXTRA_VIRII="bagle,beagle,mydoom,sco,maldal,mimail,novarg,shimg,bugler,cissi,cissy,dloade,netsky,qizy" |
111 |
elog "Adding items to the SILENT_VIRUSES list (${EXTRA_VIRII})" |
112 |
sed -e "/^SILENT_VIRUSES/s/\"$/,${EXTRA_VIRII}\"/g" -i configure |
113 |
} |
114 |
|
115 |
src_compile () { |
116 |
local myconf |
117 |
|
118 |
addpredict /var/log/kav/kavscan.log |
119 |
addpredict /opt/bdc/plugins.htm |
120 |
|
121 |
use spamassassin && myconf="--virus-to-delete yes --sa-quarantine 2.1 --sa-delete 4.2 --sa-reject no --sa-subject SPAM: --sa-delta 0.5 --sa-alt yes" |
122 |
|
123 |
PATH=${PATH}:/opt/f-prot:/opt/vlnx ./configure \ |
124 |
--domain localhost \ |
125 |
--batch \ |
126 |
--log-details yes \ |
127 |
--mime-unpacker "ripmime" \ |
128 |
--skip-setuid-test \ |
129 |
${myconf} \ |
130 |
|| die "./configure failed!" |
131 |
|
132 |
# build for qmail-scanner-queue wrapper, so we don't need suidperl |
133 |
cd contrib |
134 |
$(tc-getCC) ${CFLAGS} -o qmail-scanner-queue qmail-scanner-queue.c || die |
135 |
} |
136 |
|
137 |
src_install () { |
138 |
# Create Directory Structure |
139 |
diropts -m 755 -o qscand -g qscand |
140 |
dodir /var/spool/qscan |
141 |
keepdir /var/spool/qscan |
142 |
diropts -m 750 -o qscand -g qscand |
143 |
dodir /var/spool/qscan/quarantine |
144 |
for i in quarantine/{viruses,policy,spam} working archives; do |
145 |
for j in tmp new cur; do |
146 |
dodir /var/spool/qscan/${i}/${j} |
147 |
keepdir /var/spool/qscan/${i}/${j} |
148 |
done |
149 |
done |
150 |
dodir /var/spool/qscan/tmp |
151 |
keepdir /var/spool/qscan/tmp |
152 |
|
153 |
# Install standard quarantine events file |
154 |
insinto /var/spool/qscan |
155 |
insopts -m 644 -o qscand -g qscand |
156 |
doins quarantine-events.txt |
157 |
|
158 |
# create quarantine.log and viruses.log |
159 |
touch quarantine.log |
160 |
insinto /var/spool/qscan |
161 |
insopts -m 644 -o qscand -g qscand |
162 |
doins quarantine.log |
163 |
dosym quarantine.log ${DESTDIR}/var/spool/qscan/viruses.log |
164 |
|
165 |
# Install qmail-scanner wrapper |
166 |
insinto /var/qmail/bin |
167 |
insopts -m 4755 -o qscand -g qscand |
168 |
doins contrib/qmail-scanner-queue |
169 |
|
170 |
# Install qmail-scanner script |
171 |
insinto /var/qmail/bin |
172 |
insopts -m 0755 -o qscand -g qscand |
173 |
doins qmail-scanner-queue.pl |
174 |
|
175 |
insinto /etc/logrotate.d/ |
176 |
insopts -m 644 -o root -g root |
177 |
newins "${FILESDIR}"/${P}.logrotate qmail-scanner |
178 |
|
179 |
exeinto /etc/cron.daily/ |
180 |
newexe "${FILESDIR}"/qmailscanner.cronjob qmail-scanner |
181 |
|
182 |
# Install documentation |
183 |
dodoc README CHANGES |
184 |
dohtml README.html FAQ.php TODO.php configure-options.php manual-install.php perlscanner.php |
185 |
|
186 |
docinto contrib |
187 |
cd "${S}"/contrib |
188 |
dodoc spamc-nice.eml |
189 |
dodoc test-trophie.pl |
190 |
dodoc logrotate.qmailscanner |
191 |
dodoc sub-avpdaemon.pl |
192 |
dodoc logging_first_80_chars.eml |
193 |
dodoc spamc-nasty.eml |
194 |
dodoc avpdeamon.init |
195 |
dodoc test_installation.sh |
196 |
dodoc test-sophie.pl |
197 |
dodoc reformime-test.eml |
198 |
dodoc sub-sender-cache.pl |
199 |
dodoc rbl_scanner.txt |
200 |
dodoc test-clamd.pl |
201 |
dodoc qs2mrtg.pl |
202 |
dodoc mrtg-qmail-scanner.cfg |
203 |
} |
204 |
|
205 |
pkg_postinst () { |
206 |
einfo "Fixing ownerships" |
207 |
chown -R qscand:qscand /var/spool/qscan |
208 |
touch /var/qmail/bin/qmail-scanner-queue.pl |
209 |
|
210 |
# Setup perlscanner + Version Info |
211 |
chmod -s "${ROOT}"/var/qmail/bin/qmail-scanner-queue.pl |
212 |
"${ROOT}"/var/qmail/bin/qmail-scanner-queue -z |
213 |
"${ROOT}"/var/qmail/bin/qmail-scanner-queue -g |
214 |
|
215 |
elog "To activate qmail-scanner, please edit your" |
216 |
elog "/var/qmail/control/conf-common file and set:" |
217 |
elog "export QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue" |
218 |
elog "Or place it in your tcprules file." |
219 |
ewarn "Please note that it was a call to qmail-scanner-queue.pl before," |
220 |
ewarn "but this is now changed to use a wrapper to improve security!" |
221 |
ewarn "Once you have changed to the wrapper, you can remove the setuid " |
222 |
ewarn "bit on qmail-scanner-queue.pl" |
223 |
|
224 |
ewarn "If this is an upgrade from <=2.0.1 the home directory of the qscand" |
225 |
ewarn "user is changed. Please update it manually to /var/spool/qscan" |
226 |
ewarn "or remove the user and emerge again this package" |
227 |
|
228 |
ewarn "For an integration with clamav, clamav user should have access" |
229 |
ewarn "to files in the qscand group." |
230 |
ewarn "To allow that, add clamav user to the qscand group and" |
231 |
ewarn "comment-out in /etc/clamd.conf AllowSupplementaryGroups putting yes." |
232 |
ewarn "After that, restart clamd with" |
233 |
ewarn "/etc/init.d/clamd restart" |
234 |
} |
235 |
|
236 |
|
237 |
|
238 |
-- |
239 |
gentoo-commits@g.o mailing list |