From e312b23f8138c7ab1a7153628fa0240daf9827d4 Mon Sep 17 00:00:00 2001 From: Gabriel Fedel Date: Mon, 26 Feb 2024 13:56:43 +0100 Subject: [PATCH 1/3] fix: forces deb package to be compatible with older debian versions --- mrmShared/linux/debian/rules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mrmShared/linux/debian/rules b/mrmShared/linux/debian/rules index ce9ef2a2..223464ef 100755 --- a/mrmShared/linux/debian/rules +++ b/mrmShared/linux/debian/rules @@ -26,3 +26,5 @@ override_dh_auto_install: override_dh_auto_clean: override_dh_installudev: dh_installudev --priority=50 +override_dh_builddeb: + dh_builddeb -- -Zgzip From 2298d2a3b9d13dee169c8f84c0cb11f40a7ff1d0 Mon Sep 17 00:00:00 2001 From: Gabriel Fedel Date: Fri, 1 Mar 2024 08:58:30 +0100 Subject: [PATCH 2/3] fix: Fix mrf.spec.in for RPM package Remove no needed tools, and set arch as noarch, considering the dkms builds the kernel module on the host where the package is to be installed. --- mrmShared/linux/dkms-rpm/mrf.spec.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mrmShared/linux/dkms-rpm/mrf.spec.in b/mrmShared/linux/dkms-rpm/mrf.spec.in index 1b975a49..1b90798b 100644 --- a/mrmShared/linux/dkms-rpm/mrf.spec.in +++ b/mrmShared/linux/dkms-rpm/mrf.spec.in @@ -13,8 +13,7 @@ Vendor: EPICS Community License: GPLv2 Group: System Environment/Kernel URL: https://github.com/epics-modules/mrfioc2 -BuildRequires: autoconf libtool gcc gcc-c++ -BuildArch: @@ARCH@@ +BuildArch: noarch Requires: dkms Requires: udev BuildRoot: %{_tmppath}/%{kmod_name}-%{version}-root From 65b4844b05520d1453ca5b1ba6d4f49c0e2bbfad Mon Sep 17 00:00:00 2001 From: Gabriel Fedel Date: Fri, 1 Mar 2024 09:00:30 +0100 Subject: [PATCH 3/3] feat: Include actions to release deb and rpm dkms packages Commits tagged with kmod-*d* will release deb packages Commits tagged with kmod-*r* will release rpm packages --- .../workflows/release-dkms-deb-package.yml | 33 +++++++++++++++++++ .../workflows/release-dkms-rpm-package.yml | 28 ++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .github/workflows/release-dkms-deb-package.yml create mode 100644 .github/workflows/release-dkms-rpm-package.yml diff --git a/.github/workflows/release-dkms-deb-package.yml b/.github/workflows/release-dkms-deb-package.yml new file mode 100644 index 00000000..18c67d47 --- /dev/null +++ b/.github/workflows/release-dkms-deb-package.yml @@ -0,0 +1,33 @@ +name: Create and release kernel module deb package + +permissions: + contents: write + +on: + push: + tags: + - 'kmod*d*' + +jobs: + Create_Packages: + name: Create Packages + runs-on: ubuntu-latest + steps: + - name: "apt-get install" + run: | + sudo apt-get update + sudo apt-get -y install dkms debhelper + - name: Checkout code + uses: actions/checkout@v3 + with: + path: "REPO" + + - name: Build packages + run: | + cd REPO/mrmShared/linux + dpkg-buildpackage + - name: Release the Package + uses: softprops/action-gh-release@v1 + with: + files: | + REPO/mrmShared/*.deb diff --git a/.github/workflows/release-dkms-rpm-package.yml b/.github/workflows/release-dkms-rpm-package.yml new file mode 100644 index 00000000..dfe216b3 --- /dev/null +++ b/.github/workflows/release-dkms-rpm-package.yml @@ -0,0 +1,28 @@ +name: Create and release kernel module rpm package + +permissions: + contents: write + +on: + push: + tags: + - 'kmod*r*' + +jobs: + Create_Packages: + name: Create Packages + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + path: "REPO" + + - name: Build packages + run: | + cd REPO/mrmShared/linux/dkms-rpm + make + - name: Release the Package + uses: softprops/action-gh-release@v1 + with: + files: REPO/mrmShared/linux/dkms-rpm/rpmbuild/RPMS/*/*.rpm