Skip to content

Commit

Permalink
Future proof ruby-selinux
Browse files Browse the repository at this point in the history
We only need to patch older Debian/Fedora/Ubuntu, but shouldn't need to
for future additions.
  • Loading branch information
joshcooper committed May 9, 2024
1 parent cb55e96 commit ab8215d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions configs/components/_base-ruby-selinux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@
]

if ruby_version =~ /^3/
# swig 4.1 generated interface does not need patching
unless platform.name =~ /^(debian-12|ubuntu-24|fedora-40)/
# swig 4.1 generated interface does not need patching, so skip
# when running debian >= 12, fedora >= 40, etc
unless (platform.is_debian? && platform.os_version.to_i >= 12) ||
(platform.is_fedora? && platform.os_version.to_i >= 40) ||
(platform.is_ubuntu? && platform.os_version.to_i >= 24)
steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_wrap.patch"
end
end
Expand Down

0 comments on commit ab8215d

Please sign in to comment.