Include postgresql-libs in our Yum repos.

This commit is contained in:
Dave Page 2020-06-02 11:30:07 +01:00
parent a1a232a1f1
commit 9e67a0b0e7
2 changed files with 20 additions and 10 deletions

View File

@ -11,6 +11,9 @@ OS_VERSION=$(cat /etc/os-release | grep "^VERSION_ID=" | awk -F "=" '{ print $2
OS_NAME=$(cat /etc/os-release | grep "^ID=" | awk -F "=" '{ print $2 }' | sed 's/"//g') OS_NAME=$(cat /etc/os-release | grep "^ID=" | awk -F "=" '{ print $2 }' | sed 's/"//g')
OS_ARCH=$(arch) OS_ARCH=$(arch)
# Make sure we get the right libpq
export PATH=/usr/pgsql-12/bin:$PATH
# Common Linux build functions # Common Linux build functions
source pkg/linux/build-functions.sh source pkg/linux/build-functions.sh
@ -49,8 +52,7 @@ Summary: The core server package for pgAdmin.
License: PostgreSQL License: PostgreSQL
URL: https://www.pgadmin.org/ URL: https://www.pgadmin.org/
Requires: python3, postgresql >= 9.5 Requires: python3, postgresql-libs >= 11
Conflicts: postgresql-libs <= 9.2
%description %description
The core server package for pgAdmin. pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world. The core server package for pgAdmin. pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
@ -201,6 +203,9 @@ if [ ${OS_VERSION} == 7 ]; then
rpmbuild -bb "${SOURCEDIR}/pkg/redhat/pgadmin4-python-mod_wsgi.spec" rpmbuild -bb "${SOURCEDIR}/pkg/redhat/pgadmin4-python-mod_wsgi.spec"
fi fi
# Get the libpq we need
yumdownloader --downloadonly --destdir=$DISTROOT postgresql12-libs
# #
# Get the results! # Get the results!
# #
@ -209,3 +214,5 @@ cp ${HOME}/rpmbuild/RPMS/noarch/${APP_NAME}-*${APP_LONG_VERSION}-*.noarch.rpm "$
if [ ${OS_VERSION} == 7 ]; then if [ ${OS_VERSION} == 7 ]; then
cp ${HOME}/rpmbuild/RPMS/${OS_ARCH}/pgadmin4-python3-mod_wsgi-4.7.1-2.el7.x86_64.rpm "${DISTROOT}/" cp ${HOME}/rpmbuild/RPMS/${OS_ARCH}/pgadmin4-python3-mod_wsgi-4.7.1-2.el7.x86_64.rpm "${DISTROOT}/"
fi fi
echo "Completed. RPMs created in $DESTDIR."

View File

@ -8,9 +8,18 @@ fi
OS_VERSION=$(cat /etc/os-release | grep "^VERSION_ID=" | awk -F "=" '{ print $2 }' | sed 's/"//g') OS_VERSION=$(cat /etc/os-release | grep "^VERSION_ID=" | awk -F "=" '{ print $2 }' | sed 's/"//g')
# EPEL & other repos # EPEL & other repos
yum -y install centos-release-scl
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${OS_VERSION}.noarch.rpm yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${OS_VERSION}.noarch.rpm
if [ ${OS_VERSION} == 8 ]; then if [ ${OS_VERSION} == 8 ]; then
yum config-manager --enable PowerTools AppStream BaseOS *epel yum config-manager --enable PowerTools AppStream BaseOS *epel
dnf -qy module disable postgresql
fi
# PostgreSQL repo
if [ ${OS_VERSION} == 7 ] || [ ${OS_VERSION} == 8 ]; then
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-${OS_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm
else
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/F-${OS_VERSION}-x86_64/pgdg-fedora-repo-latest.noarch.rpm
fi fi
# Node repo # Node repo
@ -26,10 +35,10 @@ echo "Installing build pre-requisites..."
yum groupinstall -y "Development Tools" yum groupinstall -y "Development Tools"
if [ ${OS_VERSION} == 7 ]; then if [ ${OS_VERSION} == 7 ]; then
yum install -y expect fakeroot httpd-devel qt5-qtbase-devel postgresql-devel python3-devel nodejs yarn rpm-build rpm-sign yum install -y expect fakeroot httpd-devel qt5-qtbase-devel postgresql12-devel python3-devel nodejs yarn rpm-build rpm-sign
pip3 install sphinx pip3 install sphinx
else else
yum install -y expect fakeroot qt5-qtbase-devel libpq-devel python3-devel python3-sphinx nodejs yarn rpm-build rpm-sign yum install -y expect fakeroot qt5-qtbase-devel postgresql12-devel python3-devel python3-sphinx nodejs yarn rpm-build rpm-sign
fi fi
# Setup RPM macros for signing # Setup RPM macros for signing
@ -45,9 +54,3 @@ cat << EOF
%__gpg_sign_cmd %{__gpg} gpg --force-v3-sigs --batch --verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u "%{_gpg_name}" -sbo %{__signature_filename} --digest-algo sha256 %{__plaintext_filename}' %__gpg_sign_cmd %{__gpg} gpg --force-v3-sigs --batch --verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u "%{_gpg_name}" -sbo %{__signature_filename} --digest-algo sha256 %{__plaintext_filename}'
EOF EOF
echo echo