Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
267 changes: 267 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
name: Packages

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: packages-${{ github.ref }}
cancel-in-progress: true

env:
RPM_RELEASE: 1
DEB_RELEASE: 1

jobs:
source:
name: Source tarball
runs-on: ubuntu-latest
container: oraclelinux:8
timeout-minutes: 60
steps:
- name: Install checkout prerequisites
run: dnf -y install git tar gzip findutils

- name: Checking out source tree
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- name: Mark workspace safe for git
run: git config --global --add safe.directory '*'

- name: Extract version
id: version
run: |
version=$(sed -n \
's/.*app_version{\([0-9]*\)U,[[:space:]]*\([0-9]*\)U,[[:space:]]*\([0-9]*\)U}.*/\1.\2.\3/p' \
src/app_version.hpp)
test -n "${version}"
echo "version=${version}" >> "${GITHUB_OUTPUT}"
echo "Building version ${version}"

- name: Create source tarballs
run: |
mkdir -p "${GITHUB_WORKSPACE}/build"
./packaging/scripts/binlog-server_builder.sh \
--builddir="${GITHUB_WORKSPACE}/build" \
--install_deps=0 \
--get_sources=1 \
--repo="file://${GITHUB_WORKSPACE}" \
--branch="$(git rev-parse HEAD)" \
--version="${{ steps.version.outputs.version }}" \
--rpm_release="${RPM_RELEASE}" \
--deb_release="${DEB_RELEASE}"

