Skip to content

Commit

Permalink
Add fedora 40
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcooper committed Apr 16, 2024
1 parent 901679d commit eccb5f8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
4 changes: 3 additions & 1 deletion configs/components/_base-ruby-selinux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@

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_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
20 changes: 20 additions & 0 deletions configs/platforms/fedora-40-x86_64.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
platform 'fedora-40-x86_64' do |plat|
plat.servicedir '/usr/lib/systemd/system'
plat.defaultdir '/etc/sysconfig'
plat.servicetype 'systemd'
plat.dist 'fc40'

packages = %w[
autoconf automake bzip2-devel gcc gcc-c++ libselinux-devel
libsepol libsepol-devel make cmake pkgconfig readline-devel
rpmdevtools rsync swig zlib-devel systemtap-sdt-devel
perl-lib perl-FindBin
]
plat.provision_with("/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}")

plat.install_build_dependencies_with '/usr/bin/dnf install -y --best --allowerasing'

plat.docker_image 'fedora:40'
plat.docker_run_args ['--tty', '--entrypoint=/bin/sh']
plat.use_docker_exec true
end
3 changes: 2 additions & 1 deletion configs/projects/_shared-agent-components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
proj.component 'libxml2' unless platform.is_windows?
proj.component 'libxslt' unless platform.is_windows?

proj.component 'ruby-augeas' unless platform.is_windows?
# REMIND: gcc12 complains about invalid pointer types in ruby-augeas native extension
proj.component 'ruby-augeas' unless platform.is_windows? || platform.name =~ /^fedora-40/
proj.component 'ruby-shadow' unless platform.is_aix? || platform.is_windows?
# We only build ruby-selinux for EL, Fedora, Debian and Ubuntu (amd64/i386)
if platform.is_el? || platform.is_fedora? || platform.name =~ /debian|ubuntu/
Expand Down

0 comments on commit eccb5f8

Please sign in to comment.