Skip to content
Christian Fetzer edited this page Aug 26, 2025 · 3 revisions

Notes about (DKMS) packaging

GitHub Pull requests

Steps to merge a pull request locally (allows to modify the commit(s) and update the debian/changelog) file:

  • Open pull request page on GitHub
  • Click on view command line instructions
  • Manually edit the merge commit so that it looks similar to GitHub merge commits

Building a package and uploading it to the Launchpad PPA

Notes about the kernel patches

Merge strategy

All patches in this repository should be upstreamable. Hence the work is typically done in patchset branches (such as i2c_patchset_v4). When merging to master, this requires a not straight forward merge strategy (the new patchset version shall always completely override the previous one.

The selected strategy is Strategy #2 from this stackoverflow post:

git checkout -b tmp patchset_vXX
git merge -s ours master                          # ignore all changes from master
git checkout master
git merge --squash tmp                            # apply changes from tmp, don't merge
# reset & checkout unneeded changes 
git rev-parse patchset_vXX > .git/MERGE_HEAD      # record upstream 2nd merge head
git commit -m "i2c: Merge branch 'patchset_vXX'"
git branch -D tmp

Sending patches to the mailing list

Patches have to be sent in-tree from the upstream Linux project.

git format-patch -n3 --subject-prefix="PATCH vXX" --cover-letter
checkpatch.pl 000* --no-tree
git send-email --to linux-i2c@vger.kernel.org .