Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e02feda4b |
3 changed files with 50 additions and 8 deletions
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (2.14.2.tar.gz) = 5a7ab4df5d89b83d423be5d6770098ab0303b22e29166afd3ab91ac2199571df20e33ec9f40bfa90ddf44829571fe696f311d81d27b46d569f2d75e75970e4f9
|
||||
SHA512 (2.10.3.tar.gz) = c94227d9aa1df36634bbf2626f580165860cab543efbfeb448f9799cf70ef6c1891af0077c2280ae22dbfb2360cf2b6012e7f05c26b0cf7aef6eb217c583b444
|
||||
|
|
|
|||
1
timescaledb-upgrade.env
Normal file
1
timescaledb-upgrade.env
Normal file
|
|
@ -0,0 +1 @@
|
|||
export PGSETUP_PGUPGRADE_OPTIONS="${PGSETUP_PGUPGRADE_OPTIONS} -O '-c shared_preload_libraries=timescaledb'"
|
||||
|
|
@ -1,15 +1,21 @@
|
|||
%global core_name timescale
|
||||
%if 0%{?fedora} >= 30 || 0%{?epel} >= 8
|
||||
%global pg_config pg_server_config
|
||||
%else
|
||||
%global pg_config pg_config
|
||||
%endif
|
||||
|
||||
Name: %{core_name}db
|
||||
Version: 2.14.2
|
||||
Version: 2.10.3
|
||||
Release: 1%{?dist}
|
||||
Summary: Open-source time-series database powered by PostgreSQL
|
||||
|
||||
License: Apache-2.0
|
||||
URL: http://www.%{core_name}.com
|
||||
Source0: https://github.com/%{core_name}/%{name}/archive/refs/tags/%{version}.tar.gz
|
||||
Source1: timescaledb-upgrade.env
|
||||
|
||||
BuildRequires: cmake gcc openssl-devel postgresql-server-devel
|
||||
BuildRequires: cmake gcc openssl-devel postgresql-server-devel postgresql-upgrade-devel
|
||||
|
||||
Requires(pre): postgresql-server
|
||||
|
||||
|
|
@ -20,6 +26,23 @@ partitioning across time and space (partitioning key), as well as full SQL
|
|||
support.
|
||||
|
||||
|
||||
%package upgrade
|
||||
Summary: Support for upgrading from a previous major release of PostgreSQL
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description upgrade
|
||||
This package contains the files needed for upgrading a PostgreSQL database from
|
||||
the previous major version of PostgreSQL.
|
||||
|
||||
Note that since pg_upgrade starts the updated server with a default config file,
|
||||
you need to set:
|
||||
PGSETUP_PGUPGRADE_OPTIONS="-O '-c shared_preload_libraries=timescaledb'"
|
||||
before running postgresql-setup --upgrade.
|
||||
This package sets it for you at login time, but if you don't want to login again
|
||||
you can run:
|
||||
source %{_sysconfdir}/profile.d/%{name}-upgrade.sh
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}
|
||||
# Remove tsl directory containing sources licensed under Timescale license
|
||||
|
|
@ -27,16 +50,21 @@ rm -rf tsl
|
|||
|
||||
|
||||
%build
|
||||
%if 0%{?fedora} >= 30 || 0%{?epel} >= 8
|
||||
%cmake -DPROJECT_INSTALL_METHOD=fedora -DREGRESS_CHECKS=OFF -DAPACHE_ONLY=1 -DPG_CONFIG=%_bindir/pg_server_config
|
||||
%else
|
||||
%cmake -DPROJECT_INSTALL_METHOD=fedora -DREGRESS_CHECKS=OFF -DAPACHE_ONLY=1 -DPG_CONFIG=%_bindir/pg_config
|
||||
%endif
|
||||
%cmake -DPROJECT_INSTALL_METHOD=fedora -DREGRESS_CHECKS=OFF -DAPACHE_ONLY=1 -DPG_CONFIG=%_bindir/%pg_config
|
||||
%cmake_build
|
||||
|
||||
# Build for the previous PG verison for in-place upgrades
|
||||
pg_config=$(ls /usr/lib64/pgsql/postgresql-*/bin/pg_config)
|
||||
%cmake -DPROJECT_INSTALL_METHOD=fedora -DREGRESS_CHECKS=OFF -DAPACHE_ONLY=1 \
|
||||
-B %{__cmake_builddir}-prev \
|
||||
-DPG_CONFIG=${pg_config}
|
||||
%{__cmake} --build %{__cmake_builddir}-prev %{?_smp_mflags} --verbose
|
||||
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
DESTDIR="%{buildroot}" %{__cmake} --install %{__cmake_builddir}-prev
|
||||
install -p -m 644 -D %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/%{name}-upgrade.sh
|
||||
|
||||
|
||||
%files
|
||||
|
|
@ -47,8 +75,21 @@ rm -rf tsl
|
|||
%{_datadir}/pgsql/extension/%{name}--*%{version}.sql
|
||||
%{_datadir}/pgsql/extension/%{name}.control
|
||||
|
||||
%files upgrade
|
||||
%license LICENSE-APACHE
|
||||
%doc README.md
|
||||
%{_libdir}/pgsql/postgresql-*/lib/%{name}-%{version}.so
|
||||
%{_libdir}/pgsql/postgresql-*/lib/%{name}.so
|
||||
%{_libdir}/pgsql/postgresql-*/share/extension/%{name}--*%{version}.sql
|
||||
%{_libdir}/pgsql/postgresql-*/share/extension/%{name}.control
|
||||
%{_sysconfdir}/profile.d/%{name}-upgrade.sh
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue May 14 2024 Aurelien Bompard <abompard@fedoraproject.org> - 2.10.3-1
|
||||
- Support in-place upgrades of PostgreSQL major versions
|
||||
- Revert to version 2.10.3 to support upgrades from PostgreSQL 12
|
||||
|
||||
* Wed Feb 28 2024 Ondrej Sloup <osloup@redhat.com> - 2.14.2-1
|
||||
- Rebase to the latest upstream version (rhbz#2265335)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue