1 |
Enrico Weigelt <weigelt@×××××.de> a écrit: |
2 |
|
3 |
> which package and which options are you exactly going to change ? |
4 |
> |
5 |
> IMHO, it's wise to improve the ebuild and perhaps add some useflag. |
6 |
|
7 |
I agree. It seems that current useflags doesn't permit enough tuning. |
8 |
Today, I need to use $EXTRA_ECONF with some packages. |
9 |
|
10 |
For example, emerge dspam package to make it run with qmail doesn't |
11 |
work. Here is what the dspam manual says: |
12 |
|
13 |
-BEGIN--/usr/share/doc/dspam-3.8.0-r11/doc/qmair.txt.bz2---------- |
14 |
|
15 |
USER-LEVEL INTEGRATION |
16 |
|
17 |
If you are only configuring dspam for a small percentage of your users, |
18 |
this is the best method. Configure dspam to use a standalone local |
19 |
delivery agent like safecat (if you already use procmail or maildrop as |
20 |
an LDA, you should call dspam from those tools directly). |
21 |
|
22 |
First, create a small script called maildir_mod in /usr/local/bin... |
23 |
|
24 |
#!/bin/sh |
25 |
VPOPDOMAINS="/home/vpopmail/domains" |
26 |
if [[ "$2" = "-d" ]]; then |
27 |
user=`eval echo $3 | cut -f 1 -d "@"` |
28 |
domain=`eval echo $3 | cut -f 2 -d "@"` |
29 |
cd $VPOPDOMAINS/"$domain"/"$user" |
30 |
fi |
31 |
/usr/local/bin/safecat "$1"/tmp "$1"/new 1>/dev/null |
32 |
|
33 |
NOTE: Be sure to configure VPOPDOMAINS to point to the path for your |
34 |
virtual domain directories |
35 |
|
36 |
Now configure DSPAM: |
37 |
|
38 |
./configure \ |
39 |
--with-dspam-owner=vpopmail \ |
40 |
--with-dspam-group=vchkpw \ |
41 |
--with-delivery-agent="/usr/local/bin/maildir_mod Maildir -d %u" \ |
42 |
# Your arguments |
43 |
|
44 |
Next, create a .qmail file in the directory for the user with a line to |
45 |
call dspam, like this: |
46 |
|
47 |
| /usr/local/bin/dspam --deliver=innocent --user $EXT@$USER |
48 |
|
49 |
The two environment variables $EXT and $USER are created by the |
50 |
qmail-local program which begins the local delivery process. |
51 |
|
52 |
-END----/usr/share/doc/dspam-3.8.0-r11/doc/qmair.txt.bz2---------- |
53 |
|
54 |
|
55 |
Here is the ebuild content: |
56 |
|
57 |
-BEGIN--/usr/portage/mail-filter/dspam/dspam-3.8.0-r11.ebuild----- |
58 |
|
59 |
econf --with-storage-driver=${STORAGE} \ |
60 |
--with-dspam-home="${DSPAM_HOMEDIR}" \ |
61 |
--sysconfdir="${DSPAM_CONFDIR}" \ |
62 |
$(use_enable daemon) \ |
63 |
$(use_enable ldap) \ |
64 |
$(use_enable clamav) \ |
65 |
$(use_enable large-domain large-scale) \ |
66 |
$(use_enable !large-domain domain-scale) \ |
67 |
$(use_enable syslog) \ |
68 |
$(use_enable debug) \ |
69 |
$(use_enable debug bnr-debug) \ |
70 |
$(use_enable debug verbose-debug) \ |
71 |
--enable-long-usernames \ |
72 |
--with-dspam-group=dspam \ |
73 |
--with-dspam-home-group=dspam \ |
74 |
--with-dspam-mode=${DSPAM_MODE} \ |
75 |
--with-logdir="${DSPAM_LOGDIR}" \ |
76 |
${myconf} || die "econf failed" |
77 |
|
78 |
-END----/usr/portage/mail-filter/dspam/dspam-3.8.0-r11.ebuild----- |
79 |
|
80 |
|
81 |
I run ('\' end-line char added in this mail only): |
82 |
prompt> EXTRA_ECONF="--with-dspam-owner=vpopmail \ |
83 |
--with-dspam-group=vchkpw \ |
84 |
--with-delivery-agent=\"/usr/local/bin/maildir_mod Maildir \-d %u\"" \ |
85 |
emerge -v dspam |
86 |
|
87 |
The compilation failed. I think I will make a bug report... |
88 |
|
89 |
|
90 |
Nevertheless, I guess dspam and qmail integration can be done on |
91 |
various ways and dspam can work with a lot of other MTA (you can see |
92 |
/usr/share/doc/dspam-3.8.0-r11/doc/). |
93 |
In this context, maintain this package (dspam) with useflags fair |
94 |
system only would be a lot of work. |
95 |
Having EXTRA_ECONF is enough (but should be probably more documented). |
96 |
If dspam default ebuild could just compile with extra-parameters, it |
97 |
would be great. |
98 |
|
99 |
I hope I didn't missed something. |
100 |
|
101 |
|
102 |
X-post + Fu2 |
103 |
|
104 |
-- |
105 |
Nicolas Sebrecht |
106 |
|
107 |
-- |
108 |
gentoo-dev@l.g.o mailing list |