Skip to content

Commit c50b2a9

Browse files
committed
Add el10
1 parent 78da8d4 commit c50b2a9

File tree

4 files changed

+50
-7
lines changed

4 files changed

+50
-7
lines changed

Diff for: Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def location_for(place)
1111
end
1212

1313
gem 'artifactory'
14-
gem 'vanagon', *location_for(ENV['VANAGON_LOCATION'] || '~> 0.39')
14+
gem 'vanagon', *location_for(ENV['VANAGON_LOCATION'] || 'https://github.com/openvoxproject/vanagon#main')
1515
gem 'packaging', *location_for(ENV['PACKAGING_LOCATION'] || '~> 0.105')
1616
gem 'rake', '~> 13.0'
1717

Diff for: configs/components/_base-ruby-selinux.rb

+15-6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
pkg.sha256sum '9a3a3705ac13a2ccca2de6d652b6356fead10f36fb33115c185c5ccdf29eec19'
3636
pkg.url "https://github.com/SELinuxProject/selinux/releases/download/#{pkg.get_version}/libselinux-#{pkg.get_version}.tar.gz"
3737
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'
3844
else
3945
pkg.version "2.9"
4046
pkg.md5sum "bb449431b6ed55a0a0496dbc366d6e31"
@@ -51,7 +57,7 @@
5157
# The RHEL 9 libselinux-devel package provides headers, but we don't want to
5258
# use the package becuase of a compatibility issue with the shared library.
5359
# 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)/
5561

5662
if platform.is_cross_compiled_linux?
5763
cc = "/opt/pl-build-tools/bin/#{settings[:platform_triple]}-gcc"
@@ -83,18 +89,20 @@
8389
# when running debian >= 12, fedora >= 40, etc
8490
unless (platform.is_debian? && platform.os_version.to_i >= 12) ||
8591
(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)
8794
steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_wrap.patch"
8895
end
8996
# EL 7 uses an older version of swig (2.0) so a different patch is needed to
9097
# fix warning:undefining the allocator of T_DATA class
9198
if platform.name =~ /el-7|redhatfips-7/
9299
steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../undefining_allocator_el_7.patch"
93100
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
95102
# being patched
96103
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)
98106
steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_undefining_allocator.patch"
99107
end
100108
end
@@ -103,8 +111,9 @@
103111
# libselinux 3.3 is the minimum version we want to build on RHEL 9, but the
104112
# libeselinux-devel-3.3 package confusingly installs a shared library that
105113
# 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)/
108117
steps << 'if [ ! -L /usr/lib64/libselinux.so ]; then ln -s /usr/lib64/libselinux.so.1 /usr/lib64/libselinux.so; fi'
109118
end
110119

Diff for: configs/platforms/el-10-aarch64.rb

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
platform 'el-10-aarch64' do |plat|
2+
plat.inherit_from_default
3+
4+
packages = %w(
5+
perl
6+
perl-Getopt-Long
7+
patch
8+
swig
9+
readline-devel
10+
zlib-devel
11+
systemtap-sdt-devel
12+
systemtap-sdt-dtrace
13+
)
14+
plat.provision_with("dnf install -y --allowerasing #{packages.join(' ')}")
15+
plat.install_build_dependencies_with "dnf install -y --allowerasing "
16+
end

Diff for: configs/platforms/el-10-x86_64.rb

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
platform "el-10-x86_64" do |plat|
2+
plat.inherit_from_default
3+
4+
packages = %w(
5+
libsepol
6+
libsepol-devel
7+
pkgconfig
8+
readline-devel
9+
rpmdevtools
10+
swig
11+
systemtap-sdt-dtrace
12+
systemtap-sdt-devel
13+
yum-utils
14+
zlib-devel
15+
)
16+
plat.provision_with("dnf install -y --allowerasing #{packages.join(' ')}")
17+
end
18+

0 commit comments

Comments
 (0)