From 214e3c730987afcd773c835d841ac0b2eb4925f5 Mon Sep 17 00:00:00 2001 From: "Teerapatr K." Date: Wed, 7 Aug 2024 15:20:12 +0200 Subject: [PATCH 1/2] Support Ubuntu Jammy and Noble - debian/control: Updated dependencies - Makefile: Added OS release in deb file name Signed-off-by: Teerapatr K. --- Makefile | 8 +++++++- debian/control | 8 +++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index c70aaf4..c48bf5d 100644 --- a/Makefile +++ b/Makefile @@ -36,8 +36,9 @@ DOCS = $(patsubst man/%, doc/%.pdf , $(wildcard man/*)) SCHAUFEL_VERSION ?= 0.11 ARCH = $(shell uname -m) -# OS_ID = $(shell cat /etc/os-release | awk -F= '{if ($$1=="ID") print $$2}') +OS_ID = $(shell cat /etc/os-release | awk -F= '{if ($$1=="ID") print $$2}') # OS_VERSION_ID = $(shell cat /etc/os-release | awk -F= '{if ($$1=="VERSION_ID") print $$2}') +OS_VERSION_ID_NUMERIC = $(shell cat /etc/os-release | awk -F= '{if ($$1=="VERSION_ID") print $$2}' | tr -d \"\.) CC_VERSION = $(shell $(CC) -dumpversion | awk -F. '{print $$1}') # PACKAGE_DEB_DIR = schaufel-$(SCHAUFEL_VERSION)-$(OS_ID)$(OS_VERSION_ID)-$(CC)$(CC_VERSION)-$(ARCH) PACKAGE_DEB_DIR = schaufel-$(SCHAUFEL_VERSION)-$(CC)$(CC_VERSION)-$(ARCH) @@ -95,3 +96,8 @@ package-deb: all $(INSTALL) -m 0644 LICENSE $(PACKAGE_DEB_DIR)/DEBIAN/copyright ln -s DEBIAN $(PACKAGE_DEB_DIR)/debian cd $(PACKAGE_DEB_DIR) && dpkg-buildpackage --build=binary + cd ../ + + for _extension in buildinfo changes deb; do \ + mv schaufel_${SCHAUFEL_VERSION}_amd64.$${_extension} schaufel_${SCHAUFEL_VERSION}_${OS_ID}${OS_VERSION_ID_NUMERIC}_amd64.$${_extension}; \ + done diff --git a/debian/control b/debian/control index 2d2cc15..30e62c8 100644 --- a/debian/control +++ b/debian/control @@ -13,14 +13,12 @@ Build-Depends: debhelper (>= 12), Standards-Version: 0.11 Package: schaufel -Version: 0.11 Architecture: any -Multi-Arch: foreign -Pre-Depends: dh-systemd (>= 12), +Pre-Depends: dh-systemd (>= 12) | debhelper (>= 12), dpkg Depends: libconfig9 (>= 1.5~), - libhiredis0.14 (>= 0.14~), - libjson-c4 (>= 0.13~), + libhiredis0.14 (>= 0.14~) | libhiredis1.1.0 (>= 1.2~), + libjson-c4 (>= 0.13~) | libjson-c5 (>= 0.15~), libpq5 (>= 12.~), librdkafka1 (>= 1.2~) Description: schaufel aims to be a swiss army knife for moving data. From 635c59bfecc4f4c9db4d1d75921e3dc3e5ab1135 Mon Sep 17 00:00:00 2001 From: "Teerapatr K." Date: Wed, 7 Aug 2024 16:23:42 +0200 Subject: [PATCH 2/2] .github/workflows: Updated - Added recent Ubuntu releases - Updated actions supporting node16 - Updated FreeBSD actions release Signed-off-by: Teerapatr K. --- .github/workflows/build-package.yml | 10 +++++----- .github/workflows/test-pr.yml | 19 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml index aa99423..510bb7e 100644 --- a/.github/workflows/build-package.yml +++ b/.github/workflows/build-package.yml @@ -24,8 +24,8 @@ jobs: matrix: os: - ubuntu-20.04 - # # Disable jammy - # - ubuntu-22.04 + - ubuntu-22.04 + - ubuntu-24.04 cc: - gcc # # Disable Clang (enable required: matrix.include.cc: clang) @@ -48,7 +48,7 @@ jobs: CFLAGS: ${{ matrix.CFLAGS }} steps: - name: Checkout source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Fetch update package information run: sudo apt-get update --assume-yes @@ -69,9 +69,9 @@ jobs: run: make package-deb - name: Upload package(s) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: Packages + name: Packages-${{ matrix.os }} path: | schaufel_*.buildinfo schaufel_*.changes diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 90fb1a0..04ec8c6 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -1,11 +1,8 @@ +--- name: Test Schaufel # Run this workflow every time a new commit pushed to your repository on: - push: - #branches: '**' - #branches-ignore: 'main' - pull_request: #branches: '**' #branches-ignore: 'main' @@ -25,12 +22,14 @@ jobs: strategy: matrix: # also test 'latest', eventually this will be upgraded to a newer version and might fail early - os: [ubuntu-20.04, ubuntu-22.04, ubuntu-latest] - #os: [ubuntu-latest] + os: + - ubuntu-20.04 + - ubuntu-22.04 + - ubuntu-24.04 steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Versions run: echo "${{ matrix.os }}" @@ -74,14 +73,14 @@ jobs: run: diff -q src/main.c main.c pr-test-freebsd: name: Test Schaufel on FreeBSD - runs-on: macos-12 + runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run FreeBSD test id: test - uses: vmactions/freebsd-vm@v0 + uses: vmactions/freebsd-vm@v1 with: usesh: true prepare: |