QEMU Debian Build Process (Upstream Merge + Debian Packaging Workflow)
1. Import New Upstream Version
Step 1 – Run Debian Clean Script
./get-orig-source.sh
This script prepares the cleaned upstream source suitable for Debian packaging.
Create a New Upstream Tag
git tag upstream-6.2+dfsg
Make sure the tag reflects the cleaned (dfsg) version.
2. Create a Feature Branch from Main
Ensure you are on the correct and latest base branch:
git checkout l4tm/catapult
git pull
Create a new branch for the upstream merge:
git checkout -b l4tm/catapult+upstream/6.2
3. Merge Upstream Tag
git merge upstream-6.2+dfsg
Expect merge conflicts.
Use:
git mergetool
Carefully review each conflict and verify correctness. Never blindly accept either side.
4. Update Debian Patches Using Quilt
Process all patches listed in:
debian/patches/series
Apply patches sequentially:
quilt push -a
For each patch:
- If already merged upstream → remove it
- If partially merged → refresh or adjust
- If obsolete → delete patch
Remove obsolete patches properly:
quilt delete patchname.patch
git rm debian/patches/patchname.patch
5. Create Debian Packaging Branch
After upstream merge and patch cleanup:
git checkout -b l4tm/catapult+debian/2.5+dfsg-1
6. Merge Debian Tag
git merge debian/qemu_2.5+dfsg-1
Repeat conflict resolution and quilt update process if necessary.
7. Create Release Tag
Generate timestamp if needed:
date +%s
Create tag with distribution metadata:
git tag -m "distribution=cattleprod" b-01082016
8. Push Branch and Tag
git push origin l4tm/catapult+upstream/6.2
git push origin l4tm/catapult+debian/2.5+dfsg-1
git push origin b-01082016
9. Generate Debian Package
ghgbpsb git@hlinux-gitlab.us.rdlabs.hpecorp.net:userspace/qemu.git b-01082016
This builds the QEMU Debian package using the specified tag.
10. Test the Generated Packages
- Install locally
- Run regression tests
- Verify version correctness
- Validate functionality
11. Submit Merge Request
If validation passes:
- Create Merge Request
- Address review comments
12. Upload to Incoming Repository
After MR approval:
- Upload to incoming repository
- Notify repository team
Build Environment Notes
Using schroot
schroot -l
schroot -u root -c catapult-amd64-http://hlinux-deejay.us.rdlabs.hpecorp.net/l4tm-sbuild
Optional prompt customization:
export PS1='% '
Changelog Management
Generate correct date format:
date -R
Update changelog:
dch -n "Your comment here"
Build Package Manually
ghgbpsb git@github.hpe.com:hpelinux/qemu.git b-1466615184
Upload package:
dput -o hpelinux qemu_2.6+dfsg-3+hpelinux2_amd64.changes
Generate debian/control from control.in
make -f debian/rules debian/control
This generates the control file from control-in.
Summary
This workflow covers:
- Upstream version import
- Debian patch management (quilt)
- Branching and tagging strategy
- Package build and validation
- Repository submission process
Maintaining QEMU at this level requires careful merge discipline, accurate patch tracking, and consistent tagging practices.