I needed some help debugging my rpm build. Any time it encounters a %files or %build or %install directive it gives me an error and I am not able to figure out what "[rpm] + $'\r'" means
[rpm] Building the RPM based on the LBR.spec file
[rpm] Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.2932
[rpm] + umask 022
[rpm] + cd /home/user.username/workspace/LBR/dist/BUILD
[rpm] + LANG=C
[rpm] + export LANG
[rpm] + unset DISPLAY
[rpm] + $'\r'
[rpm] /var/tmp/rpm-tmp.2932: line 28:
[rpm] : command not founderror: Bad exit status from /var/tmp/rpm-tmp.2932 (%build)
[rpm] Bad exit status from /var/tmp/rpm-tmp.2932 (%build)
[rpm]
[rpm]
[rpm] RPM build errors:
I know this is almost four years old, but for anyone else who may stumble upon this page like I did looking for a solution:
I had this same issue where a carriage return character was inserted in the rpmbuild
auto generated temp script. The reason this is happening is because I had initially edited the spec file in a Windows text editor (which inserted the carriage returns) and then SCPed the files over to a CentOS box, so the carriage returns threw errors. If you remake the file on the Linux environment, it should work fine.
Good luck!
EDIT: I am very new to Linux so I didn't know there was a command called 'dos2unix' that will convert a text file appropriately for Unix based environments. :) Hope that helps anyone else who runs into this issue.