2016-05-04 04:32:15 +02:00
|
|
|
#
|
|
|
|
# spec file for package pgbackrest
|
|
|
|
#
|
2023-02-07 09:01:23 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2022-07-03 15:42:42 +02:00
|
|
|
# Copyright (c) 2019-2022 Ioda-Net Sàrl, Charmoille, Switzerland.
|
2016-05-04 04:32:15 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-10-29 08:01:08 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-05-04 04:32:15 +02:00
|
|
|
#
|
|
|
|
|
2022-04-18 15:50:21 +02:00
|
|
|
|
2022-02-18 18:58:46 +01:00
|
|
|
%define services pgbackrest.target pgbackrest-diff@.service pgbackrest-full@.service pgbackrest-incr@.service pgbackrest.service pgbackrest-diff@.timer pgbackrest-full@.timer pgbackrest-incr@.timer
|
2016-05-04 04:32:15 +02:00
|
|
|
Name: pgbackrest
|
2023-09-28 09:41:49 +02:00
|
|
|
Version: 2.48
|
2016-05-04 04:32:15 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Reliable PostgreSQL Backup & Restore
|
2018-03-10 21:11:23 +01:00
|
|
|
License: MIT
|
2016-05-04 04:32:15 +02:00
|
|
|
Group: Productivity/Databases/Tools
|
2023-06-01 08:49:10 +02:00
|
|
|
URL: https://www.pgbackrest.org
|
2022-07-03 15:42:42 +02:00
|
|
|
Source: https://github.com/%{name}/%{name}/archive/release/%{version}/%{name}-%{version}.tar.gz
|
2022-02-18 18:58:46 +01:00
|
|
|
Source1: pgbackrest.conf
|
|
|
|
Source10: pgbackrest-diff@.service
|
|
|
|
Source11: pgbackrest-diff@.timer
|
|
|
|
Source12: pgbackrest-full@.service
|
|
|
|
Source13: pgbackrest-full@.timer
|
|
|
|
Source14: pgbackrest-incr@.service
|
|
|
|
Source15: pgbackrest-incr@.timer
|
|
|
|
Source16: pgbackrest.service
|
|
|
|
Source17: pgbackrest.target
|
2022-03-08 09:30:45 +01:00
|
|
|
Source18: pgbackrest.tmpfiles.d
|
|
|
|
Source98: README.SUSE
|
|
|
|
Source99: series
|
2019-08-26 03:23:36 +02:00
|
|
|
Patch0: libpq-fe.h_localisation.patch
|
2022-03-08 09:30:45 +01:00
|
|
|
Patch1: use-run-pgbackrest.patch
|
2021-12-04 20:52:30 +01:00
|
|
|
BuildRequires: libyaml-devel
|
2018-02-05 18:37:50 +01:00
|
|
|
BuildRequires: openssl-devel
|
2019-12-04 17:52:04 +01:00
|
|
|
BuildRequires: pkgconfig
|
2020-05-30 16:10:16 +02:00
|
|
|
BuildRequires: pkgconfig(bzip2)
|
2023-06-01 08:49:10 +02:00
|
|
|
BuildRequires: pkgconfig(libpq)
|
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
# This is a bit awkward as we only need this for directory ownership
|
|
|
|
Requires(pre): postgresql-server
|
2022-02-18 18:58:46 +01:00
|
|
|
%if 0%{?suse_version} >= 1500
|
2020-05-01 18:28:44 +02:00
|
|
|
BuildRequires: pkgconfig(liblz4)
|
2022-02-18 18:58:46 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?is_opensuse} || 0%{?sle_version} >= 150100
|
2022-01-25 14:27:10 +01:00
|
|
|
BuildRequires: pkgconfig(libzstd)
|
2022-02-18 18:58:46 +01:00
|
|
|
%endif
|
2016-05-04 04:32:15 +02:00
|
|
|
|
|
|
|
%description
|
2019-02-21 09:59:16 +01:00
|
|
|
pgBackRest aims to be a simple, reliable backup and restore system for
|
|
|
|
PostgreSQL that can seamlessly scale up to the largest databases and
|
|
|
|
workloads.
|
2016-05-04 04:32:15 +02:00
|
|
|
|
2019-02-21 09:59:16 +01:00
|
|
|
The following features are available:
|
|
|
|
- Parallel backup & restore
|
|
|
|
- Local or remote operation
|
|
|
|
- Full, incremental, differential backups
|
|
|
|
- Backup rotation & archive expiration
|
|
|
|
- Backup integrity
|
|
|
|
- Page checksums
|
|
|
|
- Backup resume
|
|
|
|
- Streaming compression & checksums
|
|
|
|
- Delta restore
|
|
|
|
- Parallel, asynchronous WAL push & get
|
|
|
|
- Tablespace & link support
|
|
|
|
- Amazon S3 support
|
|
|
|
- Encryption
|
|
|
|
- Compatibility with PostgreSQL >= 8.3
|
2016-05-04 04:32:15 +02:00
|
|
|
|
|
|
|
%prep
|
2022-02-18 18:58:46 +01:00
|
|
|
%autosetup -p1 -n %{name}-release-%{version}
|
2016-05-04 04:32:15 +02:00
|
|
|
|
|
|
|
%build
|
2022-03-08 09:30:45 +01:00
|
|
|
cp %{SOURCE98} .
|
2018-03-10 21:11:23 +01:00
|
|
|
pushd src
|
2022-02-18 18:58:46 +01:00
|
|
|
%configure
|
|
|
|
# make_build doesn't work on sle12, as long we want to support that we can not use the macro here
|
2023-06-01 08:49:10 +02:00
|
|
|
%make_build
|
2018-03-10 21:11:23 +01:00
|
|
|
popd
|
|
|
|
|
2016-05-04 04:32:15 +02:00
|
|
|
%install
|
2022-02-18 18:58:46 +01:00
|
|
|
%make_install -C src
|
|
|
|
|
|
|
|
install -D -d -m 0700 \
|
|
|
|
%{buildroot}%{_localstatedir}/lib/%{name} \
|
|
|
|
%{buildroot}%{_localstatedir}/log/%{name} \
|
|
|
|
%{buildroot}%{_localstatedir}/spool/%{name}
|
|
|
|
|
|
|
|
install -D -d -m 0755 \
|
|
|
|
%{buildroot}%{_sysconfdir} \
|
|
|
|
%{buildroot}%{_unitdir}
|
|
|
|
|
|
|
|
install -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/%{name}.conf
|
|
|
|
install -m 0644 \
|
|
|
|
%{SOURCE10} \
|
|
|
|
%{SOURCE11} \
|
|
|
|
%{SOURCE12} \
|
|
|
|
%{SOURCE13} \
|
|
|
|
%{SOURCE14} \
|
|
|
|
%{SOURCE15} \
|
|
|
|
%{SOURCE16} \
|
|
|
|
%{SOURCE17} \
|
|
|
|
%{buildroot}%{_unitdir}
|
2018-02-05 18:37:50 +01:00
|
|
|
|
2022-03-08 09:30:45 +01:00
|
|
|
install -D -m 0644 \
|
|
|
|
%{SOURCE18} \
|
|
|
|
%{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|
|
|
|
2018-02-05 18:37:50 +01:00
|
|
|
%check
|
2018-07-14 18:30:33 +02:00
|
|
|
# Tests are only available with Vagrant
|
|
|
|
# We just test that the binary works.
|
2019-02-21 09:59:16 +01:00
|
|
|
%{buildroot}/%{_bindir}/%{name} version || exit 1
|
2018-02-05 18:37:50 +01:00
|
|
|
|
2022-02-18 18:58:46 +01:00
|
|
|
%pre
|
|
|
|
%service_add_pre %{services}
|
|
|
|
|
|
|
|
%post
|
2022-03-08 09:30:45 +01:00
|
|
|
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
|
2022-02-18 18:58:46 +01:00
|
|
|
%service_add_post %{services}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun %{services}
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun %{services}
|
|
|
|
|
2018-07-14 18:30:33 +02:00
|
|
|
%files
|
2022-03-08 09:30:45 +01:00
|
|
|
%doc README.md README.SUSE
|
2018-03-10 21:11:23 +01:00
|
|
|
%license LICENSE
|
2022-02-18 18:58:46 +01:00
|
|
|
%config(noreplace) %attr (640,root,postgres) %{_sysconfdir}/%{name}.conf
|
2018-02-05 18:37:50 +01:00
|
|
|
# We still can do that as postgres user is system fixed
|
2018-03-10 21:11:23 +01:00
|
|
|
%attr(-,postgres,postgres) %{_localstatedir}/log/%{name}
|
2018-02-05 18:37:50 +01:00
|
|
|
%attr(-,postgres,postgres) %{_localstatedir}/lib/%{name}
|
2018-03-10 21:11:23 +01:00
|
|
|
%attr(-,postgres,postgres) %{_localstatedir}/spool/%{name}
|
2022-03-08 09:30:45 +01:00
|
|
|
%ghost %dir %attr(750,postgres,postgres) /run/pgbackrest
|
2018-07-14 18:30:33 +02:00
|
|
|
%{_bindir}/%{name}
|
2022-02-18 18:58:46 +01:00
|
|
|
%{_unitdir}/pgbackrest-diff@.service
|
|
|
|
%{_unitdir}/pgbackrest-diff@.timer
|
|
|
|
%{_unitdir}/pgbackrest-full@.service
|
|
|
|
%{_unitdir}/pgbackrest-full@.timer
|
|
|
|
%{_unitdir}/pgbackrest-incr@.service
|
|
|
|
%{_unitdir}/pgbackrest-incr@.timer
|
|
|
|
%{_unitdir}/pgbackrest.service
|
|
|
|
%{_unitdir}/pgbackrest.target
|
2022-03-08 09:30:45 +01:00
|
|
|
%{_tmpfilesdir}/%{name}.conf
|
2018-02-05 18:37:50 +01:00
|
|
|
|
2022-03-08 09:30:45 +01:00
|
|
|
%changelog
|