Re: %ifos

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

 



On 16 November 2006 at 13:30, "Jeff Johnson" <n3npq.jbj@xxxxxxxxx> wrote:

> > %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.

OK.  I didn't know whether the "sparc-sun-solaris2.8" in my
platform file was enough to set the OS part for the %ifos
criteria.  Apparently it is.

> 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.

I'm after the %build behavior on the solaris2.8 machine.

> > 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 install arch/os, as well as the
> compatibility
> tables.

I think this part is the relevant stuff from --showrc:

ARCHITECTURE AND OS:
build os              : solaris2.8
compatible build os's : solaris2.8
install os            : solaris2.8
compatible os's       : solaris2.8 SunOS solaris2.3 solaris2.4 solaris2.5 solaris2.5.1 solaris2.6


> > 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
> are almost always expanded during build, not anywhere else.

I don't need any %ifos stuff in %install.  It's been useful to
me in the past in %prep, %build, and %files.  My problem at this
point is that the comparison doesn't work in %build when the OS
is solaris2.8, i.e. "%ifos solaris2.8" doesn't seem to evaluate
correctly. "%ifos linux" does appear to evaluate correctly, when
building on a Linux machine of course.

Does this seem as odd to you as it does to me?

If I knew what % macro(s) were being tested by %ifos, then I could
/bin/echo them during the %build step to see if they have the same 
value there as they do in other rpm build stages, and in what I'd
call the preamble section of the spec file.

Thanks....

--
Kevin


_______________________________________________
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