Description of problem: The check-rpaths script prints output like: > ERROR 0020: file '/opt/gcc-latest/lib64/libtsan.so.2.0.0' contains an referencing '..' of an absolute path [/opt/gcc-latest/lib/../lib64] Note the "contains an referencing" part. Version-Release number of selected component (if applicable): rpm-build-4.17.0-1.fc35.x86_64 rpm-build-4.17.0-1.fc36.1.x86_64 How reproducible: Always Steps to Reproduce: 1. gcc -shared -o libx.so -Wl,-rpath,/home/lib64,-rpath,/home/../lib64 -x c /dev/null 2. /usr/lib/rpm/check-rpaths-worker libx.so Actual results: ERROR 0002: file 'libx.so' contains an invalid '/home/lib64' in [/home/lib64] ERROR 0020: file 'libx.so' contains an referencing '..' of an absolute path [/home/lib64:/home/../lib64] Expected results: "contains an invalid rpath" or "contains an invalid runpath" Note however that the second ERROR will say "contains an runpath referencing" which is not correct English grammar. So even fixing the incorrect definition of the $lower variable won't fix it completely. Additional info: This was caused by this upstream commit: https://github.com/rpm-software-management/rpm/commit/5417bffe37a9dfbfd33734f3f46d82adb927463b
Proposed fix https://github.com/rpm-software-management/rpm/pull/1815
Fixed in rawhide as of 4.18 alpha, also scheduled for fix in 4.17.x branch.