How to create OpenAFS Debian 10 packages with patches. Ensure your system is up to date -------------------------------- $ sudo apt-get update $ sudo apt-get upgrade Install required packages ------------------------- $ sudo apt-get install build-essential fakeroot devscripts lintian $ sudo apt-get build-dep openafs Get the OpenAFS Debian 10 source -------------------------------- $ cd $HOME $ mkdir -p Debian/openafs $ cd Debian/openafs $ apt-get source openafs Get patches ----------- Patches can be generated with `git format-patch` if you have a local git repo. Patches on gerrit may be downloaded via git or https. For example, to download a patch from gerrit with git: $ cd $HOME $ git clone git://git.openafs.org/openafs.git $ cd openafs $ git fetch https://gerrit.openafs.org/openafs refs/changes/$x/$y/$z && \ git format-patch -1 -o FETCH_HEAD where: y = gerrit number x = last 2 digits of the gerrit number z = patchset number Add patches ----------- Copy patch files to the `debian/patches` directory. $ cp $patch $HOME/Debian/openafs/openafs-1.8.2/debian/patches Add the patches to the `series` file in `debian/patches`. $ echo $patch >> $HOME/Debian/openafs/openafs-1.8.2/debian/patches/series Update the changelog -------------------- Add a new entry at the top of the changelog file with the `debchange` tool. The format must be exact. $ cd $HOME/Debian/openafs/openafs-1.8.2/debian $ debchange -i Create packages --------------- Build the packages with the `debuild` tool. $ cd $HOME/Debian/openafs/openafs-1.8.2 $ debuild -us -uc The resulting `.deb` package files will be placed in $HOME/Debian/openafs