Skip to content

Add Debian 13 and amazon-2-x86_64 #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions configs/components/_base-ruby-selinux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
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'
elsif platform.name.start_with?('debian-13')
# SELinux 3.8.1 is the minimum version available in Debian 13 repos
# Double check when Trixie is released
pkg.version '3.8.1'
pkg.sha256sum 'ec2d2789f931152d21c1db1eb4bc202ce4eccede34d9be9e360e3b45243cee2c'
pkg.url "https://github.com/SELinuxProject/selinux/releases/download/#{pkg.get_version}/libselinux-#{pkg.get_version}.tar.gz"
pkg.build_requires 'python3-setuptools'
elsif platform.name.start_with?('ubuntu-24')
# SELinux 3.5 is the minimum version available in Ubuntu 24 repos
pkg.version '3.5'
Expand Down Expand Up @@ -98,11 +105,12 @@
if platform.name =~ /el-7|redhatfips-7/
steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../undefining_allocator_el_7.patch"
else
# Ubuntu 24, Fedora 40, and EL 10 use a newer swig that already has the fix that's
# Ubuntu 24, Fedora 40, EL 10, and Debian 13 use a newer swig that already has the fix that's
# being patched
unless (platform.is_fedora? && platform.os_version.to_i >= 40) ||
(platform.is_ubuntu? && platform.os_version.to_i >= 24) ||
(platform.is_el? && platform.os_version.to_i >= 10)
(platform.is_el? && platform.os_version.to_i >= 10) ||
(platform.is_debian? && platform.os_version.to_i >= 13)
steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_undefining_allocator.patch"
end
end
Expand Down
10 changes: 9 additions & 1 deletion configs/components/ruby-3.2.8.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,16 @@

special_flags = " --prefix=#{ruby_dir} --with-opt-dir=#{settings[:prefix]} "

cflags = settings[:cflags]
if platform.is_debian? && platform.os_version.to_i >= 13
# A problem with --enable-dtrace, which I suspect may be because of GCC on the Trixie image.
# Check if this is still needed next time we bump Ruby and/or bump the Debian 13
# container to the release version.
cflags += ' -Wno-error=implicit-function-declaration'
end

if settings[:supports_pie]
special_flags += " CFLAGS='#{settings[:cflags]}' LDFLAGS='#{settings[:ldflags]}' CPPFLAGS='#{settings[:cppflags]}' "
special_flags += " CFLAGS='#{cflags}' LDFLAGS='#{settings[:ldflags]}' CPPFLAGS='#{settings[:cppflags]}' "
end

# Ruby's build process requires a "base" ruby and we need a ruby to install
Expand Down
17 changes: 17 additions & 0 deletions configs/platforms/amazon-2-x86_64.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
platform 'amazon-2-x86_64' do |plat|
plat.inherit_from_default

packages = %w[
perl-FindBin
perl-lib
perl-IPC-Cmd
readline-devel
systemtap-sdt-devel
systemtap-sdt-trace
zlib-devel
]

plat.provision_with "yum install -y #{packages.join(' ')}"
plat.install_build_dependencies_with 'yum install --assumeyes'
plat.vmpooler_template 'amazon-7-arm64'
end
22 changes: 22 additions & 0 deletions configs/platforms/debian-13-aarch64.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
platform "debian-13-aarch64" 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

21 changes: 21 additions & 0 deletions configs/platforms/debian-13-amd64.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
platform "debian-13-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