From 32317657fe493ce911146ebd3fe9c74c414c9faa Mon Sep 17 00:00:00 2001 From: Jeremy Norris Date: Thu, 12 Dec 2024 10:07:53 -0600 Subject: [PATCH] feat(24.04): add slices for Redis and dependencies (#426) --- slices/libjemalloc2.yaml | 17 ++++++++++++ slices/liblzf1.yaml | 15 +++++++++++ slices/redis-server.yaml | 27 +++++++++++++++++++ slices/redis-tools.yaml | 26 ++++++++++++++++++ .../spread/integration/redis-server/task.yaml | 8 ++++++ .../spread/integration/redis-tools/task.yaml | 13 +++++++++ 6 files changed, 106 insertions(+) create mode 100644 slices/libjemalloc2.yaml create mode 100644 slices/liblzf1.yaml create mode 100644 slices/redis-server.yaml create mode 100644 slices/redis-tools.yaml create mode 100644 tests/spread/integration/redis-server/task.yaml create mode 100644 tests/spread/integration/redis-tools/task.yaml diff --git a/slices/libjemalloc2.yaml b/slices/libjemalloc2.yaml new file mode 100644 index 000000000..26b9d5c06 --- /dev/null +++ b/slices/libjemalloc2.yaml @@ -0,0 +1,17 @@ +package: libjemalloc2 + +essential: + - libjemalloc2_copyright + +slices: + libs: + essential: + - libc6_libs + - libgcc-s1_libs + - libstdc++6_libs + contents: + /usr/lib/*-linux-*/libjemalloc.so.2: + + copyright: + contents: + /usr/share/doc/libjemalloc2/copyright: diff --git a/slices/liblzf1.yaml b/slices/liblzf1.yaml new file mode 100644 index 000000000..a75c88e0e --- /dev/null +++ b/slices/liblzf1.yaml @@ -0,0 +1,15 @@ +package: liblzf1 + +essential: + - liblzf1_copyright + +slices: + libs: + essential: + - libc6_libs + contents: + /usr/lib/*-linux-*/liblzf.so.1*: + + copyright: + contents: + /usr/share/doc/liblzf1/copyright: diff --git a/slices/redis-server.yaml b/slices/redis-server.yaml new file mode 100644 index 000000000..4eea25cd1 --- /dev/null +++ b/slices/redis-server.yaml @@ -0,0 +1,27 @@ +package: redis-server + +essential: + - redis-server_copyright + +slices: + bins: + essential: + - redis-server_config + - redis-tools_bins + contents: + /usr/bin/redis-server: + + config: + contents: + /etc/redis/redis.conf: + + services: + essential: + - redis-server_bins + contents: + /usr/lib/systemd/system/redis-server.service: + /usr/lib/systemd/system/redis-server@.service: + + copyright: + contents: + /usr/share/doc/redis-server/copyright: diff --git a/slices/redis-tools.yaml b/slices/redis-tools.yaml new file mode 100644 index 000000000..69970dd72 --- /dev/null +++ b/slices/redis-tools.yaml @@ -0,0 +1,26 @@ +package: redis-tools + +essential: + - redis-tools_copyright + +slices: + bins: + # redis-tools actually depends on adduser as well to create and remove + # a user during package install/removal - however we don't support this + # currently so adduser is not added here. + essential: + - libatomic1_libs + - libc6_libs + - libjemalloc2_libs + - liblzf1_libs + - libssl3t64_libs + - libsystemd0_libs + contents: + /usr/bin/redis-benchmark: + /usr/bin/redis-check-aof: + /usr/bin/redis-check-rdb: + /usr/bin/redis-cli: + + copyright: + contents: + /usr/share/doc/redis-tools/copyright: diff --git a/tests/spread/integration/redis-server/task.yaml b/tests/spread/integration/redis-server/task.yaml new file mode 100644 index 000000000..9cfe7426b --- /dev/null +++ b/tests/spread/integration/redis-server/task.yaml @@ -0,0 +1,8 @@ +summary: Integration tests for redis-server + +execute: | + # Chisel a minimum number of slices to give us a runnable system that we can + # test in. + rootfs="$(install-slices redis-server_bins)" + + chroot "${rootfs}/" redis-server -v diff --git a/tests/spread/integration/redis-tools/task.yaml b/tests/spread/integration/redis-tools/task.yaml new file mode 100644 index 000000000..2fb3a0da1 --- /dev/null +++ b/tests/spread/integration/redis-tools/task.yaml @@ -0,0 +1,13 @@ +summary: Integration tests for redis-tools + +execute: | + # Chisel a minimum number of slices to give us a runnable system that we can + # test in. + rootfs="$(install-slices redis-tools_bins)" + + touch "${rootfs}/foo" + + chroot "${rootfs}/" redis-benchmark -v + chroot "${rootfs}/" redis-cli -v + chroot "${rootfs}/" redis-check-aof /foo + chroot "${rootfs}/" redis-check-rdb -v