X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: RE: rpm-build-4.1-1 incompatible with tar-1.16.1-1 Date: Thu, 4 Jan 2007 18:41:37 -0000 Message-ID: <000f01c7302f$f740be40$0708090a@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 04 January 2007 17:40, Dick wrote: > Dave Korn 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/