Add Amazon Linux 2 support, prepare for PG18
* Add Amazon Linux 2 as a supported OS. * Dynamically select the package manager for Amazon and Oracle Linux. * Prepare for supporting PostgreSQL 18. Specifically, the Docker image seems to have moved the data directory, so get that dynamically.
This commit is contained in:
parent
17c15e7e48
commit
af5d9cf186
10
Makefile
10
Makefile
@ -42,6 +42,7 @@ SUPPORTED := ubuntu-20.04 \
|
|||||||
rockylinux-9 \
|
rockylinux-9 \
|
||||||
rockylinux-10 \
|
rockylinux-10 \
|
||||||
oraclelinux-7 \
|
oraclelinux-7 \
|
||||||
|
amazonlinux-2 \
|
||||||
amazonlinux-2023 \
|
amazonlinux-2023 \
|
||||||
gentoo
|
gentoo
|
||||||
|
|
||||||
@ -219,18 +220,21 @@ ubuntu-%-install-test:
|
|||||||
bash -c 'apt-get update && apt-get install -y /output/$(PACKAGE_NAME)-$(DEB_VERSION)-ubuntu-$*.deb'
|
bash -c 'apt-get update && apt-get install -y /output/$(PACKAGE_NAME)-$(DEB_VERSION)-ubuntu-$*.deb'
|
||||||
|
|
||||||
# Run an OracleLinux install test (this is for EL7 since CentOS7 images no longer exist)
|
# Run an OracleLinux install test (this is for EL7 since CentOS7 images no longer exist)
|
||||||
|
oraclelinux-%-install-test: MGR=$(intcmp $*, 7, yum, yum, dnf)
|
||||||
oraclelinux-%-install-test:
|
oraclelinux-%-install-test:
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v ./$(BUILD_DIR):/output \
|
-v ./$(BUILD_DIR):/output \
|
||||||
oraclelinux:7 \
|
oraclelinux:$* \
|
||||||
bash -c 'yum makecache && yum install -y /output/$(PACKAGE_NAME)-$(RPM_VERSION).el7.noarch.rpm'
|
bash -c '$(MGR) makecache && $(MGR) install -y /output/$(PACKAGE_NAME)-$(RPM_VERSION).el7.noarch.rpm'
|
||||||
|
|
||||||
# Run a Amazon Linux install test
|
# Run a Amazon Linux install test
|
||||||
|
# Note: AL2 is too old for dnf
|
||||||
|
amazonlinux-%-install-test: MGR=$(intcmp $*, 2, yum, yum, dnf)
|
||||||
amazonlinux-%-install-test:
|
amazonlinux-%-install-test:
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v ./$(BUILD_DIR):/output \
|
-v ./$(BUILD_DIR):/output \
|
||||||
amazonlinux:$* \
|
amazonlinux:$* \
|
||||||
bash -c 'dnf makecache && dnf install -y /output/$(PACKAGE_NAME)-$(RPM_VERSION).amzn$*.noarch.rpm'
|
bash -c '$(MGR) makecache && $(MGR) install -y /output/$(PACKAGE_NAME)-$(RPM_VERSION).amzn$*.noarch.rpm'
|
||||||
|
|
||||||
# Run a Gentoo install test
|
# Run a Gentoo install test
|
||||||
gentoo-install-test:
|
gentoo-install-test:
|
||||||
|
|||||||
@ -8,10 +8,11 @@ FROM ${DISTRO}:${RELEASE}
|
|||||||
ARG DISTRO
|
ARG DISTRO
|
||||||
ARG RELEASE
|
ARG RELEASE
|
||||||
|
|
||||||
RUN dnf install -y \
|
RUN if [ ${RELEASE} -le 2 ] ; then MGR=yum ; else MGR=dnf ; fi && \
|
||||||
|
${MGR} install -y \
|
||||||
rpm-build \
|
rpm-build \
|
||||||
make \
|
make \
|
||||||
&& dnf clean all
|
&& ${MGR} clean all
|
||||||
|
|
||||||
RUN echo -e "#!/bin/bash\nmake actually-package-${DISTRO}-${RELEASE}" > /init.sh \
|
RUN echo -e "#!/bin/bash\nmake actually-package-${DISTRO}-${RELEASE}" > /init.sh \
|
||||||
&& chmod 755 /init.sh
|
&& chmod 755 /init.sh
|
||||||
|
|||||||
@ -8,11 +8,12 @@ FROM ${DISTRO}:${RELEASE}
|
|||||||
ARG DISTRO
|
ARG DISTRO
|
||||||
ARG RELEASE
|
ARG RELEASE
|
||||||
|
|
||||||
RUN yum install -y \
|
RUN if [ ${RELEASE} -le 7 ] ; then MGR=yum ; else MGR=dnf ; fi && \
|
||||||
|
${MGR} install -y \
|
||||||
rpm-build \
|
rpm-build \
|
||||||
make \
|
make \
|
||||||
oracle-epel-release-el7 \
|
oracle-epel-release-el${RELEASE} \
|
||||||
&& yum clean all
|
&& ${MGR} clean all
|
||||||
|
|
||||||
RUN echo -e "#!/bin/bash\nmake actually-package-${DISTRO}-${RELEASE}" > /init.sh \
|
RUN echo -e "#!/bin/bash\nmake actually-package-${DISTRO}-${RELEASE}" > /init.sh \
|
||||||
&& chmod 755 /init.sh
|
&& chmod 755 /init.sh
|
||||||
|
|||||||
@ -20,7 +20,7 @@ services:
|
|||||||
POSTGRES_PASSWORD: secret
|
POSTGRES_PASSWORD: secret
|
||||||
healthcheck:
|
healthcheck:
|
||||||
#test: [ "CMD", "pg_isready", "-U", "postgres" ]
|
#test: [ "CMD", "pg_isready", "-U", "postgres" ]
|
||||||
test: [ "CMD-SHELL", "pg_controldata /var/lib/postgresql/data/ | grep -q 'in production'" ]
|
test: [ "CMD-SHELL", "pg_controldata $(psql -At -U postgres -c 'show data_directory') | grep -q 'in production'" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
retries: 40
|
retries: 40
|
||||||
|
|||||||
@ -24,6 +24,7 @@ images["14"]='14-bookworm'
|
|||||||
images["15"]='15-bookworm'
|
images["15"]='15-bookworm'
|
||||||
images["16"]='16-bookworm'
|
images["16"]='16-bookworm'
|
||||||
images["17"]='17-bookworm'
|
images["17"]='17-bookworm'
|
||||||
|
images["18"]='18-trixie'
|
||||||
|
|
||||||
declare -A results=()
|
declare -A results=()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user