ApplyingDebianSpecificPatchesToNewUpstreamTarballs - crowlogic/arb4j GitHub Wiki

Applying Debian-specific patches to a new upstream tarball

Follow the steps below to apply Debian-specific patches to a new upstream source code release:

  1. Prepare the Environment

    sudo apt-get install devscripts dpkg-dev build-essential
    
  2. Get the existing Debian source package

    apt source package-name
    

    Replace package-name with the actual name of your package. This will download the Debian source package to your current directory.

  3. Download the New Upstream Tarball

    Download the new version of the upstream source code that you want to package.

  4. Extract the New Upstream Tarball and Apply the Debian Changes

    dpkg-source -x package-name_version.dsc
    

    Replace package-name_version.dsc with the .dsc file that was downloaded with apt source.

  5. Replace the Upstream Source Replace the package-name-version.orig.tar.gz file (or equivalent) with the new upstream tarball. Make sure to rename the new tarball to match the original .orig.tar.gz filename.

  6. Apply the Debian Changes

    dpkg-source --before-build package-name-version
    

    Replace package-name-version with the appropriate directory name.

  7. Update the debian/changelog

    cd package-name-version/
    dch -v new_version-1 "New upstream release"
    

    Replace new_version with the version number of the new upstream release.

  8. Apply the Patches

    quilt push -a
    

    Note: This might fail if the new version has significant changes that make the patches incompatible. You might need to update the patches manually in that case.

  9. Build the Package

    dpkg-buildpackage -us -uc
    

    This will create a .deb package file that you can install using dpkg -i.

Please note that these instructions might not apply perfectly to every package, as the Debian package maintainer might have a particular way of applying patches or other unique packaging practices. Always be sure to check any available documentation or reach out to the package maintainer or the Debian community for help if you're unsure.