When I do a rpm -bb, at the end when it is finding the dependencies, I see the following message scrolled to the screen: Processing files: <rpm name> Finding Provides: (using line 186: Dependency tokens must begin with alpha-numeric, '_' or '/': Failed to find Provides: ============= I looked at line 186 of /usr/lib/rpm/find-provides, and see done | sort -u might it be the case that the whole for ... do | sort -u needs to be (for ... do) | sort -u ?
No, the find-provides script is returning something unusual in your build, almost certainly because of what is in your build. Try doing rpm -i <your_src_rpm> rpm -bi /usr/src/redhat/SPECS/<your_spec_file> and then doing find <your_build_root> | /usr/lib/rpm/find-provides to examine what find-requires is returning from the installed tree (i.e. what's in $RPM_BUILD_ROOT).