Skip to content

Commit

Permalink
Add Ubuntu 24.04 (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
msakrejda committed May 20, 2024
1 parent 190c5e1 commit 2143491
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
6 changes: 3 additions & 3 deletions contrib/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ then
pkg=deb
distribution=ubuntu
version=$(grep VERSION_CODENAME /etc/os-release | cut -d= -f2)
if [ "$version" != jammy ] && [ "$version" != focal ];
if [ "$version" != noble ] && [ "$version" != jammy ] && [ "$version" != focal ];
then
if confirm "Unsupported Ubuntu version; try Ubuntu Jammy (22.04) package?";
if confirm "Unsupported Ubuntu version; try Ubuntu Noble (24.04) package?";
then
version=jammy
version=noble
else
fail "unrecognized Ubuntu version: ${version}"
fi
Expand Down
6 changes: 6 additions & 0 deletions packages/repo/sync_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ cp /root/deb.distributions /repo/ubuntu/jammy/conf/distributions
reprepro --basedir /repo/ubuntu/jammy includedeb stable /deb/systemd/$DEB_PACKAGE_X86_64
reprepro --basedir /repo/ubuntu/jammy includedeb stable /deb/systemd/$DEB_PACKAGE_ARM64

mkdir -p /repo/ubuntu/noble/conf
cp /root/deb.distributions /repo/ubuntu/noble/conf/distributions
reprepro --basedir /repo/ubuntu/noble includedeb stable /deb/systemd/$DEB_PACKAGE_X86_64
reprepro --basedir /repo/ubuntu/noble includedeb stable /deb/systemd/$DEB_PACKAGE_ARM64

mkdir -p /repo/debian/bullseye/conf
cp /root/deb.distributions /repo/debian/bullseye/conf/distributions
reprepro --basedir /repo/debian/bullseye includedeb stable /deb/systemd/$DEB_PACKAGE_X86_64
Expand All @@ -29,5 +34,6 @@ reprepro --basedir /repo/debian/bookworm includedeb stable /deb/systemd/$DEB_PAC
apt-key add /repo/pganalyze_signing_key.asc
gpgv --keyring /etc/apt/trusted.gpg /repo/ubuntu/focal/dists/stable/InRelease
gpgv --keyring /etc/apt/trusted.gpg /repo/ubuntu/jammy/dists/stable/InRelease
gpgv --keyring /etc/apt/trusted.gpg /repo/ubuntu/noble/dists/stable/InRelease
gpgv --keyring /etc/apt/trusted.gpg /repo/debian/bullseye/dists/stable/InRelease
gpgv --keyring /etc/apt/trusted.gpg /repo/debian/bookworm/dists/stable/InRelease
20 changes: 19 additions & 1 deletion packages/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ docker_test_and_clean = docker exec pga-collector-test /root/systemd_test.sh &&

# Note: The default list excludes rockylinux9 since there is an open issue with
# /sbin/init not being present, see https://github.com/rocky-linux/sig-cloud-instance-images/issues/39
DISTROS=centos7 rhel8 rockylinux8 rhel9 fedora36 fedora37 amazonlinux2 amazonlinux2023 ubuntu-focal ubuntu-jammy debian-bullseye debian-bookworm
DISTROS=centos7 rhel8 rockylinux8 rhel9 fedora36 fedora37 amazonlinux2 amazonlinux2023 ubuntu-focal ubuntu-jammy ubuntu-noble debian-bullseye debian-bookworm

.PHONY: all $(DISTROS)

Expand Down Expand Up @@ -172,6 +172,24 @@ ubuntu-jammy: $(DEB_PACKAGE_X86_64) $(DEB_PACKAGE_ARM64)
# $(call docker_test_and_clean)
rm Dockerfile.tmp

ubuntu-noble: $(DEB_PACKAGE_X86_64) $(DEB_PACKAGE_ARM64)
echo "FROM ubuntu:noble" > Dockerfile.tmp
echo "COPY . /root" >> Dockerfile.tmp
echo "RUN apt-get update" >> Dockerfile.tmp
echo "RUN apt-get install systemd-sysv -y" >> Dockerfile.tmp
echo "RUN rm /usr/sbin/policy-rc.d" >> Dockerfile.tmp
$(call docker_build_and_run,amd64)
$(call docker_exec,dpkg -i /root/$(DEB_PACKAGE_X86_64))
$(call docker_test_and_clean)
# Don't test ubuntu:noble on arm64 for now, since for unknown reasons we're seeing the following error
# in CI only, since GitHub Actions upgraded the Docker engine from 20.10.2 to 23.0.6:
# exec /bin/sh: exec format error
#
# $(call docker_build_and_run,arm64)
# $(call docker_exec,dpkg -i /root/$(DEB_PACKAGE_ARM64))
# $(call docker_test_and_clean)
rm Dockerfile.tmp

debian-bullseye: $(DEB_PACKAGE_X86_64) $(DEB_PACKAGE_ARM64)
echo "FROM debian:bullseye" > Dockerfile.tmp
echo "RUN apt-get update -qq && apt-get install -y -q systemd-sysv procps" >> Dockerfile.tmp
Expand Down

0 comments on commit 2143491

Please sign in to comment.