[ATrpms-devel] rpm build macros

John Robinson john.robinson at anonymous.org.uk
Sun Feb 18 20:31:03 CET 2007


On 18/02/2007 14:40, Axel Thimm wrote:
> On Sun, Feb 18, 2007 at 12:39:02PM +0000, John Robinson wrote:
>> Please excuse me if this is a FAQ, but where can I find a copy of your 
>> rpm macros? I've just patched dovecot and I want to build a new rpm :-)
> 
> There are no special macros you need in rebuilding dovecot unless you
> are on a old rpm system (RHEL4?).

Yes, it's RHEL4. I don't think of it as all that old since it's still 
the latest release :-)

> Is bcond giving you headaches?

Yup.

> Then use
> 
> %bcond_with()           %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
> %bcond_without()        %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
> 
> in /etc/rpm/macros

Unfortunately now I get:

error: parse error in expression
error: /home/john/rpmbuild/SPECS/dovecot.spec:125: 
parseExpressionBoolean returns -1

which in the original (1.0-2_45.rc22) dovedot.spec is as follows:
    124  mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d
    125  %if %{with pam_stack}
    126  install -m 644 %{SOURCE222} 
$RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/dovecot

and then later,
checking if we can use inotify... "no"
configure: error: inotify requested but not available

both of which make me think something's still wrong (since the spec 
starts with bcond things about inotify and pam_stack). Sorry about this; 
what did I do wrong this time?

Cheers,

John.



More information about the atrpms-devel mailing list