Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 86099 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/mail-filter/dspam/dspam-3.4.0-r1.ebuild (-54 / +50 lines)
Lines 85-96 Link Here
85
	use large-domain && myconf="${myconf} --enable-large-scale" ||\
85
	use large-domain && myconf="${myconf} --enable-large-scale" ||\
86
	    myconf="${myconf} --enable-domain-scale"
86
	    myconf="${myconf} --enable-domain-scale"
87
87
88
	myconf="${myconf} --with-dspam-home=${HOMEDIR}"
88
	myconf="${myconf} --with-dspam-mode=4755"
89
	myconf="${myconf} --with-dspam-mode=4755"
89
	myconf="${myconf} --with-dspam-owner=dspam"
90
	myconf="${myconf} --with-dspam-owner=dspam"
90
	myconf="${myconf} --with-dspam-group=dspam"
91
	myconf="${myconf} --with-dspam-group=dspam"
91
	myconf="${myconf} --sysconfdir=${HOMEDIR}"
92
	myconf="${myconf} --sysconfdir=${HOMEDIR}"
92
	myconf="${myconf} --with-logdir=${LOGDIR}"
93
	myconf="${myconf} --with-logdir=${LOGDIR}"
93
	use virtual-users || myconf="${myconf} --with-dspam-home=${HOMEDIR}"
94
	use virtual-users || myconf="${myconf} --enable-homedir"
94
95
95
	# enables support for debugging (touch /etc/dspam/.debug to turn on)
96
	# enables support for debugging (touch /etc/dspam/.debug to turn on)
96
	# optional: even MORE debugging output, use with extreme caution!
97
	# optional: even MORE debugging output, use with extreme caution!
Lines 107-113 Link Here
107
			myconf="${myconf} --enable-daemon"
108
			myconf="${myconf} --enable-daemon"
108
		fi
109
		fi
109
110
110
		use virtual-users && myconf="${myconf} --enable-virtual-users-users"
111
		use virtual-users && myconf="${myconf} --enable-virtual-users"
111
		# an experimental feature available with MySQL and PgSQL backend
112
		# an experimental feature available with MySQL and PgSQL backend
112
		use neural && myconf="${myconf} --enable-neural-networking"
113
		use neural && myconf="${myconf} --enable-neural-networking"
113
	elif use postgres ; then
114
	elif use postgres ; then
Lines 120-132 Link Here
120
			myconf="${myconf} --enable-daemon"
121
			myconf="${myconf} --enable-daemon"
121
		fi
122
		fi
122
123
123
		use virtual-users && myconf="${myconf} --enable-virtual-users-users"
124
		use virtual-users && myconf="${myconf} --enable-virtual-users"
124
		# an experimental feature available with MySQL and PgSQL backend
125
		# an experimental feature available with MySQL and PgSQL backend
125
		use neural && myconf="${myconf} --enable-neural-networking"
126
		use neural && myconf="${myconf} --enable-neural-networking"
126
	elif use oci8 ; then
127
	elif use oci8 ; then
127
		myconf="${myconf} --with-storage-driver=ora_drv"
128
		myconf="${myconf} --with-storage-driver=ora_drv"
128
		myconf="${myconf} --with-oracle-home=${ORACLE_HOME}"
129
		myconf="${myconf} --with-oracle-home=${ORACLE_HOME}"
129
		myconf="${myconf} --enable-virtual-users-users"
130
		use virtual-users && myconf="${myconf} --enable-virtual-users"
130
131
131
		# I am in no way a Oracle specialist. If someone knows
132
		# I am in no way a Oracle specialist. If someone knows
132
		# how to query the version of Oracle, then let me know.
133
		# how to query the version of Oracle, then let me know.
Lines 135-144 Link Here
135
		fi
136
		fi
136
	elif use sqlite3 ; then
137
	elif use sqlite3 ; then
137
		myconf="${myconf} --with-storage-driver=sqlite3_drv"
138
		myconf="${myconf} --with-storage-driver=sqlite3_drv"
