2
votes

I'm doing some hackery with rpmbuild, and am really just leveraging rpm spec files, rpmbuild, and rpm packages to give users self-service of packages that are patched to work in an extremely locked down, specialized environment.

Everything works great until I need to build with cmake and set the prefix (along with a few other things to make the package work in said environment). Rpmbuild must be finding rpath'd binaries or something that include the $BUILDROOT in the path. I'm totally fine with this, and want to turn that check off. The error below is the type of error I'm getting, and I can't find any way to turn this check off from googling. Any ideas?

/usr/lib/rpm/check-buildroot /var/tmp/libgssapi-0.11-root/usr/lib64/pkgconfig/libgssapi.pc:prefix=/var/tmp/libgssapi-0.11-root Found '/var/tmp/libgssapi-0.11-root' in installed files; aborting error: Bad exit status from /var/tmp/rpm-tmp.75914 (%install)

Thanks!

1

1 Answers

3
votes

If you want to go crazy, you can turn off a lot of things by specifying the following:

# no debug infos with:
%global debug_package %{nil}

# disable check-buildroot (normally /usr/lib/rpm/check-buildroot) with:
%define __arch_install_post %{nil}

%define __os_install_post %{nil}

# disable automatic dependency and provides generation with:
%define __find_provides %{nil} 
%define __find_requires %{nil} 
%define _use_internal_dependency_generator 0
Autoprov: 0
Autoreq: 0

Hopefully this helps...