Skip to content

Commit 950b5c0

Browse files
committed
Add debian 12 support to installer
1 parent 07458ba commit 950b5c0

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

docs/getting-started/linux-installer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Currently, the following Linux distributions and versions are supported:
2222

2323
- Amazon Linux: 2, 2023 (**Note:** Log collection with Fluentd not currently supported for Amazon Linux 2023.)
2424
- CentOS / Red Hat / Oracle: 7, 8, 9
25-
- Debian: 9, 10, 11 (**Note:** Log collection with Fluentd is not supported for Debian 9 aarch64.)
25+
- Debian: 9, 10, 11, 12 (**Note:** Log collection with Fluentd is not supported for Debian 9 aarch64 or Debian 12.)
2626
- SUSE: 12, 15 (**Note:** Only for Collector versions v0.34.0 or higher. Log collection with Fluentd not currently supported.)
2727
- Ubuntu: 16.04, 18.04, 20.04, 22.04 (**Note:** Log collection with Fluentd is not supported for Ubuntu 16.04 aarch64.)
2828

internal/buildscripts/packaging/installer/install.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ get_distro_codename() {
4949
11)
5050
codename="bullseye"
5151
;;
52+
12)
53+
codename="bookworm"
54+
;;
5255
*)
5356
codename=""
5457
;;
@@ -753,7 +756,7 @@ distro_is_supported() {
753756
;;
754757
debian)
755758
case "$distro_codename" in
756-
bullseye|buster|stretch)
759+
bookworm|bullseye|buster|stretch)
757760
return 0
758761
;;
759762
esac
@@ -807,6 +810,8 @@ fluentd_supported() {
807810
debian)
808811
if [ "$distro_version" = "9" ] && [ "$distro_arch" = "aarch64" ]; then
809812
return 1
813+
elif [ "$distro_version" = "12" ]; then
814+
return 1
810815
fi
811816
;;
812817
ubuntu)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# A debian image with systemd enabled. Must be run with:
2+
# `-d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro` flags
3+
FROM debian:bookworm
4+
5+
ENV DEBIAN_FRONTEND noninteractive
6+
7+
RUN apt-get update &&\
8+
apt-get install -yq ca-certificates curl procps systemd wget
9+
10+
ENV container docker
11+
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \
12+
"systemd-tmpfiles-setup.service" ] || rm -f $i; done); \
13+
rm -f /lib/systemd/system/multi-user.target.wants/*;\
14+
rm -f /lib/systemd/system/local-fs.target.wants/*; \
15+
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
16+
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
17+
rm -f /lib/systemd/system/anaconda.target.wants/*;
18+
19+
RUN systemctl set-default multi-user.target
20+
ENV init /lib/systemd/systemd
21+
22+
VOLUME [ "/sys/fs/cgroup" ]
23+
24+
ENTRYPOINT ["/lib/systemd/systemd"]

internal/buildscripts/packaging/tests/installer_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ def fluentd_supported(distro, arch):
153153
return False
154154
elif distro in ("debian-stretch", "ubuntu-xenial") and arch == "arm64":
155155
return False
156+
elif distro == "debian-bookworm":
157+
return False
156158

157159
return True
158160

0 commit comments

Comments
 (0)