From 4f3d9cb521eb8b451902e7c1f6a98fb92482045f Mon Sep 17 00:00:00 2001 From: robojerk Date: Sat, 6 Sep 2025 11:01:40 -0700 Subject: [PATCH] Fix build process to follow official Debian backporting guidelines - Add dch --bpo to add backport revision number as per Debian guidelines - Add fakeroot debian/rules binary test build before main build - Use dpkg-buildpackage --build=binary --unsigned-changes as recommended - This follows the SimpleBackportCreation workflow from Debian wiki - Should finally produce proper .deb binary packages --- .forgejo/workflows/ci.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 8afce7c..6bedbff 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -146,7 +146,20 @@ jobs: echo 'Changelog:' head -20 debian/changelog - # Build packages + # Add backport revision number (following Debian guidelines) + echo 'Adding backport revision number...' + dch --bpo || echo 'dch --bpo failed, continuing...' + + # Test build first (following Debian guidelines) + echo 'Testing build with fakeroot debian/rules binary...' + if fakeroot debian/rules binary; then + echo 'Test build successful!' + else + echo 'Test build failed!' + exit 1 + fi + + # Build packages properly (following Debian guidelines) echo 'Building ostree packages...' echo 'Current directory before build:' pwd @@ -159,9 +172,9 @@ jobs: dpkg -l | grep libfuse3-dev || echo "libfuse3-dev not found" dpkg -l | grep libsystemd-dev || echo "libsystemd-dev not found" - echo 'Running dpkg-buildpackage with verbose output...' - echo 'Forcing binary package build...' - if dpkg-buildpackage -us -uc --build=source,binary -v; then + echo 'Running dpkg-buildpackage with proper Debian backport flags...' + echo 'Using --build=binary --unsigned-changes as per Debian guidelines...' + if dpkg-buildpackage --build=binary --unsigned-changes; then echo 'Build successful!' else echo 'Build failed! Checking for any partial packages...'