|
| 1 | +# CentOS Stream 9 Build Fix |
| 2 | + |
| 3 | +## Issue Description |
| 4 | + |
| 5 | +The GitHub Action was failing during the dependency installation step with the error: |
| 6 | + |
| 7 | +``` |
| 8 | +No match for argument: python3-venv |
| 9 | +Error: Unable to find a match: python3-venv |
| 10 | +Error: Process completed with exit code 1. |
| 11 | +``` |
| 12 | + |
| 13 | +## Root Cause |
| 14 | + |
| 15 | +In CentOS Stream 9, the `python3-venv` package doesn't exist as a separate package. The `venv` module is included directly in the base `python3` package, unlike some other distributions where it's packaged separately. |
| 16 | + |
| 17 | +## Fix Applied |
| 18 | + |
| 19 | +### 1. Updated GitHub Action Workflow |
| 20 | + |
| 21 | +**File**: `.github/workflows/build-rpm.yml` |
| 22 | + |
| 23 | +**Changed**: |
| 24 | +```yaml |
| 25 | +# OLD - BROKEN |
| 26 | +python3-venv \ |
| 27 | + |
| 28 | +# NEW - WORKING |
| 29 | +python3-devel \ |
| 30 | +``` |
| 31 | + |
| 32 | +### 2. Updated Documentation |
| 33 | + |
| 34 | +**File**: `RPM_PACKAGING.md` |
| 35 | + |
| 36 | +- Updated prerequisite package lists |
| 37 | +- Added specific troubleshooting section for this error |
| 38 | +- Corrected build dependency documentation |
| 39 | + |
| 40 | +## Why This Fix Works |
| 41 | + |
| 42 | +1. **`python3-devel`**: Provides Python development headers needed for compiling native extensions (required by PyInstaller and some PyQt5 components) |
| 43 | + |
| 44 | +2. **Built-in venv**: The `venv` module is available directly via `python3 -m venv` without needing additional packages |
| 45 | + |
| 46 | +3. **CentOS Stream 9 compatibility**: Uses packages that actually exist in the CentOS Stream 9 repositories |
| 47 | + |
| 48 | +## Package Differences by Distribution |
| 49 | + |
| 50 | +| Distribution | Virtual Environment Package | Development Headers | |
| 51 | +|-------------|----------------------------|-------------------| |
| 52 | +| CentOS Stream 9 | Built into `python3` | `python3-devel` | |
| 53 | +| CentOS/RHEL 8 | Built into `python3` | `python3-devel` | |
| 54 | +| Ubuntu/Debian | `python3-venv` | `python3-dev` | |
| 55 | +| Fedora | Built into `python3` | `python3-devel` | |
| 56 | + |
| 57 | +## Verification |
| 58 | + |
| 59 | +After applying this fix, the GitHub Action should: |
| 60 | + |
| 61 | +1. ✅ Successfully install all system dependencies |
| 62 | +2. ✅ Create virtual environment using `python3 -m venv` |
| 63 | +3. ✅ Build the application using PyInstaller |
| 64 | +4. ✅ Create RPM package successfully |
| 65 | +5. ✅ Pass installation tests |
| 66 | + |
| 67 | +## Testing the Fix |
| 68 | + |
| 69 | +To test locally on CentOS Stream 9: |
| 70 | + |
| 71 | +```bash |
| 72 | +# Verify the correct packages are available |
| 73 | +dnf search python3-devel |
| 74 | +dnf info python3 |
| 75 | + |
| 76 | +# Test venv creation |
| 77 | +python3 -m venv test_env |
| 78 | +source test_env/bin/activate |
| 79 | +pip install --upgrade pip |
| 80 | +deactivate |
| 81 | +rm -rf test_env |
| 82 | +``` |
| 83 | + |
| 84 | +This fix ensures compatibility with CentOS Stream 9's package structure while maintaining the cross-platform enhanced build functionality. |
0 commit comments