Copr build error: No .src.rpm found at /var/lib/copr-rpmbuild/results
- ✅ COPR is now using
makemethod (good!) - ✅ Our
.copr/Makefileis being called (good!) - ✅ Binaries should be downloading (check logs)
- ❌ SRPM not ending up where COPR expects it
The updated .copr/Makefile now:
-
Handles multiple output directory variables:
outdir(what COPR passes)resultdir(alternative)- Falls back to current directory
-
Verifies SRPM creation:
- Checks if SRPM was built
- Shows detailed error if not found
-
Ensures COPR finds it:
- Copies SRPM to
/var/lib/copr-rpmbuild/resultsif needed - This is the hardcoded location COPR checks
- Copies SRPM to
The following files have been updated and need to be committed:
.copr/Makefile- Fixed output directory handlingMakefile- Root makefile also updated
cd /Users/travis/Github/rhtlc-copr
git add .copr/Makefile Makefile
git commit -m "Fix COPR SRPM output directory handling
- Handle lowercase 'outdir' parameter from COPR
- Add fallback to resultdir variable
- Copy SRPM to /var/lib/copr-rpmbuild/results explicitly
- Add verbose error checking and debugging output"
git push origin mainAfter pushing, trigger a new build in COPR:
Via Web Interface:
- Go to: https://copr.fedorainfracloud.org/coprs/tmichett/RHTLC/
- Click on your package
- Click "Rebuild"
Via CLI:
copr-cli build-package RHTLC --name rhtlcLook for these indicators in the build log:
Success indicators:
Downloading rhtlc CLI binary from releases/3.4.3/
Downloading rhtlc GUI binary from releases/3.4.3/
Downloaded files:
-rwxr-xr-x ... rhtlc-linux-x86_64
-rwxr-xr-x ... rhtlc-gui-linux-x86_64
Building source RPM...
SRPM created successfully: .../rhtlc-3.4.3-1.src.rpm
Copying SRPM to /var/lib/copr-rpmbuild/results/
SRPM build completed successfully!
If still failing, look for:
ERROR: Failed to download CLI binary- Binary not in releases/ERROR: No SRPM found- rpmbuild failedcurl: (22) The requested URL returned error: 404- Wrong version or path
If Git builds continue to have issues, build and upload SRPM directly:
cd /Users/travis/Github/rhtlc-copr
make srpm VERSION=3.4.3copr-cli build RHTLC rhtlc-3.4.3-1.src.rpmThis bypasses all the Git/Makefile complexity and just uploads a pre-built SRPM.
If the build still fails, check:
# Check what's in releases/
ls releases/
# Check spec file version
grep "^%define version" rhtlc.spec
# They should match! If releases/3.4.3/ exists, spec should say version 3.4.3Test if binaries are downloadable:
VERSION="3.4.3"
curl -I https://github.com/RedHatTraining/rhtlc-copr/raw/main/releases/${VERSION}/rhtlc-linux-x86_64
# Should return: HTTP/2 200
# If 404: Binary doesn't exist or path is wrongTest locally:
cd /Users/travis/Github/rhtlc-copr
make -f .copr/Makefile srpm outdir=/tmp/test spec=rhtlc.spec
# Should create SRPM in /tmp/test/
ls /tmp/test/*.src.rpm┌─────────────────────────────────────────────────────────┐
│ COPR Build System │
├─────────────────────────────────────────────────────────┤
│ 1. Clone Git repo │
│ 2. Run: make -f .copr/Makefile srpm outdir=... │
│ 3. Look for SRPM in /var/lib/copr-rpmbuild/results │
│ 4. If found: Build RPM │
│ 5. If not found: ERROR (this is where we are) │
└─────────────────────────────────────────────────────────┘
Our fix ensures step 3 succeeds by explicitly copying the SRPM there.
Summary of changes made to fix this issue:
-
.copr/Makefile:- Added
outdir,resultdir, andspecparameter handling - Removed
@from commands for verbose output - Added explicit copy to
/var/lib/copr-rpmbuild/results - Added error checking and debugging output
- Added
-
Makefile(root):- Updated for consistency
- Auto-detects version from spec file
- Better error messages
After the fix, you should see:
- ✅ COPR build starts successfully
- ✅ Binaries download from GitHub
- ✅ SRPM is built
- ✅ SRPM is found by COPR
- ✅ RPM packages built for all chroots
Once COPR builds successfully:
-
Test installation:
sudo dnf copr enable tmichett/RHTLC sudo dnf install rhtlc rhtlc --version rhtlc-gui -
Update documentation with installation instructions
-
Consider adding:
- Application icon
- Man pages
- Configuration examples
If this fix doesn't work:
- Check the full build log in COPR web interface
- Look for the specific error message
- Try the direct SRPM upload method as a workaround
- Open an issue with the build log attached
Test the Makefile locally first:
cd /Users/travis/Github/rhtlc-copr
# Clean
rm -f *.src.rpm rhtlc-*-x86_64
# Test the .copr/Makefile
make -f .copr/Makefile srpm outdir=. spec=rhtlc.spec
# Should see:
# - Download messages
# - Binary files created
# - SRPM created
# - Success message
# Verify
ls -lh *.src.rpmIf that works locally, it should work in COPR!