Skip to content

Commit

Permalink
Support Debian 11 (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Apr 25, 2022
1 parent e3a950e commit 5bef77e
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 17 deletions.
12 changes: 11 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pipeline {
axes {
axis {
name 'MAKEFILE'
values 'Makefile', 'Makefile.debian7', 'Makefile.debian8', 'Makefile.debian9', 'Makefile.debian10'
values 'Makefile', 'Makefile.debian7', 'Makefile.debian8', 'Makefile.debian9', 'Makefile.debian10', 'Makefile.debian11'
}
axis {
name 'PLATFORM'
Expand Down Expand Up @@ -108,6 +108,16 @@ pipeline {
values 'Makefile.debian10'
}
}
exclude {
axis {
name 'PLATFORM'
values 'arm'
}
axis {
name 'MAKEFILE'
values 'Makefile.debian11'
}
}
}
stages {
stage('Staging') {
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ build:
$(MAKE) -C $(var) -f Makefile.debian7 $@ || echo '1' > ${status}; \
$(MAKE) -C $(var) -f Makefile.debian8 $@ || echo '1' > ${status}; \
$(MAKE) -C $(var) -f Makefile.debian9 $@ || echo '1' > ${status}; \
$(MAKE) -C $(var) -f Makefile.debian10 $@ || echo '1' > ${status})
$(MAKE) -C $(var) -f Makefile.debian10 $@ || echo '1' > ${status}; \
$(MAKE) -C $(var) -f Makefile.debian11 $@ || echo '1' > ${status})
@make -C fpm $@ || echo '1' > ${status}
exit $$(cat ${status})

Expand All @@ -34,7 +35,8 @@ push:
$(MAKE) -C $(var) -f Makefile.debian7 $@ || echo '1' > ${status}; \
$(MAKE) -C $(var) -f Makefile.debian8 $@ || echo '1' > ${status}; \
$(MAKE) -C $(var) -f Makefile.debian9 $@ || echo '1' > ${status}; \
$(MAKE) -C $(var) -f Makefile.debian10 $@ || echo '1' > ${status})
$(MAKE) -C $(var) -f Makefile.debian10 $@ || echo '1' > ${status}; \
$(MAKE) -C $(var) -f Makefile.debian11 $@ || echo '1' > ${status})
@make -C fpm $@ || echo '1' > ${status}
exit $$(cat ${status})

Expand Down
14 changes: 14 additions & 0 deletions go/Makefile.debian11
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
IMAGES := base main darwin arm armhf armel ppc s390x darwin-arm64 npcap
DEBIAN_VERSION := 11
TAG_EXTENSION := -debian11

export DEBIAN_VERSION TAG_EXTENSION

build:
@$(foreach var,$(IMAGES),$(MAKE) -C $(var) build || exit 1;)

# Requires login at https://docker.elastic.co:7000/.
push:
@$(foreach var,$(IMAGES),$(MAKE) -C $(var) push || exit 1;)

.PHONY: build push
2 changes: 1 addition & 1 deletion go/arm/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN apt install -y \
libsystemd-dev:arm64 libsystemd0:arm64 liblz4-1:arm64
{{ end }}

