From 5964c5d678a74bf47ea7fe7bfa055639b8e39ad8 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 23 Apr 2024 11:20:22 -0700 Subject: [PATCH] Future proof ruby-selinux Change conditional so that the swig generated interface is only patched on older Debian and Ubuntu. --- configs/components/_base-ruby-selinux.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/components/_base-ruby-selinux.rb b/configs/components/_base-ruby-selinux.rb index c542918b1..e6ac3ecd3 100644 --- a/configs/components/_base-ruby-selinux.rb +++ b/configs/components/_base-ruby-selinux.rb @@ -78,7 +78,8 @@ if ruby_version =~ /^3/ # swig 4.1 generated interface does not need patching - unless platform.name =~ /^(debian-12|ubuntu-24)/ + if (!platform.is_debian? || platform.os_version.to_i < 12) && + (!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