Skip to content
Merged
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
88 changes: 88 additions & 0 deletions .github/workflows/rpm-el10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Release RPM (EL10)

on:
workflow_dispatch:
inputs:
tag_name:
description: 'Release tag (e.g. v4.6.1)'
required: true
type: string
draft:
description: 'Create as draft release'
type: boolean
default: false

jobs:
build-and-release:
runs-on: ubuntu-24.04
container:
image: rockylinux/rockylinux:10

permissions:
contents: write

steps:
- name: Install git (required for checkout)
run: dnf install -y git

- uses: actions/checkout@v4

- name: Install build dependencies
run: |
dnf install -y epel-release
dnf config-manager --set-enabled crb
dnf install -y \
rpm-build \
rpmdevtools \
make \
which \
autoconf \
automake \
pkgconfig \
python3 \
python3-devel \
python3-pip \
python3-setuptools \
python3-wheel \
python3-lxml \
python3-dateutil \
pyproject-rpm-macros \
asciidoc \
systemd-rpm-macros

- name: Set up rpmbuild tree
run: rpmdev-setuptree

- name: Generate autotools files and configure
run: |
./autogen.sh
./configure

- name: Create source tarball and prepare rpmbuild tree
run: |
VERSION=$(awk -F'[][]' '/^AC_INIT/{print $4}' configure.ac)
mkdir -p /tmp/src/crmsh-${VERSION}
cp -r . /tmp/src/crmsh-${VERSION}/
tar cjf "$HOME/rpmbuild/SOURCES/crmsh-${VERSION}.tar.bz2" -C /tmp/src crmsh-${VERSION}
cp crmsh.tmpfiles.d.conf "$HOME/rpmbuild/SOURCES/"
cp crmsh.spec "$HOME/rpmbuild/SPECS/"

- name: Build binary RPM (no SRPM)
run: rpmbuild -bb "$HOME/rpmbuild/SPECS/crmsh.spec"

- name: Collect built RPMs
run: |
mkdir -p /tmp/rpms
find "$HOME/rpmbuild/RPMS" -name '*.rpm' -exec cp {} /tmp/rpms/ \;
echo "Built RPMs:"
ls -lh /tmp/rpms/

- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag_name }}
draft: ${{ inputs.draft }}
files: /tmp/rpms/*.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

61 changes: 61 additions & 0 deletions Dockerfile.el10
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Dockerfile for building crmsh RPM on EL10 (Rocky Linux 10)
#
# Build:
# docker build -f Dockerfile.el10 -t crmsh-el10-build .
#
# Extract RPMs after build (into ./rpms/ directory):
# mkdir -p rpms
# docker run --rm -v "$(pwd)/rpms:/output" crmsh-el10-build \
# sh -c 'cp /root/rpmbuild/RPMS/noarch/*.rpm /output/'
#
# To inspect the image interactively:
# docker run --rm -it crmsh-el10-build bash

FROM rockylinux/rockylinux:10

RUN dnf install -y epel-release && \
dnf config-manager --set-enabled crb && \
dnf install -y \
rpm-build \
rpmdevtools \
git \
make \
which \
autoconf \
automake \
pkgconfig \
python3 \
python3-devel \
python3-pip \
python3-setuptools \
python3-wheel \
python3-lxml \
python3-dateutil \
pyproject-rpm-macros \
asciidoc \
systemd-rpm-macros && \
dnf clean all

# Set up the rpmbuild directory tree
RUN rpmdev-setuptree

WORKDIR /build

# Copy full source tree
COPY . .

# Generate autotools files, configure, create source tarball, then build
# binary RPMs only (-bb skips SRPM generation entirely)
RUN ./autogen.sh && \
./configure && \
VERSION=$(awk -F'[][]' '/^AC_INIT/{print $4}' configure.ac) && \
mkdir -p /tmp/src/crmsh-${VERSION} && \
cp -r . /tmp/src/crmsh-${VERSION}/ && \
tar cjf /root/rpmbuild/SOURCES/crmsh-${VERSION}.tar.bz2 -C /tmp/src crmsh-${VERSION} && \
cp crmsh.tmpfiles.d.conf /root/rpmbuild/SOURCES/ && \
cp crmsh.spec /root/rpmbuild/SPECS/ && \
rpmbuild -bb /root/rpmbuild/SPECS/crmsh.spec

# Default: list the built RPMs
CMD find /root/rpmbuild/RPMS -name '*.rpm' | sort

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dnl License: GNU General Public License (GPL)

AC_PREREQ([2.53])

AC_INIT([crmsh],[4.5.0],[users@clusterlabs.org])
AC_INIT([crmsh],[4.6.1],[users@clusterlabs.org])

AC_ARG_WITH(version,
[ --with-version=version Override package version (if you're a packager needing to pretend) ],
Expand Down
2 changes: 2 additions & 0 deletions crmsh.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,5 @@ result2=$?
%{_datadir}/%{name}/tests

%changelog
* Mon Mar 30 2026 Palash Jain <paljain@ddn.com> - 4.6.1-1
- Add EL10 (Rocky Linux 10) RPM build support
Loading