# Developing system-wide Debian packages ## Create build environment ```shell localcowbuilder-create jessie ``` ## Refresh build environment ```shell localcowbuilder-update jessie ``` ## Build package Minimal steps involved in building a new package: Refresh copyright file: ```shell debian/copyright-check ``` Resolve changelog from git commits: ```shell gbp dch -a ``` Finalize changelog (manually merge/drop items to reflect only product): ```shell dch -r ``` Build in clean chroot and tag as final: ```shell localgitcowdebuild sid --git-tag ``` Compare built binaries against previous ones (replacing `%f` and `%D/%F` with paths to old and new packages, respectively): ```shell debdiff --controlfiles ALL --wl %f %D/%F | less ``` Check lintian warnings/errors: ```shell lintian *.changes ``` Rebuild source-only package (to save bandwidth uploading, and for official rebuild): ```shell localgitcowdebuild sid -S ``` Sign and upload: ```shell debsign %f && dput %f ``` ## Backport package for main architecture ```shell localcowdebuild jessie -sa ``` ## Backport package for secondary architecture ```shell localcowdebuild jessie-ia32 -b ```