Bug 11328 - rpm emits extrainious \r\n to tmp sh script
Summary: rpm emits extrainious \r\n to tmp sh script
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 6.2
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-05-09 15:09 UTC by Andy Howell
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-05-09 18:19:24 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Andy Howell 2000-05-09 15:09:04 UTC
In trying to build gtk+extra from:

http://magnet.fsu.edu/~feiguin/gtk/src/gtk+extra-0.99.5.tar.gz

rpm generates a '\r \n' at the end of the temporary shell script produced
to do the build.

I ran:

	rpm -tb gtk+extra-0.99.5.tar.gz

The last part of the shell script ( /var/tmp/rpm-tmp.16823 ) looks like

cd gtk+extra-0.99.5
[ `/usr/bin/id -u` = '0' ] && /bin/chown -Rhf root .
[ `/usr/bin/id -u` = '0' ] && /bin/chgrp -Rhf root .
/bin/chmod -Rf a+rX,g-w,o-w .
^M

exit 0

Dumping it with od -c:
0001440   h   f       r   o   o   t       .  \n   /   b   i   n   /   c
0001460   h   m   o   d       -   R   f       a   +   r   X   ,   g   -
0001500   w   ,   o   -   w       .  \n  \r  \n  \n   e   x   i   t
0001520   0

Notice the \n \r (CR LF). When rpm runs "sh -e /var/tmp/rpm-tmp.16823",
the CR LF is treated as a "command" by the shell, which of course it
can't find:

++ /usr/bin/id -u
+ [ 0 = 0 ]
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,g-w,o-w .
+
: command not found823:

As an asside, I tried to debug build a a debuging version of rpm and figure
out what is going wrong. When I ran "make check" many of the tests failed.

I am running a stock 6.2J system.

Thanks,

	Andy

Comment 1 Jeff Johnson 2000-05-09 15:29:59 UTC
This is almost certainly a configuration problem rather than an rpm problem.
RPM has never used (and probably never will) or needed CR.

Check your macro configuration files (and the spec file itself) for lurking
carriage returns.

Simply building rpm will give you a "-g" unstripped binary for debugging. Get
the binary from the build, not from the output package, as the spec file
strips the executables.

The make check examines components of packages, and is "noisy" when comparing
package specific information like build host, build time, inode numbers, modify
times, etc.

Comment 2 Andy Howell 2000-05-09 18:19:59 UTC
Duh. Why I went to all the effort to check everything but the spec file is
beyond me. od -c on it turned up \r on every line. Arrrg. I have vi`d it, but
these did not show up. Oh well, a quick tr -d `\r` on the spec file fixed it.

As for the make check. It definately does fail. The tests that fail are:

FAIL: ba
FAIL: ckL
FAIL: ckC
FAIL: i
FAIL: e

As it is 3:30am, I am problably doing something equally stupid, so I'll leave it
at that. Thanks for the quick response.

Andy


Note You need to log in before you can comment on or make changes to this bug.