Skip to content

Commit 7b527e6

Browse files
committed
cmake: fix krb5 detection on SUSE
`zypper install krb5-devel` installs executables outside of $PATH. It also installs /etc/profile.d/krb5.sh that is sourced by a new shell to add the new location to the $PATH. But this doesn't affect the current shell. Now decent Linux distros remind the user to run `. /etc/profile` to reload paths in such a case. SUSE doesn't and for a good reason - it doesn't work there. Because SUSE sets PROFILEREAD=true in the environment and /etc/profile does not do anything. By this point, one should not really expect `unset PROFILEREAD` to help, and it does not - PROFILEREAD is readonly, and cannot be unset. Apparently SUSE really *really* wants you to re-login between installing MariaDB build dependencies and actually running the rpmbuild. Which we cannot do it buildbot. And it would look very user-un-friendly in the Build Instructions section of the manual. So, we work around it - by adding SUSE krb5 path to the search list. THIS IS SUSEEEEEE!!!
1 parent 0b2042f commit 7b527e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/auth_gssapi/cmake/FindGSSAPI.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if(GSSAPI_LIBS AND GSSAPI_FLAVOR)
4040
else(GSSAPI_LIBS AND GSSAPI_FLAVOR)
4141

4242
find_program(KRB5_CONFIG NAMES krb5-config heimdal-krb5-config PATHS
43-
/opt/local/bin
43+
/opt/local/bin /usr/lib/mit/bin
4444
ONLY_CMAKE_FIND_ROOT_PATH # this is required when cross compiling with cmake 2.6 and ignored with cmake 2.4, Alex
4545
)
4646
mark_as_advanced(KRB5_CONFIG)

0 commit comments

Comments
 (0)