138
		myconf="${myconf} --enable-virtual-users-users"
139
		use virtual-users && myconf="${myconf} --enable-virtual-users"
139
	elif use sqlite ; then
140
	elif use sqlite ; then
140
		myconf="${myconf} --with-storage-driver=sqlite_drv"
141
		myconf="${myconf} --with-storage-driver=sqlite_drv"
141
		myconf="${myconf} --enable-virtual-users-users"
142
		use virtual-users && myconf="${myconf} --enable-virtual-users"
142
	else
143
	else
143
		myconf="${myconf} --with-storage-driver=libdb4_drv"
144
		myconf="${myconf} --with-storage-driver=libdb4_drv"
144
	fi
145
	fi
Lines 158-164 Link Here
158
	# open up perms on /etc/mail/dspam
159
	# open up perms on /etc/mail/dspam
159
	diropts -m0775 -o dspam -g dspam
160
	diropts -m0775 -o dspam -g dspam
160
	dodir ${HOMEDIR}
161
	dodir ${HOMEDIR}
161
	keepdir ${HOMEDIR}
162
162
163
	# keeps dspam data in /var
163
	# keeps dspam data in /var
164
	diropts -m0775 -o dspam -g dspam
164
	diropts -m0775 -o dspam -g dspam
Lines 168-174 Link Here
168
	# keeps dspam log in /var/log
168
	# keeps dspam log in /var/log
169
	diropts -m0775 -o dspam -g dspam
169
	diropts -m0775 -o dspam -g dspam
170
	dodir ${LOGDIR}
170
	dodir ${LOGDIR}
171
	keepdir ${LOGDIR}
171
	insinto ${LOGDIR}
172
	touch ${T}/empty.file
172
	touch ${T}/empty.file
173
	newins ${T}/empty.file system.log
173
	newins ${T}/empty.file system.log
174
	dosym ${LOGDIR}/system.log ${HOMEDIR}/system.log
174
	dosym ${LOGDIR}/system.log ${HOMEDIR}/system.log
Lines 177-221 Link Here
177
	dosym ${DATADIR} ${HOMEDIR}/data
177
	dosym ${DATADIR} ${HOMEDIR}/data
178
178
179
	# make install
179
	# make install
180
	sed -e 's/rm -f ..mandir.\(.*\)/rm -f ${D}${mandir}\1/g' \
181
		-e 's/ln -s ..mandir.\(.*\) ..mandir.\(.*3\)/ln -s ${mandir}\1.gz ${D}${mandir}\2.gz/g' \
182
		-i Makefile
183
	make DESTDIR=${D} install || die
180
	make DESTDIR=${D} install || die
184
	chmod 4755 ${D}/usr/bin/dspam
181
	chmod 4755 ${D}/usr/bin/dspam
185
	chmod 4755 ${D}/usr/bin/dspam_stats
182
	chmod 4755 ${D}/usr/bin/dspam_stats
186
183
187
	# documentation
184
	# documentation
188
	dodoc CHANGELOG LICENSE README* RELEASE.NOTES UPGRADING
185
	dodoc CHANGELOG LICENSE README* RELEASE.NOTES UPGRADING
186
	dodoc ${DISTDIR}/dspam_sa_trainer.tar.gz
187
	docinto doc
