|
35 | 35 | pkg.sha256sum '9a3a3705ac13a2ccca2de6d652b6356fead10f36fb33115c185c5ccdf29eec19'
|
36 | 36 | pkg.url "https://github.com/SELinuxProject/selinux/releases/download/#{pkg.get_version}/libselinux-#{pkg.get_version}.tar.gz"
|
37 | 37 | pkg.build_requires 'python3-setuptools'
|
| 38 | +elsif platform.name.start_with?('el-10') |
| 39 | + # SELinux 3.7 is the minimum version available in RHEL 10 repos |
| 40 | + pkg.version '3.7' |
| 41 | + pkg.sha256sum 'ea03f42d13a4f95757997dba8cf0b26321fac5d2f164418b4cc856a92d2b17bd' |
| 42 | + pkg.url "https://github.com/SELinuxProject/selinux/releases/download/#{pkg.get_version}/libselinux-#{pkg.get_version}.tar.gz" |
| 43 | + pkg.build_requires 'python3-setuptools' |
38 | 44 | else
|
39 | 45 | pkg.version "2.9"
|
40 | 46 | pkg.md5sum "bb449431b6ed55a0a0496dbc366d6e31"
|
|
51 | 57 | # The RHEL 9 libselinux-devel package provides headers, but we don't want to
|
52 | 58 | # use the package becuase of a compatibility issue with the shared library.
|
53 | 59 | # Instead, we use the headers provided in the tarball.
|
54 |
| -system_include.prepend('-I./include ') if platform.name.start_with?('el-9') |
| 60 | +system_include.prepend('-I./include ') if platform.name =~ /el-(9|10)/ |
55 | 61 |
|
56 | 62 | if platform.is_cross_compiled_linux?
|
57 | 63 | cc = "/opt/pl-build-tools/bin/#{settings[:platform_triple]}-gcc"
|
|
83 | 89 | # when running debian >= 12, fedora >= 40, etc
|
84 | 90 | unless (platform.is_debian? && platform.os_version.to_i >= 12) ||
|
85 | 91 | (platform.is_fedora? && platform.os_version.to_i >= 40) ||
|
86 |
| - (platform.is_ubuntu? && platform.os_version.to_i >= 24) |
| 92 | + (platform.is_ubuntu? && platform.os_version.to_i >= 24) || |
| 93 | + (platform.is_el? && platform.os_version.to_i >= 10) |
87 | 94 | steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_wrap.patch"
|
88 | 95 | end
|
89 | 96 | # EL 7 uses an older version of swig (2.0) so a different patch is needed to
|
90 | 97 | # fix warning:undefining the allocator of T_DATA class
|
91 | 98 | if platform.name =~ /el-7|redhatfips-7/
|
92 | 99 | steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../undefining_allocator_el_7.patch"
|
93 | 100 | else
|
94 |
| - # Ubuntu 24 & Fedora 40 use a newer swig that already has the fix that's |
| 101 | + # Ubuntu 24, Fedora 40, and EL 10 use a newer swig that already has the fix that's |
95 | 102 | # being patched
|
96 | 103 | unless (platform.is_fedora? && platform.os_version.to_i >= 40) ||
|
97 |
| - (platform.is_ubuntu? && platform.os_version.to_i >= 24) |
| 104 | + (platform.is_ubuntu? && platform.os_version.to_i >= 24) || |
| 105 | + (platform.is_el? && platform.os_version.to_i >= 10) |
98 | 106 | steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_undefining_allocator.patch"
|
99 | 107 | end
|
100 | 108 | end
|
|
103 | 111 | # libselinux 3.3 is the minimum version we want to build on RHEL 9, but the
|
104 | 112 | # libeselinux-devel-3.3 package confusingly installs a shared library that
|
105 | 113 | # uses 3.4. The hacky workaround for this is to symlink an existing library.
|
106 |
| - # PDK builds two Rubies so check if symlink exists first. |
107 |
| - if platform.name.start_with?('el-9') |
| 114 | + # PDK builds two Rubies so check if symlink exists first. Similar issue |
| 115 | + # exists for RHEL 10. |
| 116 | + if platform.name =~ /el-(9|10)/ |
108 | 117 | steps << 'if [ ! -L /usr/lib64/libselinux.so ]; then ln -s /usr/lib64/libselinux.so.1 /usr/lib64/libselinux.so; fi'
|
109 | 118 | end
|
110 | 119 |
|
|
0 commit comments