4 ms·
# Get the source apt-get source $package # Copy the patch in cp my_patch.diff $package-$version/debian/patches echo "my_patch.diff" >> $package
by kiallmacinnes 14y ago
# Get the source
apt-get source $package
# Copy the patch in
cp my_patch.diff $package-$version/debian/patches
echo "my_patch.diff" >> $package-$version/debian/series
# Build the package
dpkg-buildpackage -us -uc
# Install the newly built package
dpkg -i package.deb
- ambrop7 14y agoSure. But: - How do I make sure any other systems I own also get the patched version? (Gentoo: set up an overlay and commit the fixed package) - How do I get notified when the package was updated upstream and my patch is no longer being applied? (Gentoo: emerge tells you when a new package is being installed from a different repository than the currently installed package) You're probably going to say I should use a PPA, but not everyone is comfortable with signing up for a proprietary service and accepting their TOS. And setting up a PPA is way more complicated than maintaining a portage overlay in some VCS. And of course I have to submit a new package whenever a new version of Ubuntu comes out.