Skip to content

Commit 71025be

Browse files
committed
FIX: Updates to Github workflow
1 parent 4e96f90 commit 71025be

File tree

3 files changed

+103
-8
lines changed

3 files changed

+103
-8
lines changed

.github/workflows/build-rpm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
git \
3131
python3 \
3232
python3-pip \
33-
python3-venv \
33+
python3-devel \
3434
rpm-build \
3535
rpmdevtools \
3636
gcc \

CENTOS_STREAM9_FIX.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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.

RPM_PACKAGING.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@ After a successful build:
5555
On CentOS/RHEL/Fedora systems, install required packages:
5656

5757
```bash
58-
# For CentOS/RHEL 8+
59-
sudo dnf install rpm-build rpmdevtools python3 python3-pip python3-venv \
58+
# For CentOS Stream 9 / RHEL 9+ / Fedora
59+
sudo dnf install rpm-build rpmdevtools python3 python3-pip python3-devel \
60+
qt5-qtbase-devel desktop-file-utils
61+
62+
# For CentOS/RHEL 8
63+
sudo dnf install rpm-build rpmdevtools python3 python3-pip python3-devel \
6064
qt5-qtbase-devel desktop-file-utils
6165

6266
# For older systems with yum
63-
sudo yum install rpm-build rpmdevtools python3 python3-pip \
67+
sudo yum install rpm-build rpmdevtools python3 python3-pip python3-devel \
6468
qt5-qtbase-devel desktop-file-utils
6569
```
6670

@@ -181,7 +185,7 @@ This removes all installed files and cleans up desktop integration.
181185
## Dependencies
182186

183187
### Build Dependencies
184-
- `python3`, `python3-pip`, `python3-venv`
188+
- `python3`, `python3-pip`, `python3-devel`
185189
- `qt5-qtbase-devel`
186190
- `rpm-build`, `rpmdevtools`
187191
- `desktop-file-utils`
@@ -204,12 +208,19 @@ All runtime dependencies are automatically installed with the RPM.
204208
sudo dnf install rpm-build rpmdevtools
205209
```
206210

207-
2. **"PyQt5 installation failed"**
211+
2. **"No match for argument: python3-venv"**
212+
- In CentOS Stream 9, `venv` is included in the base `python3` package
213+
- Use `python3-devel` instead for development headers
214+
```bash
215+
sudo dnf install python3-devel
216+
```
217+
218+
3. **"PyQt5 installation failed"**
208219
```bash
209-
sudo dnf install qt5-qtbase-devel python3-devel
220+
sudo dnf install qt5-qtbase-devel python3-devel gcc gcc-c++
210221
```
211222

212-
3. **"Desktop file validation failed"**
223+
4. **"Desktop file validation failed"**
213224
```bash
214225
sudo dnf install desktop-file-utils
215226
```

0 commit comments

Comments
 (0)