SHA256
1
0
forked from pool/pgbackrest

Accepting request 677608 from home:bruno_friedmann:branches:server:database:postgresql

- Include upstream patch 2cd204f.patch to fix issue#677 

- Update to 2.10 version bug fixes
  + Add unimplemented S3 driver method required for archive-get.
  + Fix check for improperly configured pg-path. 
- Packaging:
  + Fix trailing space in changes (jengelh)
  + Use a factual description (jengelh)

- Packaging: remove comments/remark fixed and merged issue #659
- Update to 2.08 version : bug fixes and improvement
- Update spec (date and order)
  is ported to C

OBS-URL: https://build.opensuse.org/request/show/677608
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/pgbackrest?expand=0&rev=21
This commit is contained in:
Martin Pluskal 2019-02-21 08:59:16 +00:00 committed by Git OBS Bridge
parent 210b7ca263
commit b04d05504d
5 changed files with 177 additions and 87 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eb5f8abc8601246f348d2682f18073a68a55468e6d33d4a96ba4b0eb5cfe3f51
size 6426446

3
2.10.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8d04d2bb69842236a0394fbc54963b4af7d3ab6c3124bdf1e6692f6a7b0fc204
size 6426455

61
2cd204f.patch Normal file
View File

@ -0,0 +1,61 @@
From 2cd204f38037f1465c84bb4e6b55893204ee8f93 Mon Sep 17 00:00:00 2001
From: Stephen Frost <sfrost@snowman.net>
Date: Tue, 12 Feb 2019 14:59:51 +0200
Subject: [PATCH] Change execRead() to return a size_t.
execRead() should be returning a size_t, not a void. Thankfully, this isn't actually used and therefore shouldn't be an issue, but we should fix it anyway.
Contributed by Stephen Frost.
---
src/common/exec.c | 8 +++++---
src/common/exec.h | 2 +-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/common/exec.c b/src/common/exec.c
index 84b1107ea..31d3dc444 100644
--- a/src/common/exec.c
+++ b/src/common/exec.c
@@ -214,7 +214,7 @@ execCheck(Exec *this)
/***********************************************************************************************************************************
Read from the process
***********************************************************************************************************************************/
-void
+size_t
execRead(Exec *this, Buffer *buffer, bool block)
{
FUNCTION_LOG_BEGIN(logLevelTrace);
@@ -226,9 +226,11 @@ execRead(Exec *this, Buffer *buffer, bool block)
ASSERT(this != NULL);
ASSERT(buffer != NULL);
+ size_t result = 0;
+
TRY_BEGIN()
{
- ioHandleRead(this->ioReadHandle, buffer, block);
+ result = ioHandleRead(this->ioReadHandle, buffer, block);
}
CATCH_ANY()
{
@@ -237,7 +239,7 @@ execRead(Exec *this, Buffer *buffer, bool block)
}
TRY_END();
- FUNCTION_LOG_RETURN_VOID();
+ FUNCTION_LOG_RETURN(SIZE, result);
}
/***********************************************************************************************************************************
diff --git a/src/common/exec.h b/src/common/exec.h
index df7574010..2064c284c 100644
--- a/src/common/exec.h
+++ b/src/common/exec.h
@@ -28,7 +28,7 @@ Exec *execNew(const String *command, const StringList *param, const String *name
Functions
***********************************************************************************************************************************/
void execOpen(Exec *this);
-void execRead(Exec *this, Buffer *buffer, bool block);
+size_t execRead(Exec *this, Buffer *buffer, bool block);
void execWrite(Exec *this, Buffer *buffer);
/***********************************************************************************************************************************

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Wed Feb 20 08:15:24 UTC 2019 - Bruno Friedmann <bruno@ioda-net.ch>
- Include upstream patch 2cd204f.patch to fix issue#677
-------------------------------------------------------------------
Sun Feb 17 10:02:49 UTC 2019 - Bruno Friedmann <bruno@ioda-net.ch>
- Update to 2.10 version bug fixes
+ Add unimplemented S3 driver method required for archive-get.
+ Fix check for improperly configured pg-path.
- Packaging:
+ Fix trailing space in changes (jengelh)
+ Use a factual description (jengelh)
-------------------------------------------------------------------
Fri Feb 8 20:02:00 UTC 2019 - Bruno Friedmann <bruno@ioda-net.ch>
@ -9,40 +24,40 @@ Fri Feb 8 20:02:00 UTC 2019 - Bruno Friedmann <bruno@ioda-net.ch>
+ Add _DARWIN_C_SOURCE flag to Makefile for MacOS builds.
+ Update address lookup in C TLS client to use modern methods.
+ Include Posix-compliant header for strcasecmp() and fd_set.
- Packaging : remove comments/remark fixed and merged issue #659
- Packaging: remove comments/remark fixed and merged issue #659
-------------------------------------------------------------------
Sat Jan 26 10:00:00 UTC 2019 - Bruno Friedmann <bruno@ioda-net.ch>
- Update to 2.08 version : bug fixes and improvement
- Update to 2.08 version : bug fixes and improvement
See more information https://pgbackrest.org/release.html
- Add libxml2-devel as buildrequires
- Add a comment about gethostbyname() upstream issue #659
- Update spec (date and order)
- Update spec (date and order)
-------------------------------------------------------------------
Sat Dec 1 08:58:07 UTC 2018 - Bruno Friedmann <bruno@ioda-net.ch>
- Re-add all needed Perl (upstream issue #629): not all the code
is ported to C
is ported to C
-------------------------------------------------------------------
Tue Nov 20 13:36:49 UTC 2018 - Bruno Friedmann <bruno@ioda-net.ch>
- Update to 2.07 version : bug fixes and improvement
- Update to 2.07 version : bug fixes and improvement
See more information https://pgbackrest.org/release.html
-------------------------------------------------------------------
Sat Oct 27 20:12:17 UTC 2018 - Bruno Friedmann <bruno@ioda-net.ch>
- Bug fix and improvement 2.06 version
- Bug fix and improvement 2.06 version
See more information https://pgbackrest.org/release.html
- Packaging : Remove Requires perl, it not more used
-------------------------------------------------------------------
Wed Oct 3 08:07:18 UTC 2018 - Bruno Friedmann <bruno@ioda-net.ch>
- Bug fix and improvement 2.05 version
- Bug fix and improvement 2.05 version
See more information https://pgbackrest.org/release.html
-------------------------------------------------------------------
@ -51,7 +66,7 @@ Sat Jul 14 16:25:46 UTC 2018 - bruno@ioda-net.ch
- Fix packaging : Avoid segv backtrace
+ Don't package and distribute perl or LibC
They are already in final binary.
Ref https://github.com/pgbackrest/pgbackrest/issues/558
Ref https://github.com/pgbackrest/pgbackrest/issues/558
+ As a result : tests are no more usable, (only vagrant runs)
use a simple call of the binary (pgbackrest version) to exclude
futur backtrace
@ -61,16 +76,16 @@ Sat Jul 14 16:25:46 UTC 2018 - bruno@ioda-net.ch
Wed Jul 11 07:49:49 UTC 2018 - bruno@ioda-net.ch
- Critical bug fix release 2.04 (Backup Resume)
+ IMPORTANT NOTE: This release fixes a critical bug in the backup
resume feature. All resumed backups prior to this release should
be considered inconsistent.
+ IMPORTANT NOTE: This release fixes a critical bug in the backup
resume feature. All resumed backups prior to this release should
be considered inconsistent.
See more information https://pgbackrest.org/release.html
+ Bug Fixes:
- Fix critical bug in resume that resulted in inconsistent
backups. A regression in v0.82 removed the timestamp comparison
when deciding which files from the aborted backup to keep on
- Fix critical bug in resume that resulted in inconsistent
backups. A regression in v0.82 removed the timestamp comparison
when deciding which files from the aborted backup to keep on
resume.
- Fix error in selective restore when only one user database
- Fix error in selective restore when only one user database
exists in the cluster.
- Fix non-compliant ISO-8601 timestamp format in S3 authorization
headers. AWS and some gateways were tolerant of space rather than
@ -78,16 +93,16 @@ Wed Jul 11 07:49:49 UTC 2018 - bruno@ioda-net.ch
+ Features:
- PostgreSQL 11 Beta 2 support.
+ Improvements:
- Improve the HTTP client to set content-length to 0 when not
specified by the server. S3 (and gateways) always set
- Improve the HTTP client to set content-length to 0 when not
specified by the server. S3 (and gateways) always set
content-length or transfer-encoding but HTTP 1.1 does not require
it and proxies (e.g. HAProxy) may not include either.
- Set search_path = 'pg_catalog' on PostgreSQL connections
+ Documentation Improvements:
- Create a new section to describe building pgBackRest and
- Create a new section to describe building pgBackRest and
build on a separate host.
- Add sample S3 policy to restrict bucket privileges.
- Packaging :
- Packaging :
+ Explicitly requires all perl deps
+ Define make_build for 42.3 compilation
@ -97,7 +112,7 @@ Mon May 28 08:21:30 UTC 2018 - bruno@ioda-net.ch
- Urgent fix : add perl as BuildRequires and Requires to force
presence of libperl.so : Otherwise pgbackrest binary can't find
it
- Spec : use %make_build macros
- Spec : use %make_build macros
-------------------------------------------------------------------
Wed May 23 09:55:27 UTC 2018 - bruno@ioda-net.ch
@ -105,10 +120,10 @@ Wed May 23 09:55:27 UTC 2018 - bruno@ioda-net.ch
- Update release 2.03 version
+ Bug Fixes:
- Fix potential buffer overrun in error message handling.
- Fix archive write lock being taken for the synchronous
- Fix archive write lock being taken for the synchronous
archive-get command.
+ Improvements:
- Embed exported C functions and Perl modules directly into
- Embed exported C functions and Perl modules directly into
the pgBackRest executable.
- Use time_t instead of __time_t for better portability.
- Print total runtime in milliseconds at command end.
@ -120,7 +135,7 @@ Thu May 10 10:12:23 UTC 2018 - bruno@ioda-net.ch
Parallel Asynchronous Archive Get and Configuration Includes
Released May 6, 2018
+ Bug Fixes:
- Fix directory syncs running recursively when only the
- Fix directory syncs running recursively when only the
specified directory should be synced.
- Fix archive-copy throwing "path not found" error for incr/diff
backups.
@ -129,32 +144,32 @@ Thu May 10 10:12:23 UTC 2018 - bruno@ioda-net.ch
- Fix delta restore failing when a linked file is missing.
- Fix rendering of key/value and list options in help.
+ Features:
- Add asynchronous, parallel archive-get. This feature maintains
- Add asynchronous, parallel archive-get. This feature maintains
a queue of WAL segments to help reduce latency when PostgreSQL
requests a WAL segment with restore_command.
- Add support for additional pgBackRest configuration files in the
directory specified by the --config-include-path option.
Add --config-path option for overriding the default base path
directory specified by the --config-include-path option.
Add --config-path option for overriding the default base path
of the --config and --config-include-path option.
- Add repo-s3-token option to allow temporary credentials tokens
to be configured. pgBackRest currently has no way to request new
credentials so the entire command (e.g. backup, restore) must
credentials so the entire command (e.g. backup, restore) must
complete before the credentials expire.
+ Improvements:
- Update the archive-push-queue-max, manifest-save-threshold,
and buffer-size options to accept values in KB, MB, GB, TB, PB
where the multiplier is a power of 1024.
- Make backup/restore path sync more efficient. Scanning the
entire directory can be very expensive if there are a lot of
- Make backup/restore path sync more efficient. Scanning the
entire directory can be very expensive if there are a lot of
small tables. The backup manifest contains the path list so use
it to perform syncs instead of scanning the backup/restore path
- Show command parameters as well as command options in initial
- Show command parameters as well as command options in initial
info log message.
- Rename archive-queue-max option to archive-push-queue-max to
avoid confusion with the new archive-get-queue-max option.
- Rename archive-queue-max option to archive-push-queue-max to
avoid confusion with the new archive-get-queue-max option.
The old option name will continue to be accepted.
+ Documentation Bug Fixes:
- Update docs with 32-bit support and caveats.
- Update docs with 32-bit support and caveats.
32-bit support was added in v1.26.
+ Documentation Improvements:
- Add monitoring examples using PostgreSQL and jq.
@ -162,28 +177,28 @@ Thu May 10 10:12:23 UTC 2018 - bruno@ioda-net.ch
- Remove documentation info --output=json as experimental.
- Update out-of-date description for the spool-path option.
+ Test Suite Features:
- Use lcov for C unit test coverage reporting. Switch from
Devel::Cover because it would not report on branch coverage
- Use lcov for C unit test coverage reporting. Switch from
Devel::Cover because it would not report on branch coverage
for reports converted from gcov. Incomplete branch coverage
for a module now generates an error. Coverage of unit tests
for a module now generates an error. Coverage of unit tests
is not displayed in the report unless they are incomplete for
either statement or branch coverage.
either statement or branch coverage.
- Changes of previous 2.01 version from March 6th 2018
+ Bug Fixes:
- Fix --target-action and --recovery-option options being reported
as invalid when restoring with --type=immediate.
- Immediately error when a secure option (e.g. repo1-s3-key) is
passed on the command line. Since pgBackRest would not pass
- Immediately error when a secure option (e.g. repo1-s3-key) is
passed on the command line. Since pgBackRest would not pass
secure options on to sub-processes an obscure error was thrown.
The new error is much clearer and provides hints about how to fix
the problem. Update command documentation to omit secure options
the problem. Update command documentation to omit secure options
that cannot be specified on the command-line.
- Fix issue passing --no-config to embedded Perl.
- Fix issue where specifying log-level-stderr > warn would cause a
local/remote process to error on exit due to output found on
- Fix issue where specifying log-level-stderr > warn would cause a
local/remote process to error on exit due to output found on
stderr when none was expected. The max value for a local/remote
process is now error.
- Fix manifest test in the check command when tablespaces are
- Fix manifest test in the check command when tablespaces are
present.
+ Improvements:
- Error when multiple arguments are set in the config file for an
@ -196,14 +211,14 @@ Thu May 10 10:12:23 UTC 2018 - bruno@ioda-net.ch
- Remove references to the C library being optional.
+ Test Suite Features:
- Add CentOS/RHEL package builds.
- Use clang for static code analysis. Nothing found initially
- Use clang for static code analysis. Nothing found initially
except for some functions that should have been marked
__noreturn__.
-------------------------------------------------------------------
Fri Mar 9 15:16:24 UTC 2018 - bruno@ioda-net.ch
- Packaging :
- Packaging :
+ modernize spec with spec-cleaner -m
+ remove pgbackrest-release-1.00_datadir.patch pgbackrest is now
written in C
@ -211,72 +226,72 @@ Fri Mar 9 15:16:24 UTC 2018 - bruno@ioda-net.ch
+ Adjust new parameter name in pgbackrest-conf.patch
- Update to new 2.0 version
+ Features:
The archive-push command is now partially coded in C which
allows the PostgreSQL archive_command to run significantly
faster when processing status messages from the asynchronous
The archive-push command is now partially coded in C which
allows the PostgreSQL archive_command to run significantly
faster when processing status messages from the asynchronous
archive process. (Reviewed by Cynthia Shang.)
+ Improvements:
- Improve check command to verify that the backup manifest can be
built. (Contributed by Cynthia Shang.)
- Improve performance of HTTPS client. Buffering now takes the
- Improve performance of HTTPS client. Buffering now takes the
pending bytes on the socket into account (when present) rather
than relying entirely on select(). In some instances the final
bytes would not be flushed until the connection was closed.
- Improve S3 delete performance. The constant S3_BATCH_MAX had
been replaced with a hard-coded value of 2, probably during
- Improve S3 delete performance. The constant S3_BATCH_MAX had
been replaced with a hard-coded value of 2, probably during
testing.
- Allow any non-command-line option to be reset to default on
the command-line. This allows options in pgbackrest.conf to be
reset to default which reduces the need to write new config
- Allow any non-command-line option to be reset to default on
the command-line. This allows options in pgbackrest.conf to be
reset to default which reduces the need to write new config
files for specific needs.
- The C library is now required. This eliminates conditional
- The C library is now required. This eliminates conditional
loading and eases development of new library features.
- The pgbackrest executable is now a C binary instead of Perl.
This allows certain time-critical commands (like async
This allows certain time-critical commands (like async
archive-push) to run more quickly.
- Rename db-* options to pg-* and backup-* options to repo-* to
improve consistency. repo-* options are now indexed although
improve consistency. repo-* options are now indexed although
currently only one is allowed.
** This imply you need to revisit your pgbackrest.conf **
- Packaging :
- Packaging :
+ Use make install (now fixed upstream) for bin
-------------------------------------------------------------------
Sun Feb 4 17:14:16 UTC 2018 - bruno@ioda-net.ch
- Upgrade to 1.28 bugfix version
+ Bug Fixes:
- Fixed inability to restore a single database contained in a
- 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).
- 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
- Fixed overly chatty error message when reporting an invalid
command. (Reported by Jason O'Donnell.)
+ Features:
Add stanza-delete command to cleanup unused stanzas.
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.)
Improve stanza-create command so that it does not error when
the stanza already exists. (Contributed by Cynthia Shang.)
-------------------------------------------------------------------
Thu Feb 1 13:20:00 UTC 2018 - bruno@ioda-net.ch
- Packaging :
- 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
+ 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
support. see upstream issue
https://github.com/pgbackrest/pgbackrest/issues/478
+ use %_localstatedir/lib as %_sharedstatedir is broken on Leap
+ use %_localstatedir/lib as %_sharedstatedir is broken on Leap
42.x and some SLE12
-------------------------------------------------------------------
@ -303,7 +318,7 @@ Thu Aug 3 17:42:43 UTC 2017 - mrueckert@suse.de
-------------------------------------------------------------------
Tue Mar 21 11:04:04 UTC 2017 - bruno@ioda-net.ch
- update to 1.17
- update to 1.17
https://github.com/pgbackrest/pgbackrest/releases/tag/release%2F1.17
https://github.com/pgbackrest/pgbackrest/releases/tag/release%2F1.16
https://github.com/pgbackrest/pgbackrest/releases/tag/release%2F1.15

View File

@ -2,6 +2,7 @@
# spec file for package pgbackrest
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 Ioda-Net Sàrl, Charmoille, Switzerland.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -22,8 +23,7 @@
%endif
Name: pgbackrest
# Nobody can stop upstream to be too creative !
Version: 2.09
Version: 2.10
Release: 0
Summary: Reliable PostgreSQL Backup & Restore
License: MIT
@ -31,6 +31,9 @@ Group: Productivity/Databases/Tools
URL: http://www.pgbackrest.org
Source: https://github.com/pgbackrest/pgbackrest/archive/release/%{version}.tar.gz
Source1: pgbackrest-conf.patch
# Trimmed Upstream patch fix return void (remove doc part)
# https://github.com/pgbackrest/pgbackrest/commit/2cd204f.patch
Patch0: 2cd204f.patch
BuildRequires: libxml2-devel
BuildRequires: openssl-devel
BuildRequires: perl
@ -50,18 +53,29 @@ ExclusiveArch: do_not_build
%endif
%description
pgBackRest aims to be a simple, reliable backup and restore system that can
seamlessly scale up to the largest databases and workloads.
pgBackRest aims to be a simple, reliable backup and restore system for
PostgreSQL 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.
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
%prep
%setup -q -n %{name}-release-%{version}
%patch0 -p1
%build
# TODO upstream doesn't care about RPM_OPT_FLAGS
@ -80,7 +94,7 @@ make install -C src DESTDIR=%{buildroot}
%check
# Tests are only available with Vagrant
# We just test that the binary works.
%{buildroot}/%{_bindir}/%{name} version
%{buildroot}/%{_bindir}/%{name} version || exit 1
%files
%defattr(-,root,root)