How to disable rpath check?

Hi,

I’m trying to build rpms for the python-cx-freeze package and get an errors like the following on 11.1 and above:

  • /usr/lib/rpm/brp-rpath
    ERROR: RPATH “${ORIGIN}” on /var/tmp/python-cx-freeze4-4.1.2-build/usr/lib/python2.6/site-packages/cx_Freeze/bases/Console is not allowed

Is there any way to disable this check?
BTW what is the rationale for it?

Thanks,
Mikhail

Hi
Have a read here;
http://en.opensuse.org/openSUSE:Packaging_Guidelines#Beware_of_Rpath

Does the application have the configure option --disable-rpath


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.39-0.3-default
up 1 day 0:32, 2 users, load average: 0.09, 0.11, 0.09
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Yes, I’ve read that and no, there is no --disable-rpath option. I explicitly want RPATH feature, i.e. I do not want distro managers to mess with the libraries my application is qualified to work with. At the same time I welcome all the general system updates that improve functionality or security of other common applications.

So I’ll reformulate the question a little - is it possible to disable the rpath check for a package that is not a part of the official distribution?

Regards,
Mikhail

if build local, just replace /usr/lib/rpm/brp-rpath to /bin/true ))

on build service try enable “rootforbuild” and replace /usr/lib/rpm/brp-rpath , or create package that do it (and this package to buildrequres in spec)

What a terrible, terrible idea.

Anyway if you look in the sources of /usr/lib/rpm/brp-rpath the solution becomes obvious


if  "$NO_BRP_CHECK_RPATH" = "true" ] ; then
        echo "NO_BRP_CHECK_RPATH is set: skipping check"
        exit 0
fi

Thank you for the tip, but forgive my rpm ignorance, how would I put this define into the spec file?

Hi
I would imagine something like;


export NO_BRP_CHECK_RPATH=true


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 9 days 1:02, 4 users, load average: 0.41, 0.20, 0.13
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.53

Hi,
is there any solution to this problem? I also want to disable the rpath-check and tried to add the line

export NO_BRP_CHECK_RPATH=true

to the SPEC file. The result is this error message:

error: line 79: Unknown tag: export NO_BRP_CHECK_RPATH=true
System halted.

Is there an other way to set environment variables?

Hi
What are you building with? For example if using cmake in the
CMakeLists.txt add;


set(CMAKE_SKIP_RPATH true)

Can you not find and remove from the code?


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 8 days 18:23, 3 users, load average: 0.36, 0.27, 0.30
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 195.36.15

I’ve got the same error when I put it in a wrong place. Try to insert it as a last command in the %install section. Kudos to the beautiful rpm.spec files syntax/design rotfl!

I’m using make to build the sources. When building on my local machine (not using osc) I get no errors.

Yesterday I was told to write a rpmlintrc file and put it beside the spec-file. The content of this file is:


addFilter("binary-or-shlib-defines-rpath .*")

but this also doesn’t work.

@termim: I will give it a try :wink:

Inserting it after the %install tag worked for me.