- name: Uploading source tarballs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: source-tarball
path: source_tarball/*.tar.gz
if-no-files-found: error
retention-days: 7

srpm:
name: Source RPM
needs: source
runs-on: ubuntu-latest
container: oraclelinux:8
timeout-minutes: 60
steps:
- name: Install checkout prerequisites
run: dnf -y install git tar gzip findutils rpm-build

- name: Checking out source tree
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Downloading source tarballs
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: source-tarball
path: source_tarball

- name: Building source RPM
run: |
mkdir -p "${GITHUB_WORKSPACE}/build"
./packaging/scripts/binlog-server_builder.sh \
--builddir="${GITHUB_WORKSPACE}/build" \
--install_deps=0 \
--get_sources=0 \
--build_src_rpm=1 \
--rpm_release="${RPM_RELEASE}"

- name: Uploading source RPM
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: srpm
path: srpm/*.src.rpm
if-no-files-found: error
retention-days: 30

sdeb:
name: Source DEB
needs: source
runs-on: ubuntu-latest
container: ubuntu:jammy
timeout-minutes: 60
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install checkout prerequisites
run: |
apt-get update
apt-get install -y --no-install-recommends \
git ca-certificates tar gzip xz-utils lsb-release \
devscripts debhelper dpkg-dev

- name: Checking out source tree
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Downloading source tarballs
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: source-tarball
path: source_tarball

- name: Building source DEB
run: |
mkdir -p "${GITHUB_WORKSPACE}/build"
./packaging/scripts/binlog-server_builder.sh \
--builddir="${GITHUB_WORKSPACE}/build" \
--install_deps=1 \
--get_sources=0 \
--build_src_deb=1 \
--deb_release="${DEB_RELEASE}"

- name: Uploading source DEB
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: source-deb
path: |
source_deb/*.dsc
source_deb/*.tar.gz
source_deb/*.tar.xz
source_deb/*_source.changes
if-no-files-found: error
retention-days: 7

rpm:
name: RPM ${{ matrix.target.name }} ${{ matrix.arch.name }}
needs: srpm
runs-on: ${{ matrix.arch.runner }}
container: ${{ matrix.target.image }}
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
target:
- { image: 'oraclelinux:9', name: 'el9' }
- { image: 'oraclelinux:10', name: 'el10' }
- { image: 'amazonlinux:2023', name: 'amzn2023' }
arch:
- { runner: 'ubuntu-latest', name: 'x86_64' }
- { runner: 'ubuntu-24.04-arm', name: 'aarch64' }
steps:
- name: Install checkout prerequisites
run: dnf -y install git tar gzip findutils

- name: Checking out source tree
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Downloading source RPM
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: srpm
path: srpm

- name: Building RPM
run: |
mkdir -p "${GITHUB_WORKSPACE}/build"
./packaging/scripts/binlog-server_builder.sh \
--builddir="${GITHUB_WORKSPACE}/build" \
--install_deps=1 \
--get_sources=0 \
--build_rpm=1 \
--rpm_release="${RPM_RELEASE}"

- name: Package contents
run: |
for package in rpm/*.rpm; do
echo "=== ${package}"
rpm -qlp "${package}"
rpm -qp --requires "${package}"
done

- name: Uploading RPM
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: rpm-${{ matrix.target.name }}-${{ matrix.arch.name }}
path: rpm/*.rpm
if-no-files-found: error
retention-days: 30

deb:
name: DEB ${{ matrix.target.name }} ${{ matrix.arch.name }}
needs: sdeb
runs-on: ${{ matrix.arch.runner }}
container: ${{ matrix.target.image }}
timeout-minutes: 180
env:
DEBIAN_FRONTEND: noninteractive
strategy:
fail-fast: false
matrix:
target:
- { image: 'ubuntu:jammy', name: 'jammy' }
- { image: 'ubuntu:noble', name: 'noble' }
- { image: 'ubuntu:resolute', name: 'resolute' }
- { image: 'debian:bookworm', name: 'bookworm' }
- { image: 'debian:trixie', name: 'trixie' }
arch:
- { runner: 'ubuntu-latest', name: 'x86_64' }
- { runner: 'ubuntu-24.04-arm', name: 'aarch64' }
steps:
- name: Install checkout prerequisites
run: |
apt-get update
apt-get install -y --no-install-recommends \
git ca-certificates tar gzip xz-utils lsb-release

- name: Checking out source tree
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Downloading source DEB
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: source-deb
path: source_deb

- name: Building DEB
run: |
mkdir -p "${GITHUB_WORKSPACE}/build"
./packaging/scripts/binlog-server_builder.sh \
--builddir="${GITHUB_WORKSPACE}/build" \
--install_deps=1 \
--get_sources=0 \
--build_deb=1 \
--deb_release="${DEB_RELEASE}"

- name: Package contents
run: |
for package in deb/*.deb; do
echo "=== ${package}"
dpkg -c "${package}"
dpkg -I "${package}"
done

- name: Uploading DEB
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: deb-${{ matrix.target.name }}-${{ matrix.arch.name }}
path: deb/*.deb
if-no-files-found: error
retention-days: 30
3 changes: 2 additions & 1 deletion extra/cmake_presets/aws-sdk-cpp/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"FORCE_SHARED_CRT": "OFF",
"ENABLE_TESTING": "OFF",
"AUTORUN_UNIT_TESTS": "OFF",
"BUILD_ONLY": "s3-crt"
"BUILD_ONLY": "s3-crt",
"ENFORCE_SUBMODULE_VERSIONS": "OFF"
}
},

Expand Down
3 changes: 2 additions & 1 deletion extra/cmake_presets/boost/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"CMAKE_CXX_EXTENSIONS": "OFF",
"CMAKE_CXX_FLAGS_INIT": "$env{ASAN_FLAGS} $env{STDLIB_FLAGS}",
"BUILD_SHARED_LIBS": "OFF",
"BUILD_TESTING": "OFF"
"BUILD_TESTING": "OFF",
"BOOST_INCLUDE_LIBRARIES": "algorithm;align;asio;container;date_time;describe;icl;io;json;lexical_cast;math;mp11;mpl;scope;system;test;url;uuid"
}
},

Expand Down
1 change: 0 additions & 1 deletion packaging/debian/compat

This file was deleted.

14 changes: 12 additions & 2 deletions packaging/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@ Source: percona-binlog-server
Maintainer: Percona Development Team <info@percona.com>
Section: misc
Priority: optional
Build-Depends: debhelper-compat (= 13),
cmake (>= 3.21),
g++,
libcurl4-openssl-dev,
zlib1g-dev,
libssl-dev,
libperconaserverclient24-dev
Standards-Version: 4.6.2

Rules-Requires-Root: no

Package: percona-binlog-server
Architecture: any
Depends: percona-server-client
Depends: ${shlibs:Depends},
${misc:Depends},
zlib1g,
percona-server-client
Description: Percona Binary Log Server
Command line utility that can be considered as an enhanced version of mysqlbinlog.
29 changes: 29 additions & 0 deletions packaging/debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: percona-binlog-server
Upstream-Contact: Percona Development Team <info@percona.com>
Source: https://github.com/Percona-Lab/percona-binlog-server

Files: *
Copyright: 2023-2026 Percona and/or its affiliates
License: GPL-2

Files: extra/mysql_protocol/*
Copyright: 2015-2026 Oracle and/or its affiliates
License: GPL-2

License: GPL-2
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License, version 2.0, for more details.
.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General Public License
version 2 can be found in "/usr/share/common-licenses/GPL-2".
Loading
Loading