dh_ucf - Linux


Overview

dh_ucf merges Debian patches with the upstream source to create a pristine quilt series. It combines the benefits of quilt patches with the ease of handling of Debian patches.

Syntax

dh_ucf [options] [<debfiles>]

Options/Flags

  • -i, –ignore-clean: Ignore the clean command in quilt patches.
  • -n, –ignore-new: Ignore new files which are not in debian’s source package.
  • –no-distinct: Continue to treat all patches as distinct even if quilt identifies them as redundant.
  • -s, –synopsis: Summarize all changes in a single file named ‘debian/changelog.diff’.
  • -p, –patch: Merge Debian patches instead of their upstream counterparts.
  • -a, –amend: Amend merged Debian patches instead of creating new ones.
  • -c, –commit: Commit changes directly to the source tree without producing Debian patches.
  • -b, –basedir: Prepend the given directory to the path of Debian patches.
  • -e, –extension: Use the given extension for Debian patches.
  • –encoding: Set the encoding of the patch files.
  • -v, –verbose: Produces verbose output.
  • -h, –help: Displays help information.

Examples

  • Create Debian patches from upstream quilt patches:
    dh_ucf
    
  • Merge Debian patches into the upstream source:
    dh_ucf -p
    

Common Issues

  • Error: "patch: Can’t find file to patch at input line 1": Ensure that the Debian patch file contains valid instructions and references existing files.
  • Error: "patch: Hunk #1 succeeded at…": Check if the patch is still applicable to the current version of the source code.
  • Error: "dh_ucf: patch failed": Check for additional error messages in the patch file or the build log.

Integration

dh_ucf can be used in conjunction with other tools such as quilt or git-import-db.

  • Quilt: Use quilt to manage and apply patches. dh_ucf can be used to convert quilt patches to Debian patches.
  • Git-import-db: Use git-import-db to import Debian patches into a Git repository. dh_ucf can be used to prepare the Debian patches for import.

Related Commands

  • quilt
  • git-import-db
  • dpkg-source
  • debmake