Merge pull request #145 from adivinho/DISTPG-349-pg_stat_monitor-Remove-dependency-on-Percona-PostgreSQL
DISTPG-349 remove dependency on Percona PostgreSQLpull/162/head
commit
9a35b5d1c0
20
Makefile
20
Makefile
|
@ -23,19 +23,39 @@ PG_VERSION := $(shell pg_config --version | awk {'print $$1 $$2'})
|
|||
MAJOR := $(shell echo $(PG_VERSION) | sed -e 's/\.[^./]*$$//')
|
||||
|
||||
ifneq (,$(findstring PostgreSQL14,$(MAJOR)))
|
||||
ifneq (,$(wildcard ../pg_stat_monitor--1.0.14.sql.in))
|
||||
CP := $(shell cp ../pg_stat_monitor--1.0.14.sql.in ../pg_stat_monitor--1.0.sql)
|
||||
endif
|
||||
ifneq (,$(wildcard pg_stat_monitor--1.0.14.sql.in))
|
||||
CP := $(shell cp pg_stat_monitor--1.0.14.sql.in pg_stat_monitor--1.0.sql)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring PostgreSQL13,$(MAJOR)))
|
||||
ifneq (,$(wildcard ../pg_stat_monitor--1.0.13.sql.in))
|
||||
CP := $(shell cp ../pg_stat_monitor--1.0.13.sql.in ../pg_stat_monitor--1.0.sql)
|
||||
endif
|
||||
ifneq (,$(wildcard pg_stat_monitor--1.0.13.sql.in))
|
||||
CP := $(shell cp pg_stat_monitor--1.0.13.sql.in pg_stat_monitor--1.0.sql)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring PostgreSQL12,$(MAJOR)))
|
||||
ifneq (,$(wildcard ../pg_stat_monitor--1.0.sql.in))
|
||||
CP := $(shell cp ../pg_stat_monitor--1.0.sql.in ../pg_stat_monitor--1.0.sql)
|
||||
endif
|
||||
ifneq (,$(wildcard pg_stat_monitor--1.0.sql.in))
|
||||
CP := $(shell cp pg_stat_monitor--1.0.sql.in pg_stat_monitor--1.0.sql)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring PostgreSQL11,$(MAJOR)))
|
||||
ifneq (,$(wildcard ../pg_stat_monitor--1.0.sql.in))
|
||||
CP := $(shell cp ../pg_stat_monitor--1.0.sql.in ../pg_stat_monitor--1.0.sql)
|
||||
endif
|
||||
ifneq (,$(wildcard pg_stat_monitor--1.0.sql.in))
|
||||
CP := $(shell cp pg_stat_monitor--1.0.sql.in pg_stat_monitor--1.0.sql)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef USE_PGXS
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
Source: percona-pg-stat-monitor
|
||||
Section: database
|
||||
Priority: optional
|
||||
Maintainer: Percona Development Team <info@percona.com>
|
||||
Build-Depends:
|
||||
debhelper (>= 9),
|
||||
postgresql-server-dev-all (>= 153~),
|
||||
|
||||
Package: percona-pg-stat-monitor@@PG_REL@@
|
||||
Architecture: any
|
||||
Depends:
|
||||
postgresql-@@PG_REL@@,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
Description: enhancement query planning and execution statistics collector
|
||||
The pg_stat_monitor is a Query Performance Monitoring tool for PostgreSQL.
|
||||
It attempts to provide a more holistic picture by providing much-needed query
|
||||
performance insights in a single view.
|
||||
.
|
||||
pg_stat_monitor provides improved insights that allow database users to
|
||||
understand query origins, execution, planning statistics and details, query
|
||||
information, and metadata. This significantly improves observability, enabling
|
||||
users to debug and tune query performance. pg_stat_monitor is developed on the
|
||||
basis of pg_stat_statements as its more advanced replacement.
|
|
@ -4,12 +4,12 @@ Priority: optional
|
|||
Maintainer: Percona Development Team <info@percona.com>
|
||||
Build-Depends:
|
||||
debhelper (>= 9),
|
||||
percona-postgresql-server-dev-all (>= 153~),
|
||||
postgresql-server-dev-all (>= 153~) | percona-postgresql-server-dev-all (>= 153~),
|
||||
|
||||
Package: percona-pg-stat-monitor@@PG_REL@@
|
||||
Package: percona-pg-stat-monitorPGVERSION
|
||||
Architecture: any
|
||||
Depends:
|
||||
percona-postgresql-@@PG_REL@@ | postgresql-@@PG_REL@@,
|
||||
postgresql-PGVERSION,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
Description: The pg_stat_monitor is statistics collector tool
|
|
@ -0,0 +1,26 @@
|
|||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: pg_stat_monitor
|
||||
Source: https://github.com/percona/pg_stat_monitor
|
||||
|
||||
Files: *
|
||||
Copyright: Portions Copyright © 2018-2021, Percona LLC and/or its affiliates
|
||||
Portions Copyright © 1996-2021, The PostgreSQL Global Development Group
|
||||
Portions Copyright © 1994, The Regents of the University of California
|
||||
|
||||
License: PostgreSQL
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose, without fee, and without a written agreement
|
||||
is hereby granted, provided that the above copyright notice and this
|
||||
paragraph and the following two paragraphs appear in all copies.
|
||||
.
|
||||
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
|
||||
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
|
||||
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
|
||||
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
.
|
||||
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
||||
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
|
||||
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
@ -1,20 +0,0 @@
|
|||
Source: percona-pg-stat-monitor
|
||||
Section: database
|
||||
Priority: optional
|
||||
Maintainer: Percona Development Team <info@percona.com>
|
||||
Build-Depends:
|
||||
debhelper (>= 9),
|
||||
percona-postgresql-server-dev-all (>= 153~),
|
||||
|
||||
Package: percona-pg-stat-monitor@@PG_REL@@
|
||||
Architecture: any
|
||||
Depends:
|
||||
percona-postgresql-@@PG_REL@@ | postgresql-@@PG_REL@@,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
Description: The pg_stat_monitor is statistics collector tool
|
||||
based on PostgreSQL's contrib module "pg_stat_statements".
|
||||
.
|
||||
pg_stat_monitor is developed on the basis of pg_stat_statments
|
||||
as more advanced replacement for pg_stat_statment.
|
||||
It provides all the features of pg_stat_statment plus its own feature set.
|
|
@ -1,27 +0,0 @@
|
|||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: PostgreSQL
|
||||
Source: https://github.com/percona/pg_stat_monitor
|
||||
|
||||
pg_stat_monitor - Statistics collector for PostgreSQL.
|
||||
|
||||
Portions Copyright © 2018-2020, Percona LLC and/or its affiliates
|
||||
|
||||
Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
|
||||
|
||||
Portions Copyright (c) 1994, The Regents of the University of California
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose, without fee, and without a written agreement is
|
||||
hereby granted, provided that the above copyright notice and this paragraph and
|
||||
the following two paragraphs appear in all copies.
|
||||
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR DIRECT,
|
||||
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
|
||||
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE
|
||||
COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
|
||||
THE COPYRIGHT HOLDER HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
|
||||
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
@ -128,9 +128,6 @@ get_sources(){
|
|||
fi
|
||||
REVISION=$(git rev-parse --short HEAD)
|
||||
echo "REVISION=${REVISION}" >> ${WORKDIR}/pg-stat-monitor.properties
|
||||
rm -rf rpm debian
|
||||
cp -r percona-packaging/rpm ./
|
||||
cp -r percona-packaging/debian ./
|
||||
|
||||
EDITFILES="debian/control debian/control.in debian/rules rpm/pg-stat-monitor.spec"
|
||||
for file in $EDITFILES; do
|
||||
|
@ -193,9 +190,10 @@ install_deps() {
|
|||
percona-release enable ppg-12 release
|
||||
fi
|
||||
yum -y install git wget
|
||||
PKGLIST="percona-postgresql-common percona-postgresql${PG_RELEASE}-devel"
|
||||
PKGLIST+=" clang-devel git clang llvm-devel rpmdevtools vim wget"
|
||||
PKGLIST+=" perl binutils gcc gcc-c++"
|
||||
PKGLIST+=" percona-postgresql-common clang-devel llvm-devel percona-postgresql${PG_RELEASE}-devel git rpm-build rpmdevtools wget gcc make autoconf"
|
||||
PKGLIST+=" clang-devel llvm-devel git rpm-build rpmdevtools wget gcc make autoconf"
|
||||
if [[ "${RHEL}" -eq 8 ]]; then
|
||||
dnf -y module disable postgresql
|
||||
elif [[ "${RHEL}" -eq 7 ]]; then
|
||||
|
@ -225,6 +223,15 @@ install_deps() {
|
|||
elif [[ "${PG_RELEASE}" == "12" ]]; then
|
||||
percona-release enable ppg-12 release
|
||||
fi
|
||||
|
||||
|
||||
PKGLIST="percona-postgresql-${PG_RELEASE} percona-postgresql-common percona-postgresql-server-dev-all"
|
||||
|
||||
# ---- using a community version of postgresql
|
||||
#wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
||||
#echo "deb http://apt.postgresql.org/pub/repos/apt/ ${PG_RELEASE}"-pgdg main | sudo tee /etc/apt/sources.list.d/pgdg.list
|
||||
#PKGLIST="postgresql-${PG_RELEASE} postgresql-common postgresql-server-dev-all"
|
||||
|
||||
apt-get update
|
||||
|
||||
if [[ "${OS_NAME}" != "focal" ]]; then
|
||||
|
@ -237,8 +244,9 @@ install_deps() {
|
|||
fi
|
||||
fi
|
||||
|
||||
PKGLIST+=" percona-postgresql-${PG_RELEASE} debconf debhelper clang-7 devscripts dh-exec dh-systemd git wget libkrb5-dev libssl-dev percona-postgresql-common percona-postgresql-server-dev-all"
|
||||
PKGLIST+=" build-essential debconf debhelper devscripts dh-exec dh-systemd git wget libxml-checker-perl libxml-libxml-perl libio-socket-ssl-perl libperl-dev libssl-dev libxml2-dev txt2man zlib1g-dev libpq-dev"
|
||||
PKGLIST+=" debconf debhelper clang-7 devscripts dh-exec dh-systemd git wget libkrb5-dev libssl-dev"
|
||||
PKGLIST+=" build-essential debconf debhelper devscripts dh-exec dh-systemd git wget libxml-checker-perl"
|
||||
PKGLIST+=" libxml-libxml-perl libio-socket-ssl-perl libperl-dev libssl-dev libxml2-dev txt2man zlib1g-dev libpq-dev"
|
||||
|
||||
until DEBIAN_FRONTEND=noninteractive apt-get -y install ${PKGLIST}; do
|
||||
sleep 1
|
||||
|
@ -402,6 +410,7 @@ build_source_deb(){
|
|||
cd ${BUILDDIR}
|
||||
|
||||
dch -D unstable --force-distribution -v "${VERSION}-${DEB_RELEASE}" "Update to new percona-pg-stat-monitor${PG_RELEASE} version ${VERSION}"
|
||||
pg_buildext updatecontrol
|
||||
dpkg-buildpackage -S
|
||||
cd ../
|
||||
mkdir -p $WORKDIR/source_deb
|
||||
|
@ -444,6 +453,7 @@ build_deb(){
|
|||
dpkg-source -x ${DSC}
|
||||
#
|
||||
cd percona-pg-stat-monitor-${VERSION}
|
||||
sed -i "s:\. :${WORKDIR}/percona-pg-stat-monitor-${VERSION} :g" debian/rules
|
||||
dch -m -D "${OS_NAME}" --force-distribution -v "1:${VERSION}-${DEB_RELEASE}.${OS_NAME}" 'Update distribution'
|
||||
unset $(locale|cut -d= -f1)
|
||||
dpkg-buildpackage -rfakeroot -us -uc -b
|
||||
|
|
Loading…
Reference in New Issue