Enrico Weigelt <[EMAIL PROTECTED]> a écrit:

> which package and which options are you exactly going to change ?
> 
> IMHO, it's wise to improve the ebuild and perhaps add some useflag.

I agree. It seems that current useflags doesn't permit enough tuning.
Today, I need to use $EXTRA_ECONF with some packages.

For example, emerge dspam package to make it run with qmail doesn't
work. Here is what the dspam manual says:

-BEGIN--/usr/share/doc/dspam-3.8.0-r11/doc/qmair.txt.bz2----------

USER-LEVEL INTEGRATION

If you are only configuring dspam for a small percentage of your users,
this is the best method. Configure dspam to use a standalone local
delivery agent like safecat (if you already use procmail or maildrop as
an LDA, you should call dspam from those tools directly). 

First, create a small script called maildir_mod in /usr/local/bin...

  #!/bin/sh
  VPOPDOMAINS="/home/vpopmail/domains"
  if [[ "$2" = "-d" ]]; then
      user=`eval echo $3 | cut -f 1 -d "@"`
      domain=`eval echo $3 | cut -f 2 -d "@"`
      cd $VPOPDOMAINS/"$domain"/"$user"
  fi
  /usr/local/bin/safecat "$1"/tmp "$1"/new 1>/dev/null

  NOTE: Be sure to configure VPOPDOMAINS to point to the path for your
virtual domain directories

Now configure DSPAM:

./configure \
  --with-dspam-owner=vpopmail \
  --with-dspam-group=vchkpw \
  --with-delivery-agent="/usr/local/bin/maildir_mod Maildir -d %u" \
  # Your arguments

Next, create a .qmail file in the directory for the user with a line to
call dspam, like this:

 | /usr/local/bin/dspam --deliver=innocent --user [EMAIL PROTECTED]

The two environment variables $EXT and $USER are created by the
qmail-local program which begins the local delivery process.

-END----/usr/share/doc/dspam-3.8.0-r11/doc/qmair.txt.bz2----------


Here is the ebuild content: 

-BEGIN--/usr/portage/mail-filter/dspam/dspam-3.8.0-r11.ebuild-----

        econf --with-storage-driver=${STORAGE} \
                        --with-dspam-home="${DSPAM_HOMEDIR}" \
                        --sysconfdir="${DSPAM_CONFDIR}" \
                        $(use_enable daemon) \
                        $(use_enable ldap) \
                        $(use_enable clamav) \
                        $(use_enable large-domain large-scale) \
                        $(use_enable !large-domain domain-scale) \
                        $(use_enable syslog) \
                        $(use_enable debug) \
                        $(use_enable debug bnr-debug) \
                        $(use_enable debug verbose-debug) \
                        --enable-long-usernames \
                        --with-dspam-group=dspam \
                        --with-dspam-home-group=dspam \
                        --with-dspam-mode=${DSPAM_MODE} \
                        --with-logdir="${DSPAM_LOGDIR}" \
                        ${myconf} || die "econf failed"

-END----/usr/portage/mail-filter/dspam/dspam-3.8.0-r11.ebuild-----


I run ('\' end-line char added in this mail only):
prompt> EXTRA_ECONF="--with-dspam-owner=vpopmail \
--with-dspam-group=vchkpw \
--with-delivery-agent=\"/usr/local/bin/maildir_mod Maildir \-d %u\"" \
emerge -v dspam

The compilation failed. I think I will make a bug report...


Nevertheless, I guess dspam and qmail integration can be done on
various ways and dspam can work with a lot of other MTA (you can see
/usr/share/doc/dspam-3.8.0-r11/doc/).
In this context, maintain this package (dspam) with useflags fair
system only would be a lot of work.
Having EXTRA_ECONF is enough (but should be probably more documented). 
If dspam default ebuild could just compile with extra-parameters, it 
would be great.

I hope I didn't missed something.


X-post + Fu2

-- 
Nicolas Sebrecht

-- 
gentoo-dev@lists.gentoo.org mailing list

Reply via email to