|
| 1 | +#!/bin/bash |
| 2 | +# Script to commit the CentOS Stream 9 compatibility fixes |
| 3 | + |
| 4 | +set -e |
| 5 | + |
| 6 | +# Colors for output |
| 7 | +GREEN='\033[0;32m' |
| 8 | +BLUE='\033[0;34m' |
| 9 | +YELLOW='\033[1;33m' |
| 10 | +NC='\033[0m' |
| 11 | + |
| 12 | +print_status() { |
| 13 | + echo -e "${BLUE}[INFO]${NC} $1" |
| 14 | +} |
| 15 | + |
| 16 | +print_success() { |
| 17 | + echo -e "${GREEN}[SUCCESS]${NC} $1" |
| 18 | +} |
| 19 | + |
| 20 | +print_warning() { |
| 21 | + echo -e "${YELLOW}[WARNING]${NC} $1" |
| 22 | +} |
| 23 | + |
| 24 | +print_status "Committing CentOS Stream 9 compatibility fixes..." |
| 25 | + |
| 26 | +# Check if we have uncommitted changes |
| 27 | +if ! git diff --quiet || ! git diff --cached --quiet; then |
| 28 | + print_status "Found uncommitted changes, proceeding with commit..." |
| 29 | + |
| 30 | + # Add all the modified files |
| 31 | + git add .github/workflows/build-rpm.yml |
| 32 | + git add RPM_PACKAGING.md |
| 33 | + git add build-rpm.sh |
| 34 | + git add CENTOS_STREAM9_FIX.md |
| 35 | + git add commit-centos-fix.sh |
| 36 | + |
| 37 | + # Show what's being committed |
| 38 | + print_status "Files being committed:" |
| 39 | + git diff --cached --name-only |
| 40 | + |
| 41 | + # Commit with descriptive message |
| 42 | + git commit -m "Fix CentOS Stream 9 build compatibility |
| 43 | +
|
| 44 | +- Replace python3-venv with python3-devel in dependencies |
| 45 | +- Fix changelog date generation in RPM spec file |
| 46 | +- Update documentation with CentOS Stream 9 specifics |
| 47 | +- Add troubleshooting guide for common build issues |
| 48 | +
|
| 49 | +Fixes GitHub Action build failure: |
| 50 | +- No match for argument: python3-venv |
| 51 | +- bad date in %changelog error |
| 52 | +
|
| 53 | +The venv module is built into python3 package in CentOS Stream 9, |
| 54 | +and python3-devel provides the development headers needed for |
| 55 | +PyInstaller and PyQt5 native extensions." |
| 56 | + |
| 57 | + print_success "Changes committed successfully!" |
| 58 | + |
| 59 | + # Ask about pushing |
| 60 | + echo "" |
| 61 | + echo "Next steps:" |
| 62 | + echo "1. Push to GitHub:" |
| 63 | + echo " git push" |
| 64 | + echo "" |
| 65 | + echo "2. Create and push a test tag:" |
| 66 | + echo " git tag v1.0.2" |
| 67 | + echo " git push origin v1.0.2" |
| 68 | + echo "" |
| 69 | + echo "3. Or manually trigger GitHub Action workflow" |
| 70 | + |
| 71 | +else |
| 72 | + print_warning "No uncommitted changes found. All files are already committed." |
| 73 | + |
| 74 | + # Show current status |
| 75 | + print_status "Current git status:" |
| 76 | + git status --porcelain |
| 77 | +fi |
| 78 | + |
| 79 | +print_status "Summary of fixes applied:" |
| 80 | +echo "✅ Removed python3-venv dependency (not available in CentOS Stream 9)" |
| 81 | +echo "✅ Added python3-devel dependency (provides development headers)" |
| 82 | +echo "✅ Fixed changelog date generation in GitHub Action" |
| 83 | +echo "✅ Updated documentation and troubleshooting guide" |
| 84 | +echo "" |
| 85 | +print_success "Ready to test the build process!" |
0 commit comments