Bug 97957 - Updated/new ebuild for qmail-ldap (1.03-r5)
Bug#: 97957 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: qmail-bugs@gentoo.org Reported By: ed@cates.net
Component: Ebuilds
URL: 
Summary: Updated/new ebuild for qmail-ldap (1.03-r5)
Keywords:  Inclusion
Status Whiteboard: 
Opened: 2005-07-04 20:51 0000
Description:   Opened: 2005-07-04 20:51 0000
It has been almost a year since the most recent qmail-ldap ebuild has had 
anything of substance done to it.  The qmail-ldap patch it installs is over a 
year old now.   
Searches for "qmail-ldap" in the forums show that there are lots of problems  
with the most recent version (-r4).  Some of these problems are inherent in 
the ebuild (files not installed), and some are due to its age (not finding the 
right compiler version).  So I took the most recent stable qmail ebuild (-r15) 
and qmail-ldap-ified it.  
 

Reproducible: Always
Steps to Reproduce:
1.emerge qmail-ldap-1.03-r4 as is 
2.search forums for help 
3.get frustrated 
 
Actual Results:  
I got frustrated enough to write a new ebuild.  

Expected Results:  
Ebuild should install software that works, with a little extra setup.

------- Comment #1 From Ed Cates 2005-07-04 20:54:20 0000 -------
Created an attachment (id=62638) [details]
ebuild and support files for qmail-ldap-1.03-r5

This is a tarball (.tgz) that contains the ebuild + support files for
qmail-ldap-1.03-r5.  Installing should be as simple as unpacking into
${PORTDIR_OVERLAY} and emerging.

------- Comment #2 From Ed Cates 2005-07-14 13:51:18 0000 -------
Created an attachment (id=63414) [details]
Bugfixes, updates:  qmail-ldap-1.03-r5 ebuild

Changelog vs. previous ebuild:
13 Jul 2005; Ed Cates <ed@ed-n-cresta.net>
  qmail-ldap-1.03-r5.ebuild:
  Fixed "vmail" user account creation.	Thanks to "nabbed" on the forums for
    pointing that out.
  Got rid of:
    -files/1.03-r5/Makefile-ssl.patch
    -files/1.03-r5/Makefile-zlib.patch
    -files/1.03-r5/Makefile-debug.patch
    -files/1.03-r5/qmail-ldap.h.vmail.patch
    -temporary file to add LDAPFLAGS to Makefile
  and replaced them with sed commands
  Got rid of:
    -files/control/rbllist
    -files/control/dirmaker
    -files/control/ldaplocaldelivery
    -files/control/smtpcert
  and replaced them with `cat` or `echo` commands in ebuild.
  Added support for Kristof Bajnok's "Virtual domain support" patch.
    See: http://www.sztaki.hu/~bajnokk/qmail-ldap-virtual.html
    For this to work, "vmail" has to be set as a USE flag, and the
    "VDOMAINS" environment variable must be properly set.  See the ebuild
    for details.
  Allowed LDAPFLAGS to be passed as an environment variable, and added
    a list of LDAPFLAGS to the ebuild
  Added SPP support;
    see:  http://qmail-spp.sourceforge.net/
    Thanks to Andre Celso Zaiats for the patch!
  Added dns fix for ppc-macos . . . in case it ever works on ppc-macos
  Made the "queue custom error" patch included by default; removed
    "customerror" use flag

------- Comment #3 From Chad Sine 2005-08-22 06:00:26 0000 -------
With very little legwork, the ebuild went in fine.  Here are the steps that
were
required for me to install this ebuild.

Edit /etc/make.conf, change PORTDIR_OVERLAY=/usr/local/portage
mkdir -p /usr/local/portage
cp qmail-ldap-1.03-r5.ebuild.tgz /usr/local/portage
tar -zxvf qmail-ldap*

Download and drop these into /usr/portage/distfiles
http://qmail-spp.sourceforge.net/contrib-patches/qmail-1.03-ldap-1.03-20050401a-spp-0.41.diff
http://www.nrg4u.com/qmail/qmail-ldap-1.03-20050401a.patch.gz

echo "mail-mta/qmail-ldap ~x86" >> /etc/portage/package.keywords
emerge -av qmail-ldap

Thank You Ed Cates..

Chad Sine

------- Comment #4 From Steve-o 2005-12-15 23:51:06 0000 -------
This no longer builds as the shadow package has libshadow internal ( bug #37725
):

./load auth_pop auth_mod.o checkpassword.o passwd.o digest_md4.o \
digest_md5.o digest_rmd160.o digest_sha1.o base64.o read-ctrl.o \
control.o qldap.a dirmaker.o mailmaker.o localdelivery.o \
locallookup.o pbsexec.o constmap.o getln.a strerr.a substdio.a \
stralloc.a env.a wait.a dns.o ip.o ipalloc.o ipme.o alloc.a str.a \
case.a fs.a error.a timeoutconn.o timeoutread.o ndelay.a open.a \
prot.o auto_uids.o auto_qmail.o -L/usr/lib -lldap -llber -lcrypt -lshadow \
`cat dns.lib` `cat socket.lib`
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld:
cannot find -lshadow

