agora inbox for pgsql-pkg-debian@postgresql.org
help / color / mirror / Atom feedFrom: David Steele <david@pgbackrest.org>
To: pgsql-pkg-debian@lists.postgresql.org
To: pgsql-pkg-yum@lists.postgresql.org
Subject: Re: Migration of pgBackRest internal support tools to Rust.
Date: Fri, 17 Jul 2026 09:47:22 +0000 (UTC)
Message-ID: <bbe4e843-2e04-4e3c-a040-09c5afea84bc@pgbackrest.org> (raw)
In-Reply-To: <7e1f2552-82c3-40c6-baf1-ef65cfd0ac30@pgbackrest.org>
References: <7e1f2552-82c3-40c6-baf1-ef65cfd0ac30@pgbackrest.org>
On 7/15/26 09:44, David Steele wrote:
>
> My proposal is to provide the files that are currently generated at
> build time (html documentation, man pages, help.auto.c.inc,
> interface.auto.c.inc) in each release
<...>
> by providing a dist tarball that contains the
> generated files.
This is the approach I decided to go with. In retrospect it was a
mistake on my part to expose so many details of our toolchain to
packaging. Live and learn!
Starting with the 2.59.0 release on July 20 there will be a distribution
tarball as a release asset that contains pre-built documentation in the
form of HTML and a man page, help.auto.c.inc and interface.auto.c.inc
pre-generated in the source tree, and a smoke test that exercises basic
functionality and can be run with meson test. The test needs only the
same core Python that is provided for the meson build environment.
The packagers will get a consistent deliverable that we test for
regressions and the pgBackRest developers can use whatever tooling is
deemed best for the project, as long as it does not leak into the dist
tarball.
You can see an example of what the release will look like going forward
(with dist tarball asset) here:
https://github.com/dwsteele/pgbackrest/releases/tag/release%2F2.59.0dev
This is exactly what the 2.59.0 release will look like except for the
dev tag. For 2.59.0 packages can still be built as before (from a source
tarball) and if there are issues with the dist tarball we will address
them in patch releases before 2.60.0.
I have attached the README.md that will be included in the dist tarball.
It has more details on what is provided.
Regards,
-David
Attachments:
[text/markdown] README.md (3.2K, ../bbe4e843-2e04-4e3c-a040-09c5afea84bc@pgbackrest.org/2-README.md)
download | inline:
# pgBackRest Distribution
This is a pgBackRest build distribution. Unlike a checkout of the [git repository](https://github.com/pgbackrest/pgbackrest), it ships the generated source and the rendered documentation pre-built, so pgBackRest can be built and installed without the code generation or the documentation tooling.
See <https://pgbackrest.org> for complete documentation.
## Contents
- `src` -- pgBackRest source, including the pre-generated `*.auto.c.inc` files
- `doc/man` -- command reference
- `doc/html` -- HTML documentation
- `test` -- smoke test to verify the build
- `meson.build`, `meson_options.txt` -- build configuration
- `LICENSE`
## Build
pgBackRest builds with meson and ninja. The required libraries are libpq, OpenSSL (>= 1.1.1), libxml2, lz4, bz2, and zlib; zstd, libssh2 (for SFTP), and libsystemd are optional. For example, on Debian/Ubuntu:
```
apt-get install meson gcc pkg-config libpq-dev libssl-dev libxml2-dev \
liblz4-dev libzstd-dev libbz2-dev libz-dev libssh2-1-dev libsystemd-dev
```
Then configure, build, and install:
```
meson setup build .
ninja -C build
meson install -C build
```
The `pgbackrest` binary is built at `build/src/pgbackrest`.
## Test
A smoke test is included to verify that the build works. It finds each PostgreSQL installation on the system and runs the newly-built `pgbackrest` through a backup and restore cycle against every supported version found: create a cluster, configure archiving, create the stanza, check, back up, restore, and verify that the restored data matches. Versions that pgBackRest does not support are reported and skipped. The test requires nothing beyond the build environment and PostgreSQL -- no additional Python packages.
Run it with meson after building:
```
meson test -C build --suite smoke
```
Add `-v` to stream the output of each step as it runs:
```
meson test -C build --suite smoke -v
```
PostgreSQL is searched for in the standard packaging paths:
- `/usr/lib/postgresql/<version>/bin` (Debian/Ubuntu)
- `/usr/pgsql-<version>/bin` (RHEL)
- `/usr/libexec/postgresql<version>` (Alpine)
- `/usr/bin`
Each version is tested in a temporary directory with its own repository and a private unix socket, so a running PostgreSQL cluster is not disturbed. The test fails when there is no PostgreSQL to test against, since a test that silently does nothing does not verify the build. Since PostgreSQL will not run as root, running the test as root drops to the `postgres` user and fails if that user does not exist.
The test can also be run directly, which allows the defaults to be overridden:
```
python3 test/smoke.py --pgbackrest build/src/pgbackrest
```
Useful options are `--pg-bin-path` to search an additional path for PostgreSQL, `--version` to test only a specific version, and `--user` to select the user to drop to when running as root. Use `--help` for the complete list.
## Documentation
The rendered documentation is in `doc`: the command reference in `doc/man` and the HTML documentation in `doc/html`.
Two user guides are provided, Debian/Ubuntu and RHEL/Rocky/Alma. If only one user guide is required, replace user-guide-index.html with the desired user guide. For example, to keep only the Debian/Ubuntu user guide:
```
mv user-guide.html user-guide-index.html
rm user-guide-rhel.html
```
view thread (2+ messages)
Message-ID: <bbe4e843-2e04-4e3c-a040-09c5afea84bc@pgbackrest.org>
Permalink: ../bbe4e843-2e04-4e3c-a040-09c5afea84bc@pgbackrest.org/
Also on: postgresql.org/message-id/bbe4e843-2e04-4e3c-a040-09c5afea84bc@pgbackrest.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-pkg-debian@postgresql.org
Cc: david@pgbackrest.org, pgsql-pkg-debian@lists.postgresql.org, pgsql-pkg-yum@lists.postgresql.org
Subject: Re: Migration of pgBackRest internal support tools to Rust.
In-Reply-To: <bbe4e843-2e04-4e3c-a040-09c5afea84bc@pgbackrest.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox