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

Andrew Deason adeason@sinenomine.net
Thu, 7 Oct 2010 16:34:24 -0500


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