The purpose of this package is to give you tools to create a qmail rpm
that is patched with the patches you select.

I am assuming here that you know all about qmail; in other words you
are not a newbie installing qmail for the first time.

First I describe the files in the package, and then I tell you what to
do to build your own patched qmail rpm.

var-qmail-create-1.03-112patch_0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15.src.rpm
======================================================================

This contains the sources for qmail along with the following patches:

0 rbl, to use MAPS RBL
1 verh, for personalized headers in ezmlm lists
2 qmqpc, to allow command line spec of qmqp servers (F. Lindberg)
3 dns, to handle big DNS records (S. Schwartz's)
4 big-todo, for high volume servers
5 bigrem, to up the limit on concurrent remote connections (F. Lindberg)
6 anti-spam, it modifies qmail-smtpd
7 tarpitting, to implement---tarpitting
8 queuevar, to implement the QMAILQUEUE variable
9 ext todo, to cure silly qmail syndrome
10 syncdir, gives qmail bsd fsync semantics on a Linux filesystem
11 qmtpc, attempt qmtp first if the MX priority indicates so.
12 condredirect, define exit with 100
13 pop3d_stat, fixes STAT command
14 errno, fixes errno declaration
15 qmail_local, fixes and_or typo in qmail-local.c

Where I did not indicate the author, the patch is from www.qmail.org,
and that is where you should go to read about what the patches do.

var-qmail-create-template.spec:
===============================

This is a spec file template used by 

var-qmail-create-make-spec.sh:
==============================

to create a spec file that will build qmail with a specified
list of patches.   

Now here is what to do:

A) Run 

rpm -Uvh var-qmail-create-1.03-112patch_0_1_2_3_4_5_6_7_8_9_10_11_12_13.src.rpm

this installs the sources and all patches on your system along with a
specfile which is useful only to create the above src rpm.  If you
attempt to run `rpmbuild -bb' on it, the build will fail because some of
the patches are incompatible.

B) Run 

./var-qmail-create-make-spec.sh list

for a current list of patches (in case I forgot to update this
README).  Create the specfile you need; for example

./var-qmail-create-make-spec.sh 0 3 1

will create a spec file (in the current directory) which will then
build qmail using patches 0 1 3 (you must play around with the
template spec if you want the patches to be applied in a specific
order).  The spec file's name is var-qmail-create_0_1_3.spec , and you
may want to move it to your spec directory (but not necessarily).

C) Run 

rpmbuild -ba spec_file_you_created

so in the above example, 

rpmbuild -ba var-qmail-create_0_1_3.spec

The resulting src rpm now contains only the patches 0, 1, 3 (along
with the qmail sources).

The resulting binary (i386) rpm contains and installs the tarball of
the qmail binaries along with a spec file that will create the final
package to be installed on your system.

With the above example,  the src rpm is 

var-qmail-create-1.03-112patch_0_1_3.src.rpm

and the binary rpm is 

var-qmail-create-1.03-112patch_0_1_3.i386.rpm

D) Run

rpm -Uvh var-qmail-create-1.03-112...i386.rpm

so in the above example

rpm -Uvh var-qmail-create-1.03-112patch_0_1_3.i386.rpm

This installs the qmail binary tarball and a spec file (in the rpm
SOURCE and SPEC directories, respectively).  You will be told about
the name of the spec file; in the above example

var-qmail_0_1_3.spec

E) Run

rpmbuild -ba var-qmail_0_1_3.spec

This edits the qmail binaries for the qmail uids/gids in your system
(or adds the qmail users/groups if they do not yet exist), and creates
the binary rpm you want to install on your system; in the above
example

rpm -Uvh qmail-1.03-112patch_0_1_3.i386.rpm

This binary rpm is usually not suitable to install on other machines
since the qmail uids might be different.  On the other hand, you can
use the created src rpm; on a new machine (same system though), you
can issue

rpmbuild --rebuild qmail-1.03-112patch_0_1_3.src.rpm

and then install the binary rpm.  So if you have a bunch of, say, RH
7.3 Linux boxes, then build qmail-1.03-112patch_0_1_3.src.rpm as
described above, and use this rpm to install qmail on each of the
boxes.  If the qmail users are the same on each box as on the build
box, then you can install qmail-1.03-112patch_0_1_3.i386.rpm directly.


Remarks:  

-- At http://djbware.csi.hu/run.html, you find packages that will help
   you run qmail (and many other programs).

-- If you do not specify any argument to
   var-qmail-create-make-spec.sh, then no patches are applied.  In
   this case, the release of the package becomes `112memphis' instead
   of `112patch_...'.

-- All the complication above is due to the fact, that the rpm that
   finally installs qmail has to be created on the install system to
   reflect the local qmail uids/gids.  If you have a better idea to
   make sure that rpm's verify work on the qmail installation, let me
   know. 

-- In case you want to know: I am using patches 1 2 3 8 9 10 11 13 14
   15, so these patches do not conflict.

mw@csi.hu


