- Exclude all svc* services from sources package - Align packaging with Release 2 scope (AP3, AP4, AP9 only) - Services not required for Release 2 functionality Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Entire-Checkpoint: 01M7A1KYKYYWE1P633PY1X6EPH
106 lines
3.2 KiB
Markdown
106 lines
3.2 KiB
Markdown
# Release 2a DEB Packaging Filter - Manual Application Required
|
|
|
|
## Issue
|
|
The file `rpmbuild/make_rpm_ubuntu26_release2.py` is owned by root and requires sudo to modify.
|
|
|
|
## Required Changes
|
|
Add Release 2a scope filtering to exclude:
|
|
- All svc* service directories (Release 2b scope)
|
|
- Test executable directories (*Tests)
|
|
- LtsElevation module (depends on excluded AssetManagement)
|
|
- AssetManagement plugin
|
|
|
|
## Option 1: Apply Patch (Recommended)
|
|
|
|
```bash
|
|
cd /home/torsten/sandbox/qt6-migration-pipeline/qt-migration-legatus/qt6-after/qt6-migrated-legatus
|
|
sudo patch -p1 < /tmp/make_rpm_ubuntu26_release2.patch
|
|
```
|
|
|
|
## Option 2: Manual Edit
|
|
|
|
Edit `rpmbuild/make_rpm_ubuntu26_release2.py` with sudo:
|
|
|
|
### Step 1: Add filter function after imports (after line 30)
|
|
|
|
```python
|
|
def is_release2a_scope(filepath):
|
|
"""Check if file/directory is outside Release 2a scope (libraries only)
|
|
|
|
Release 2a scope: 18 library targets (no services, no test executables)
|
|
Returns True to EXCLUDE, False to INCLUDE
|
|
|
|
Excluded:
|
|
- All svc* service directories
|
|
- Test executable directories (*Tests)
|
|
- LtsElevation (depends on excluded AssetManagement)
|
|
- AssetManagement plugin
|
|
"""
|
|
filepath_str = str(filepath)
|
|
|
|
# Exclude svc* services (Release 2b scope)
|
|
if '/svc' in filepath_str.lower():
|
|
return True
|
|
|
|
# Exclude test executables (Release 2a is libraries only)
|
|
test_patterns = ['Tests/', 'Tests\\', '_Tests/', '_Tests\\']
|
|
for pattern in test_patterns:
|
|
if pattern in filepath_str:
|
|
return True
|
|
|
|
# Exclude LtsElevation (depends on excluded AssetManagement)
|
|
if 'LtsElevation' in filepath_str:
|
|
return True
|
|
|
|
# Exclude AssetManagement plugin
|
|
if 'AssetManagement' in filepath_str:
|
|
return True
|
|
|
|
return False
|
|
```
|
|
|
|
### Step 2: Update 3 copy_src_dir_to_dest_dir calls
|
|
|
|
**Line ~625** (Package 2 - qt6-release-sources):
|
|
```python
|
|
# OLD:
|
|
copy_src_dir_to_dest_dir(source_dir, pkg2_dir, release_scope=False, release_dirs=release_dirs)
|
|
|
|
# NEW:
|
|
copy_src_dir_to_dest_dir(source_dir, pkg2_dir, release_scope=False, release_dirs=release_dirs, file_filter=is_release2a_scope)
|
|
```
|
|
|
|
**Line ~668** (Package 3 - qt6-release-ctest-runtime):
|
|
```python
|
|
# OLD:
|
|
copy_src_dir_to_dest_dir(source_dir, pkg3_dir, release_scope=False, release_dirs=release_dirs)
|
|
|
|
# NEW:
|
|
copy_src_dir_to_dest_dir(source_dir, pkg3_dir, release_scope=False, release_dirs=release_dirs, file_filter=is_release2a_scope)
|
|
```
|
|
|
|
**Line ~718** (Package 4 - qt6-release-ctest-sources):
|
|
```python
|
|
# OLD:
|
|
copy_src_dir_to_dest_dir(source_dir, pkg4_dir, release_scope=False, release_dirs=release_dirs)
|
|
|
|
# NEW:
|
|
copy_src_dir_to_dest_dir(source_dir, pkg4_dir, release_scope=False, release_dirs=release_dirs, file_filter=is_release2a_scope)
|
|
```
|
|
|
|
## After Applying Changes
|
|
|
|
Run validation build with DEB packaging:
|
|
|
|
```bash
|
|
cd /home/torsten/sandbox/qt6-migration-pipeline/qt-migration-legatus/qt6-after/qt6-migrated-legatus
|
|
./new_docker_build_release2.sh --group1 --group3 --group5 --group6 --build-type Release --deb-package
|
|
```
|
|
|
|
## Verification
|
|
|
|
After build completes, verify DEB packages contain only Release 2a scope files:
|
|
- No svc* directories
|
|
- No *Tests directories (except test framework files)
|
|
- No LtsElevation
|
|
- No AssetManagement |