Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 70ea011

Browse files
authored
Add support for RHEL 10 and some improvements (#173)
1 parent 02b2517 commit 70ea011

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

.github/workflows/Dockerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
ARG RHEL_VERSION
2-
FROM rockylinux:${RHEL_VERSION}
2+
FROM rockylinux/rockylinux:${RHEL_VERSION:-10}
33

44
ARG RHEL_VERSION
55
ARG PG_VERSION
66
ARG PG_BULKLOAD_VERSION
77

8-
ENV PATH /usr/pgsql-${PG_VERSION}/bin:$PATH
9-
ENV PGDATA /var/lib/pgsql/${PG_VERSION}/data
8+
ENV PATH=/usr/pgsql-${PG_VERSION}/bin:$PATH
9+
ENV PGDATA=/var/lib/pgsql/${PG_VERSION}/data
1010

1111

1212
################################################################################
@@ -16,8 +16,9 @@ ENV PGDATA /var/lib/pgsql/${PG_VERSION}/data
1616
################################################################################
1717

1818
# Install packages for build
19-
RUN dnf update -y
20-
RUN dnf install -y \
19+
RUN sed -i -e '/^mirrorlist=/s/^/#/' -e '/^#baseurl=/s/^#//' /etc/yum.repos.d/*.repo && \
20+
dnf update -y && \
21+
dnf install -y \
2122
clang gcc git krb5-devel libselinux-devel libzstd-devel lz4-devel make \
2223
openssl-devel pam-devel readline-devel rpmdevtools zlib-devel
2324

@@ -28,7 +29,9 @@ RUN if [ "${RHEL_VERSION}" = "8" ]; then \
2829
dnf install -y --enablerepo=crb perl-IPC-Run; \
2930
fi
3031
RUN dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-${RHEL_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm
31-
RUN dnf -qy module disable postgresql
32+
RUN if [ "${RHEL_VERSION}" = "8" ] || [ "${RHEL_VERSION}" = "9" ]; then \
33+
dnf -qy module disable postgresql; \
34+
fi
3235
RUN dnf install -y \
3336
postgresql${PG_VERSION}-server \
3437
postgresql${PG_VERSION}-devel \
@@ -56,7 +59,7 @@ RUN cd pg_bulkload && \
5659
--output=../rpmbuild/SOURCES/pg_bulkload-${PG_BULKLOAD_VERSION}.tar.gz
5760

5861
# Build RPMs
59-
RUN rpmbuild rpmbuild/SPECS/pg_bulkload-pg${PG_VERSION}.spec \
62+
RUN QA_RPATHS=0x0002 rpmbuild rpmbuild/SPECS/pg_bulkload-pg${PG_VERSION}.spec \
6063
-bb --define="dist .pg${PG_VERSION}.rhel${RHEL_VERSION}"
6164

6265

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ jobs:
1111
permissions:
1212
contents: write
1313
strategy:
14+
fail-fast: false
1415
matrix:
15-
RHEL_VERSION: ["8", "9"]
16+
RHEL_VERSION: ["8", "9", "10"]
1617
PG_VERSION: ["13", "14", "15", "16", "17"]
1718
steps:
1819
- name: Checkout repository

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
4848
- name: cache builded resources
4949
id: cache-postgresql-core
50-
uses: actions/cache@v2
50+
uses: actions/cache@v4
5151
with:
5252
path: "~/pgsql/${{ env.PGVERSION }}"
5353
key: ${{ env.PGVERSION }}-${{ env.CACHE_VERSION }}

0 commit comments

Comments
 (0)