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:
-
Prepare the Environment
sudo apt-get install devscripts dpkg-dev build-essential
-
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. -
Download the New Upstream Tarball
Download the new version of the upstream source code that you want to package.
-
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 withapt source
. -
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. -
Apply the Debian Changes
dpkg-source --before-build package-name-version
Replace
package-name-version
with the appropriate directory name. -
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. -
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.
-
Build the Package
dpkg-buildpackage -us -uc
This will create a
.deb
package file that you can install usingdpkg -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.