Skip to content

Commit

Permalink
Merge pull request #755 from mhashizume/PA-5632/master/pdk-fix
Browse files Browse the repository at this point in the history
(PA-5632) Check for SELinux symlink
  • Loading branch information
joshcooper authored Nov 3, 2023
2 parents 0502a75 + b005af2 commit 7ffa874
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion configs/components/_base-ruby-selinux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@
# libselinux 3.3 is the minimum version we want to build on RHEL 9, but the
# libeselinux-devel-3.3 package confusingly installs a shared library that
# uses 3.4. The hacky workaround for this is to symlink an existing library.
steps << 'ln -s /usr/lib64/libselinux.so.1 /usr/lib64/libselinux.so' if platform.name.start_with?('el-9')
# PDK builds two Rubies so check if symlink exists first.
if platform.name.start_with?('el-9')
steps << 'if [ ! -L /usr/lib64/libselinux.so ]; then ln -s /usr/lib64/libselinux.so.1 /usr/lib64/libselinux.so; fi'
end

steps.concat([
"#{cc} $${INCLUDESTR} #{system_include} #{cflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DSHARED -c -o selinuxswig_ruby_wrap.lo selinuxswig_ruby_wrap.c",
Expand Down

0 comments on commit 7ffa874

Please sign in to comment.