-
Notifications
You must be signed in to change notification settings - Fork 9
Fix dependency checking and build system issues #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Changed from checking package names (rpm-build) to actual commands (rpmbuild) - Added mapping between command names and package names for Fedora - Enhanced error messages to be more specific about missing commands - Added guidance for when packages are installed but commands not in PATH Co-authored-by: mapitman <4205286+mapitman@users.noreply.github.com>
Co-authored-by: mapitman <4205286+mapitman@users.noreply.github.com>
|
@copilot Look at the build failure and fix it |
Co-authored-by: mapitman <4205286+mapitman@users.noreply.github.com>
Fixed in commit 19f0f9d. The build was failing because the VERSION variable (from branch name The fix adds a Tested locally - all builds (linux, windows, darwin, freebsd) now complete successfully. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot is this PR ready to go? If so mark as ready. |
Yes, this PR is ready! ✅ Status:
Changes:
The PR addresses the original feedback on #43 and fixes the build failure that occurred during CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes two build system issues: dependency checking in the RPM build script and VERSION handling in the Makefile. The dependency checker now correctly maps command names (like rpmbuild) to their package names (like rpm-build) for accurate detection. The VERSION_SAFE variable sanitizes forward slashes in version strings (e.g., from branch names) to prevent tar transform failures while preserving the original version in the binary.
Key Changes:
- Improved dependency checking with command-to-package mapping and clearer error messages
- Added VERSION_SAFE variable to sanitize version strings for use in filenames and tar commands
- Updated all build targets to use VERSION_SAFE consistently for artifact naming
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| build-rpm.sh | Replaced direct package name checking with command-to-package mapping using bash associative arrays, improved error messaging with installation instructions |
| Makefile | Added VERSION_SAFE variable to sanitize forward slashes, updated all tar/zip/deb commands to use VERSION_SAFE for filenames while preserving original VERSION for binary metadata |
After thorough review of this pull request, I found no issues to report. The changes are well-implemented, consistent across all affected targets, and properly address the problems described in the PR. The code follows good practices:
- The bash associative array syntax is correct for bash 4.0+
- The command-to-package mapping logic is sound and will correctly detect missing commands
- The VERSION_SAFE substitution effectively handles the forward slash issue
- All build targets (linux, windows, darwin, freebsd) are updated consistently
- The original VERSION is preserved for the binary's embedded version string via ldflags
- Error messages are clear and actionable
The PR is ready to merge.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR addresses two issues discovered during the Fedora RPM packaging work:
1. Dependency Checking Improvements
The
check_dependencies()function inbuild-rpm.shwas checking for package names (e.g.,rpm-build) instead of actual command names (e.g.,rpmbuild), causing false negatives when packages were installed but not detected.Changes:
Error output now shows:
2. Build System Fix for VERSION with Special Characters
Fixed build failures that occurred when the VERSION variable contained forward slashes (e.g., from branch names like
copilot/sub-pr-43-another-one). The tar--transformoption was interpreting the slashes incorrectly.Changes:
VERSION_SAFEvariable to the Makefile that sanitizes VERSION by replacing forward slashes with dashesVERSION_SAFEfor filenamesVERSION(with slashes) for the binary's embedded version stringExample:
copilot/sub-pr-43-another-onemdview-copilot-sub-pr-43-another-one-linux-amd64.tar.gzTesting
Files Changed
build-rpm.sh: Improved dependency checking with command-to-package mappingMakefile: Added VERSION_SAFE for robust filename handling💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.