more rpm problems...
Pekka Savola
pekkas at netcore.fi
Mon Feb 12 01:41:39 EST 2001
On Sun, 11 Feb 2001, Damien Miller wrote:
> On Sat, 10 Feb 2001, Pekka Savola wrote:
>
> > On Sat, 10 Feb 2001, Craig Longman wrote:
> > > is there any way to:
> > > a) tell the rpm --rebuild to not build the gnome stuff
> >
> > The way .spec file is done, this is impossible, because %if's in there
> > override take what's defined in the specfile and don't consider what's
> > given in the command line.
> >
> > In RH pine packages, you can do like:
> >
> > rpm --rebuild pine-*.src.rpm --define 'nokerberos 1'
> >
> >
> > The difference is like:
> >
> > %{!?no_x11_askpass:%setup -q -a 1}
>
> Could you do something like:
>
> %{!?no_x11_askpass:%define skip_x11_askpass 1}
>
> %if ! %{skip_x11_askpass}
>
> i.e can you nest defines inside the conditionals like that?
Yes. With e.g. the following:
--- redhat.orig/openssh.spec Fri Feb 9 16:56:41 2001
+++ redhat/openssh.spec Sun Feb 11 16:35:51 2001
@@ -10,6 +10,10 @@
# Do we want to disable building of gnome-askpass? (1=yes 0=no)
%define no_gnome_askpass 0
+# Reserve options to override askpass settings with rpm -ba|--rebuild --define
+%{?skip_x11_askpass:%define no_x11_askpass 1}
+%{?skip_gnome_askpass:%define no_gnome_askpass 1}
+
Summary: OpenSSH free Secure Shell (SSH) implementation
Name: openssh
Version: %{oversion}
----8<---
you can do 'rpm --rebuild openssh*.src.rpm --define 'skip_gnome_askpass 1'.
Ie. %defines put in .spec file can't be overridden by --define, and %if
requires you use %define in .spec file.
Also, it'd be probably good idea to add rpm >= 3.0.5 Requires and/or
BuildRequires so people don't wonder why their non-updated RHL6x can't
cope with --rebuild.
--
Pekka Savola "Tell me of difficulties surmounted,
Netcore Oy not those you stumble over and fall"
Systems. Networks. Security. -- Robert Jordan: A Crown of Swords
More information about the openssh-unix-dev
mailing list