-
Notifications
You must be signed in to change notification settings - Fork 5
PKG-1208 Prepare packages for Percona Binlog Server #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
percona-ysorokin
merged 3 commits into
Percona-Lab:main
from
adivinho:PKG-1208-Prepare-packages-for-Percona-Binlog-Server
Mar 16, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| percona-binlog-server (0.1.0-1) unstable; urgency=low | ||
|
|
||
| * Packaging for 0.1.0-1 | ||
|
|
||
| -- Vadim Yalovets <vadim.yalovets@percona.com> Mon, 19 Jan 2026 10:40:32 +0300 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| Source: percona-binlog-server | ||
| Maintainer: Percona Development Team <info@percona.com> | ||
| Section: misc | ||
| Priority: optional | ||
| Standards-Version: 4.6.2 | ||
|
|
||
|
|
||
| Package: percona-binlog-server | ||
| Architecture: any | ||
| Depends: percona-server-client | ||
| Description: Percona Binary Log Server | ||
| Command line utility that can be considered as an enhanced version of mysqlbinlog. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| #!/usr/bin/make -f | ||
|
|
||
| export DH_VERBOSE=1 | ||
| export DEB_BUILD_MAINT_OPTIONS=hardening=+all | ||
| export DEB_CMAKE_GENERATOR=Ninja | ||
|
|
||
| export DISTRO := $(shell dpkg-vendor --query Vendor) | ||
| export CODENAME := $(shell . /etc/os-release && echo $$VERSION_CODENAME) | ||
|
|
||
| # Versions | ||
| export DEB_VERSION=0.1.0 | ||
| export BOOST_VERSION=1.88.0 | ||
| export AWS_VERSION=1.11.570 | ||
|
|
||
| # CMake presets | ||
| export BUILD_PRESET_DEBUG=debug_gcc14 | ||
| export BUILD_PRESET_RELEASE=release_gcc14 | ||
|
|
||
| # Source dir | ||
| SRC_DIR := $(CURDIR) | ||
|
|
||
| %: | ||
| dh $@ --buildsystem=cmake --parallel | ||
|
|
||
| override_dh_auto_configure: | ||
| # handled manually in build | ||
|
|
||
| override_dh_auto_build: | ||
| set -e; \ | ||
| \ | ||
| echo "Ubuntu VERSION: $(DISTRO)"; \ | ||
| echo "Ubuntu CODENAME: $(CODENAME)"; \ | ||
| if [ "$(CODENAME)" = "bullseye" ]; then \ | ||
| sed -i 's:gcc-14:gcc-10:' $(SRC_DIR)/extra/cmake_presets/boost/CMakePresets.json; \ | ||
| sed -i 's:g++-14:g++-10:' $(SRC_DIR)/extra/cmake_presets/boost/CMakePresets.json; \ | ||
| sed -i 's:gcc-14:gcc-10:' $(SRC_DIR)/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json; \ | ||
| sed -i 's:g++-14:g++-10:' $(SRC_DIR)/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json; \ | ||
| sed -i 's:gcc-14:gcc-10:' $(SRC_DIR)/CMakePresets.json; \ | ||
| sed -i 's:g++-14:g++-10:' $(SRC_DIR)/CMakePresets.json; \ | ||
| elif [ "$(CODENAME)" = "jammy" ] || [ "$(CODENAME)" = "bookworm" ] || [ "$(CODENAME)" = "forky" ]; then \ | ||
| sed -i 's:gcc-14:gcc-13:' $(SRC_DIR)/extra/cmake_presets/boost/CMakePresets.json; \ | ||
| sed -i 's:g++-14:g++-13:' $(SRC_DIR)/extra/cmake_presets/boost/CMakePresets.json; \ | ||
| sed -i 's:gcc-14:gcc-13:' $(SRC_DIR)/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json; \ | ||
| sed -i 's:g++-14:g++-13:' $(SRC_DIR)/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json; \ | ||
| sed -i 's:gcc-14:gcc-13:' $(SRC_DIR)/CMakePresets.json; \ | ||
| sed -i 's:g++-14:g++-13:' $(SRC_DIR)/CMakePresets.json; \ | ||
| elif [ "$(CODENAME)" = "trixie" ] || [ "$(CODENAME)" = "bookworm" || [ "$(CODENAME)" = "forky" ]; then \ | ||
| sed -i '/"BUILD_TESTING"[[:space:]]*:[[:space:]]*"ON"/i\ "MYSQL_LIBRARY": "/usr/lib/x86_64-linux-gnu/libperconaserverclient.so",' $(SRC_DIR)/CMakePresets.json; \ | ||
| fi \ | ||
| ######################## | ||
| # DEBUG BUILD | ||
| ######################## | ||
| mkdir -p debug; \ | ||
| sed -i 's:/boost-install-:/percona-binlog-server-$(DEB_VERSION)/debug/boost-install-:' CMakePresets.json; \ | ||
| sed -i 's:/aws-sdk-cpp-install-:/percona-binlog-server-$(DEB_VERSION)/debug/aws-sdk-cpp-install-:' CMakePresets.json; \ | ||
| sed -i 's:$${sourceParentDir}/$${sourceDirName}-:$${sourceParentDir}/$${sourceDirName}/$${sourceDirName}-:g' CMakePresets.json | ||
| \ | ||
| cd debug; \ | ||
| git clone --recurse-submodules -b boost-$(BOOST_VERSION) https://github.com/boostorg/boost.git boost; \ | ||
| cd boost && git switch -c required_release && cd ..; \ | ||
| cp $(SRC_DIR)/extra/cmake_presets/boost/CMakePresets.json boost; \ | ||
| cmake ./boost --preset $(BUILD_PRESET_DEBUG); \ | ||
| cmake --build ./boost-build-$(BUILD_PRESET_DEBUG); \ | ||
| cmake --install ./boost-build-$(BUILD_PRESET_DEBUG); \ | ||
| \ | ||
| git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp.git aws-sdk-cpp; \ | ||
| cd aws-sdk-cpp && git checkout --recurse-submodules -b required_release $(AWS_VERSION) && cd ..; \ | ||
| cp $(SRC_DIR)/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json aws-sdk-cpp; \ | ||
| cmake ./aws-sdk-cpp --preset $(BUILD_PRESET_DEBUG); \ | ||
| cmake --build ./aws-sdk-cpp-build-$(BUILD_PRESET_DEBUG); \ | ||
| cmake --install ./aws-sdk-cpp-build-$(BUILD_PRESET_DEBUG); \ | ||
| \ | ||
| cd ..; \ | ||
| cmake . --preset $(BUILD_PRESET_DEBUG); \ | ||
| cmake --build ./percona-binlog-server-$(DEB_VERSION)-build-$(BUILD_PRESET_DEBUG); \ | ||
| ./percona-binlog-server-$(DEB_VERSION)-build-$(BUILD_PRESET_DEBUG)/binlog_server version; \ | ||
| \ | ||
| ######################## | ||
| # RELEASE BUILD | ||
| ######################## | ||
| mkdir -p release; \ | ||
| sed -i 's:debug/boost-install-:release/boost-install-:' CMakePresets.json; \ | ||
| sed -i 's:debug/aws-sdk-cpp-install-:release/aws-sdk-cpp-install-:' CMakePresets.json; \ | ||
| \ | ||
| cd release; \ | ||
| git clone --recurse-submodules -b boost-$(BOOST_VERSION) https://github.com/boostorg/boost.git boost; \ | ||
| cd boost && git switch -c required_release && cd ..; \ | ||
| cp $(SRC_DIR)/extra/cmake_presets/boost/CMakePresets.json boost; \ | ||
| cmake ./boost --preset $(BUILD_PRESET_RELEASE); \ | ||
| cmake --build ./boost-build-$(BUILD_PRESET_RELEASE); \ | ||
| cmake --install ./boost-build-$(BUILD_PRESET_RELEASE); \ | ||
| \ | ||
| git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp.git aws-sdk-cpp; \ | ||
| cd aws-sdk-cpp && git checkout --recurse-submodules -b required_release $(AWS_VERSION) && cd ..; \ | ||
| cp $(SRC_DIR)/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json aws-sdk-cpp; \ | ||
| cmake ./aws-sdk-cpp --preset $(BUILD_PRESET_RELEASE); \ | ||
| cmake --build ./aws-sdk-cpp-build-$(BUILD_PRESET_RELEASE); \ | ||
| cmake --install ./aws-sdk-cpp-build-$(BUILD_PRESET_RELEASE); \ | ||
| \ | ||
| cd ..; \ | ||
| cmake . --preset $(BUILD_PRESET_RELEASE); \ | ||
| cmake --build ./percona-binlog-server-$(DEB_VERSION)-build-$(BUILD_PRESET_RELEASE) | ||
| ./percona-binlog-server-$(DEB_VERSION)-build-$(BUILD_PRESET_DEBUG)/binlog_server version; \ | ||
|
|
||
| override_dh_auto_install: | ||
| install -d debian/percona-binlog-server/usr/bin | ||
| install -m 0755 \ | ||
| percona-binlog-server-$(DEB_VERSION)-build-$(BUILD_PRESET_DEBUG)/binlog_server \ | ||
| debian/percona-binlog-server/usr/bin/binlog_server-debug | ||
| install -m 0755 \ | ||
| percona-binlog-server-$(DEB_VERSION)-build-$(BUILD_PRESET_RELEASE)/binlog_server \ | ||
| debian/percona-binlog-server/usr/bin/binlog_server | ||
| install -d debian/percona-binlog-server/etc/percona-binlog-server | ||
| install -m 0640 main_config.json \ | ||
| debian/percona-binlog-server/etc/percona-binlog-server/main_config.json | ||
|
|
||
| override_dh_auto_test: | ||
| # no tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.0 (quilt) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,141 @@ | ||
| %global percona_binlog_server_version @@PBS_RELEASE@@ | ||
| %global rpm_release @@RPM_RELEASE@@ | ||
| %global BUILD_PRESET_DEBUG debug_gcc14 | ||
| %global BUILD_PRESET_RELEASE release_gcc14 | ||
| %global BOOST_VERSION 1.88.0 | ||
| %global AWS_VERSION 1.11.570 | ||
| %global release %{rpm_release}%{?dist} | ||
| %global optflags %(echo %{optflags} | sed 's/-specs=[^ ]*annobin[^ ]*//g') | ||
|
|
||
| Name: percona-binlog-server | ||
| Version: %{percona_binlog_server_version} | ||
| Release: %{release} | ||
| Summary: Percona Binary Log Server | ||
|
|
||
| License: GPLv2 | ||
| URL: https://github.com/Percona-Lab/percona-binlog-server | ||
| Source0: %{name}-%{version}.tar.gz | ||
|
|
||
| %description | ||
| Percona Binary Log Server is a command-line utility that acts as an enhanced version of mysqlbinlog in --read-from-remote-server mode. It serves as a replication client and can stream binary log events from a remote Oracle MySQL Server / Percona Server for MySQL both to a local filesystem and to a cloud storage (currently AWS S3). The tool is capable of automatically reconnecting to the remote server and resuming operations from the point where it was previously stopped. | ||
|
|
||
| %prep | ||
| %setup -q | ||
|
|
||
| %build | ||
| # Build Debug version | ||
| mkdir -p debug | ||
| ( | ||
| %if 0%{?amzn} | ||
| echo "Running Amazon Linux–specific command" | ||
| sed -i 's:gcc-14:gcc14-gcc:' ../percona-binlog-server-%{version}/extra/cmake_presets/boost/CMakePresets.json | ||
| sed -i 's:g++-14:gcc14-g++:' ../percona-binlog-server-%{version}/extra/cmake_presets/boost/CMakePresets.json | ||
| export CFLAGS="${CFLAGS//-Werror*/}" | ||
| export CXXFLAGS="${CXXFLAGS//-Werror*/}" | ||
| export LDFLAGS="${LDFLAGS//-Werror*/}" | ||
| export CFLAGS="${CFLAGS//-specs*annobin*/}" | ||
| export CXXFLAGS="${CXXFLAGS//-specs*annobin*/}" | ||
| export LDFLAGS="${LDFLAGS//-specs*annobin*/}" | ||
| export CFLAGS="${CFLAGS//-specs*redhat-hardened-cc1*/}" | ||
| export CXXFLAGS="${CXXFLAGS//-specs*redhat-hardened-cc1*/}" | ||
| export LDFLAGS="${LDFLAGS//-specs*redhat-hardened-ld*/}" | ||
| %endif | ||
| sed -i 's:/boost-install-:/percona-binlog-server-%{version}/debug/boost-install-:' ../percona-binlog-server-%{version}/CMakePresets.json | ||
| sed -i 's:/aws-sdk-cpp-install-:/percona-binlog-server-%{version}/debug/aws-sdk-cpp-install-:' ../percona-binlog-server-%{version}/CMakePresets.json | ||
| cd debug | ||
| # Build Boost Libraries | ||
| git clone --recurse-submodules -b boost-%{BOOST_VERSION} --jobs=8 https://github.com/boostorg/boost.git boost | ||
| cd boost | ||
| git switch -c required_release | ||
| cd .. | ||
| cp -v ../../percona-binlog-server-%{version}/extra/cmake_presets/boost/CMakePresets.json boost | ||
|
|
||
| cmake ./boost \ | ||
| --preset %{BUILD_PRESET_DEBUG} | ||
| cmake --build ./boost-build-%{BUILD_PRESET_DEBUG} --parallel | ||
| cmake --install ./boost-build-%{BUILD_PRESET_DEBUG} | ||
|
|
||
| # Build AWS SDK for C++ Libraries | ||
| git clone --recurse-submodules --jobs=8 https://github.com/aws/aws-sdk-cpp.git aws-sdk-cpp | ||
| cd aws-sdk-cpp | ||
| git checkout --recurse-submodules -b required_release %{AWS_VERSION} | ||
| cd .. | ||
| cp -v ../../percona-binlog-server-%{version}/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json aws-sdk-cpp | ||
| cmake ./aws-sdk-cpp --preset %{BUILD_PRESET_DEBUG} | ||
| cmake --build ./aws-sdk-cpp-build-%{BUILD_PRESET_DEBUG} --parallel | ||
| cmake --install ./aws-sdk-cpp-build-%{BUILD_PRESET_DEBUG} | ||
|
|
||
| # Build Percona Binlog Server | ||
| cd ../.. | ||
| cmake ./percona-binlog-server-%{version} --preset %{BUILD_PRESET_DEBUG} | ||
| cmake --build ./percona-binlog-server-%{version}-build-%{BUILD_PRESET_DEBUG} --parallel | ||
| ) | ||
|
|
||
| # Build Release version | ||
| mkdir -p release | ||
| ( | ||
| %if 0%{?amzn} | ||
| echo "Running Amazon Linux–specific command" | ||
| export CFLAGS="${CFLAGS//-Werror*/}" | ||
| export CXXFLAGS="${CXXFLAGS//-Werror*/}" | ||
| export LDFLAGS="${LDFLAGS//-Werror*/}" | ||
| export CFLAGS="${CFLAGS//-specs*annobin*/}" | ||
| export CXXFLAGS="${CXXFLAGS//-specs*annobin*/}" | ||
| export LDFLAGS="${LDFLAGS//-specs*annobin*/}" | ||
| export CFLAGS="${CFLAGS//-specs*redhat-hardened-cc1*/}" | ||
| export CXXFLAGS="${CXXFLAGS//-specs*redhat-hardened-cc1*/}" | ||
| export LDFLAGS="${LDFLAGS//-specs*redhat-hardened-ld*/}" | ||
| %endif | ||
| sed -i 's:debug/boost-install-:release/boost-install-:' ../percona-binlog-server-%{version}/CMakePresets.json | ||
| sed -i 's:debug/aws-sdk-cpp-install-:release/aws-sdk-cpp-install-:' ../percona-binlog-server-%{version}/CMakePresets.json | ||
| cd release | ||
| # Build Boost Libraries | ||
| git clone --recurse-submodules -b boost-%{BOOST_VERSION} --jobs=8 https://github.com/boostorg/boost.git boost | ||
| cd boost | ||
| git switch -c required_release | ||
| cd .. | ||
| cp -v ../../percona-binlog-server-%{version}/extra/cmake_presets/boost/CMakePresets.json boost | ||
|
|
||
| cmake ./boost \ | ||
| --preset %{BUILD_PRESET_RELEASE} | ||
| cmake --build ./boost-build-%{BUILD_PRESET_RELEASE} --parallel | ||
| cmake --install ./boost-build-%{BUILD_PRESET_RELEASE} | ||
|
|
||
| # Build AWS SDK for C++ Libraries | ||
| git clone --recurse-submodules --jobs=8 https://github.com/aws/aws-sdk-cpp.git aws-sdk-cpp | ||
| cd aws-sdk-cpp | ||
| git checkout --recurse-submodules -b required_release %{AWS_VERSION} | ||
| cd .. | ||
| cp -v ../../percona-binlog-server-%{version}/extra/cmake_presets/aws-sdk-cpp/CMakePresets.json aws-sdk-cpp | ||
| cmake ./aws-sdk-cpp --preset %{BUILD_PRESET_RELEASE} | ||
| cmake --build ./aws-sdk-cpp-build-%{BUILD_PRESET_RELEASE} --parallel | ||
| cmake --install ./aws-sdk-cpp-build-%{BUILD_PRESET_RELEASE} | ||
|
|
||
| # Build Percona Binlog Server | ||
| cd ../.. | ||
| cmake ./percona-binlog-server-%{version} --preset %{BUILD_PRESET_RELEASE} | ||
| cmake --build ./percona-binlog-server-%{version}-build-%{BUILD_PRESET_RELEASE} --parallel | ||
| ) | ||
|
|
||
| %install | ||
| install -d %{buildroot}/usr/bin | ||
| install -m 755 ../percona-binlog-server-%{version}-build-%{BUILD_PRESET_DEBUG}/binlog_server %{buildroot}/usr/bin/binlog_server-debug | ||
| install -m 755 ../percona-binlog-server-%{version}-build-%{BUILD_PRESET_RELEASE}/binlog_server %{buildroot}/usr/bin/binlog_server | ||
| install -m 0755 -d %{buildroot}/%{_sysconfdir} | ||
| install -D -m 0644 main_config.json %{buildroot}/%{_sysconfdir}/percona-binlog-server/main_config.json | ||
|
|
||
|
|
||
| %files | ||
| %license LICENSE | ||
| %doc README.md | ||
| %config(noreplace) %attr(0640,root,root) /%{_sysconfdir}/percona-binlog-server/main_config.json | ||
| /usr/bin/binlog_server-debug | ||
| /usr/bin/binlog_server | ||
|
|
||
|
|
||
| %changelog | ||
| * Fri Jan 16 2026 Vadim Yalovets <vadim.yalovets@percona.com> - 1.0.0-1 | ||
| - PKG-1208 Prepare packages for Percona Binlog Server | ||
|
|
||
| * Mon Aug 26 2024 Surabhi Bhat <surabhi.bhat@percona.com> - 0.1.0-1 | ||
| - Initial package with separate builds for Debug and RelWithDebInfo versions. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.