From 8a9bc3a5417cabb7f8d4de6d30a3ac96f1c1054f Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 28 Jun 2024 11:09:03 -0500 Subject: [PATCH] Optionally enable additional wal-g features `wal-g` can be built with additonal features that require linking witih system libraries. Using build conditions, we can enable these as needed. LZO is enabled by default for compatibility with WAL-E backups created by the Postgres Operator/Spilo. --- wal-g.spec | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/wal-g.spec b/wal-g.spec index 16c4ae8..638988d 100644 --- a/wal-g.spec +++ b/wal-g.spec @@ -7,9 +7,13 @@ %bcond mysql 0 %bcond sqlserver 0 +%bcond lzo 1 +%bcond brotli 0 +%bcond libsodium 0 + Name: wal-g Version: 3.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Archival and Restoration for databases in the Cloud License: Apache-2.0 @@ -18,6 +22,15 @@ Source: %{name}-%{version}.tar.gz BuildRequires: golang BuildRequires: git-core +%if %{with lzo} +BuildRequires: lzo-devel +%endif +%if %{with brotli} +BuildRequires: brotli-devel +%endif +%if %{with libsodium} +BuildRequires: libsodium-devel +%endif %description WAL-G is an archival restoration tool for PostgreSQL, MySQL/MariaDB, and MS SQL @@ -71,6 +84,16 @@ Requires: %{name} = %{version} %build +%if %{with lzo} +export USE_LZO=1 +%endif +%if %{with brotli} +export USE_BROTLI=1 +%endif +%if %{with libsodium} +export USE_LIBSODIUM=1 +%endif + %if %{with postgresql} make pg_build %endif