Re: [rpm-list] %ifos

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

 



On 15 November 2006 at 12:28, "Jeff Johnson" <n3npq.jbj@xxxxxxxxx> wrote:

> On 11/14/06, Kevin Cosgrove <kevinc@xxxxxxxxx> wrote:
> > In the prep, build, install sections of the spec file "%ifos
> > Linux" works fine.  But, "%ifos solaris2.8" doesn't work at
> > all.  If I use "%ifos solaris2.8" in the definitions section,
> > i.e. outside prep etc, I can confirm that the os is indeed known
> > to rpm as solaris2.8 by defining something else, e.g. "%define
> > myaction echo os is solaris2.8".
> >
> > Why would %ifos work for Linux but not other solaris2.8?  How
> > could I get it to work for solaris2.8?
> 
> For non-linux, you're gonna be way happier choosing your
> own os designator imho.
> 
> That can be done by changing "OS" below
>     echo "sparc-sun-OS" > /etc/rpm/platform
> 
> Sure it makes sense to choose something conventional and
> unsurprising, like whatever config.guess returns.
> 
> If you really must add compatibility rules to rpmrc, that isn't impossibly
> hard. Be forewarned that rpm-4.4.7 does not read rpmrc by default,
> and all of the compatibility rules are in the process of being removed
> in favor of the simpler to understand and maintain
> 
>     rpmbuild ... --target=CPU-VENDOR-OS ...
> 
> I.e. CPU and VENDOR and OS are whatever you want them to be, no
> fuss, no muss.
> 
> Othere you're stuck with a rather twitchy and stinky os string remapping
> that attempts to remap whatever is returned by uname(2) into Something
> Else Instead.

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

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

...

%build
[some stuff]
%myscript


The downside of this is that I have to edit the spec files for my 
existing rpms in order to rebuild them.


> Hint: you can guess from "solaris2.8" the last time the code was changed.

;-)


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