Today I'm preparing a patch to fix Launchpad Bug #117984, which is also Gnome Bug #451734.
References: Ubuntu Wiki, Ubuntu Packaging Guide
It turns out that to do it properly, you need to make two patches. The first one is a .diff file for Debian and upstream. The second creates a .debdiff patch for Ubuntu.
There are circumstances, of course, where one of the patches is not neccessary, and some of these steps can be skipped.
- Note: Use steps 1-9 & 14-15 for just an upstream (.diff) patch. Use steps 1-4,5-7,11-13 & 15 for just an Ubuntu (.debdiff) patch.
 - Open a terminal window
 - Create a working directory with the command 
mkdir working - Move to the working directory with the command 
cd working - Download the latest source package using the command 
apt-get source packagename. This method automatically appends an '.orig' suffix, and unpacks the file, too. DON'T download the source from packages.ubuntu.com; instead ADD the repos to your Software Sources control panel using the instructions at the Ubuntu Wiki - Make a copy of the unpacked folder with 
cp -r package-folder package-folder-orig - Go into the unpacked folder (not the orig) with 
cd package-folder. - Edit the file using 
nano path/to/file/to/fix. Fix the file - Return to the working directory with 
cd .. - Use 
diff -Nurp package-folder-orig package-folder > upstream-bug#.diffto create the upstream patch. - Go back into the unpacked folder (not the orig) with 
cd package-folder. - Use the command 
dch -ito update the changelog. Show the change and list the bug# fixed. - Use 
debuild -S -us -ucto create the debdiff patch. - Attach the .debdiff patch to the bug in Launchpad.
 - Attach the upstream .diff patch to the Launchpad bug AND the upstream bug.
 - Delete the working directory, and all contents.
 
No comments:
Post a Comment