Bug 75439

Summary: RPM build fails if TLS=0 in postfix.spec
Product: [Retired] Red Hat Linux Reporter: Jonathan Cheyer <jonmisc>
Component: postfixAssignee: John Dennis <jdennis>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-06-13 20:29:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jonathan Cheyer 2002-10-08 16:34:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

Description of problem:
I want to use the redhat-built postfix-1.1.11-5.i386.rpm on a Redhat 7.1 system
that has a) old versions of openssl and cyrus-sasl and b) no pcre installed. 
Attempting to assuage dependency complaints by installing/upgrading required
packages yields the usual combinatorial explosion of additional packages,
culminating in required upgrade to glibc (which ends that path).  This system
isn't mine so I can't do a complete upgrade to Redhat 7.3 or 8.0.  Since
postfix/TLS includes patches to source code involving TLS, I can't just do a rpm
-i --nodeps and have it work (openssl libraries that the patched source uses are
incompatible).

More important, I don't need the additional functionality of postfix/TLS on this
particular system (I only need postfix installed to act as a secondary MX).  It
would be nice if redhat would have separate pre-built RPMS for postfix and
postfix/TLS.  In any case, since I have to build my own RPM, I *would* like to
leverage the useful redhat postfix.spec file in doing so.

Doing a build from the default postfix.spec file completes normally. I want to
change three of the #define values: PCRE, SASL, and TLS (from 1 to 0) since I
don't want to build postfix with any of that functionality.  Changing PCRE and
SASL works fine.

However, if I try to turn off TLS, the build fails. The obligatory patch1 to
master.cf fails because the previous TLS patch to master.cf was not done.

Since the TLS patch to master.cf only adds commented lines, I was able to hack a
workaround to this whole problem by allowing the TLS patch for just that file to
occur, and then taking the resulting master.cf and inserting back into a new
postfix-1.1.11.tar.bz2 file.  Replacing the old bz2 file with the new one allows
me to a complete rebuild with TLS=0 and it works.

But it would be nice if you could fix the postfix.spec file to handle performing
patch1 on either a TLS-patched master.cf or a non-TLS-patched master.cf file. 
That way other people who want to build their own non-TLS versions from the
redhat source RPM don't have  deal with this problem.

Much better would be if redhat would in the future release both a postfix RPM
separately from the postfix/TLS RPM to minimize dependency annoyances if someone
doesn't need the extra functionality.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Install postfix-1.1.11-5.src.rpm
2. Modify TLS definition line in postfix.spec to be "%define TLS 0" (no quotes)
3. rpm -ba postfix.spec
	

Actual Results:  The build fails.

Expected Results:  The build should have completed successfully.

Additional info:

Redhat Linux 7.1
kernel-2.4.2-2
postfix-1.1.11-5

Results of running "Steps to Reproduce" above:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.34424
+ umask 022
+ cd /home/cheyer/rpm/BUILD
+ umask 022
+ cd /home/cheyer/rpm/BUILD
+ rm -rf postfix-1.1.11
+ /usr/bin/bzip2 -dc /home/cheyer/rpm/SOURCES/postfix-1.1.11.tar.bz2
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd postfix-1.1.11
+ /usr/bin/bzip2 -dc /home/cheyer/rpm/SOURCES/pfixtls-0.8.11a-1.1.11-0.9.6d.tar.bz2
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
+ /bin/chmod -Rf a+rX,g-w,o-w .
+ echo 'Patch #1 (postfix-config.patch):'
Patch #1 (postfix-config.patch):
+ patch -p1 -b --suffix .config -s
1 out of 2 hunks FAILED -- saving rejects to file conf/master.cf.rej
error: Bad exit status from /var/tmp/rpm-tmp.34424 (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.34424 (%prep)

Comment 1 John Dennis 2003-06-13 20:29:44 UTC
We don't have a good way to provide binaries with alternative build options but
I did fix the spec file so that TLS=0 works.