Skip to content

Commit

Permalink
feat: add support for ubuntu 24.04
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Krouper <[email protected]>
  • Loading branch information
tomkrouper committed Dec 3, 2024
1 parent ceb2146 commit 2a28bf2
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- "ubuntu-1804"
- "ubuntu-2004"
- "ubuntu-2204"
- "ubuntu-2404"
suite:
- "client-install-57"
- "client-install-80"
Expand Down Expand Up @@ -68,6 +69,12 @@ jobs:
suite: smoke57
- os: ubuntu-2204
suite: resources-57
- os: ubuntu-2404
suite: client-install-57
- os: ubuntu-2404
suite: smoke57
- os: ubuntu-2404
suite: resources-57
- os: rockylinux-8
suite: client-install-57
- os: rockylinux-8
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.

## Unreleased

- feat: add support for ubuntu 24.04 (noble numbat)

## 11.1.8 - *2024-11-18*

## 11.1.7 - *2024-11-18*
Expand Down Expand Up @@ -659,7 +661,7 @@ Adding Ubuntu 13.04 to Platforminfo
- **[COOK-2966] - Address foodcritic failures'
- **[COOK-4182] - Template parse failure in /etc/init/mysql.conf (data_dir)'
- **[COOK-4198] - Added missing tunable'
- **[COOK-4206] - create [email protected], as well as root@localhost'
- **[COOK-4206] - create `[email protected]`, as well as `root@localhost`'

## [4.0.20] - 2014-01-18

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ The following platforms have been tested with Test Kitchen:
| ubuntu-18.04 | | X | |
| ubuntu-20.04 | | | X |
| ubuntu-22.04 | | | X |
| ubuntu-24.04 | | | X |

## Cookbook Dependencies

Expand Down
4 changes: 3 additions & 1 deletion kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ suse_dists_with_56 = %w(opensuse-leap-15)
yum_dists_with_57 = %w(centos-7 fedora-latest)
apt_dists_with_57 = %w(ubuntu-18.04)
yum_dists_with_80 = %w(centos-7 centos-stream-8 almalinux-8 rockylinux-8 fedora-latest)
apt_dists_with_80 = %w(ubuntu-20.04)
apt_dists_with_80 = %w(ubuntu-20.04 ubuntu-22.04 ubuntu-24.04)
%>
---
driver:
Expand All @@ -31,6 +31,8 @@ platforms:
- name: rockylinux-8
- name: ubuntu-18.04
- name: ubuntu-20.04
- name: ubuntu-22.04
- name: ubuntu-24.04

suites:
#
Expand Down
6 changes: 6 additions & 0 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ def jammy?
false
end

def noble?
return true if platform?('ubuntu') && node['platform_version'] == '24.04'
false
end

def defaults_file
"#{etc_dir}/my.cnf"
end
Expand Down Expand Up @@ -85,6 +90,7 @@ def default_major_version
return '5.7' if bionic?
return '8.0' if focal?
return '8.0' if jammy?
return '8.0' if noble?

# misc
return '5.6' if platform?('freebsd')
Expand Down
68 changes: 68 additions & 0 deletions templates/default/apparmor/ubuntu-24.04/usr.sbin.mysqld.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# vim:syntax=apparmor
# Last Modified: Tue Feb 09 15:28:30 2016
#include <tunables/global>

/usr/sbin/mysqld {
#include <abstractions/base>
#include <abstractions/nameservice>
#include <abstractions/user-tmp>
#include <abstractions/mysql>
#include <abstractions/winbind>

# Allow system resource access
/sys/devices/system/cpu/ r,
capability sys_resource,
capability dac_override,
capability setuid,
capability setgid,

# Allow network access
network tcp,

/etc/hosts.allow r,
/etc/hosts.deny r,

# Allow config access
/etc/mysql/** r,

# Allow pid, socket, socket lock file access
/var/run/mysqld/mysqld.pid rw,
/var/run/mysqld/mysqld.sock rw,
/var/run/mysqld/mysqld.sock.lock rw,
/run/mysqld/mysqld.pid rw,
/run/mysqld/mysqld.sock rw,
/run/mysqld/mysqld.sock.lock rw,

# Allow execution of server binary
/usr/sbin/mysqld mr,
/usr/sbin/mysqld-debug mr,

# Allow plugin access
/usr/lib/mysql/plugin/ r,
/usr/lib/mysql/plugin/*.so* mr,

# Allow error msg and charset access
/usr/share/mysql/ r,
/usr/share/mysql/** r,

# Allow data dir access
/var/lib/mysql/ r,
/var/lib/mysql/** rwk,

# Allow data files dir access
/var/lib/mysql-files/ r,
/var/lib/mysql-files/** rwk,

# Allow keyring dir access
/var/lib/mysql-keyring/ r,
/var/lib/mysql-keyring/** rwk,

# Allow log file access
/var/log/mysql.err rw,
/var/log/mysql.log rw,
/var/log/mysql/ r,
/var/log/mysql/** rw,

# Site-specific additions and overrides. See local/README for details.
#include <local/usr.sbin.mysqld>
}

0 comments on commit 2a28bf2

Please sign in to comment.