Re: Re: [rpm-list] %ifos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/15/06, Kevin Cosgrove <kevinc@xxxxxxxxx> 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

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux