Blame SOURCES/fapolicyd-1.1.1-ld_so.patch

5c9578
diff -urp fapolicyd-1.1.1.orig/fapolicyd.spec fapolicyd-1.1.1/fapolicyd.spec
5c9578
--- fapolicyd-1.1.1.orig/fapolicyd.spec	2022-01-28 15:17:55.000000000 -0500
5c9578
+++ fapolicyd-1.1.1/fapolicyd.spec	2022-01-28 15:19:31.594155397 -0500
5c9578
@@ -30,7 +30,7 @@ makes use of the kernel's fanotify inter
5c9578
 # generate rules for python
5c9578
 sed -i "s/%python2_path%/`readlink -f %{__python2} | sed 's/\//\\\\\//g'`/g" rules.d/*.rules
5c9578
 sed -i "s/%python3_path%/`readlink -f %{__python3} | sed 's/\//\\\\\//g'`/g" rules.d/*.rules
5c9578
-sed -i "s/%ld_so_path%/`find /usr/lib64/ -type f -name 'ld-2\.*.so' | sed 's/\//\\\\\//g'`/g" rules.d/*.rules
5c9578
+sed -i "s/%ld_so_path%/`readelf -e /usr/bin/bash | grep Requesting | sed 's/.$//' | rev | cut -d" " -f1 | rev  | sed 's/\//\\\\\//g'`/g" rules.d/*.rules
5c9578
 
5c9578
 %build
5c9578
 %configure \
5c9578
diff -urp fapolicyd-1.1.1.orig/m4/dyn_linker.m4 fapolicyd-1.1.1/m4/dyn_linker.m4
5c9578
--- fapolicyd-1.1.1.orig/m4/dyn_linker.m4	2022-01-28 15:17:55.000000000 -0500
5c9578
+++ fapolicyd-1.1.1/m4/dyn_linker.m4	2022-01-28 15:20:02.048609672 -0500
5c9578
@@ -1,6 +1,10 @@
5c9578
 AC_DEFUN([LD_SO_PATH],
5c9578
 [
5c9578
-  xpath=`realpath /usr/lib64/ld-2.*.so`
5c9578
+  xpath1=`readelf -e /usr/bin/bash | grep Requesting | sed 's/.$//' | rev | cut -d" " -f1 | rev`
5c9578
+  xpath=`realpath $xpath1`
5c9578
+  if test ! -f "$xpath" ; then
5c9578
+    AC_MSG_ERROR([Cant find the dynamic linker])
5c9578
+  fi
5c9578
   echo "dynamic linker is.....$xpath"
5c9578
   AC_DEFINE_UNQUOTED(SYSTEM_LD_SO, ["$xpath"], [dynamic linker])
5c9578
 ])