------- Comment #5 From Steve-o 2005-12-16 00:12:37 0000 -------
(In reply to comment #4)

ignore this, pulling in wrong version :((

------- Comment #6 From Bel Zébute 2006-01-05 08:40:42 0000 -------
Can't say it worked out of the box.  Their seem to be many broken thing.

For example, the ldapgid and ldapuid files in /var/qmail/control were empty,
although after analysing the ebuild there are code for that which seem not to
be working (egetent?).

So, since no Gentoo specific howto exist for qmail-ldap, at least you could try
to make the defaults the same to some widely available documentation. Life With
Qmail-ldap seems a good choice.  Otherwise, you end up having to analyse what's
going on inside the ebuild in paralelle to reading the doc.  One think, might
as well building the darn thing from the cli and tell the ebuild maintainers to
stop wasting time on it since I'm not using it.

You have absolutely no clue from the ebuild that their are gazillions of env
variables to set for emerging this.  Result:  I had to compile twice.

Anyhow.  My 2

------- Comment #7 From Bel Zébute 2006-01-05 08:40:42 0000 -------
Can't say it worked out of the box.  Their seem to be many broken thing.

For example, the ldapgid and ldapuid files in /var/qmail/control were empty,
although after analysing the ebuild there are code for that which seem not to
be working (egetent?).

So, since no Gentoo specific howto exist for qmail-ldap, at least you could try
to make the defaults the same to some widely available documentation. Life With
Qmail-ldap seems a good choice.  Otherwise, you end up having to analyse what's
going on inside the ebuild in paralelle to reading the doc.  One think, might
as well building the darn thing from the cli and tell the ebuild maintainers to
stop wasting time on it since I'm not using it.

You have absolutely no clue from the ebuild that their are gazillions of env
variables to set for emerging this.  Result:  I had to compile twice.

Anyhow.  My 2¢, for those who wish to improve upon this.  I might do so when
I'm done transfering my system from vmailmgr to ldap base.

PS. Not ranting.  I appreciate the work.  Just mentionning (humblely) what's
deserves to be done to improve the ebuild.

------- Comment #8 From Ed Cates 2006-03-07 14:32:08 0000 -------
Created an attachment (id=81648) [details]
Tarball for 1.03-r6 ebuild + files

I've updated the ebuild to work with the latest qmail-ldap patch, and gotten a
lot of other things working that were previously broken.

CHANGELOG: 
qmail-ldap-1.0.3-r6.ebuild
  Updated to use qmail-ldap-20060201 patch
  Fixed qmail-spp plugin (http://qmail-spp.sourceforge.net) to
    work with qmail-ldap, thanks to Scott Ryan (see:
   
http://sourceforge.net/mailarchive/forum.php?thread_id=9823259&forum_id=41276
    )
  Added "spp" use variable
  Fixed/added Makefile for tcprules in /etc/tcprules.d
  Updated Kristof Bajnok's "Virtual domain support" patch to at least
    compile and run cleanly.  **UNTESTED**
  Fixed a redundancy in tcp.smtp rule
  Fixed a redundancy in tcp.smtp rule ;-)
  A couple of URL updates
  Fixed setup for ldapuid, ldapgid, and ldapmessagestore
    in /var/qmail/control
  Added "readvars" use flag and associated informational
    text about environment variables and compile-time options

------- Comment #9 From Ed Cates 2006-03-08 08:47:57 0000 -------
Created an attachment (id=81692) [details]
Patch to 1.03-r6 ebuild and package Manifest

I realized last night that I had hardcoded the virtual mail user's UID, GID and
HOME into the ebuild when determining the ldapuid, ldapgid, and
ldapmessagestore files in /var/qmail/control.  This patch fixes that problem, I
think.

To use it, just download it and run (for example):  cat
/path/to/qmail-ldap-1.03-r6.diff | patch -d
${PORTDIR_OVERLAY}/mail-mta/qmail-ldap/

------- Comment #10 From Ed Cates 2006-03-09 11:47:10 0000 -------
Created an attachment (id=81794) [details]
Patch to 1.03-r6 ebuild, Manifest, ChangeLog, files/digest

Falador on the forums pointed out that Gentoo 2006.0 doesn't come with the
qmail system users, so I've modified the ebuild to take care of that.  After
some internal debate, I used the old Gentoo IDs instead of the ones from Life
With Qmail.

Also, it seems there might have been an error in the digest for the qmail-spp
diff file.  That has been fixed.

------- Comment #11 From Ed Cates 2006-03-09 12:01:16 0000 -------
To clarify:  The latest diff is still against the original "Tarball for 1.03-r6
ebuild + files"

------- Comment #12 From stephan 2006-03-11 06:36:11 0000 -------
Hi, I added the qmail-ldap-control patch to the ebuild that resultet from the
latest patch by Ed Cates.
The additional qmail-ldap-controls20060217-control.c.patch removes a few lines
from control.c that causes qmail-ldaplookup to segault (at least for me). I
reportet the problem upstream but got no response. Maybe it work's for you
without the patch?

------- Comment #13 From stephan 2006-03-11 06:38:21 0000 -------
Created an attachment (id=81920) [details]
qmail-ldap-1.03-r6 ebuild with qmail-control

------- Comment #14 From stephan 2006-03-11 06:39:25 0000 -------
Created an attachment (id=81921) [details]
The patch for control.c

This file goes to files/1.03-r6/

------- Comment #15 From stephan 2006-03-11 06:43:13 0000 -------
Created an attachment (id=81922) [details]
qmail-ldap-1.03-r6 ebuild with qmail-control

sorry, I've left a non-visible unicode char there ,o)

------- Comment #16 From Benedikt Böhm 2007-06-16 13:51:04 0000 -------
qmail-ldap-1.03-r5 is in cvs, has been synced with netqmail and latest ldap and
spp patches, please test