Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future proof ruby-selinux #849

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions configs/components/_base-ruby-selinux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,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
# EL 7 uses an older version of swig (2.0) so a different patch is needed to
Expand All @@ -90,7 +93,8 @@
else
# Ubuntu 24 & Fedora 40 use a newer swig that already has the fix that's
# being patched
unless platform.name =~ /^(ubuntu-24|fedora-40)/
unless (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_undefining_allocator.patch"
end
end
Expand Down
Loading