mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-11-28 09:33:54 +02:00
a454bd7d63
* adding testing of packages for PG-14 * updating postgres versions * adding reprepro config and rpmmacros to git * fixing forgotten rhel repo signing and package testing * adding alt-8 package testing * removing debian-8, ubuntu-14.04 and ubuntu-16.04 packaging * s/PGPRO Standart/PGPRO Standard/g
186 lines
7.5 KiB
Makefile
186 lines
7.5 KiB
Makefile
ifeq ($(PBK_EDITION),std)
|
|
PBK_PKG_REPO = pg_probackup-forks
|
|
PBK_EDITION_FULL = Standard
|
|
PKG_NAME_SUFFIX = std-
|
|
else ifeq ($(PBK_EDITION),ent)
|
|
PBK_PKG_REPO = pg_probackup-forks
|
|
PBK_EDITION_FULL = Enterprise
|
|
PKG_NAME_SUFFIX = ent-
|
|
else
|
|
PBK_PKG_REPO = pg_probackup
|
|
PBK_EDITION_FULL =
|
|
PBK_EDITION =
|
|
PKG_NAME_SUFFIX =
|
|
endif
|
|
|
|
check_env:
|
|
@if [ -z ${PBK_VERSION} ] ; then \
|
|
echo "Env variable PBK_VERSION is not set" ; \
|
|
false ; \
|
|
fi
|
|
|
|
@if [ -z ${PBK_RELEASE} ] ; then \
|
|
echo "Env variable PBK_RELEASE is not set" ; \
|
|
false ; \
|
|
fi
|
|
|
|
@if [ -z ${PBK_HASH} ] ; then \
|
|
echo "Env variable PBK_HASH is not set" ; \
|
|
false ; \
|
|
fi
|
|
|
|
pkg: check_env build/prepare build/all
|
|
@echo Build for all platform: done
|
|
|
|
build/prepare:
|
|
mkdir -p build
|
|
|
|
build/clean: build/prepare
|
|
find $(BUILDDIR) -maxdepth 1 -type f -exec rm -f {} \;
|
|
|
|
build/all: build/debian build/ubuntu build/centos build/oraclelinux build/alt build/suse build/rhel
|
|
@echo Packaging is done
|
|
|
|
### DEBIAN
|
|
build/debian: build/debian_9 build/debian_10 build/debian_11
|
|
@echo Debian: done
|
|
|
|
build/debian_9: build/debian_9_9.6 build/debian_9_10 build/debian_9_11 build/debian_9_12 build/debian_9_13 build/debian_9_14
|
|
@echo Debian 9: done
|
|
|
|
build/debian_10: build/debian_10_9.6 build/debian_10_10 build/debian_10_11 build/debian_10_12 build/debian_10_13 build/debian_10_14
|
|
@echo Debian 10: done
|
|
|
|
build/debian_11: build/debian_11_9.6 build/debian_11_10 build/debian_11_11 build/debian_11_12 build/debian_11_13 build/debian_11_14
|
|
@echo Debian 11: done
|
|
|
|
### UBUNTU
|
|
build/ubuntu: build/ubuntu_18.04 build/ubuntu_20.04
|
|
@echo Ubuntu: done
|
|
|
|
build/ubuntu_18.04: build/ubuntu_18.04_9.6 build/ubuntu_18.04_10 build/ubuntu_18.04_11 build/ubuntu_18.04_12 build/ubuntu_18.04_13 build/ubuntu_18.04_14
|
|
@echo Ubuntu 18.04: done
|
|
|
|
build/ubuntu_20.04: build/ubuntu_20.04_9.6 build/ubuntu_20.04_10 build/ubuntu_20.04_11 build/ubuntu_20.04_12 build/ubuntu_20.04_13 build/ubuntu_20.04_14
|
|
@echo Ubuntu 20.04: done
|
|
|
|
define build_deb
|
|
docker rm -f $1_$2_probackup_$(PKG_NAME_SUFFIX)$(PBK_VERSION) >> /dev/null 2>&1 ; \
|
|
docker run \
|
|
-v $(WORKDIR)/packaging/pkg:/app/in \
|
|
-v $(WORKDIR)/build/data/$(PBK_PKG_REPO)/$1/$2/pg-probackup-$(PKG_NAME_SUFFIX)$4/$(PBK_VERSION):/app/out \
|
|
-e "DISTRIB=$1" -e "DISTRIB_VERSION=$2" -e "CODENAME=$3" -e "PG_VERSION=$4" -e "PG_FULL_VERSION=$5" \
|
|
-e "PKG_HASH=$(PBK_HASH)" -e "PKG_URL=$(PBK_GIT_REPO)" -e "PKG_RELEASE=$(PBK_RELEASE)" -e "PKG_NAME=pg-probackup-$(PKG_NAME_SUFFIX)$4" \
|
|
-e "PKG_VERSION=$(PBK_VERSION)" -e "PBK_EDITION=$(PBK_EDITION)" -e "PBK_EDITION_FULL=$(PBK_EDITION_FULL)" \
|
|
--name $1_$2_probackup_$(PKG_NAME_SUFFIX)$(PBK_VERSION)_pg_$5 \
|
|
--rm pgpro/$1:$2 /app/in/scripts/deb.sh
|
|
endef
|
|
|
|
include packaging/pkg/Makefile.debian
|
|
include packaging/pkg/Makefile.ubuntu
|
|
|
|
# CENTOS
|
|
build/centos: build/centos_7 build/centos_8 #build/rpm_repo_package_centos
|
|
@echo Centos: done
|
|
|
|
build/centos_7: build/centos_7_9.6 build/centos_7_10 build/centos_7_11 build/centos_7_12 build/centos_7_13 build/centos_7_14
|
|
@echo Centos 7: done
|
|
|
|
# pgpro-9.6@centos-8 doesn't exist
|
|
build/centos_8: build/centos_8_10 build/centos_8_11 build/centos_8_12 build/centos_8_13 build/centos_8_14 #build/centos_8_9.6
|
|
@echo Centos 8: done
|
|
|
|
# Oracle Linux
|
|
build/oraclelinux: build/oraclelinux_6 build/oraclelinux_7 build/oraclelinux_8 #build/rpm_repo_package_oraclelinux
|
|
@echo Oraclelinux: done
|
|
|
|
build/oraclelinux_6: build/oraclelinux_6_9.6 build/oraclelinux_6_10 build/oraclelinux_6_11 build/oraclelinux_6_12 build/oraclelinux_6_13 build/oraclelinux_6_14
|
|
@echo Oraclelinux 6: done
|
|
|
|
build/oraclelinux_7: build/oraclelinux_7_9.6 build/oraclelinux_7_10 build/oraclelinux_7_11 build/oraclelinux_7_12 build/oraclelinux_7_13 build/oraclelinux_7_14
|
|
@echo Oraclelinux 7: done
|
|
|
|
# pgpro-9.6@oraclelinux-8 doesn't exist
|
|
build/oraclelinux_8: build/oraclelinux_8_10 build/oraclelinux_8_11 build/oraclelinux_8_12 build/oraclelinux_8_13 build/oraclelinux_8_14 #build/oraclelinux_8_9.6
|
|
@echo Oraclelinux 8: done
|
|
|
|
# RHEL
|
|
build/rhel: build/rhel_7 build/rhel_8 #build/rpm_repo_package_rhel
|
|
@echo Rhel: done
|
|
|
|
build/rhel_7: build/rhel_7_9.6 build/rhel_7_10 build/rhel_7_11 build/rhel_7_12 build/rhel_7_13 build/rhel_7_14
|
|
@echo Rhel 7: done
|
|
|
|
build/rhel_8: build/rhel_8_9.6 build/rhel_8_10 build/rhel_8_11 build/rhel_8_12 build/rhel_8_13 build/rhel_8_14
|
|
@echo Rhel 8: done
|
|
|
|
|
|
define build_rpm
|
|
docker rm -f $1_$2_probackup_$(PKG_NAME_SUFFIX)$(PBK_VERSION) >> /dev/null 2>&1 ; \
|
|
docker run \
|
|
-v $(WORKDIR)/packaging/pkg:/app/in \
|
|
-v $(WORKDIR)/build/data/$(PBK_PKG_REPO)/$1/$2/pg_probackup-$(PKG_NAME_SUFFIX)$4/$(PBK_VERSION):/app/out \
|
|
-e "DISTRIB=$1" -e "DISTRIB_VERSION=$2" -e "CODENAME=$3" -e "PG_VERSION=$4" -e "PG_FULL_VERSION=$5" \
|
|
-e "PKG_HASH=$(PBK_HASH)" -e "PKG_URL=$(PBK_GIT_REPO)" -e "PKG_RELEASE=$(PBK_RELEASE)" -e "PKG_NAME=pg_probackup-$(PKG_NAME_SUFFIX)$4" \
|
|
-e "PKG_VERSION=$(PBK_VERSION)" -e "PBK_EDITION=$(PBK_EDITION)" -e "PBK_EDITION_FULL=$(PBK_EDITION_FULL)" \
|
|
--name $1_$2_probackup_$(PKG_NAME_SUFFIX)$(PBK_VERSION)_pg_$5 \
|
|
--rm pgpro/$1:$2 /app/in/scripts/rpm.sh
|
|
endef
|
|
|
|
include packaging/pkg/Makefile.centos
|
|
include packaging/pkg/Makefile.rhel
|
|
include packaging/pkg/Makefile.oraclelinux
|
|
|
|
|
|
# Alt Linux
|
|
build/alt: build/alt_7 build/alt_8 build/alt_9
|
|
@echo Alt Linux: done
|
|
|
|
build/alt_7: build/alt_7_9.6 build/alt_7_10 build/alt_7_11 build/alt_7_12 build/alt_7_13 build/alt_7_14
|
|
@echo Alt Linux 7: done
|
|
|
|
build/alt_8: build/alt_8_9.6 build/alt_8_10 build/alt_8_11 build/alt_8_12 build/alt_8_13 build/alt_8_14
|
|
@echo Alt Linux 8: done
|
|
|
|
build/alt_9: build/alt_9_9.6 build/alt_9_10 build/alt_9_11 build/alt_9_12 build/alt_9_13 build/alt_9_14
|
|
@echo Alt Linux 9: done
|
|
|
|
define build_alt
|
|
docker rm -f $1_$2_probackup_$(PKG_NAME_SUFFIX)$(PBK_VERSION) >> /dev/null 2>&1 ; \
|
|
docker run \
|
|
-v $(WORKDIR)/packaging/pkg:/app/in \
|
|
-v $(WORKDIR)/build/data/$(PBK_PKG_REPO)/$1/$2/pg_probackup-$(PKG_NAME_SUFFIX)$4/$(PBK_VERSION):/app/out \
|
|
-e "DISTRIB=$1" -e "DISTRIB_VERSION=$2" -e "CODENAME=$3" -e "PG_VERSION=$4" -e "PG_FULL_VERSION=$5" \
|
|
-e "PKG_HASH=$(PBK_HASH)" -e "PKG_URL=$(PBK_GIT_REPO)" -e "PKG_RELEASE=$(PBK_RELEASE)" -e "PKG_NAME=pg_probackup-$(PKG_NAME_SUFFIX)$4" \
|
|
-e "PKG_VERSION=$(PBK_VERSION)" -e "PBK_EDITION=$(PBK_EDITION)" -e "PBK_EDITION_FULL=$(PBK_EDITION_FULL)" \
|
|
--name $1_$2_probackup_$(PKG_NAME_SUFFIX)$(PBK_VERSION)_pg_$5 \
|
|
--rm pgpro/$1:$2 /app/in/scripts/alt.sh
|
|
endef
|
|
|
|
include packaging/pkg/Makefile.alt
|
|
|
|
# SUSE Linux
|
|
build/suse: build/suse_15.1 build/suse_15.2
|
|
@echo Suse: done
|
|
|
|
# there is no PG-14 in suse-15.1 repositories (test fails)
|
|
build/suse_15.1: build/suse_15.1_9.6 build/suse_15.1_10 build/suse_15.1_11 build/suse_15.1_12 build/suse_15.1_13
|
|
@echo Rhel 15.1: done
|
|
|
|
build/suse_15.2: build/suse_15.2_9.6 build/suse_15.2_10 build/suse_15.2_11 build/suse_15.2_12 build/suse_15.2_13 build/suse_15.2_14
|
|
@echo Rhel 15.1: done
|
|
|
|
define build_suse
|
|
docker rm -f $1_$2_probackup_$(PKG_NAME_SUFFIX)$(PBK_VERSION) >> /dev/null 2>&1 ; \
|
|
docker run \
|
|
-v $(WORKDIR)/packaging/pkg:/app/in \
|
|
-v $(WORKDIR)/build/data/$(PBK_PKG_REPO)/$1/$2/pg_probackup-$(PKG_NAME_SUFFIX)$4/$(PBK_VERSION):/app/out \
|
|
-e "DISTRIB=$1" -e "DISTRIB_VERSION=$2" -e "CODENAME=$3" -e "PG_VERSION=$4" -e "PG_FULL_VERSION=$5" \
|
|
-e "PKG_HASH=$(PBK_HASH)" -e "PKG_URL=$(PBK_GIT_REPO)" -e "PKG_RELEASE=$(PBK_RELEASE)" -e "PKG_NAME=pg_probackup-$(PKG_NAME_SUFFIX)$4" \
|
|
-e "PKG_VERSION=$(PBK_VERSION)" -e "PBK_EDITION=$(PBK_EDITION)" -e "PBK_EDITION_FULL=$(PBK_EDITION_FULL)" \
|
|
--name $1_$2_probackup_$(PKG_NAME_SUFFIX)$(PBK_VERSION)_pg_$5 \
|
|
--rm pgpro/$1:$2 /app/in/scripts/suse.sh
|
|
endef
|
|
|
|
include packaging/pkg/Makefile.suse
|