This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: rpm-build-4.1-1 incompatible with tar-1.16.1-1


On 04 January 2007 17:40, Dick wrote:

> Dave Korn <dave.korn <at> artimi.com> writes:
>> That's not what it looks like to me.  Look at that stray ": m" at the end
>> of the line.  It looks to me like you have a stray CR-LF line-ending
>> somewhere, and the error message is partially self-overwriting.
> 
> I think this comes from all the pipes and so, the output is corrupted.
> Whenever I manually extract the specfile from the tar.gz (see above
> command) and build it it seems to work.
> 
> You can reproduce the effect by creating a tar (test.tar.gz) containing the
> following file: test.spec
> Name: test
> Version: 0
> Release: 0
> Summary: test
> Group: test/test
> License: GPL
> 
> %description
> 
> And then calling: rpmbuild -ta test.tar.gz

  Thanks for the simple testcase: you are definitely right about it being
nothing to do with line-endings, since it happens both ways round:

/tmp/rpm $ cat test.spec
Name: test
Version: 0
Release: 0
Summary: test
Group: test/test
License: GPL

%description

/tmp/rpm $ d2u test.spec
test.spec: done.
/tmp/rpm $ tar cfvz testspec.unix.tar.gz test.spec
test.spec
/tmp/rpm $ u2d test.spec
test.spec: done.
/tmp/rpm $ tar cfvz testspec.dos.tar.gz test.spec
test.spec
/tmp/rpm $ ls -lart
total 3
-rw-r--r--   1 dk Domain Users 209 Jan  4 18:24 testspec.unix.tar.gz
-rw-r--r--   1 dk Domain Users 101 Jan  4 18:24 test.spec
drwxrwxrwt+ 19 dk Users          0 Jan  4 18:24 ..
drwxr-xr-x+  2 dk Domain Users   0 Jan  4 18:24 .
-rw-r--r--   1 dk Domain Users 215 Jan  4 18:24 testspec.dos.tar.gz
/tmp/rpm $ rpmbuild -ta testspec.unix.tar.gz
error: Failed to rename : /davek/docbook/SPECS/rpm-spec.HJGFhC to :
/davek/docbo
ok/SPECS/sh: :: No such file or directory: m
/tmp/rpm $ rpmbuild -ta testspec.dos.tar.gz
error: Failed to rename : /davek/docbook/SPECS/rpm-spec.ngE2hQ to :
/davek/docbo
ok/SPECS/sh: :: No such file or directory: m
/tmp/rpm $


  My mind completely boggles as to where and why it got /davek/docbook from...
that's fairly random of it.  How bizarre.  However, strace'ing shows some more
information:

   25  154725 [main] rpmb 4028 spawn_guts: null_app_name 0
(C:\cygwin\bin\sh.exe, C:\cygwin\bin\sh.exe -c "gunzip < testspec.unix.tar.gz
| tar xOvf - Specfile 2>&1 > : /davek/docbook/SPECS/rpm-spec.uApSH4")
   26  154751 [main] rpmb 4028 build_env: envp 0x10010090


  Now, wtf is going on with that stray ':' in the quoted command-line, do you
suppose?  I think it's the underlying cause of the problem, because when I try
to run it manually I get:

/tmp/rpm $ sh.exe -c "gunzip < testspec.unix.tar.gz | tar xOvf - Specfile 2>&1
> : /davek/docbook/SPECS/rpm-spec.uApSH4"
sh: :: No such file or directory

and so that's where part of the error message comes from, and then the rest
comes when it tries to rename the file which it just failed to create because
there was a colon in the way.

  I'm fairly sure that the strace output shows the submitted command verbatim,
so it looks like an rpmbuild bug rather than a cygwin dll problem.  Looking at
the strings in /usr/lib/rpmb.exe, I see:

failed to stat %s: %m
%{_specdir}
%{_specdir}/
%s < %s | tar xOvf - Specfile 2>&1 > %s
%s < %s | tar xOvf - \*.spec 2>&1 > %s
%s/%s
_sourcedir
Failed to rename %s to %s: %m


so it really looks like the argument being passed to %s actually genuinely is

   ": /davek/docbook/SPECS/rpm-spec.uApSH4"

and as to finding out why /that/ happens... it probably requires building a
debug version of rpmb and scattering printf's through it to try and find out
where that string comes from, how it's generated, and whether it's created
incorrectly in the first place or gets corrupted or partially overwritten
later.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]