From 5e02feda4b229cee0c1d482bf868ce47d186f503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Wed, 15 May 2024 16:13:21 +0200 Subject: [PATCH 1/7] Support in-place upgrades of PostgreSQL major versions Revert to version 2.10.3 to support upgrades from PostgreSQL 12 --- sources | 2 +- timescaledb-upgrade.env | 1 + timescaledb.spec | 55 +++++++++++++++++++++++++++++++++++------ 3 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 timescaledb-upgrade.env diff --git a/sources b/sources index 4ddb006..7cf38da 100755 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (2.14.2.tar.gz) = 5a7ab4df5d89b83d423be5d6770098ab0303b22e29166afd3ab91ac2199571df20e33ec9f40bfa90ddf44829571fe696f311d81d27b46d569f2d75e75970e4f9 +SHA512 (2.10.3.tar.gz) = c94227d9aa1df36634bbf2626f580165860cab543efbfeb448f9799cf70ef6c1891af0077c2280ae22dbfb2360cf2b6012e7f05c26b0cf7aef6eb217c583b444 diff --git a/timescaledb-upgrade.env b/timescaledb-upgrade.env new file mode 100644 index 0000000..b2bcc3a --- /dev/null +++ b/timescaledb-upgrade.env @@ -0,0 +1 @@ +export PGSETUP_PGUPGRADE_OPTIONS="${PGSETUP_PGUPGRADE_OPTIONS} -O '-c shared_preload_libraries=timescaledb'" diff --git a/timescaledb.spec b/timescaledb.spec index f411ae2..c512d01 100644 --- a/timescaledb.spec +++ b/timescaledb.spec @@ -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 - 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 - 2.14.2-1 - Rebase to the latest upstream version (rhbz#2265335) From 76902de009f6edfd1c9c3007deb923621fea9f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sloup?= Date: Tue, 11 Jun 2024 00:52:33 +0200 Subject: [PATCH 2/7] Rebase to the latest upstream version (rhbz#2283808) --- .gitignore | 1 + sources | 2 +- timescaledb.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8d2a1e5..23acc54 100755 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ /2.14.0.tar.gz /2.14.1.tar.gz /2.14.2.tar.gz +/2.15.2.tar.gz diff --git a/sources b/sources index 4ddb006..36db459 100755 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (2.14.2.tar.gz) = 5a7ab4df5d89b83d423be5d6770098ab0303b22e29166afd3ab91ac2199571df20e33ec9f40bfa90ddf44829571fe696f311d81d27b46d569f2d75e75970e4f9 +SHA512 (2.15.2.tar.gz) = 956f828a282638945037a5c7a8eaf39a1698de5e40ab89b8a60af5a4e5585fdf17eeeafc34e90f03df4a13bbe95466245babb09845a2020f65c77183fccce78e diff --git a/timescaledb.spec b/timescaledb.spec index f411ae2..0de9086 100644 --- a/timescaledb.spec +++ b/timescaledb.spec @@ -1,7 +1,7 @@ %global core_name timescale Name: %{core_name}db -Version: 2.14.2 +Version: 2.15.2 Release: 1%{?dist} Summary: Open-source time-series database powered by PostgreSQL @@ -49,6 +49,9 @@ rm -rf tsl %changelog +* Mon Jun 10 2024 Ondrej Sloup - 2.15.2-1 +- Rebase to the latest upstream version (rhbz#2283808) + * Wed Feb 28 2024 Ondrej Sloup - 2.14.2-1 - Rebase to the latest upstream version (rhbz#2265335) From 7fc41d35c2912a69ed6ec10e3f1e9e00a7bf2cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sloup?= Date: Wed, 10 Jul 2024 11:20:17 +0200 Subject: [PATCH 3/7] Rebase to the latest upstream version (rhbz#2295739) --- .gitignore | 1 + sources | 2 +- timescaledb.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 23acc54..e7ff065 100755 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ /2.14.1.tar.gz /2.14.2.tar.gz /2.15.2.tar.gz +/2.15.3.tar.gz diff --git a/sources b/sources index 36db459..65812f4 100755 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (2.15.2.tar.gz) = 956f828a282638945037a5c7a8eaf39a1698de5e40ab89b8a60af5a4e5585fdf17eeeafc34e90f03df4a13bbe95466245babb09845a2020f65c77183fccce78e +SHA512 (2.15.3.tar.gz) = c259bea088a03286a392812b23eda05ba7e5c714f9b52cd25b39ea9a280c5147e43d13a71027c43a5029df03e021a0022feb1ae311baae577ec3c56f1d7dfcae diff --git a/timescaledb.spec b/timescaledb.spec index 0de9086..8d61d40 100644 --- a/timescaledb.spec +++ b/timescaledb.spec @@ -1,7 +1,7 @@ %global core_name timescale Name: %{core_name}db -Version: 2.15.2 +Version: 2.15.3 Release: 1%{?dist} Summary: Open-source time-series database powered by PostgreSQL @@ -49,6 +49,9 @@ rm -rf tsl %changelog +* Wed Jul 10 2024 Ondrej Sloup - 2.15.3-1 +- Rebase to the latest upstream version (rhbz#2295739) + * Mon Jun 10 2024 Ondrej Sloup - 2.15.2-1 - Rebase to the latest upstream version (rhbz#2283808) From 0c4f9555849fe1a20e65b2609c5d081fa9ab5171 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 07:27:46 +0000 Subject: [PATCH 4/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- timescaledb.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/timescaledb.spec b/timescaledb.spec index 8d61d40..f49f027 100644 --- a/timescaledb.spec +++ b/timescaledb.spec @@ -2,7 +2,7 @@ Name: %{core_name}db Version: 2.15.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open-source time-series database powered by PostgreSQL License: Apache-2.0 @@ -49,6 +49,9 @@ rm -rf tsl %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 2.15.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jul 10 2024 Ondrej Sloup - 2.15.3-1 - Rebase to the latest upstream version (rhbz#2295739) From 1c75a879caf79a4364f379c1877b1f1566c9a187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sloup?= Date: Sun, 4 Aug 2024 20:13:33 +0200 Subject: [PATCH 5/7] Rebase to the latest upstream version (rhbz#2302504) --- .gitignore | 1 + sources | 2 +- timescaledb.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e7ff065..2ab4fa1 100755 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ /2.14.2.tar.gz /2.15.2.tar.gz /2.15.3.tar.gz +/2.16.0.tar.gz diff --git a/sources b/sources index 65812f4..f6ec9b4 100755 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (2.15.3.tar.gz) = c259bea088a03286a392812b23eda05ba7e5c714f9b52cd25b39ea9a280c5147e43d13a71027c43a5029df03e021a0022feb1ae311baae577ec3c56f1d7dfcae +SHA512 (2.16.0.tar.gz) = 1476f0d3cbc5881911d5126799e28a5fda9c2e762ab8d0470e4c6d7dc715b099b2899b1f5dcb6d31c6cebf97a82007c1d18340e83fff8c9f72523574eb690732 diff --git a/timescaledb.spec b/timescaledb.spec index f49f027..f52d483 100644 --- a/timescaledb.spec +++ b/timescaledb.spec @@ -1,8 +1,8 @@ %global core_name timescale Name: %{core_name}db -Version: 2.15.3 -Release: 2%{?dist} +Version: 2.16.0 +Release: 1%{?dist} Summary: Open-source time-series database powered by PostgreSQL License: Apache-2.0 @@ -49,6 +49,9 @@ rm -rf tsl %changelog +* Sun Aug 04 2024 Ondrej Sloup - 2.16.0-1 +- Rebase to the latest upstream version (rhbz#2302504) + * Sat Jul 20 2024 Fedora Release Engineering - 2.15.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From d3d5b098d40b1664ff5f7d6764b97538141a4eb3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 12:49:54 +0000 Subject: [PATCH 6/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- timescaledb.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/timescaledb.spec b/timescaledb.spec index f52d483..0322e4d 100644 --- a/timescaledb.spec +++ b/timescaledb.spec @@ -2,7 +2,7 @@ Name: %{core_name}db Version: 2.16.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open-source time-series database powered by PostgreSQL License: Apache-2.0 @@ -49,6 +49,9 @@ rm -rf tsl %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 2.16.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sun Aug 04 2024 Ondrej Sloup - 2.16.0-1 - Rebase to the latest upstream version (rhbz#2302504) From 0c60b5aee81f5ec1c186b0fc938a7b385a9290cb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 19:18:46 +0000 Subject: [PATCH 7/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- timescaledb.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/timescaledb.spec b/timescaledb.spec index 0322e4d..2b45ac6 100644 --- a/timescaledb.spec +++ b/timescaledb.spec @@ -2,7 +2,7 @@ Name: %{core_name}db Version: 2.16.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open-source time-series database powered by PostgreSQL License: Apache-2.0 @@ -49,6 +49,9 @@ rm -rf tsl %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.16.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sun Jan 19 2025 Fedora Release Engineering - 2.16.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild