[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Re: [rpm-list] %ifos
- From: "Jeff Johnson" <n3npq jbj gmail com>
- To: "RPM Package Manager" <rpm-list redhat com>
- Subject: Re: Re: [rpm-list] %ifos
- Date: Thu, 16 Nov 2006 13:30:33 -0500
On 11/15/06, Kevin Cosgrove <kevinc doink com> wrote:
...
The cpu-vendor-os stuff seems like a much simpler route and I would
be one to welcome it.
I'm not too sure how that relates to my situation tho. Here's what
I'm doing:
%build
[some stuff]
%ifos solaris2.8
%{_bindir}/egd.pl --kill checks/entropy
%endif
The issue "relates" to what you are doing because
1) the "OS" is set by /etc/rpm/platform, otherwise uname(2) and a
string transorm
2) there are OS compatibility tables that are driven by the OS from 1) that
will determine whether "solaris2.8" is compatible.
No matter what, %ifos is handled during parsing on the build machine, not
from the OS on the install machine. If that's not what you want, then use
shell logic, not %ifos, in scriptlets.
The above doesn't run the perl script on solaris2.8 machines at the
time that I build the rpm packages. "%ifos solaris2.8" outside one
of the build stages, i.e. at the top of a spec file where variables
are typically set, _does_ behave as if the os is solaris2.8. For the
linux os, %ifos works everywhere. Is this something that can be
altered by %_sysconfdir/rpm/platform contents?
rpm --showrc displays both build and insall arch/os, as well as the
compatibility
tables.
My workaround is to do this near the top of the spec file
%ifos solaris2.8
%define myscript %{_bindir}/egd.pl --kill checks/entropy
%else
%define myscript echo do nothing
%endif
All depends on whether you want build or install system logic. Macros
ars almost always expanded during build, not anywhere else.
hth
73 de Jeff
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]