[OpenAFS-devel] Re: Building binary rpms for 1.5.77

Phillip Moore w.phillip.moore@gmail.com
Thu, 7 Oct 2010 17:44:25 -0400


--001636aa2be23645fe04920dcc45
Content-Type: text/plain; charset=ISO-8859-1

Looks like I'll get to patch some source code instead of some docs now...

I think I found the problem.   I dug into the code and found out how the
.version file is parsed.  However, when makesrpm.pl untars the source, it
does NOT untar everything.  I hacked makesrpm.pl to abort after untarring
the source, and here's the entire directory:

efsops@madefsd01$ ll -a /tmp/ShFYl5PUyS/openafs-1.5.77
total 24
drwxrwxr-x 4 efsops efsops 4096 Oct  7 14:39 .
drwx------ 3 efsops efsops 4096 Oct  7 14:39 ..
drwxr-xr-x 2 efsops efsops 4096 Oct  7 14:31 build-tools
-rw-r--r-- 1 efsops efsops 6604 Sep  7 21:01 configure.ac
drwxrwxr-x 3 efsops efsops 4096 Oct  7 14:39 src

It's starting to become obvious that noone has built the rpms from the
source tree without having a complete git checkout, because if .version's
not there, then it falls back on querying the version with:

    git_version=`git describe --abbrev=4 HEAD 2>/dev/null`

The workaround is to add .version to the list of files extracted.

Now I get:

efsops@madefsd01$ ./makesrpm.pl ../../../../openafs-1.5.77-src.tar.bz2
../../../../openafs-1.5.77-doc.tar.bz2
Building version 1.5.77
...
...

Patch to follow shortly...



On Thu, Oct 7, 2010 at 5:34 PM, Andrew Deason <adeason@sinenomine.net>wrote:

> On Thu, 7 Oct 2010 17:18:36 -0400
> Phillip Moore <w.phillip.moore@gmail.com> wrote:
>
> > and then I was able to at least build the srpm.  However, when rebuilding
> > the srpm to get binary rpms:
> >
> > + /usr/bin/bzip2 -dc
> /var/tmp/rpm-root/SOURCES/openafs-UNKNOWN-doc.tar.bz2
> > + tar -xf -
> > tar: Read 6144 bytes from -
> > + STATUS=0
> > + '[' 0 -ne 0 ']'
> > + cd openafs-UNKNOWN
> > /var/tmp/rpm-tmp.73321: line 51: cd: openafs-UNKNOWN: No such file or
> > directory
> > error: Bad exit status from /var/tmp/rpm-tmp.73321 (%prep)
>
> I don't know why it's doing that if you gave it a .version, but I think
> if you make the src and doc tarballs contain a directory called
> openafs-UNKNOWN instead of openafs-1.5.77, it will get through this.
>
> > Working backwards, I see where the UNKNOWN comes from.  When building the
> > srpm (which builds without errors):
> >
> >     efsops@madefsd01$ ./makesrpm.pl../../../../openafs-1.5.77-src.tar.bz2
> > ../../../../openafs-1.5.77-doc.tar.bz2
> >     Building version UNKNOWN
>
> The version string comes out of running
> "/path/to/src/build-tools/git-version /path/to/src" where /path/to/src
> is the untarred src tarball. If you untar it and run that command, does
> it actually give you UNKNOWN ? It shouldn't if you have a .version in
> that same directory.
>
> It's possible it's screwing up because we don't deal with path names
> robustly or something (paths containing whitespace etc). You're one of
> the very few people (I think) that have tried to run this procedure
> after some changes to how version information is kept, btw, which is why
> the process may seem rather fragile. I've never even tried doing this
> with a non-UNKNOWN version.
>
> --
> Andrew Deason
> adeason@sinenomine.net
>
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
>

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

<div><br></div>Looks like I&#39;ll get to patch some source code instead of=
 some docs now...<div><br></div><div>I think I found the problem. =A0 I dug=
 into the code and found out how the .version file is parsed. =A0However, w=
hen <a href=3D"http://makesrpm.pl">makesrpm.pl</a> untars the source, it do=
es NOT untar everything. =A0I hacked <a href=3D"http://makesrpm.pl">makesrp=
m.pl</a> to abort after untarring the source, and here&#39;s the entire dir=
ectory:</div>
<div><br></div><div><div>efsops@madefsd01$ ll -a /tmp/ShFYl5PUyS/openafs-1.=
5.77</div><div>total 24</div><div>drwxrwxr-x 4 efsops efsops 4096 Oct =A07 =
14:39 .</div><div>drwx------ 3 efsops efsops 4096 Oct =A07 14:39 ..</div><d=
iv>
drwxr-xr-x 2 efsops efsops 4096 Oct =A07 14:31 build-tools</div><div>-rw-r-=
-r-- 1 efsops efsops 6604 Sep =A07 21:01 <a href=3D"http://configure.ac">co=
nfigure.ac</a></div><div>drwxrwxr-x 3 efsops efsops 4096 Oct =A07 14:39 src=
</div>
</div><div><br></div><div>It&#39;s starting to become obvious that noone ha=
s built the rpms from the source tree without having a complete git checkou=
t, because if .version&#39;s not there, then it falls back on querying the =
version with:</div>
<div><br></div><div><div>=A0=A0 =A0git_version=3D`git describe --abbrev=3D4=
 HEAD 2&gt;/dev/null`</div></div><div><br></div><div>The workaround is to a=