{{if eq .DEBIAN_VERSION "10"}}
{{if or (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11")}}
# librpm-dev
RUN apt install -y \
librpm-dev:arm64
Expand Down
2 changes: 1 addition & 1 deletion go/armel/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN apt install -y \
libsystemd-dev:armel libsystemd0:armel liblz4-1:armel
{{ end }}

{{if eq .DEBIAN_VERSION "10"}}
{{if or (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11")}}
# librpm-dev
RUN apt install -y \
librpm-dev:armel
Expand Down
2 changes: 1 addition & 1 deletion go/armhf/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN apt install -y \
libsystemd-dev:armhf libsystemd0:armhf liblz4-1:armhf
{{ end }}

{{if eq .DEBIAN_VERSION "10"}}
{{if or (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11")}}
# librpm-dev
RUN apt install -y \
librpm-dev:armhf
Expand Down
2 changes: 1 addition & 1 deletion go/base/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apt-get -o Acquire::Check-Valid-Until=false update -y --no-install-recommend
file \
flex \
bison \
{{if eq .DEBIAN_VERSION "10"}}
{{if or (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11")}}
python3-venv \
python3-pip \
python3 \
Expand Down
3 changes: 3 additions & 0 deletions go/base/sources-debian11.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# see https://wiki.debian.org/CrossToolchains
deb http://deb.debian.org/debian bullseye main
deb http://deb.debian.org/debian-security/ bullseye-security main
2 changes: 1 addition & 1 deletion go/darwin-arm64/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN \
uuid-dev \
&& rm -rf /var/lib/apt/lists/*

{{if eq .DEBIAN_VERSION "10"}}
{{if or (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11")}}
ARG OSXCROSS_SDK_URL=https://storage.googleapis.com/obs-ci-cache/beats/MacOSX11.3.sdk.tar.xz
ARG OSXCROSS_PATH=/usr/osxcross
ARG OSXCROSS_REV=035cc170338b7b252e3f13b0e3ccbf4411bffc41
Expand Down
6 changes: 3 additions & 3 deletions go/darwin/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN \
llvm \
cmake \
patch \
{{if ne .DEBIAN_VERSION "10"}}
{{if and (ne .DEBIAN_VERSION "10") (ne .DEBIAN_VERSION "11")}}
python \
{{ end }}
libssl-dev \
Expand All @@ -20,7 +20,7 @@ RUN \
uuid-dev \
&& rm -rf /var/lib/apt/lists/*

{{if eq .DEBIAN_VERSION "10"}}
{{if or (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11")}}
ARG OSXCROSS_SDK_URL=https://storage.googleapis.com/obs-ci-cache/beats/MacOSX10.14.sdk.tar.xz
ARG OSXCROSS_PATH=/usr/osxcross
ARG OSXCROSS_REV=8a716a43a72dab1db9630d7824ee0af3730cb8f9
Expand Down Expand Up @@ -58,7 +58,7 @@ RUN cd / \
&& file helloWorld | grep -c 'Mach-O 64-bit x86_64'

# MacOSX10.14 SDK does not have 32bits compiler
{{if ne .DEBIAN_VERSION "10"}}
{{if and (ne .DEBIAN_VERSION "10") (ne .DEBIAN_VERSION "11")}}
RUN cd / \
&& o32-clang helloWorld.c -o helloWorld \
&& file helloWorld \
Expand Down
4 changes: 2 additions & 2 deletions go/main/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN \
xz-utils \
unzip

{{ if or (eq .DEBIAN_VERSION "8") (eq .DEBIAN_VERSION "9") (eq .DEBIAN_VERSION "10") }}
{{ if ne .DEBIAN_VERSION "7" }}
# librpm-dev
RUN apt install -y --no-install-recommends --allow-unauthenticated\
librpm-dev \
Expand All @@ -32,7 +32,7 @@ RUN apt install -y --no-install-recommends --allow-unauthenticated\
libsystemd-dev
{{ end }}

{{ if or (eq .DEBIAN_VERSION "9") (eq .DEBIAN_VERSION "10") }}
{{ if or (eq .DEBIAN_VERSION "9") (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11") }}
# msitools
RUN apt install -y --no-install-recommends --allow-unauthenticated\
msitools
Expand Down
2 changes: 1 addition & 1 deletion go/mips/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RUN apt install -y \
# libsystemd-dev:mips64el libsystemd0:mips64el liblz4-1:mips64el
{{ end }}

{{if eq .DEBIAN_VERSION "10"}}
{{if or (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11")}}
# librpm-dev
RUN apt install -y \
librpm-dev:mips64el
Expand Down
2 changes: 1 addition & 1 deletion go/mips32/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN apt install -y \
# libsystemd-dev:mips libsystemd0:mips liblz4-1:mips
{{ end }}

{{if eq .DEBIAN_VERSION "10"}}
{{if or (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11")}}
# librpm-dev
RUN apt install -y \
librpm-dev:mips
Expand Down
2 changes: 1 addition & 1 deletion go/ppc/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN apt install -qq -y \
# libsystemd-dev:ppc64el libsystemd0:ppc64el liblz4-1:ppc64el
{{ end }}

{{if eq .DEBIAN_VERSION "10"}}
{{if or (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11")}}
# librpm-dev
RUN apt install -y \
librpm-dev:ppc64el
Expand Down
2 changes: 1 addition & 1 deletion go/s390x/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN apt install -qq -y \
# libsystemd-dev:s390x libsystemd0:s390x liblz4-1:s390x
{{ end }}

{{if eq .DEBIAN_VERSION "10"}}
{{if or (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11")}}
# librpm-dev
RUN apt install -y \
librpm-dev:s390x
Expand Down

0 comments on commit 5bef77e

Please sign in to comment.