diff --git a/.gitignore b/.gitignore index 09fbf40..4e0b625 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -pg_top-3.6.2.tar.bz2 -/pg_top-3.7.0.tar.bz2 +*.tar.bz2 +*.tar.xz diff --git a/pg_top-3.6.2-fix-totals.patch b/pg_top-3.6.2-fix-totals.patch deleted file mode 100644 index 322b716..0000000 --- a/pg_top-3.6.2-fix-totals.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -Narup pg_top-3.6.2/pg.c pg_top-3.6.2.new/pg.c ---- pg_top-3.6.2/pg.c 2008-04-03 08:37:46.000000000 +0400 -+++ pg_top-3.6.2.new/pg.c 2009-09-26 00:48:37.000000000 +0400 -@@ -798,9 +798,9 @@ update_index_stats(struct index_node * n - long long idx_tup_read, long long idx_tup_fetch) - { - /* Add to the index totals */ -- node->total_idx_scan += idx_scan; -- node->total_idx_tup_read += idx_tup_read; -- node->total_idx_tup_fetch += idx_tup_fetch; -+ node->total_idx_scan = idx_scan; -+ node->total_idx_tup_read = idx_tup_read; -+ node->total_idx_tup_fetch = idx_tup_fetch; - - /* Calculate difference between previous and current values. */ - node->diff_idx_scan = idx_scan - node->old_idx_scan; -@@ -819,13 +819,13 @@ update_table_stats(struct table_node * n - long long n_tup_ins, long long n_tup_upd, long long n_tup_del) - { - /* Add to the table totals */ -- node->total_idx_scan += idx_scan; -- node->total_idx_tup_fetch += idx_tup_fetch; -- node->total_n_tup_del += n_tup_del; -- node->total_n_tup_ins += n_tup_ins; -- node->total_n_tup_upd += n_tup_upd; -- node->total_seq_scan += seq_scan; -- node->total_seq_tup_read += seq_tup_read; -+ node->total_idx_scan = idx_scan; -+ node->total_idx_tup_fetch = idx_tup_fetch; -+ node->total_n_tup_del = n_tup_del; -+ node->total_n_tup_ins = n_tup_ins; -+ node->total_n_tup_upd = n_tup_upd; -+ node->total_seq_scan = seq_scan; -+ node->total_seq_tup_read = seq_tup_read; - - /* Calculate difference between previous and current values. */ - node->diff_idx_scan = idx_scan - node->old_idx_scan; diff --git a/pg_top.spec b/pg_top.spec index 14a0af3..c13128b 100644 --- a/pg_top.spec +++ b/pg_top.spec @@ -1,21 +1,19 @@ Summary: 'top' for PostgreSQL process Name: pg_top -Version: 3.7.0 -Release: 18%{?dist} +Version: 4.0.0 +Release: 1%{?dist} License: BSD -Source0: http://pgfoundry.org/frs/download.php/3504/%{name}-%{version}.tar.bz2 -URL: http://pgfoundry.org/projects/ptop -BuildRequires: make -BuildRequires: elfutils-libelf-devel +Source0: https://pg_top.gitlab.io/source/pg_top-4.0.0.tar.xz +URL: https://pg_top.gitlab.io/ +BuildRequires: cmake BuildRequires: gcc BuildRequires: libpq-devel BuildRequires: readline-devel +BuildRequires: libbsd-devel Requires: postgresql-server -%if 0%{?fedora} >= 10 -BuildRequires: systemtap-sdt-devel -%endif - +%undefine _hardened_build +%global debug_package %{nil} %description pg_top is 'top' for PostgreSQL processes. See running queries, @@ -25,19 +23,24 @@ query plans, issued locks, and table and index statistics. %autosetup %build -%configure -make %{?_smp_mflags} CFLAGS="%{optflags}" +%cmake +%cmake_build %install -install -Dp -m 755 %{name} %{buildroot}%{_bindir}/%{name} -install -Dp -m 644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 +%cmake_install %files %{_mandir}/man1/%{name}* %{_bindir}/%{name} -%doc FAQ HISTORY LICENSE README TODO Y2K +%doc HISTORY.rst README.rst TODO Y2K +%license LICENSE %changelog +* Mon Mar 08 2021 Mikel Olasagasti Uranga - 4.0.0-1 +- Version update to 4.0.0 +- Change homepage +- Add BR on libbsd-devel + * Mon Feb 08 2021 Pavel Raiskup - 3.7.0-18 - rebuild for libpq ABI fix rhbz#1908268 diff --git a/sources b/sources index bc9cf0a..b019d1c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4d0c61a1aaa32f815d2e2452513fbfec pg_top-3.7.0.tar.bz2 +SHA512 (pg_top-4.0.0.tar.xz) = b7a016137495ceecdcf0ac0e95c73b7eca20b57264f7b63b0a38c3f31db742c704ed0094e07f6df051bce9bc26214f5a8f66ced1e923bb66e0c86fff1e2ffc19