Compare commits

..

1 commit

Author SHA1 Message Date
Tom Foster
809b6e4f3a feat(ci): Add Fedora RPM package build workflow
Following PR #950 which introduced the RPM spec and systemd unit files,
this adds a comprehensive CI workflow for building, signing, testing, and
publishing RPM packages. Includes GPG signing infrastructure with Ed25519
keys and automatic package registry deployment for stable, development,
and feature branch builds.

Add documentation for RPM installation methods, repository configuration,
and package management. Fix linting issues in spec file for pre-commit
compliance.
2025-08-30 20:45:35 +01:00
2 changed files with 2 additions and 24 deletions

View file

@ -51,18 +51,6 @@ jobs:
restore-keys: | restore-keys: |
cargo-fedora${{ steps.fedora.outputs.version }}- cargo-fedora${{ steps.fedora.outputs.version }}-
- name: Cache Rust build dependencies
uses: https://code.forgejo.org/actions/cache@v4
with:
path: |
~/rpmbuild/BUILD/*/target/release/deps
~/rpmbuild/BUILD/*/target/release/build
~/rpmbuild/BUILD/*/target/release/.fingerprint
~/rpmbuild/BUILD/*/target/release/incremental
key: rust-deps-fedora${{ steps.fedora.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
rust-deps-fedora${{ steps.fedora.outputs.version }}-
- name: Setup sccache - name: Setup sccache
uses: https://github.com/mozilla-actions/sccache-action@v0.0.9 uses: https://github.com/mozilla-actions/sccache-action@v0.0.9
with: with:
@ -74,15 +62,12 @@ jobs:
echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV
echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV
echo "SCCACHE_CACHE_SIZE=2G" >> $GITHUB_ENV echo "SCCACHE_CACHE_SIZE=2G" >> $GITHUB_ENV
# Aggressive GC since cache restores don't increment counter
echo "CARGO_INCREMENTAL_GC_TRIGGER=5" >> $GITHUB_ENV
- name: Install build dependencies - name: Install build dependencies
run: | run: |
dnf install -y --setopt=keepcache=1 \ dnf install -y --setopt=keepcache=1 \
wget \ wget \
rpm-build \ rpm-build \
rpm-sign \
rpmdevtools \ rpmdevtools \
rpkg \ rpkg \
cargo-rpm-macros \ cargo-rpm-macros \
@ -201,19 +186,12 @@ jobs:
- name: Verify RPM signatures - name: Verify RPM signatures
run: | run: |
# Skip if no signing key is configured or no RPMs were signed # Skip if no signing key is configured
if [ -z "${{ secrets.RPM_SIGNING_KEY }}" ]; then if [ -z "${{ secrets.RPM_SIGNING_KEY }}" ]; then
echo "No RPM signing key configured - skipping signature verification" echo "No RPM signing key configured - skipping signature verification"
exit 0 exit 0
fi fi
# Check if rpmsign was successful (at least one signed RPM exists)
SIGNED_COUNT=$(find "$HOME/rpmbuild" -name "*.rpm" -type f -exec rpm -K {} \; 2>/dev/null | grep -c "signatures OK" || true)
if [ "$SIGNED_COUNT" -eq 0 ]; then
echo "No successfully signed RPMs found - skipping signature verification"
exit 0
fi
# Import our public key for verification # Import our public key for verification
curl -s https://forgejo.ellis.link/continuwuation/continuwuity/raw/branch/main/fedora/RPM-GPG-KEY-continuwuity.asc | rpm --import curl -s https://forgejo.ellis.link/continuwuation/continuwuity/raw/branch/main/fedora/RPM-GPG-KEY-continuwuity.asc | rpm --import

View file

@ -430,7 +430,7 @@ async fn handle_left_room(
.ok(); .ok();
// Left before last sync // Left before last sync
if (Some(since) >= left_count && !include_leave) || Some(next_batch) < left_count { if Some(since) >= left_count {
return Ok(None); return Ok(None);
} }