Files
pgbackrest/pgbackrest.spec

96 lines
3.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package pgbackrest
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: pgbackrest
Accepting request 572427 from home:bruno_friedmann:branches:server:database:postgresql - Upgrade to 1.28 bugfix version + Bug Fixes: - Fixed inability to restore a single database contained in a tablespace using --db-include. (Fixed by Cynthia Shang.) - Ensure latest db-id is selected on when matching archive.info to backup.info. This provides correct matching in the event there are system-id and db-version duplicates (e.g. after reverting a pg_upgrade). (Fixed by Cynthia Shang. Reported by Adam K. Sumner.) - Fixed overly chatty error message when reporting an invalid command. (Reported by Jason O'Donnell.) + Features: Add stanza-delete command to cleanup unused stanzas. (Contributed by Cynthia Shang. Suggested by Magnus Hagander.) + Improvements: Improve stanza-create command so that it does not error when the stanza already exists. (Contributed by Cynthia Shang.) - Packaging : + Fix wrong requirement of previous version, now use correct %perl_requires, add openssl-devel for crytpo on libc + Add pgbackrest-conf.patch : a minimal working configuration file + Build pgbackrest-libc allowing crypto and checksum + Added %check section + Rework install and file section (copy of pgdg packaging and use of correct %perl macros + Disable build on i586 pgBackRest need perl with 64bit integer support. see upstream issue https://github.com/pgbackrest/pgbackrest/issues/478 + use %_localstatedir/lib as %_sharedstatedir is broken on Leap OBS-URL: https://build.opensuse.org/request/show/572427 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/pgbackrest?expand=0&rev=9
2018-02-05 17:37:50 +00:00
Version: 1.28
Release: 0
License: MIT
Summary: Reliable PostgreSQL Backup & Restore
Url: http://www.pgbackrest.org/
Group: Productivity/Databases/Tools
Source: https://github.com/pgbackrest/pgbackrest/archive/release/%{version}.tar.gz
Accepting request 572427 from home:bruno_friedmann:branches:server:database:postgresql - Upgrade to 1.28 bugfix version + Bug Fixes: - Fixed inability to restore a single database contained in a tablespace using --db-include. (Fixed by Cynthia Shang.) - Ensure latest db-id is selected on when matching archive.info to backup.info. This provides correct matching in the event there are system-id and db-version duplicates (e.g. after reverting a pg_upgrade). (Fixed by Cynthia Shang. Reported by Adam K. Sumner.) - Fixed overly chatty error message when reporting an invalid command. (Reported by Jason O'Donnell.) + Features: Add stanza-delete command to cleanup unused stanzas. (Contributed by Cynthia Shang. Suggested by Magnus Hagander.) + Improvements: Improve stanza-create command so that it does not error when the stanza already exists. (Contributed by Cynthia Shang.) - Packaging : + Fix wrong requirement of previous version, now use correct %perl_requires, add openssl-devel for crytpo on libc + Add pgbackrest-conf.patch : a minimal working configuration file + Build pgbackrest-libc allowing crypto and checksum + Added %check section + Rework install and file section (copy of pgdg packaging and use of correct %perl macros + Disable build on i586 pgBackRest need perl with 64bit integer support. see upstream issue https://github.com/pgbackrest/pgbackrest/issues/478 + use %_localstatedir/lib as %_sharedstatedir is broken on Leap OBS-URL: https://build.opensuse.org/request/show/572427 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/pgbackrest?expand=0&rev=9
2018-02-05 17:37:50 +00:00
Source1: pgbackrest-conf.patch
Patch: pgbackrest-release-1.00_datadir.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Accepting request 572427 from home:bruno_friedmann:branches:server:database:postgresql - Upgrade to 1.28 bugfix version + Bug Fixes: - Fixed inability to restore a single database contained in a tablespace using --db-include. (Fixed by Cynthia Shang.) - Ensure latest db-id is selected on when matching archive.info to backup.info. This provides correct matching in the event there are system-id and db-version duplicates (e.g. after reverting a pg_upgrade). (Fixed by Cynthia Shang. Reported by Adam K. Sumner.) - Fixed overly chatty error message when reporting an invalid command. (Reported by Jason O'Donnell.) + Features: Add stanza-delete command to cleanup unused stanzas. (Contributed by Cynthia Shang. Suggested by Magnus Hagander.) + Improvements: Improve stanza-create command so that it does not error when the stanza already exists. (Contributed by Cynthia Shang.) - Packaging : + Fix wrong requirement of previous version, now use correct %perl_requires, add openssl-devel for crytpo on libc + Add pgbackrest-conf.patch : a minimal working configuration file + Build pgbackrest-libc allowing crypto and checksum + Added %check section + Rework install and file section (copy of pgdg packaging and use of correct %perl macros + Disable build on i586 pgBackRest need perl with 64bit integer support. see upstream issue https://github.com/pgbackrest/pgbackrest/issues/478 + use %_localstatedir/lib as %_sharedstatedir is broken on Leap OBS-URL: https://build.opensuse.org/request/show/572427 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/pgbackrest?expand=0&rev=9
2018-02-05 17:37:50 +00:00
%if %{_arch} == "i586"
ExclusiveArch: do_not_build
%endif
BuildRequires: openssl-devel
BuildRequires: perl(DBD::Pg)
BuildRequires: perl-libxml-perl
BuildRequires: perl(IO::Socket::SSL)
%{perl_requires}
Requires: perl(DBD::Pg)
Requires: perl-libxml-perl
Requires: perl(IO::Socket::SSL)
%description
pgBackRest aims to be a simple, reliable backup and restore system that can
seamlessly scale up to the largest databases and workloads.
Instead of relying on traditional backup tools like tar and rsync, pgBackRest
implements all backup features internally and uses a custom protocol for
communicating with remote systems. Removing reliance on tar and rsync allows
for better solutions to database-specific backup challenges. The custom remote
protocol allows for more flexibility and limits the types of connections that
are required to perform a backup which increases security.
%prep
%setup -q -n %{name}-release-%{version}
%patch -p1
%build
Accepting request 572427 from home:bruno_friedmann:branches:server:database:postgresql - Upgrade to 1.28 bugfix version + Bug Fixes: - Fixed inability to restore a single database contained in a tablespace using --db-include. (Fixed by Cynthia Shang.) - Ensure latest db-id is selected on when matching archive.info to backup.info. This provides correct matching in the event there are system-id and db-version duplicates (e.g. after reverting a pg_upgrade). (Fixed by Cynthia Shang. Reported by Adam K. Sumner.) - Fixed overly chatty error message when reporting an invalid command. (Reported by Jason O'Donnell.) + Features: Add stanza-delete command to cleanup unused stanzas. (Contributed by Cynthia Shang. Suggested by Magnus Hagander.) + Improvements: Improve stanza-create command so that it does not error when the stanza already exists. (Contributed by Cynthia Shang.) - Packaging : + Fix wrong requirement of previous version, now use correct %perl_requires, add openssl-devel for crytpo on libc + Add pgbackrest-conf.patch : a minimal working configuration file + Build pgbackrest-libc allowing crypto and checksum + Added %check section + Rework install and file section (copy of pgdg packaging and use of correct %perl macros + Disable build on i586 pgBackRest need perl with 64bit integer support. see upstream issue https://github.com/pgbackrest/pgbackrest/issues/478 + use %_localstatedir/lib as %_sharedstatedir is broken on Leap OBS-URL: https://build.opensuse.org/request/show/572427 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/pgbackrest?expand=0&rev=9
2018-02-05 17:37:50 +00:00
pushd libc
perl Makefile.PL
make V=1 %{?_smp_mflags}
popd
%install
Accepting request 572427 from home:bruno_friedmann:branches:server:database:postgresql - Upgrade to 1.28 bugfix version + Bug Fixes: - Fixed inability to restore a single database contained in a tablespace using --db-include. (Fixed by Cynthia Shang.) - Ensure latest db-id is selected on when matching archive.info to backup.info. This provides correct matching in the event there are system-id and db-version duplicates (e.g. after reverting a pg_upgrade). (Fixed by Cynthia Shang. Reported by Adam K. Sumner.) - Fixed overly chatty error message when reporting an invalid command. (Reported by Jason O'Donnell.) + Features: Add stanza-delete command to cleanup unused stanzas. (Contributed by Cynthia Shang. Suggested by Magnus Hagander.) + Improvements: Improve stanza-create command so that it does not error when the stanza already exists. (Contributed by Cynthia Shang.) - Packaging : + Fix wrong requirement of previous version, now use correct %perl_requires, add openssl-devel for crytpo on libc + Add pgbackrest-conf.patch : a minimal working configuration file + Build pgbackrest-libc allowing crypto and checksum + Added %check section + Rework install and file section (copy of pgdg packaging and use of correct %perl macros + Disable build on i586 pgBackRest need perl with 64bit integer support. see upstream issue https://github.com/pgbackrest/pgbackrest/issues/478 + use %_localstatedir/lib as %_sharedstatedir is broken on Leap OBS-URL: https://build.opensuse.org/request/show/572427 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/pgbackrest?expand=0&rev=9
2018-02-05 17:37:50 +00:00
%{__install} -D -d -m 0755 %{buildroot}%{perl_vendorlib} %{buildroot}%{_bindir}
%{__install} -D -d -m 0700 %{buildroot}/%{_localstatedir}/lib/%{name}
%{__install} -D -d -m 0700 %{buildroot}/var/log/%{name}
%{__install} -D -d -m 0700 %{buildroot}/var/spool/%{name}
%{__install} -D -d -m 0755 %{buildroot}%{_sysconfdir}
%{__install} %{SOURCE1} %{buildroot}/%{_sysconfdir}/%{name}.conf
%{__cp} -a lib/* %{buildroot}%{perl_vendorlib}/
%{__cp} -a bin/%{name} %{buildroot}%{_bindir}/%{name}
Accepting request 572427 from home:bruno_friedmann:branches:server:database:postgresql - Upgrade to 1.28 bugfix version + Bug Fixes: - Fixed inability to restore a single database contained in a tablespace using --db-include. (Fixed by Cynthia Shang.) - Ensure latest db-id is selected on when matching archive.info to backup.info. This provides correct matching in the event there are system-id and db-version duplicates (e.g. after reverting a pg_upgrade). (Fixed by Cynthia Shang. Reported by Adam K. Sumner.) - Fixed overly chatty error message when reporting an invalid command. (Reported by Jason O'Donnell.) + Features: Add stanza-delete command to cleanup unused stanzas. (Contributed by Cynthia Shang. Suggested by Magnus Hagander.) + Improvements: Improve stanza-create command so that it does not error when the stanza already exists. (Contributed by Cynthia Shang.) - Packaging : + Fix wrong requirement of previous version, now use correct %perl_requires, add openssl-devel for crytpo on libc + Add pgbackrest-conf.patch : a minimal working configuration file + Build pgbackrest-libc allowing crypto and checksum + Added %check section + Rework install and file section (copy of pgdg packaging and use of correct %perl macros + Disable build on i586 pgBackRest need perl with 64bit integer support. see upstream issue https://github.com/pgbackrest/pgbackrest/issues/478 + use %_localstatedir/lib as %_sharedstatedir is broken on Leap OBS-URL: https://build.opensuse.org/request/show/572427 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/pgbackrest?expand=0&rev=9
2018-02-05 17:37:50 +00:00
make pure_vendor_install -C libc DESTDIR=%{buildroot}
%perl_process_packlist
%perl_gen_filelist
%check
pushd libc
make test
popd
%files -f %{name}.files
%defattr(-,root,root)
Accepting request 572427 from home:bruno_friedmann:branches:server:database:postgresql - Upgrade to 1.28 bugfix version + Bug Fixes: - Fixed inability to restore a single database contained in a tablespace using --db-include. (Fixed by Cynthia Shang.) - Ensure latest db-id is selected on when matching archive.info to backup.info. This provides correct matching in the event there are system-id and db-version duplicates (e.g. after reverting a pg_upgrade). (Fixed by Cynthia Shang. Reported by Adam K. Sumner.) - Fixed overly chatty error message when reporting an invalid command. (Reported by Jason O'Donnell.) + Features: Add stanza-delete command to cleanup unused stanzas. (Contributed by Cynthia Shang. Suggested by Magnus Hagander.) + Improvements: Improve stanza-create command so that it does not error when the stanza already exists. (Contributed by Cynthia Shang.) - Packaging : + Fix wrong requirement of previous version, now use correct %perl_requires, add openssl-devel for crytpo on libc + Add pgbackrest-conf.patch : a minimal working configuration file + Build pgbackrest-libc allowing crypto and checksum + Added %check section + Rework install and file section (copy of pgdg packaging and use of correct %perl macros + Disable build on i586 pgBackRest need perl with 64bit integer support. see upstream issue https://github.com/pgbackrest/pgbackrest/issues/478 + use %_localstatedir/lib as %_sharedstatedir is broken on Leap OBS-URL: https://build.opensuse.org/request/show/572427 OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/pgbackrest?expand=0&rev=9
2018-02-05 17:37:50 +00:00
%doc README.md
%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320
%license LICENSE
%else
%doc LICENSE
%endif
%config(noreplace) %attr (644,root,root) %{_sysconfdir}/%{name}.conf
# We still can do that as postgres user is system fixed
%attr(-,postgres,postgres) /var/log/%{name}
%attr(-,postgres,postgres) %{_localstatedir}/lib/%{name}
%attr(-,postgres,postgres) /var/spool/%{name}