How to merge manually¶
In case the regular git-ubuntu
-based Merge process fails, follow these instructions to perform the merge manually.
Merging series
The article series provides guidance on performing package merges.
- Process overview:
Generate the merge branch¶
Create a branch to do the merge work in:
$ git checkout -b merge-lp1802914-disco
Start a rebase¶
$ git rebase -i old/debian
Clear any history, up to and including the last Debian version¶
Clear any history, up to and including the last Debian version. If the package hasn’t been updated since the Git repository structure changed, it grabs all changes throughout time rather than since the last Debian version. Delete the older lines from the interactive rebase.
In this case, up to, and including the import of 3.1.20-3.1
.
Create reconstruct tag¶
$ git ubuntu tag --reconstruct
Next step: Split commits.
Create logical tag manually¶
Use the version number of the last ubuntu change. So, if there are:
3.1.20-3.1ubuntu1
3.1.20-3.1ubuntu2
3.1.20-3.1ubuntu2
Run:
$ git tag -a -m "Logical delta of 3.1.20-3.1ubuntu2" logical/3.1.20-3.1ubuntu2
Note
Certain characters aren’t allowed in Git. For example, replace colons (:
) with percentage signs (%
).
Next step: Rebase onto new Debian.
Finish the merge manually¶
Merge the changelogs of old Ubuntu and new Debian:
$ git show new/debian:debian/changelog > /tmp/debnew.txt $ git show old/ubuntu:debian/changelog > /tmp/ubuntuold.txt $ merge-changelog /tmp/debnew.txt /tmp/ubuntuold.txt > debian/changelog $ git commit -m "Merge changelogs" debian/changelog
Create a new changelog entry for the merge:
$ dch -i
Which creates, for example:
at (3.1.23-1ubuntu1) disco; urgency=medium * Merge with Debian unstable (LP: #1802914). Remaining changes: - Suggest an MTA rather than Recommending one. -- Karl Stenerud <[email protected]> Mon, 12 Nov 2018 18:11:53 +0100
Commit the changelog:
$ git commit -m "changelog: Merge of 3.1.23-1" debian/changelog
Update maintainer:
$ update-maintainer $ git commit -m "Update maintainer" debian/control
Next step: Fix the changelog
Get the orig tarball manually¶
Use the pristine-tar(1) tool to regenerate the orig (upstream) tarball:
Create a new branch for the orig tarball:
$ git checkout -b pkg/importer/debian/pristine-tar
Regenerate the pristine tarball:
$ pristine-tar checkout at_3.1.23.orig.tar.gz
Switch to the merge branch:
$ git checkout merge-3.1.23-1-disco
TODO: Is this ^ branch name correct?
If git checkout also fails¶
$ git checkout merge-lp1802914-disco
$ cd /tmp
$ pull-debian-source at
$ mv at_3.1.23.orig.tar.gz{,.asc} ~/work/packages/ubuntu/
$ cd -
TODO: This step needs context/explanation.
Next step: Check the source for errors.
Submit merge proposal manually¶
$ git push kstenerud merge-lp1802914-disco
Then create a MP manually in Launchpad, and save the URL.
Next step: Update the merge proposal.