[OpenAFS-devel] Issue building 1.5.77 rpms for i386

Phillip Moore w.phillip.moore@gmail.com
Thu, 7 Oct 2010 21:53:38 -0400


--20cf300fafc17dd87f0492114759
Content-Type: text/plain; charset=ISO-8859-1

OK, now I get it...  This comment in openafs.spec.in explain it:

# Determine which elements of OpenAFS to build.  For non-x86 arches
# (subject to the ExclusiveArch setting, below), we build both userspace
# and modules.  For most x86 arches, we build just the kernel modules.  For
# i386, we build just the userspace.  If you're running an i386 kernel,
# you'll need to tweak that last bit.

At least it's not a mystery.  I simple need to define build_userspace and/or
build_modules to override the default decisions:

%ifarch %{ix86}
%define build_userspace 0
%define build_modules 1
%define build_authlibs 1
%endif

%ifarch i386
%define build_userspace 1
%define build_modules 0
%define build_authlibs 1
%endif

The CLI you showed was the hint.  Thanks...

On Thu, Oct 7, 2010 at 9:50 PM, Phillip Moore <w.phillip.moore@gmail.com>wrote:

>
> Seems the --target i686 is a key here.
>
> I read the src/packaging/RedHat/openafs-README file, and it suggests
> setting that option as well, so I rebuilt with it.   Oddly, this time I got
> ONLY the kmod-openafs file:
>
> total 272
> -rw-r--r-- 1 efsops efsops 271437 Oct  7 18:29
> kmod-openafs-1.5.77-1.1.2.6.18_164.el5.i686.rpm
>
> That's it.   There must be a way to get the entire set of rpms built with
> one command.  Now I wonder why --target i686 doesn't build all the others.
>
> More digging....
>
> On Thu, Oct 7, 2010 at 9:44 PM, Andy Cobaugh <phalenor@gmail.com> wrote:
>
>> On 2010-10-07 at 21:14, Phillip Moore ( w.phillip.moore@gmail.com ) said:
>>
>>>
>>> Is there anything special that needs to be done to coerce the build of
>>> the
>>> kmod-openafs rpm on the 32 bit platform?
>>>
>>> I can't find the code/file/whatever that determines whether or not it
>>> gets
>>> built....
>>>
>>
>> Well, that's all handled by the logic in openafs.spec, in combination with
>> some kmod macros.
>>
>> Make sure you unset ARCH, or use mock to build. There's some logic
>> somewhere that goes wonky if ARCH is set at all in your environment.
>>
>> This is the command line I used (going back through IRC logs, I think it's
>> the right one):
>>
>> rpmbuild --rebuild --define 'kernvers 2.6.18-194.11.1.el5' --define
>> 'build_userspace 1' --define 'build_modules 1' --target i686
>> openafs-1.5.77-1.1.1.src.rpm
>>
>> Hope that works for you.
>>
>> --andy
>>
>
>

--20cf300fafc17dd87f0492114759
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div><br></div>OK, now I get it... =A0This comment in <a href=3D"http://ope=
nafs.spec.in">openafs.spec.in</a> explain it:<div><br></div><div><div># Det=
ermine which elements of OpenAFS to build. =A0For non-x86 arches</div><div>=
# (subject to the ExclusiveArch setting, below), we build both userspace</d=
iv>
<div># and modules. =A0For most x86 arches, we build just the kernel module=
s. =A0For</div><div># i386, we build just the userspace. =A0If you&#39;re r=
unning an i386 kernel,</div><div># you&#39;ll need to tweak that last bit.<=
/div>
<div><br></div><div>At least it&#39;s not a mystery. =A0I simple need to de=
fine build_userspace and/or build_modules to override the default decisions=
:</div><div><br></div><div><div>%ifarch %{ix86}</div><div>%define build_use=
rspace 0</div>
<div>%define build_modules 1</div><div>%define build_authlibs 1</div><div>%=
endif</div><div><br></div><div>%ifarch i386</div><div>%define build_userspa=
ce 1</div><div>%define build_modules 0</div><div>%define build_authlibs 1</=
div>
<div>%endif</div></div><div><br></div><div>The CLI you showed was the hint.=
 =A0Thanks...</div><br><div class=3D"gmail_quote">On Thu, Oct 7, 2010 at 9:=
50 PM, Phillip Moore <span dir=3D"ltr">&lt;<a href=3D"mailto:w.phillip.moor=
e@gmail.com">w.phillip.moore@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div><br></div>Seems the --target i686 is a=
 key here.<div><br></div><div>I read the src/packaging/RedHat/openafs-READM=
E file, and it suggests setting that option as well, so I rebuilt with it. =
=A0 Oddly, this time I got ONLY the kmod-openafs file:</div>

<div><br></div><div><div>total 272</div><div>-rw-r--r-- 1 efsops efsops 271=
437 Oct =A07 18:29 kmod-openafs-1.5.77-1.1.2.6.18_164.el5.i686.rpm</div><di=
v><br></div><div>That&#39;s it. =A0 There must be a way to get the entire s=
et of rpms built with one command. =A0Now I wonder why --target i686 doesn&=
#39;t build all the others.</div>

<div><br></div><div>More digging....</div><div><div></div><div class=3D"h5"=
><br><div class=3D"gmail_quote">On Thu, Oct 7, 2010 at 9:44 PM, Andy Cobaug=
h <span dir=3D"ltr">&lt;<a href=3D"mailto:phalenor@gmail.com" target=3D"_bl=
ank">phalenor@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<div>On 2010-10-07 at 21:14, Phillip Moore ( <a href=3D"mailto:w.phillip.mo=
ore@gmail.com" target=3D"_blank">w.phillip.moore@gmail.com</a> ) said:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<br>
Is there anything special that needs to be done to coerce the build of the<=
br>
kmod-openafs rpm on the 32 bit platform?<br>
<br>
I can&#39;t find the code/file/whatever that determines whether or not it g=
ets<br>
built....<br>
</blockquote>
<br></div>
Well, that&#39;s all handled by the logic in openafs.spec, in combination w=
ith some kmod macros.<br>
<br>
Make sure you unset ARCH, or use mock to build. There&#39;s some logic some=
where that goes wonky if ARCH is set at all in your environment.<br>
<br>
This is the command line I used (going back through IRC logs, I think it&#3=
9;s the right one):<br>
<br>
rpmbuild --rebuild --define &#39;kernvers 2.6.18-194.11.1.el5&#39; --define=
 &#39;build_userspace 1&#39; --define &#39;build_modules 1&#39; --target i6=
86 openafs-1.5.77-1.1.1.src.rpm<br>
<br>
Hope that works for you.<br><font color=3D"#888888">
<br>
--andy<br>
</font></blockquote></div><br></div></div></div>
</blockquote></div><br></div>

--20cf300fafc17dd87f0492114759--