Skip to content

Commit

Permalink
Merge pull request #774 from h0tw1r3/PA-5550-debian-12-amd64
Browse files Browse the repository at this point in the history
 (PA-5550) debian 12 x86_64 platform support
  • Loading branch information
h0tw1r3 authored Dec 5, 2023
2 parents 1f960c8 + ddea154 commit 2c8cdfe
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
11 changes: 10 additions & 1 deletion configs/components/_base-ruby-selinux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
pkg.version '3.3'
pkg.sha256sum 'acfdee27633d2496508c28727c3d41d3748076f66d42fccde2e6b9f3463a7057'
pkg.url "https://github.com/SELinuxProject/selinux/releases/download/#{pkg.get_version}/libselinux-#{pkg.get_version}.tar.gz"
elsif platform.name.start_with?('debian-12')
# SELinux 3.4 is the minimum version available in Debian 12 repos
pkg.version '3.4'
pkg.sha256sum '77c294a927e6795c2e98f74b5c3adde9c8839690e9255b767c5fca6acff9b779'
pkg.url "https://github.com/SELinuxProject/selinux/releases/download/#{pkg.get_version}/libselinux-#{pkg.get_version}.tar.gz"
pkg.build_requires 'python3-distutils'
else
pkg.version "2.9"
pkg.md5sum "bb449431b6ed55a0a0496dbc366d6e31"
Expand Down Expand Up @@ -65,7 +71,10 @@
]

if ruby_version =~ /^3/
steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_wrap.patch"
# swig 4.1 generated interface does not need patching
unless platform.name =~ /debian-12/
steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_wrap.patch"
end
end

# libselinux 3.3 is the minimum version we want to build on RHEL 9, but the
Expand Down
21 changes: 21 additions & 0 deletions configs/platforms/debian-12-amd64.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
platform "debian-12-amd64" do |plat|
plat.inherit_from_default
packages = [
'build-essential',
'cmake',
'debhelper',
'devscripts',
'fakeroot',
'libbz2-dev',
'libreadline-dev',
'libselinux1-dev',
'make',
'pkg-config',
'quilt',
'rsync',
'swig',
'systemtap-sdt-dev',
'zlib1g-dev'
]
plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
end

0 comments on commit 2c8cdfe

Please sign in to comment.