Bug 11328 - rpm emits extrainious \r\n to tmp sh script
Summary: rpm emits extrainious \r\n to tmp sh script
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 6.2
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
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:
Last Closed: 2000-05-09 18:19:24 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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:


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 .

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.



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

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


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