188
	dodoc doc/*.txt
189
	docinto gentoo
189
	dodoc ${FILESDIR}/README.postfix ${FILESDIR}/README.qmail
190
	dodoc ${FILESDIR}/README.postfix ${FILESDIR}/README.qmail
190
	if use mysql; then
191
		dodoc src/tools.mysql_drv/README
192
	elif use postgres ; then
193
		dodoc src/tools.pgsql_drv/README
194
	elif use oci8 ; then
195
		dodoc src/tools.ora_drv/README
196
	elif use sqlite || sqlite3 ; then
197
		dodoc src/tools.sqlite_drv/README
198
	fi
199
	doman man/dspam*
191
	doman man/dspam*
200
	dodoc ${DISTDIR}/dspam_sa_trainer.tar.gz
201
192
202
	# build some initial configuration data
193
	# build some initial configuration data
203
	cp src/dspam.conf ${T}/dspam.conf
194
	cp src/dspam.conf ${T}/dspam.conf
204
	if use cyrus; then
195
	if use cyrus; then
205
		sed -i 's:^#*\(UntrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/lib/cyrus/deliver %u\":gI' ${T}/dspam.conf
196
		sed -e 's:^#*\(UntrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/lib/cyrus/deliver %u\":gI' \
206
		sed -i 's:^\(TrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/lib/cyrus/deliver\":gI' ${T}/dspam.conf
197
			-e 's:^\(TrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/lib/cyrus/deliver\":gI' \
198
			-i ${T}/dspam.conf
207
	elif use exim; then
199
	elif use exim; then
208
		sed -i 's:^#*\(UntrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/sbin/exim -oMr spam-scanned %u\":gI' ${T}/dspam.conf
200
		sed -e 's:^#*\(UntrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/sbin/exim -oMr spam-scanned %u\":gI' \
209
		sed -i 's:^\(TrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/sbin/exim -oMr spam-scanned %u\":gI' ${T}/dspam.conf
201
			-e 's:^\(TrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/sbin/exim -oMr spam-scanned %u\":gI' \
202
			-i ${T}/dspam.conf
210
	elif use maildrop; then
203
	elif use maildrop; then
211
		sed -i 's:^#*\(UntrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/bin/maildrop -d %u\":gI' ${T}/dspam.conf
204
		sed -e 's:^#*\(UntrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/bin/maildrop -d %u\":gI' \
212
		sed -i 's:^\(TrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/bin/maildrop\":gI' ${T}/dspam.conf
205
			-e 's:^\(TrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/bin/maildrop\":gI' \
206
			-i ${T}/dspam.conf
213
	elif use procmail; then
207
	elif use procmail; then
214
		sed -i 's:^#*\(UntrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/bin/procmail -d %u\":gI' ${T}/dspam.conf
208
		sed -e 's:^#*\(UntrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/bin/procmail -d %u\":gI' \
215
		sed -i 's:^\(TrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/bin/procmail":gI' ${T}/dspam.conf
209
			-e 's:^\(TrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/bin/procmail":gI' \
210
			-i ${T}/dspam.conf
216
	else
211
	else
217
		sed -i 's:^#*\(UntrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/sbin/sendmail\":gI' ${T}/dspam.conf
212
		sed -e 's:^#*\(UntrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/sbin/sendmail\":gI' \
218
		sed -i 's:^\(TrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/sbin/sendmail\":gI' ${T}/dspam.conf
213
			-e 's:^\(TrustedDeliveryAgent\)[\t ]*.*:\1 \"/usr/sbin/sendmail\":gI' \
214
			-i ${T}/dspam.conf
219
	fi
215
	fi
220
	if use mysql || use postgres; then
216
	if use mysql || use postgres; then
221
		if has_version sys-kernel/linux26-headers; then
217
		if has_version sys-kernel/linux26-headers; then
Lines 225-232 Link Here
225
			keepdir /var/run/dspam
221
			keepdir /var/run/dspam
226
222
227
			# We use sockets for the deamon instead of tcp port 24
223
			# We use sockets for the deamon instead of tcp port 24
228
			sed -i 's:^#*\(ServerDomainSocketPath[\t ]\{1,\}\).*:\1\"/var/run/dspam/dspam.sock\":gI' ${T}/dspam.conf
224
			sed -e 's:^#*\(ServerDomainSocketPath[\t ]\{1,\}\).*:\1\"/var/run/dspam/dspam.sock\":gI' \
229
			sed -i 's:^#*\(ServerPID[\t ]\{1,\}\).*:\1/var/run/dspam/dspam.pid:gI' ${T}/dspam.conf
225
				-e 's:^#*\(ServerPID[\t ]\{1,\}\).*:\1/var/run/dspam/dspam.pid:gI' \
226
				-i ${T}/dspam.conf
230
227
231
			# dspam init script
228
			# dspam init script
232
			exeinto /etc/init.d
229
			exeinto /etc/init.d
Lines 262-268 Link Here
262
			-e "s:^#*\(MySQLPass[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[3]}:gI" \
259
			-e "s:^#*\(MySQLPass[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[3]}:gI" \
263
			-e "s:^#*\(MySQLDb[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[4]}:gI" \
260
			-e "s:^#*\(MySQLDb[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[4]}:gI" \
264
			-e "s:^#*\(MySQLCompress[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[5]}:gI" \
261
			-e "s:^#*\(MySQLCompress[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[5]}:gI" \
265
			${T}/dspam.conf
262
			-i ${T}/dspam.conf
266
		for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do
263
		for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do
267
			echo "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" >> ${T}/mysql.data
264
			echo "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" >> ${T}/mysql.data
268
		done
265
		done
Lines 272-278 Link Here
272
		newins src/tools.mysql_drv/mysql_objects-space.sql mysql_objects-space.sql
269
		newins src/tools.mysql_drv/mysql_objects-space.sql mysql_objects-space.sql
273
		newins src/tools.mysql_drv/mysql_objects-speed.sql mysql_objects-speed.sql
270
		newins src/tools.mysql_drv/mysql_objects-speed.sql mysql_objects-speed.sql
274
		newins src/tools.mysql_drv/mysql_objects-4.1.sql mysql_objects-4.1.sql
271
		newins src/tools.mysql_drv/mysql_objects-4.1.sql mysql_objects-4.1.sql
275
		newins src/tools.mysql_drv/virtual-users_users.sql mysql_virtual-users_users.sql
272
		newins src/tools.mysql_drv/virtual_users.sql mysql_virtual_users.sql
276
		newins src/tools.mysql_drv/neural.sql mysql_neural.sql
273
		newins src/tools.mysql_drv/neural.sql mysql_neural.sql
277
		newins src/tools.mysql_drv/purge.sql mysql_purge.sql
274
		newins src/tools.mysql_drv/purge.sql mysql_purge.sql
278
		newins src/tools.mysql_drv/purge-4.1.sql mysql_purge-4.1.sql
275
		newins src/tools.mysql_drv/purge-4.1.sql mysql_purge-4.1.sql
Lines 308-314 Link Here
308
		insopts -m644 -o dspam -g dspam
305
		insopts -m644 -o dspam -g dspam
309
		doins ${T}/pgsql.data
306
		doins ${T}/pgsql.data
310
		newins src/tools.pgsql_drv/pgsql_objects.sql pgsql_objects.sql
307
		newins src/tools.pgsql_drv/pgsql_objects.sql pgsql_objects.sql
311
		newins src/tools.pgsql_drv/virtual-users_users.sql pgsql_virtual-users_users.sql
308
		newins src/tools.pgsql_drv/virtual_users.sql pgsql_virtual_users.sql
312
		newins src/tools.pgsql_drv/purge.sql pgsql_purge.sql
309
		newins src/tools.pgsql_drv/purge.sql pgsql_purge.sql
313
310
314
	elif use oci8 ; then
311
	elif use oci8 ; then
Lines 339-345 Link Here
339
		insopts -m644 -o dspam -g dspam
336
		insopts -m644 -o dspam -g dspam
340
		doins ${T}/oracle.data
337
		doins ${T}/oracle.data
341
		newins src/tools.ora_drv/oral_objects.sql ora_objects.sql
338
		newins src/tools.ora_drv/oral_objects.sql ora_objects.sql
342
		newins src/tools.ora_drv/virtual-users_users.sql ora_virtual-users_users.sql
339
		newins src/tools.ora_drv/virtual_users.sql ora_virtual_users.sql
343
		newins src/tools.ora_drv/purge.sql ora_purge.sql
340
		newins src/tools.ora_drv/purge.sql ora_purge.sql
344
	elif use sqlite || sqlite3 ; then
341
	elif use sqlite || sqlite3 ; then
345
		insinto ${HOMEDIR}
342
		insinto ${HOMEDIR}
Lines 347-355 Link Here
347
		newins src/tools.sqlite_drv/purge.sql sqlite_purge.sql
344
		newins src/tools.sqlite_drv/purge.sql sqlite_purge.sql
348
	fi
345
	fi
349
346
350
	sed -i "s:^\(Purge.*\):###\1:g" ${T}/dspam.conf
347
	sed -e "s:^\(Purge.*\):###\1:g" \
351
	sed -i "s:^#\(Purge.*\):\1:g" ${T}/dspam.conf
348
		-e "s:^#\(Purge.*\):\1:g" \
352
	sed -i "s:^###\(Purge.*\):#\1:g" ${T}/dspam.conf
349
		-e "s:^###\(Purge.*\):#\1:g" \
350
		-i ${T}/dspam.conf
353
	insinto ${HOMEDIR}
351
	insinto ${HOMEDIR}
354
	insopts -m644 -o dspam -g dspam
352
	insopts -m644 -o dspam -g dspam
355
	doins ${T}/dspam.conf
353
	doins ${T}/dspam.conf
Lines 358-364 Link Here
358
	# -> The documentation is wrong! The files need to be in ./txt
356
	# -> The documentation is wrong! The files need to be in ./txt
359
	diropts -m0775 -o dspam -g dspam
357
	diropts -m0775 -o dspam -g dspam
360
	dodir ${HOMEDIR}/txt
358
	dodir ${HOMEDIR}/txt
361
	keepdir ${HOMEDIR}/txt
362
	insinto ${HOMEDIR}/txt
359
	insinto ${HOMEDIR}/txt
363
	insopts -m644 -o dspam -g dspam
360
	insopts -m644 -o dspam -g dspam
364
	doins ${S}/txt/*.txt
361
	doins ${S}/txt/*.txt
Lines 373-379 Link Here
373
	# logrotation scripts
370
	# logrotation scripts
374
	diropts -m0755 -o dspam -g dspam
371
	diropts -m0755 -o dspam -g dspam
375
	dodir /etc/logrotate.d
372
	dodir /etc/logrotate.d
376
	keepdir /etc/logrotate.d
377
	insinto /etc/logrotate.d
373
	insinto /etc/logrotate.d
378
	insopts -m0755 -o dspam -g dspam
374
	insopts -m0755 -o dspam -g dspam
379
	newins ${FILESDIR}/logrotate.dspam dspam
375
	newins ${FILESDIR}/logrotate.dspam dspam
Lines 381-387 Link Here
381
	# dspam cron job
377
	# dspam cron job
382
	diropts -m0755 -o dspam -g dspam
378
	diropts -m0755 -o dspam -g dspam
383
	dodir /etc/cron.daily
379
	dodir /etc/cron.daily
384
	keepdir /etc/cron.daily
385
	exeinto /etc/cron.daily
380
	exeinto /etc/cron.daily
386
	exeopts -m0755 -o dspam -g dspam
381
	exeopts -m0755 -o dspam -g dspam
387
	doexe ${FILESDIR}/dspam.cron
382
	doexe ${FILESDIR}/dspam.cron
Lines 414-428 Link Here
414
409
415
pkg_config () {
410
pkg_config () {
416
	if use mysql ; then
411
	if use mysql ; then
417
		[[ -f ${HOMEDIR}/mysql.data ]] && mv -f ${HOMEDIR}/mysql.data ${HOMEDIR}
418
419
		DSPAM_DB_DATA=( $(sed "s:^[\t ]*$:###:gI" "${ROOT}${HOMEDIR}/mysql.data") )
412
		DSPAM_DB_DATA=( $(sed "s:^[\t ]*$:###:gI" "${ROOT}${HOMEDIR}/mysql.data") )
420
		for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do
413
		for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do
421
			[[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]=""
414
			[[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]=""
422
		done
415
		done
423
		DSPAM_MySQL_USER="$DSPAM_DB_DATA[2]"
416
		DSPAM_MySQL_USER="${DSPAM_DB_DATA[2]}"
424
		DSPAM_MySQL_PWD="$DSPAM_DB_DATA[3]"
417
		DSPAM_MySQL_PWD="${DSPAM_DB_DATA[3]}"
425
		DSPAM_MySQL_DB="$DSPAM_DB_DATA[4]"
418
		DSPAM_MySQL_DB="${DSPAM_DB_DATA[4]}"
426
419
427
		ewarn "When prompted for a password, please enter your MySQL root password"
420
		ewarn "When prompted for a password, please enter your MySQL root password"
428
		ewarn ""
421
		ewarn ""
Lines 448-455 Link Here
448
			/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_objects-speed.sql
441
			/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_objects-speed.sql
449
		fi
442
		fi
450
443
451
		einfo "Creating DSPAM MySQL database for virtual-users users"
444
		if use virtual-users ; then
452
		/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_virtual-users_users.sql
445
		einfo "Creating DSPAM MySQL database for virtual users"
446
		/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_virtual_users.sql
447
		fi
453
448
454
		if use neural ; then
449
		if use neural ; then
455
			/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_neural.sql
450
			/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_neural.sql
Lines 458-465 Link Here
458
		einfo "Creating DSPAM MySQL user \"${DSPAM_MySQL_USER}\""
453
		einfo "Creating DSPAM MySQL user \"${DSPAM_MySQL_USER}\""
459
		/usr/bin/mysql -u root -p -e "GRANT SELECT,INSERT,UPDATE,DELETE ON ${DSPAM_MySQL_DB}.* TO ${DSPAM_MySQL_USER}@localhost IDENTIFIED BY '${DSPAM_MySQL_PWD}';FLUSH PRIVILEGES;" -D mysql
454
		/usr/bin/mysql -u root -p -e "GRANT SELECT,INSERT,UPDATE,DELETE ON ${DSPAM_MySQL_DB}.* TO ${DSPAM_MySQL_USER}@localhost IDENTIFIED BY '${DSPAM_MySQL_PWD}';FLUSH PRIVILEGES;" -D mysql
460
	elif use postgres ; then
455
	elif use postgres ; then
461
		[[ -f ${HOMEDIR}/pgsql.data ]] && mv -f ${HOMEDIR}/pgsql.data ${HOMEDIR}
462
463
		DSPAM_DB_DATA=( $(sed "s:^[\t ]*$:###:gI" "${ROOT}${HOMEDIR}/pgsql.data") )
456
		DSPAM_DB_DATA=( $(sed "s:^[\t ]*$:###:gI" "${ROOT}${HOMEDIR}/pgsql.data") )
464
		for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do
457
		for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do
465
			[[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]=""
458
			[[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]=""
Lines 476-485 Link Here
476
469
477
		einfo "Creating DSPAM PostgreSQL tables"
470
		einfo "Creating DSPAM PostgreSQL tables"
478
		PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${HOMEDIR}/pgsql_objects.sql 1>/dev/null 2>&1
471
		PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${HOMEDIR}/pgsql_objects.sql 1>/dev/null 2>&1
479
		PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${HOMEDIR}/pgsql_virtual-users_users.sql 1>/dev/null 2>&1
472
473
		if use virtual-users ; then
474
		einfo "Creating DSPAM PostgreSQL database for virtual users"
475
		PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${HOMEDIR}/pgsql_virtual_users.sql 1>/dev/null 2>&1
476
		fi
480
477
481
	elif use oci8 ; then
478
	elif use oci8 ; then
482
		[[ -f ${HOMEDIR}/oracle.data ]] && mv -f ${HOMEDIR}/oracle.data ${HOMEDIR}
483
		einfo "We have not enought Oracle knowledge to configure Oracle"
479
		einfo "We have not enought Oracle knowledge to configure Oracle"
484
		einfo "automatically. If you know how, please post a message in"
480
		einfo "automatically. If you know how, please post a message in"
485
		einfo "Gentoo Bugzilla."
481
		einfo "Gentoo Bugzilla."

Return to bug 86099