Skip to content

Commit

Permalink
Merge pull request #93 from Yelp/u/mpiano/IDR-303
Browse files Browse the repository at this point in the history
  • Loading branch information
piax93 authored Jun 26, 2024
2 parents 5cb4238 + ca7ae12 commit 174b113
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG OS_RELEASE=bionic
ARG OS_RELEASE=jammy
FROM pidtree-docker-base-bcc-${OS_RELEASE}

# Build python environment
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ARG BASE_IMAGE=ubuntu:bionic
ARG BASE_IMAGE=ubuntu:jammy
FROM ${BASE_IMAGE}
2 changes: 1 addition & 1 deletion Dockerfile.bcc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG OS_RELEASE=bionic
ARG OS_RELEASE=jammy
FROM pidtree-docker-base-${OS_RELEASE} as builder
ARG BCC_TOOLS_SOURCE=source
ARG BCC_VERSION=0.19.0
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ FIFO = $(CURDIR)/pidtree-bcc.fifo
EXTRA_DOCKER_ARGS ?=
DOCKER_ARGS = $(EXTRA_DOCKER_ARGS) -v /etc/passwd:/etc/passwd:ro --privileged --cap-add sys_admin --pid host
DOCKER_BASE_IMAGE_TMPL ?= ubuntu:OS_RELEASE_PH
HOST_OS_RELEASE = $(or $(shell cat /etc/lsb-release 2>/dev/null | grep -Po '(?<=CODENAME=)(.+)'), bionic)
SUPPORTED_UBUNTU_RELEASES = bionic focal jammy
UPSTREAM_BCC_RELEASES = jammy
HOST_OS_RELEASE = $(or $(shell cat /etc/lsb-release 2>/dev/null | grep -Po '(?<=CODENAME=)(.+)'), jammy)
SUPPORTED_UBUNTU_RELEASES = bionic focal jammy noble
UPSTREAM_BCC_RELEASES = jammy noble
VERSION_FILE = $(PWD)/pidtree_bcc/__init__.py
EDITOR ?= vi

Expand Down
4 changes: 2 additions & 2 deletions itest/itest_autoreload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ touch $TOPLEVEL/$OUTPUT_NAME
if [ -f /etc/lsb-release ]; then
source /etc/lsb-release
else
echo "WARNING: Could not source /etc/lsb-release, tentatively creating bionic docker image"
DISTRIB_CODENAME=bionic
echo "WARNING: Could not source /etc/lsb-release, tentatively creating jammy docker image"
DISTRIB_CODENAME=jammy
fi
docker build -t pidtree-itest-base --build-arg OS_RELEASE=$DISTRIB_CODENAME .
docker build -t pidtree-itest itest
Expand Down
6 changes: 3 additions & 3 deletions itest/itest_generic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ function main {
if [ -f /etc/lsb-release ]; then
source /etc/lsb-release
else
echo "WARNING: Could not source /etc/lsb-release, tentatively creating bionic docker image"
DISTRIB_CODENAME=bionic
echo "WARNING: Could not source /etc/lsb-release, tentatively creating jammy docker image"
DISTRIB_CODENAME=jammy
fi
docker build -t pidtree-itest-base --build-arg OS_RELEASE=$DISTRIB_CODENAME .
# Run the setup.sh install steps in the image so we don't hit timeouts
Expand Down Expand Up @@ -125,7 +125,7 @@ function main {
-v $TOPLEVEL/itest/dist/$1/:/work/dist \
pidtree-itest-$1 /work/entrypoint_deb_package.sh run -c /work/config.yml -f /work/outfile
else
echo "ERROR: '$@' is not a supported argument (see 'itest/itest.sh' for options)" >&2
echo "ERROR: '$@' is not a supported argument (see 'itest/itest_generic.sh' for options)" >&2
exit 1
fi
echo "Sleeping $SPIN_UP_TIME seconds for pidtree-bcc to start"
Expand Down
4 changes: 2 additions & 2 deletions itest/itest_sourceipmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ mkfifo $TOPLEVEL/$FIFONAME
if [ -f /etc/lsb-release ]; then
source /etc/lsb-release
else
echo "WARNING: Could not source /etc/lsb-release, tentatively creating bionic docker image"
DISTRIB_CODENAME=bionic
echo "WARNING: Could not source /etc/lsb-release, tentatively creating jammy docker image"
DISTRIB_CODENAME=jammy
fi
docker build -t pidtree-itest-base --build-arg OS_RELEASE=$DISTRIB_CODENAME .
docker build -t pidtree-itest itest
Expand Down
9 changes: 8 additions & 1 deletion packaging/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ else
python_bcc = python3-bcc
endif

ifeq ($(shell (. /etc/lsb-release && dpkg --compare-versions $$DISTRIB_RELEASE "le" "18.04" && echo yes || echo no)),yes)
# bionic does not support newer pip/setuptools
requirements_bootstrap = -rrequirements-bootstrap-bionic.txt
else
requirements_bootstrap = -rrequirements-bootstrap.txt
endif

# for some $reason this prevents virtualenv to spit a bunch of errors
export VIRTUALENV_NO_PERIODIC_UPDATE = true

Expand All @@ -20,4 +27,4 @@ override_dh_gencontrol:
dh_gencontrol -- -VpythonBCC:Depends="$(python_bcc)"

override_dh_virtualenv:
dh_virtualenv --python python3 --use-system-packages --no-test --preinstall=-rrequirements-bootstrap.txt
dh_virtualenv --python python3 --use-system-packages --no-test --preinstall=$(requirements_bootstrap)
3 changes: 3 additions & 0 deletions requirements-bootstrap-bionic.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pip==21.3.1
setuptools==49.2.1
wheel==0.37.0
6 changes: 3 additions & 3 deletions requirements-bootstrap.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pip==21.3.1
setuptools==49.2.1
wheel==0.37.0
pip==24.1
setuptools==70.1.1
wheel==0.43.0

0 comments on commit 174b113

Please sign in to comment.