dd .version to the list of files extracted.</div><div><br></div><div>Now I =
get:</div>
<div><br></div><div><div>efsops@madefsd01$ ./<a href=3D"http://makesrpm.pl"=
>makesrpm.pl</a> ../../../../openafs-1.5.77-src.tar.bz2 ../../../../openafs=
-1.5.77-doc.tar.bz2=A0</div><div>Building version 1.5.77</div></div><div>..=
.</div>
<div>...</div><div><br></div><div>Patch to follow shortly...</div><div><br>=
</div><div><br><br><div class=3D"gmail_quote">On Thu, Oct 7, 2010 at 5:34 P=
M, Andrew Deason <span dir=3D"ltr">&lt;<a href=3D"mailto:adeason@sinenomine=
.net">adeason@sinenomine.net</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;">On Thu, 7 Oct 2010 17:18:36 -0400<br>
<div class=3D"im">Phillip Moore &lt;<a href=3D"mailto:w.phillip.moore@gmail=
.com">w.phillip.moore@gmail.com</a>&gt; wrote:<br>
<br>
</div><div class=3D"im">&gt; and then I was able to at least build the srpm=
. =A0However, when rebuilding<br>
&gt; the srpm to get binary rpms:<br>
&gt;<br>
&gt; + /usr/bin/bzip2 -dc /var/tmp/rpm-root/SOURCES/openafs-UNKNOWN-doc.tar=
.bz2<br>
&gt; + tar -xf -<br>
&gt; tar: Read 6144 bytes from -<br>
&gt; + STATUS=3D0<br>
&gt; + &#39;[&#39; 0 -ne 0 &#39;]&#39;<br>
&gt; + cd openafs-UNKNOWN<br>
&gt; /var/tmp/rpm-tmp.73321: line 51: cd: openafs-UNKNOWN: No such file or<=
br>
&gt; directory<br>
&gt; error: Bad exit status from /var/tmp/rpm-tmp.73321 (%prep)<br>
<br>
</div>I don&#39;t know why it&#39;s doing that if you gave it a .version, b=
ut I think<br>
if you make the src and doc tarballs contain a directory called<br>
openafs-UNKNOWN instead of openafs-1.5.77, it will get through this.<br>
<div class=3D"im"><br>
&gt; Working backwards, I see where the UNKNOWN comes from. =A0When buildin=
g the<br>
&gt; srpm (which builds without errors):<br>
&gt;<br>
&gt; =A0 =A0 efsops@madefsd01$ ./<a href=3D"http://makesrpm.pl" target=3D"_=
blank">makesrpm.pl</a> ../../../../openafs-1.5.77-src.tar.bz2<br>
&gt; ../../../../openafs-1.5.77-doc.tar.bz2<br>
&gt; =A0 =A0 Building version UNKNOWN<br>
<br>
</div>The version string comes out of running<br>
&quot;/path/to/src/build-tools/git-version /path/to/src&quot; where /path/t=
o/src<br>
is the untarred src tarball. If you untar it and run that command, does<br>
it actually give you UNKNOWN ? It shouldn&#39;t if you have a .version in<b=
r>
that same directory.<br>
<br>
It&#39;s possible it&#39;s screwing up because we don&#39;t deal with path =
names<br>
robustly or something (paths containing whitespace etc). You&#39;re one of<=
br>
the very few people (I think) that have tried to run this procedure<br>
after some changes to how version information is kept, btw, which is why<br=
>
the process may seem rather fragile. I&#39;ve never even tried doing this<b=
r>
with a non-UNKNOWN version.<br>
<font color=3D"#888888"><br>
--<br>
Andrew Deason<br>
<a href=3D"mailto:adeason@sinenomine.net">adeason@sinenomine.net</a><br>
<br>
_______________________________________________<br>
OpenAFS-devel mailing list<br>
<a href=3D"mailto:OpenAFS-devel@openafs.org">OpenAFS-devel@openafs.org</a><=
br>
<a href=3D"https://lists.openafs.org/mailman/listinfo/openafs-devel" target=
=3D"_blank">https://lists.openafs.org/mailman/listinfo/openafs-devel</a><br=
>
</font></blockquote></div><br></div>

--001636aa2be23645fe04920dcc45--