<?xml version="1.0" ?><html>
<head>
<title></title>
</head>
<body>
<div align="left"><font face="Courier New"><span style="font-size:10pt">Hello Ralf,</span></font></div>
<div align="left"><br/></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > So
here is my request: Would it be possible to replace the </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > "_prefix"
definition in the specs from </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > %define
_prefix /opt/rtems</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > to
something like:</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > %define
_prefix %{?prefix:%prefix}%{!?prefix:/opt/rtems}</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > (Ralf,
is this correct?</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> Not quite. </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> Syntactically
it is correct (I am using similar constructs in many of my</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> rpms),
but </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> * %prefix
has a special meaning inside of rpm-specs:</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> - %prefix
is the relocation prefix, also used by rpm/rpmbuild --prefix;</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> - %prefix
defaults to %_prefix, so your %define above is circular</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> => I
am not sure about the potential side-effects </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> * changing
%_prefix or %_prefix doesn't help much wrt. parallel</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> installation.
You'd also have to change the package %name.</span></font></div>
<div align="left"><br/></div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">Well, I think the package name
is not a problem. What I don't
like (but accept) with the OAR packages, is that DIFFERENT
packages (in my view) like </span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">i386-rtems-binutils-2.10.rpm</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">and</span></font></div>
<div align="left"><br/></div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">i386-rtems-binutils-2.13.2.rpm</span></font></div>
<div align="left"><br/></div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">would install into the same
location /opt/rtems/bin*</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">while I would like them to be
in different locations: </span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">/opt/rtems/binutils-2.10-gcc-3.0* </span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">and</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">/opt/rtems/binutils-2.13.2-gcc-3.2* </span></font></div>
<div align="left"><br/></div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">Hm. or are you talking about
the case that the same binutils
package version is used together with different gcc/newlib
versions? This would lead to paths of:</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">/opt/rtems/binutils-2.10-gcc-3.0* </span></font></div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">/opt/rtems/binutils-2.10-gcc-3.2* </span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">and probably this would confuse
RPM (am I right here?
Sometimes I am a bit slow :-( )</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">I am not quite sure how this
can be overcome, but I think the
idea of my initial proposal work for most cases (in fact for
me and many rtems users it is sufficent to switch versions
after half a year, not half a week like you and Joel might do
it...)</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">So let's refine my proposal
to use a better name instead of
"prefix":</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">replace from:</span></font></div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">%define _prefix
/opt/rtems</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">to</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New" size="1"><span style="font-size:8pt">%define _prefix %{?custom_prefix:%custom_prefix}%{!?custom_prefix:/opt/rtems}</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">Any further comments?</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New"><span style="font-size:10pt">Thomas.</span></font></div>
<div align="left"><br/></div>
<div align="left"><br/>
</div>
<div align="left"><br/>
</div>
<div align="left"><br/>
</div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> >
Any improvements possible?</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> Of cause
;)</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> For the
moment, there is an easier way to apply a different installation prefix:</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> In RTEMS
source tree,</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> cd scripts</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> ../bootstrap</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> ./configure
--prefix=/opt/rtems-4.6</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> make</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> The rpm-specs
generated then will apply /opt/rtems-4.6 instead of</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> /opt/rtems.</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > The
anybody who wants to rebuild the toolset simply has to </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > call
RPM as follows:</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > $
rpm -ba --define 'prefix /opt/rtems/binutils-2.13.2.1-gcc-</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > 3.2.1-newlib-1.11.0'
--define 'gnat 0' --define 'gcj 0' </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > powerpc-rtems-gcc-3.2.1-newlib-1.11.0.spec</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > No
more hacking around inside the specs...</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> You've
just discovered, why it is implemented the way it is.</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> Except
of the prefix you are using, it's exactly what I am using for</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> speeding
up testing the rpms.</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> > Is
it possible to integrate this into the toolse specs?</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> Ralf</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">> </span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">--------------------------------------------</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">IMD Ingenieurbuero
fuer Microcomputertechnik</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">Thomas Doerfler
Herbststrasse 8</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">D-82178 Puchheim
Germany</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">email:
Thomas.Doerfler@imd-systems.de</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">PGP public key
available at: http://www.imd-</span></font></div>
<div align="left"><font face="Courier New" color="#7f0000"><span style="font-size:10pt">systems.de/pgp_keys.htm</span></font></div>
<div align="left"></div>
</body>
</html>