Jim Knoble wrote: > Circa 2006-03-20 02:45 dixit Raman Gupta: > > : Jim Knoble wrote: > : > Circa 2006-03-20 01:53 dixit Raman Gupta: > : > : I am now attempting to build the msttcorefonts RPM (spec file at [2]). > : > : However, any lines that involve "cd <somedir>" seem to fail during building: > : > > : > [...] > : > > : > : It works fine if I edit the spec file and change all lines involving cd, > : > : and prefix a `pwd`/ before them e.g. > : > : > : > : cd %{name} > : > : > : > : change to > : > : > : > : cd `pwd`/%{name} > : > > : > [...] > : > > : > : Can anyone tell me why this is happening and how I can fix it? I don't > : > : want to continue to build RPMs as root. > > I'd suggest creating a minimal specfile (such as the one below) and > using it to try to reproduce the problem. For example create the file > 'blah.spec' as follows: Thanks for the great suggestion. > Then run 'rpmbuild -bp blah.spec' and inspect the output. Does the > 'pwd' return what you expect? Try creating a minimal source tarball > [...] I continued to test with the minimal spec file you provided. I was eventually able to eliminate RPM from the equation and isolate the problem down to my bourne shell interpreter. With a simple bourne shell script and an strace to figure out what was going on, I realized that I had a CDPATH variable set in my ~/.bash_profile that did NOT include the current directory. It seems that bourne shell scripts are sensitive to CDPATH not containing the dot (but note that bash shell scripts, as well as the bash interactive interpreter, seem to implicitly add the dot!). Therefore removing the CDPATH setting (or adding . to the beginning of it) was the solution. This is a pretty tricky way to screw up somebody's RPM build environment! :-) Thanks to everyone who helped. Cheers, Raman _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list