Bug 77216

Summary: spec file won't proper work in case of "snapshot"
Product: [Retired] Red Hat Linux Reporter: Peter Bieringer <pb>
Component: postfixAssignee: John Dennis <jdennis>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-01-22 00:27:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Peter Bieringer 2002-11-03 12:48:07 UTC
Description of problem:
There are some minor bugs regarding to "snapshot" mode in spec file

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


How reproducible:
Always

Steps to Reproduce:
Edit spec file
1. %define official 0
2. %define releasedate 20021029
3. try build
	

Actual Results:  Some errors

Expected Results:  Clean build

Additional info:

Following patches will solve the issue:

--- postfix-1.1.11-5.spec       Wed Sep 11 15:47:59 2002
+++ postfix-1.1.11-5fixed.spec  Sun Nov  3 13:44:35 2002
@@ -10,15 +10,15 @@
 %define POSTDROP_GID 90

 # If set to 1 if official version, 0 if snapshot
-%define official 1
+%define official 0
 %define ver 1.1.11
-%define releasedate 20020624
+%define releasedate 20021029
 %define alternatives 1
 %if %{official}
 Version: %{ver}
 %define ftp_directory official
 %else
-Version: %{ver}-%{releasedate}
+Version: %{ver}.%{releasedate}
 %define ftp_directory experimental
 %endif

@@ -48,7 +48,11 @@
 Provides: MTA smtpd smtpdaemon /usr/bin/newaliases
 Release: 5
 Summary: Postfix Mail Transport Agent
+%if %{official}
 Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/%{ftp_directory}/%{name}-%{version}.tar.bz2
+%else
+Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/%{ftp_directory}/%{name}-%{ver}-%{releasedate}.tar.gz
+%endif
 Source3: postfix-etc-init.d-postfix
 Source5: postfix-aliases
 Source6: postfix-chroot-setup.awk
@@ -104,7 +108,12 @@
 %prep
 umask 022

+%if %{official}
 %setup -q -a 9
+%else
+%setup -q -a 9 -n %{name}-%{ver}-%{releasedate}
+%endif
+
 # Apply the TLS patch, must be at first, because the changes of master.cf
 %if %{TLS}
 patch -p1 <%{tlsno}/pfixtls.diff
@@ -508,6 +517,9 @@
 %{_mandir}/*/*

 %changelog
+* Wed Nov 03 2002 Dr. Peter Bieringer <pb@bieringer.de>
+- fix spec file for use with snapshot 1.1.11-20021029
+
 * Wed Jul 24 2002 Karsten Hopp <karsten@redhat.de>
 - make aliases.db config(noreplace) (#69612)

Comment 1 John Dennis 2004-01-22 00:27:11 UTC
Done. Better late than never :-) Thanks!