[omniORB] omniORB 4.0.3 and omniORBpy 2.3 available

Thomas Lockhart lockhart at fourpalms.org
Wed Nov 26 08:41:47 GMT 2003


(back on list to involve Sander and others)

> I did as above, and the process completed successfully. However, some of the 
> files were in the wrong places (e.g. omniNames startup script was in 
> /etc/init.d/init.d/ i.s.o. /etc/init.d/)

OK. We can isolate those differences into some conditional parts of the 
spec file. There may be other techniques (suggestions welcome) but the 
following construct works:

%if %{_real_vendor} == mandrake
%define rc_path /etc/rc.d/init.d
%else
%define rc_path /etc/init.d
%endif

I would suggest flipping the test to check for SuSE; what do you find 
for useful variables such as "_real_vendor" when you run
   rpm --showrc
?

> So, I modified the spec file to point everything to SuSE specific locations. 
> However, now the process stops somewhere after doing a "findprovides" and 
> "findrequires" on (I suspect) the last %files part (%{name}-doc) before 
> actually writing any RPMs. I have consulted the RPM-HOWTO to farmiliarise
> myself with spec file options, and I cannot see where I go wrong (and a build
> on my machine takes approximately 2 hours until the point where it stops), so
> "debugging" the spec file is a tedious process. I am in the process of 
> building again, and will only find out in 2 hours if my changes were 
> successful.

Ah, it is time to try the next set of RPM tricks :)

When something fails in the middle, you can skip steps leading up to it 
and pick up at the phase which failed. Here are some combinations I use 
(with comments):

Failed after build, so start at "install":
   rpm -bi --short-circuit omniORB.spec

Failed during packaging (usually due to missing or ignored files):
   rpm -bb --short-circuit omniORB.spec
   rpm -bs --short-circuit omniORB.spec

Once you get a good build, then do it from the beginning for your final 
version.

> In the mean time, do you mind taking a look at my spec file?
> BuildArch:      i586

Do you need to specify the architecture? Your distro probably has a 
default value (?).

> # on SuSE, /etc/rc.d -> /etc/init.d/
> mkdir -p $RPM_BUILD_ROOT/etc/init.d
> cp etc/init.d/omniNames $RPM_BUILD_ROOT/etc/init.d/

We can integrate this one with the "suse" conditional test mentioned above.

> # install SuSE rc start script
> mkdir -p $RPM_BUILD_ROOT/usr/sbin
> ln -sf ../../etc/init.d/omniNames $RPM_BUILD_ROOT/usr/sbin/rcomniNames

I *think* this one should go into the post-installation section for boot 
scripts. I've had trouble getting soft links to stay "soft" when 
packaging if I just use the %files section to solve it.

> # man pages under /usr/share/man
> mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man{1,5}
> cp -r man/* $RPM_BUILD_ROOT/%{prefix}/share/man

Mandrake has a /usr/share/man directory. Does RH? If so, perhaps we 
should just move them over there for everyone.

> %config(noreplace) %_sysconfdir/init.d/*

Oh, we should use %_sysconfdir instead of "/etc" elsewhere too. So this 
line can become

%config(noreplace) %{rc_path}/*

> #%files -n %{name}-doc
> #%defattr(-,root,root)
> #%doc doc/*

If things are failing here, please send the text of the RPM output. Not 
sure what the problem with the spec file might be, except perhaps SuSE 
looks for something a bit different.

                        - Tom




More information about the omniORB-list mailing list