Patches
|
Definition
What is a patch? A patch is a change to an Ubuntu package that will resolve a bug report. These include but are not necessarily limited to:
- changes to the packaging of an Ubuntu package
- changes to the source code included in an Ubuntu package
These changes can come in various different formats:
- a diff - text file of differences between the original file and changed file
diff -Nurp ciso-1.0.0/ciso.c ciso-1.0.0-fixed/ciso.c --- ciso-1.0.0/ciso.c 2006-11-03 12:53:29.000000000 -0800 +++ ciso-1.0.0-fixed/ciso.c 2008-11-27 10:09:19.000000000 -0800 @@ -22,6 +22,7 @@ #include <stdio.h> #include <stdlib.h> +#include <stdint.h> #include <zlib.h> /* /usr(/local)/include/zlib.h */ #include <zconf.h> diff -Nurp ciso-1.0.0/ciso.h ciso-1.0.0-fixed/ciso.h --- ciso-1.0.0/ciso.h 2006-11-03 12:53:02.000000000 -0800 +++ ciso-1.0.0-fixed/ciso.h 2008-11-27 13:32:01.000000000 -0800 @@ -28,9 +28,9 @@ typedef struct ciso_header { unsigned char magic[4]; /* +00 : 'C','I','S','O' */ - unsigned long header_size; /* +04 : header size (==0x18) */ + uint32_t header_size; /* +04 : header size (==0x18) */ unsigned long long total_bytes; /* +08 : number of original data size */ - unsigned long block_size; /* +10 : number of compressed block size */ + uint32_t block_size; /* +10 : number of compressed block size */ unsigned char ver; /* +14 : version 01 */ unsigned char align; /* +15 : align of index value */ unsigned char rsv_06[2]; /* +16 : reserved */
- a debdiff - text file of differences between two Ubuntu package versions
- Example
- image files - in the event a package is missing a menu icon
Process
How do patches end up in Ubuntu packages? Lets look at the process in reverse, from the actually upload to a patch being added to a pbug report.
The last step for a bug report with a patch to be fixed is for it to be sponsored to the appropriate archive
There are two sponsorship queues one for packages in the main and restricted repositories and one for packages in the universe and multiverse repositories
- Bug reports end up in the sponsorship queue by having the appropriate team subscribed (NOT assigned) to the bug report - ubuntu-main-sponsors or ubuntu-universe-sponsors
- Can only bugs with debdiffs have the sponsor teams subscribed?
- Before being sponsored bug reports should be identified as having patches or not